go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/milo/ui/src/proto/google/protobuf/empty.pb.ts (about)

     1  /* eslint-disable */
     2  import _m0 from "protobufjs/minimal";
     3  
     4  export const protobufPackage = "google.protobuf";
     5  
     6  /**
     7   * A generic empty message that you can re-use to avoid defining duplicated
     8   * empty messages in your APIs. A typical example is to use it as the request
     9   * or the response type of an API method. For instance:
    10   *
    11   *     service Foo {
    12   *       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
    13   *     }
    14   */
    15  export interface Empty {
    16  }
    17  
    18  function createBaseEmpty(): Empty {
    19    return {};
    20  }
    21  
    22  export const Empty = {
    23    encode(_: Empty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
    24      return writer;
    25    },
    26  
    27    decode(input: _m0.Reader | Uint8Array, length?: number): Empty {
    28      const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
    29      let end = length === undefined ? reader.len : reader.pos + length;
    30      const message = createBaseEmpty() as any;
    31      while (reader.pos < end) {
    32        const tag = reader.uint32();
    33        switch (tag >>> 3) {
    34        }
    35        if ((tag & 7) === 4 || tag === 0) {
    36          break;
    37        }
    38        reader.skipType(tag & 7);
    39      }
    40      return message;
    41    },
    42  
    43    fromJSON(_: any): Empty {
    44      return {};
    45    },
    46  
    47    toJSON(_: Empty): unknown {
    48      const obj: any = {};
    49      return obj;
    50    },
    51  
    52    create<I extends Exact<DeepPartial<Empty>, I>>(base?: I): Empty {
    53      return Empty.fromPartial(base ?? ({} as any));
    54    },
    55    fromPartial<I extends Exact<DeepPartial<Empty>, I>>(_: I): Empty {
    56      const message = createBaseEmpty() as any;
    57      return message;
    58    },
    59  };
    60  
    61  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
    62  
    63  export type DeepPartial<T> = T extends Builtin ? T
    64    : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
    65    : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
    66    : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
    67    : Partial<T>;
    68  
    69  type KeysOfUnion<T> = T extends T ? keyof T : never;
    70  export type Exact<P, I extends P> = P extends Builtin ? P
    71    : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };