fixed imports
This commit is contained in:
201
lib/esm/hermesclient/google/protobuf/struct.d.ts
vendored
201
lib/esm/hermesclient/google/protobuf/struct.d.ts
vendored
@@ -1,201 +0,0 @@
|
||||
import * as _m0 from "protobufjs/minimal";
|
||||
export declare const protobufPackage = "google.protobuf";
|
||||
/**
|
||||
* `NullValue` is a singleton enumeration to represent the null value for the
|
||||
* `Value` type union.
|
||||
*
|
||||
* The JSON representation for `NullValue` is JSON `null`.
|
||||
*/
|
||||
export declare enum NullValue {
|
||||
/** NULL_VALUE - Null value. */
|
||||
NULL_VALUE = 0,
|
||||
UNRECOGNIZED = -1
|
||||
}
|
||||
export declare function nullValueFromJSON(object: any): NullValue;
|
||||
export declare function nullValueToJSON(object: NullValue): string;
|
||||
/**
|
||||
* `Struct` represents a structured data value, consisting of fields
|
||||
* which map to dynamically typed values. In some languages, `Struct`
|
||||
* might be supported by a native representation. For example, in
|
||||
* scripting languages like JS a struct is represented as an
|
||||
* object. The details of that representation are described together
|
||||
* with the proto support for the language.
|
||||
*
|
||||
* The JSON representation for `Struct` is JSON object.
|
||||
*/
|
||||
export interface Struct {
|
||||
/** Unordered map of dynamically typed values. */
|
||||
fields: {
|
||||
[key: string]: any | undefined;
|
||||
};
|
||||
}
|
||||
export interface Struct_FieldsEntry {
|
||||
key: string;
|
||||
value: any | undefined;
|
||||
}
|
||||
/**
|
||||
* `Value` represents a dynamically typed value which can be either
|
||||
* null, a number, a string, a boolean, a recursive struct value, or a
|
||||
* list of values. A producer of value is expected to set one of these
|
||||
* variants. Absence of any variant indicates an error.
|
||||
*
|
||||
* The JSON representation for `Value` is JSON value.
|
||||
*/
|
||||
export interface Value {
|
||||
/** Represents a null value. */
|
||||
nullValue?: NullValue | undefined;
|
||||
/** Represents a double value. */
|
||||
numberValue?: number | undefined;
|
||||
/** Represents a string value. */
|
||||
stringValue?: string | undefined;
|
||||
/** Represents a boolean value. */
|
||||
boolValue?: boolean | undefined;
|
||||
/** Represents a structured value. */
|
||||
structValue?: {
|
||||
[key: string]: any;
|
||||
} | undefined;
|
||||
/** Represents a repeated `Value`. */
|
||||
listValue?: Array<any> | undefined;
|
||||
}
|
||||
/**
|
||||
* `ListValue` is a wrapper around a repeated field of values.
|
||||
*
|
||||
* The JSON representation for `ListValue` is JSON array.
|
||||
*/
|
||||
export interface ListValue {
|
||||
/** Repeated field of dynamically typed values. */
|
||||
values: any[];
|
||||
}
|
||||
export declare const Struct: {
|
||||
encode(message: Struct, writer?: _m0.Writer): _m0.Writer;
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): Struct;
|
||||
fromJSON(object: any): Struct;
|
||||
toJSON(message: Struct): unknown;
|
||||
create<I extends {
|
||||
fields?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
} & {
|
||||
fields?: ({
|
||||
[x: string]: any;
|
||||
} & {
|
||||
[x: string]: any;
|
||||
} & { [K in Exclude<keyof I["fields"], string | number>]: never; }) | undefined;
|
||||
} & { [K_1 in Exclude<keyof I, "fields">]: never; }>(base?: I): Struct;
|
||||
fromPartial<I_1 extends {
|
||||
fields?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
} & {
|
||||
fields?: ({
|
||||
[x: string]: any;
|
||||
} & {
|
||||
[x: string]: any;
|
||||
} & { [K_2 in Exclude<keyof I_1["fields"], string | number>]: never; }) | undefined;
|
||||
} & { [K_3 in Exclude<keyof I_1, "fields">]: never; }>(object: I_1): Struct;
|
||||
wrap(object: {
|
||||
[key: string]: any;
|
||||
} | undefined): Struct;
|
||||
unwrap(message: Struct): {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
export declare const Struct_FieldsEntry: {
|
||||
encode(message: Struct_FieldsEntry, writer?: _m0.Writer): _m0.Writer;
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry;
|
||||
fromJSON(object: any): Struct_FieldsEntry;
|
||||
toJSON(message: Struct_FieldsEntry): unknown;
|
||||
create<I extends {
|
||||
key?: string | undefined;
|
||||
value?: any | undefined;
|
||||
} & {
|
||||
key?: string | undefined;
|
||||
value?: any | undefined;
|
||||
} & { [K in Exclude<keyof I, keyof Struct_FieldsEntry>]: never; }>(base?: I): Struct_FieldsEntry;
|
||||
fromPartial<I_1 extends {
|
||||
key?: string | undefined;
|
||||
value?: any | undefined;
|
||||
} & {
|
||||
key?: string | undefined;
|
||||
value?: any | undefined;
|
||||
} & { [K_1 in Exclude<keyof I_1, keyof Struct_FieldsEntry>]: never; }>(object: I_1): Struct_FieldsEntry;
|
||||
};
|
||||
export declare const Value: {
|
||||
encode(message: Value, writer?: _m0.Writer): _m0.Writer;
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): Value;
|
||||
fromJSON(object: any): Value;
|
||||
toJSON(message: Value): unknown;
|
||||
create<I extends {
|
||||
nullValue?: NullValue | undefined;
|
||||
numberValue?: number | undefined;
|
||||
stringValue?: string | undefined;
|
||||
boolValue?: boolean | undefined;
|
||||
structValue?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
listValue?: any[] | undefined;
|
||||
} & {
|
||||
nullValue?: NullValue | undefined;
|
||||
numberValue?: number | undefined;
|
||||
stringValue?: string | undefined;
|
||||
boolValue?: boolean | undefined;
|
||||
structValue?: ({
|
||||
[x: string]: any;
|
||||
} & {
|
||||
[x: string]: any;
|
||||
} & { [K in Exclude<keyof I["structValue"], string | number>]: never; }) | undefined;
|
||||
listValue?: (any[] & any[] & { [K_1 in Exclude<keyof I["listValue"], keyof any[]>]: never; }) | undefined;
|
||||
} & { [K_2 in Exclude<keyof I, keyof Value>]: never; }>(base?: I): Value;
|
||||
fromPartial<I_1 extends {
|
||||
nullValue?: NullValue | undefined;
|
||||
numberValue?: number | undefined;
|
||||
stringValue?: string | undefined;
|
||||
boolValue?: boolean | undefined;
|
||||
structValue?: {
|
||||
[x: string]: any;
|
||||
} | undefined;
|
||||
listValue?: any[] | undefined;
|
||||
} & {
|
||||
nullValue?: NullValue | undefined;
|
||||
numberValue?: number | undefined;
|
||||
stringValue?: string | undefined;
|
||||
boolValue?: boolean | undefined;
|
||||
structValue?: ({
|
||||
[x: string]: any;
|
||||
} & {
|
||||
[x: string]: any;
|
||||
} & { [K_3 in Exclude<keyof I_1["structValue"], string | number>]: never; }) | undefined;
|
||||
listValue?: (any[] & any[] & { [K_4 in Exclude<keyof I_1["listValue"], keyof any[]>]: never; }) | undefined;
|
||||
} & { [K_5 in Exclude<keyof I_1, keyof Value>]: never; }>(object: I_1): Value;
|
||||
wrap(value: any): Value;
|
||||
unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
|
||||
};
|
||||
export declare const ListValue: {
|
||||
encode(message: ListValue, writer?: _m0.Writer): _m0.Writer;
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): ListValue;
|
||||
fromJSON(object: any): ListValue;
|
||||
toJSON(message: ListValue): unknown;
|
||||
create<I extends {
|
||||
values?: any[] | undefined;
|
||||
} & {
|
||||
values?: (any[] & any[] & { [K in Exclude<keyof I["values"], keyof any[]>]: never; }) | undefined;
|
||||
} & { [K_1 in Exclude<keyof I, "values">]: never; }>(base?: I): ListValue;
|
||||
fromPartial<I_1 extends {
|
||||
values?: any[] | undefined;
|
||||
} & {
|
||||
values?: (any[] & any[] & { [K_2 in Exclude<keyof I_1["values"], keyof any[]>]: never; }) | undefined;
|
||||
} & { [K_3 in Exclude<keyof I_1, "values">]: never; }>(object: I_1): ListValue;
|
||||
wrap(array: Array<any> | undefined): ListValue;
|
||||
unwrap(message: ListValue): Array<any>;
|
||||
};
|
||||
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
||||
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
||||
[K in keyof T]?: DeepPartial<T[K]>;
|
||||
} : Partial<T>;
|
||||
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
||||
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
||||
[K in keyof P]: Exact<P[K], I[K]>;
|
||||
} & {
|
||||
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
||||
};
|
||||
export {};
|
||||
@@ -1,441 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import * as _m0 from "protobufjs/minimal";
|
||||
export const protobufPackage = "google.protobuf";
|
||||
/**
|
||||
* `NullValue` is a singleton enumeration to represent the null value for the
|
||||
* `Value` type union.
|
||||
*
|
||||
* The JSON representation for `NullValue` is JSON `null`.
|
||||
*/
|
||||
export var NullValue;
|
||||
(function (NullValue) {
|
||||
/** NULL_VALUE - Null value. */
|
||||
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
|
||||
NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
||||
})(NullValue || (NullValue = {}));
|
||||
export function nullValueFromJSON(object) {
|
||||
switch (object) {
|
||||
case 0:
|
||||
case "NULL_VALUE":
|
||||
return NullValue.NULL_VALUE;
|
||||
case -1:
|
||||
case "UNRECOGNIZED":
|
||||
default:
|
||||
return NullValue.UNRECOGNIZED;
|
||||
}
|
||||
}
|
||||
export function nullValueToJSON(object) {
|
||||
switch (object) {
|
||||
case NullValue.NULL_VALUE:
|
||||
return "NULL_VALUE";
|
||||
case NullValue.UNRECOGNIZED:
|
||||
default:
|
||||
return "UNRECOGNIZED";
|
||||
}
|
||||
}
|
||||
function createBaseStruct() {
|
||||
return { fields: {} };
|
||||
}
|
||||
export const Struct = {
|
||||
encode(message, writer = _m0.Writer.create()) {
|
||||
Object.entries(message.fields).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
});
|
||||
return writer;
|
||||
},
|
||||
decode(input, length) {
|
||||
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseStruct();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
|
||||
if (entry1.value !== undefined) {
|
||||
message.fields[entry1.key] = entry1.value;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skipType(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
fromJSON(object) {
|
||||
return {
|
||||
fields: isObject(object.fields)
|
||||
? Object.entries(object.fields).reduce((acc, [key, value]) => {
|
||||
acc[key] = value;
|
||||
return acc;
|
||||
}, {})
|
||||
: {},
|
||||
};
|
||||
},
|
||||
toJSON(message) {
|
||||
const obj = {};
|
||||
if (message.fields) {
|
||||
const entries = Object.entries(message.fields);
|
||||
if (entries.length > 0) {
|
||||
obj.fields = {};
|
||||
entries.forEach(([k, v]) => {
|
||||
obj.fields[k] = v;
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
create(base) {
|
||||
return Struct.fromPartial(base !== null && base !== void 0 ? base : {});
|
||||
},
|
||||
fromPartial(object) {
|
||||
var _a;
|
||||
const message = createBaseStruct();
|
||||
message.fields = Object.entries((_a = object.fields) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
||||
if (value !== undefined) {
|
||||
acc[key] = value;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
return message;
|
||||
},
|
||||
wrap(object) {
|
||||
const struct = createBaseStruct();
|
||||
if (object !== undefined) {
|
||||
Object.keys(object).forEach((key) => {
|
||||
struct.fields[key] = object[key];
|
||||
});
|
||||
}
|
||||
return struct;
|
||||
},
|
||||
unwrap(message) {
|
||||
const object = {};
|
||||
if (message.fields) {
|
||||
Object.keys(message.fields).forEach((key) => {
|
||||
object[key] = message.fields[key];
|
||||
});
|
||||
}
|
||||
return object;
|
||||
},
|
||||
};
|
||||
function createBaseStruct_FieldsEntry() {
|
||||
return { key: "", value: undefined };
|
||||
}
|
||||
export const Struct_FieldsEntry = {
|
||||
encode(message, writer = _m0.Writer.create()) {
|
||||
if (message.key !== "") {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
decode(input, length) {
|
||||
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseStruct_FieldsEntry();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
message.key = reader.string();
|
||||
continue;
|
||||
case 2:
|
||||
if (tag !== 18) {
|
||||
break;
|
||||
}
|
||||
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skipType(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
fromJSON(object) {
|
||||
return {
|
||||
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
||||
value: isSet(object === null || object === void 0 ? void 0 : object.value) ? object.value : undefined,
|
||||
};
|
||||
},
|
||||
toJSON(message) {
|
||||
const obj = {};
|
||||
if (message.key !== "") {
|
||||
obj.key = message.key;
|
||||
}
|
||||
if (message.value !== undefined) {
|
||||
obj.value = message.value;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
create(base) {
|
||||
return Struct_FieldsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
||||
},
|
||||
fromPartial(object) {
|
||||
var _a, _b;
|
||||
const message = createBaseStruct_FieldsEntry();
|
||||
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
||||
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : undefined;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
function createBaseValue() {
|
||||
return {
|
||||
nullValue: undefined,
|
||||
numberValue: undefined,
|
||||
stringValue: undefined,
|
||||
boolValue: undefined,
|
||||
structValue: undefined,
|
||||
listValue: undefined,
|
||||
};
|
||||
}
|
||||
export const Value = {
|
||||
encode(message, writer = _m0.Writer.create()) {
|
||||
if (message.nullValue !== undefined) {
|
||||
writer.uint32(8).int32(message.nullValue);
|
||||
}
|
||||
if (message.numberValue !== undefined) {
|
||||
writer.uint32(17).double(message.numberValue);
|
||||
}
|
||||
if (message.stringValue !== undefined) {
|
||||
writer.uint32(26).string(message.stringValue);
|
||||
}
|
||||
if (message.boolValue !== undefined) {
|
||||
writer.uint32(32).bool(message.boolValue);
|
||||
}
|
||||
if (message.structValue !== undefined) {
|
||||
Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
if (message.listValue !== undefined) {
|
||||
ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
decode(input, length) {
|
||||
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseValue();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
if (tag !== 8) {
|
||||
break;
|
||||
}
|
||||
message.nullValue = reader.int32();
|
||||
continue;
|
||||
case 2:
|
||||
if (tag !== 17) {
|
||||
break;
|
||||
}
|
||||
message.numberValue = reader.double();
|
||||
continue;
|
||||
case 3:
|
||||
if (tag !== 26) {
|
||||
break;
|
||||
}
|
||||
message.stringValue = reader.string();
|
||||
continue;
|
||||
case 4:
|
||||
if (tag !== 32) {
|
||||
break;
|
||||
}
|
||||
message.boolValue = reader.bool();
|
||||
continue;
|
||||
case 5:
|
||||
if (tag !== 42) {
|
||||
break;
|
||||
}
|
||||
message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
case 6:
|
||||
if (tag !== 50) {
|
||||
break;
|
||||
}
|
||||
message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
|
||||
continue;
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skipType(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
fromJSON(object) {
|
||||
return {
|
||||
nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined,
|
||||
numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : undefined,
|
||||
stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
|
||||
boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined,
|
||||
structValue: isObject(object.structValue) ? object.structValue : undefined,
|
||||
listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : undefined,
|
||||
};
|
||||
},
|
||||
toJSON(message) {
|
||||
const obj = {};
|
||||
if (message.nullValue !== undefined) {
|
||||
obj.nullValue = nullValueToJSON(message.nullValue);
|
||||
}
|
||||
if (message.numberValue !== undefined) {
|
||||
obj.numberValue = message.numberValue;
|
||||
}
|
||||
if (message.stringValue !== undefined) {
|
||||
obj.stringValue = message.stringValue;
|
||||
}
|
||||
if (message.boolValue !== undefined) {
|
||||
obj.boolValue = message.boolValue;
|
||||
}
|
||||
if (message.structValue !== undefined) {
|
||||
obj.structValue = message.structValue;
|
||||
}
|
||||
if (message.listValue !== undefined) {
|
||||
obj.listValue = message.listValue;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
create(base) {
|
||||
return Value.fromPartial(base !== null && base !== void 0 ? base : {});
|
||||
},
|
||||
fromPartial(object) {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
const message = createBaseValue();
|
||||
message.nullValue = (_a = object.nullValue) !== null && _a !== void 0 ? _a : undefined;
|
||||
message.numberValue = (_b = object.numberValue) !== null && _b !== void 0 ? _b : undefined;
|
||||
message.stringValue = (_c = object.stringValue) !== null && _c !== void 0 ? _c : undefined;
|
||||
message.boolValue = (_d = object.boolValue) !== null && _d !== void 0 ? _d : undefined;
|
||||
message.structValue = (_e = object.structValue) !== null && _e !== void 0 ? _e : undefined;
|
||||
message.listValue = (_f = object.listValue) !== null && _f !== void 0 ? _f : undefined;
|
||||
return message;
|
||||
},
|
||||
wrap(value) {
|
||||
const result = createBaseValue();
|
||||
if (value === null) {
|
||||
result.nullValue = NullValue.NULL_VALUE;
|
||||
}
|
||||
else if (typeof value === "boolean") {
|
||||
result.boolValue = value;
|
||||
}
|
||||
else if (typeof value === "number") {
|
||||
result.numberValue = value;
|
||||
}
|
||||
else if (typeof value === "string") {
|
||||
result.stringValue = value;
|
||||
}
|
||||
else if (globalThis.Array.isArray(value)) {
|
||||
result.listValue = value;
|
||||
}
|
||||
else if (typeof value === "object") {
|
||||
result.structValue = value;
|
||||
}
|
||||
else if (typeof value !== "undefined") {
|
||||
throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
unwrap(message) {
|
||||
if (message.stringValue !== undefined) {
|
||||
return message.stringValue;
|
||||
}
|
||||
else if ((message === null || message === void 0 ? void 0 : message.numberValue) !== undefined) {
|
||||
return message.numberValue;
|
||||
}
|
||||
else if ((message === null || message === void 0 ? void 0 : message.boolValue) !== undefined) {
|
||||
return message.boolValue;
|
||||
}
|
||||
else if ((message === null || message === void 0 ? void 0 : message.structValue) !== undefined) {
|
||||
return message.structValue;
|
||||
}
|
||||
else if ((message === null || message === void 0 ? void 0 : message.listValue) !== undefined) {
|
||||
return message.listValue;
|
||||
}
|
||||
else if ((message === null || message === void 0 ? void 0 : message.nullValue) !== undefined) {
|
||||
return null;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
function createBaseListValue() {
|
||||
return { values: [] };
|
||||
}
|
||||
export const ListValue = {
|
||||
encode(message, writer = _m0.Writer.create()) {
|
||||
for (const v of message.values) {
|
||||
Value.encode(Value.wrap(v), writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
decode(input, length) {
|
||||
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseListValue();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
case 1:
|
||||
if (tag !== 10) {
|
||||
break;
|
||||
}
|
||||
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
||||
continue;
|
||||
}
|
||||
if ((tag & 7) === 4 || tag === 0) {
|
||||
break;
|
||||
}
|
||||
reader.skipType(tag & 7);
|
||||
}
|
||||
return message;
|
||||
},
|
||||
fromJSON(object) {
|
||||
return { values: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.values) ? [...object.values] : [] };
|
||||
},
|
||||
toJSON(message) {
|
||||
var _a;
|
||||
const obj = {};
|
||||
if ((_a = message.values) === null || _a === void 0 ? void 0 : _a.length) {
|
||||
obj.values = message.values;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
create(base) {
|
||||
return ListValue.fromPartial(base !== null && base !== void 0 ? base : {});
|
||||
},
|
||||
fromPartial(object) {
|
||||
var _a;
|
||||
const message = createBaseListValue();
|
||||
message.values = ((_a = object.values) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
||||
return message;
|
||||
},
|
||||
wrap(array) {
|
||||
const result = createBaseListValue();
|
||||
result.values = array !== null && array !== void 0 ? array : [];
|
||||
return result;
|
||||
},
|
||||
unwrap(message) {
|
||||
if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("values")) && globalThis.Array.isArray(message.values)) {
|
||||
return message.values;
|
||||
}
|
||||
else {
|
||||
return message;
|
||||
}
|
||||
},
|
||||
};
|
||||
function isObject(value) {
|
||||
return typeof value === "object" && value !== null;
|
||||
}
|
||||
function isSet(value) {
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user