2(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.MessageOptions * @static * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a MessageOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ MessageOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.messageSetWireFormat = reader.bool(); break; } case 2: { message.noStandardDescriptorAccessor = reader.bool(); break; } case 3: { message.deprecated = reader.bool(); break; } case 7: { message.mapEntry = reader.bool(); break; } case 11: { message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } case 12: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } case 1053: { message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a MessageOptions message. * @function verify * @memberof google.protobuf.MessageOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MessageOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) if (typeof message.messageSetWireFormat !== "boolean") return "messageSetWireFormat: boolean expected"; if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) if (typeof message.noStandardDescriptorAccessor !== "boolean") return "noStandardDescriptorAccessor: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) if (typeof message.mapEntry !== "boolean") return "mapEntry: boolean expected"; if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); if (error) return ".google.api.resource." + error; } return null; }; /** * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.MessageOptions} MessageOptions */ MessageOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.MessageOptions) return object; var message = new $root.google.protobuf.MessageOptions(); if (object.messageSetWireFormat != null) message.messageSetWireFormat = Boolean(object.messageSetWireFormat); if (object.noStandardDescriptorAccessor != null) message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.mapEntry != null) message.mapEntry = Boolean(object.mapEntry); if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.MessageOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } if (object[".google.api.resource"] != null) { if (typeof object[".google.api.resource"] !== "object") throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); } return message; }; /** * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.MessageOptions * @static * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) { object.messageSetWireFormat = false; object.noStandardDescriptorAccessor = false; object.deprecated = false; object.mapEntry = false; object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; object[".google.api.resource"] = null; } if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) object.messageSetWireFormat = message.messageSetWireFormat; if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) object.mapEntry = message.mapEntry; if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** * Converts this MessageOptions to JSON. * @function toJSON * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for MessageOptions * @function getTypeUrl * @memberof google.protobuf.MessageOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.MessageOptions"; }; return MessageOptions; })(); protobuf.FieldOptions = (function() { /** * Properties of a FieldOptions. * @memberof google.protobuf * @interface IFieldOptions * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {boolean|null} [debugRedact] FieldOptions debugRedact * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** * Constructs a new FieldOptions. * @memberof google.protobuf * @classdesc Represents a FieldOptions. * @implements IFieldOptions * @constructor * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ function FieldOptions(properties) { this.targets = []; this.editionDefaults = []; this.uninterpretedOption = []; this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * FieldOptions ctype. * @member {google.protobuf.FieldOptions.CType} ctype * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.ctype = 0; /** * FieldOptions packed. * @member {boolean} packed * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.packed = false; /** * FieldOptions jstype. * @member {google.protobuf.FieldOptions.JSType} jstype * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.jstype = 0; /** * FieldOptions lazy. * @member {boolean} lazy * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.lazy = false; /** * FieldOptions unverifiedLazy. * @member {boolean} unverifiedLazy * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.unverifiedLazy = false; /** * FieldOptions deprecated. * @member {boolean} deprecated * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.deprecated = false; /** * FieldOptions weak. * @member {boolean} weak * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.weak = false; /** * FieldOptions debugRedact. * @member {boolean} debugRedact * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.debugRedact = false; /** * FieldOptions retention. * @member {google.protobuf.FieldOptions.OptionRetention} retention * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.retention = 0; /** * FieldOptions targets. * @member {Array.} targets * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.targets = $util.emptyArray; /** * FieldOptions editionDefaults. * @member {Array.} editionDefaults * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.editionDefaults = $util.emptyArray; /** * FieldOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.features = null; /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** * FieldOptions .google.api.fieldBehavior. * @member {Array.} .google.api.fieldBehavior * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** * FieldOptions .google.api.resourceReference. * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference * @memberof google.protobuf.FieldOptions * @instance */ FieldOptions.prototype[".google.api.resourceReference"] = null; /** * Creates a new FieldOptions instance using the specified properties. * @function create * @memberof google.protobuf.FieldOptions * @static * @param {google.protobuf.IFieldOptions=} [properties] Properties to set * @returns {google.protobuf.FieldOptions} FieldOptions instance */ FieldOptions.create = function create(properties) { return new FieldOptions(properties); }; /** * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode * @memberof google.protobuf.FieldOptions * @static * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); if (message.targets != null && message.targets.length) for (var i = 0; i < message.targets.length; ++i) writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); if (message.editionDefaults != null && message.editionDefaults.length) for (var i = 0; i < message.editionDefaults.length; ++i) $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) writer.int32(message[".google.api.fieldBehavior"][i]); writer.ldelim(); } if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; /** * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.FieldOptions * @static * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a FieldOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FieldOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.ctype = reader.int32(); break; } case 2: { message.packed = reader.bool(); break; } case 6: { message.jstype = reader.int32(); break; } case 5: { message.lazy = reader.bool(); break; } case 15: { message.unverifiedLazy = reader.bool(); break; } case 3: { message.deprecated = reader.bool(); break; } case 10: { message.weak = reader.bool(); break; } case 16: { message.debugRedact = reader.bool(); break; } case 17: { message.retention = reader.int32(); break; } case 19: { if (!(message.targets && message.targets.length)) message.targets = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.targets.push(reader.int32()); } else message.targets.push(reader.int32()); break; } case 20: { if (!(message.editionDefaults && message.editionDefaults.length)) message.editionDefaults = []; message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); break; } case 21: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } case 1052: { if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) message[".google.api.fieldBehavior"] = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message[".google.api.fieldBehavior"].push(reader.int32()); } else message[".google.api.fieldBehavior"].push(reader.int32()); break; } case 1055: { message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a FieldOptions message. * @function verify * @memberof google.protobuf.FieldOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FieldOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ctype != null && message.hasOwnProperty("ctype")) switch (message.ctype) { default: return "ctype: enum value expected"; case 0: case 1: case 2: break; } if (message.packed != null && message.hasOwnProperty("packed")) if (typeof message.packed !== "boolean") return "packed: boolean expected"; if (message.jstype != null && message.hasOwnProperty("jstype")) switch (message.jstype) { default: return "jstype: enum value expected"; case 0: case 1: case 2: break; } if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) if (typeof message.unverifiedLazy !== "boolean") return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; if (message.weak != null && message.hasOwnProperty("weak")) if (typeof message.weak !== "boolean") return "weak: boolean expected"; if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; if (message.retention != null && message.hasOwnProperty("retention")) switch (message.retention) { default: return "retention: enum value expected"; case 0: case 1: case 2: break; } if (message.targets != null && message.hasOwnProperty("targets")) { if (!Array.isArray(message.targets)) return "targets: array expected"; for (var i = 0; i < message.targets.length; ++i) switch (message.targets[i]) { default: return "targets: enum value[] expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: break; } } if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { if (!Array.isArray(message.editionDefaults)) return "editionDefaults: array expected"; for (var i = 0; i < message.editionDefaults.length; ++i) { var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); if (error) return "editionDefaults." + error; } } if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { if (!Array.isArray(message[".google.api.fieldBehavior"])) return ".google.api.fieldBehavior: array expected"; for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) switch (message[".google.api.fieldBehavior"][i]) { default: return ".google.api.fieldBehavior: enum value[] expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: break; } } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); if (error) return ".google.api.resourceReference." + error; } return null; }; /** * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions} FieldOptions */ FieldOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.FieldOptions) return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { default: if (typeof object.ctype === "number") { message.ctype = object.ctype; break; } break; case "STRING": case 0: message.ctype = 0; break; case "CORD": case 1: message.ctype = 1; break; case "STRING_PIECE": case 2: message.ctype = 2; break; } if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { default: if (typeof object.jstype === "number") { message.jstype = object.jstype; break; } break; case "JS_NORMAL": case 0: message.jstype = 0; break; case "JS_STRING": case 1: message.jstype = 1; break; case "JS_NUMBER": case 2: message.jstype = 2; break; } if (object.lazy != null) message.lazy = Boolean(object.lazy); if (object.unverifiedLazy != null) message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) message.weak = Boolean(object.weak); if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); switch (object.retention) { default: if (typeof object.retention === "number") { message.retention = object.retention; break; } break; case "RETENTION_UNKNOWN": case 0: message.retention = 0; break; case "RETENTION_RUNTIME": case 1: message.retention = 1; break; case "RETENTION_SOURCE": case 2: message.retention = 2; break; } if (object.targets) { if (!Array.isArray(object.targets)) throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); message.targets = []; for (var i = 0; i < object.targets.length; ++i) switch (object.targets[i]) { default: if (typeof object.targets[i] === "number") { message.targets[i] = object.targets[i]; break; } case "TARGET_TYPE_UNKNOWN": case 0: message.targets[i] = 0; break; case "TARGET_TYPE_FILE": case 1: message.targets[i] = 1; break; case "TARGET_TYPE_EXTENSION_RANGE": case 2: message.targets[i] = 2; break; case "TARGET_TYPE_MESSAGE": case 3: message.targets[i] = 3; break; case "TARGET_TYPE_FIELD": case 4: message.targets[i] = 4; break; case "TARGET_TYPE_ONEOF": case 5: message.targets[i] = 5; break; case "TARGET_TYPE_ENUM": case 6: message.targets[i] = 6; break; case "TARGET_TYPE_ENUM_ENTRY": case 7: message.targets[i] = 7; break; case "TARGET_TYPE_SERVICE": case 8: message.targets[i] = 8; break; case "TARGET_TYPE_METHOD": case 9: message.targets[i] = 9; break; } } if (object.editionDefaults) { if (!Array.isArray(object.editionDefaults)) throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); message.editionDefaults = []; for (var i = 0; i < object.editionDefaults.length; ++i) { if (typeof object.editionDefaults[i] !== "object") throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); } } if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } if (object[".google.api.fieldBehavior"]) { if (!Array.isArray(object[".google.api.fieldBehavior"])) throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); message[".google.api.fieldBehavior"] = []; for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: if (typeof object[".google.api.fieldBehavior"][i] === "number") { message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; break; } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; break; case "OPTIONAL": case 1: message[".google.api.fieldBehavior"][i] = 1; break; case "REQUIRED": case 2: message[".google.api.fieldBehavior"][i] = 2; break; case "OUTPUT_ONLY": case 3: message[".google.api.fieldBehavior"][i] = 3; break; case "INPUT_ONLY": case 4: message[".google.api.fieldBehavior"][i] = 4; break; case "IMMUTABLE": case 5: message[".google.api.fieldBehavior"][i] = 5; break; case "UNORDERED_LIST": case 6: message[".google.api.fieldBehavior"][i] = 6; break; case "NON_EMPTY_DEFAULT": case 7: message[".google.api.fieldBehavior"][i] = 7; break; case "IDENTIFIER": case 8: message[".google.api.fieldBehavior"][i] = 8; break; } } if (object[".google.api.resourceReference"] != null) { if (typeof object[".google.api.resourceReference"] !== "object") throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); } return message; }; /** * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.FieldOptions * @static * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.targets = []; object.editionDefaults = []; object.uninterpretedOption = []; object[".google.api.fieldBehavior"] = []; } if (options.defaults) { object.ctype = options.enums === String ? "STRING" : 0; object.packed = false; object.deprecated = false; object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; object.unverifiedLazy = false; object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) object.unverifiedLazy = message.unverifiedLazy; if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; if (message.retention != null && message.hasOwnProperty("retention")) object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; if (message.targets && message.targets.length) { object.targets = []; for (var j = 0; j < message.targets.length; ++j) object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; } if (message.editionDefaults && message.editionDefaults.length) { object.editionDefaults = []; for (var j = 0; j < message.editionDefaults.length; ++j) object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** * Converts this FieldOptions to JSON. * @function toJSON * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for FieldOptions * @function getTypeUrl * @memberof google.protobuf.FieldOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; /** * CType enum. * @name google.protobuf.FieldOptions.CType * @enum {number} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value */ FieldOptions.CType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STRING"] = 0; values[valuesById[1] = "CORD"] = 1; values[valuesById[2] = "STRING_PIECE"] = 2; return values; })(); /** * JSType enum. * @name google.protobuf.FieldOptions.JSType * @enum {number} * @property {number} JS_NORMAL=0 JS_NORMAL value * @property {number} JS_STRING=1 JS_STRING value * @property {number} JS_NUMBER=2 JS_NUMBER value */ FieldOptions.JSType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "JS_NORMAL"] = 0; values[valuesById[1] = "JS_STRING"] = 1; values[valuesById[2] = "JS_NUMBER"] = 2; return values; })(); /** * OptionRetention enum. * @name google.protobuf.FieldOptions.OptionRetention * @enum {number} * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value */ FieldOptions.OptionRetention = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; values[valuesById[1] = "RETENTION_RUNTIME"] = 1; values[valuesById[2] = "RETENTION_SOURCE"] = 2; return values; })(); /** * OptionTargetType enum. * @name google.protobuf.FieldOptions.OptionTargetType * @enum {number} * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value */ FieldOptions.OptionTargetType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; return values; })(); FieldOptions.EditionDefault = (function() { /** * Properties of an EditionDefault. * @memberof google.protobuf.FieldOptions * @interface IEditionDefault * @property {google.protobuf.Edition|null} [edition] EditionDefault edition * @property {string|null} [value] EditionDefault value */ /** * Constructs a new EditionDefault. * @memberof google.protobuf.FieldOptions * @classdesc Represents an EditionDefault. * @implements IEditionDefault * @constructor * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set */ function EditionDefault(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * EditionDefault edition. * @member {google.protobuf.Edition} edition * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ EditionDefault.prototype.edition = 0; /** * EditionDefault value. * @member {string} value * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ EditionDefault.prototype.value = ""; /** * Creates a new EditionDefault instance using the specified properties. * @function create * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance */ EditionDefault.create = function create(properties) { return new EditionDefault(properties); }; /** * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encode * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ EditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); return writer; }; /** * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an EditionDefault message from the specified reader or buffer. * @function decode * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ EditionDefault.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 3: { message.edition = reader.int32(); break; } case 2: { message.value = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an EditionDefault message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ EditionDefault.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an EditionDefault message. * @function verify * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EditionDefault.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.edition != null && message.hasOwnProperty("edition")) switch (message.edition) { default: return "edition: enum value expected"; case 0: case 998: case 999: case 1000: case 1001: case 1: case 2: case 99997: case 99998: case 99999: case 2147483647: break; } if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; }; /** * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {Object.} object Plain object * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault */ EditionDefault.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) return object; var message = new $root.google.protobuf.FieldOptions.EditionDefault(); switch (object.edition) { default: if (typeof object.edition === "number") { message.edition = object.edition; break; } break; case "EDITION_UNKNOWN": case 0: message.edition = 0; break; case "EDITION_PROTO2": case 998: message.edition = 998; break; case "EDITION_PROTO3": case 999: message.edition = 999; break; case "EDITION_2023": case 1000: message.edition = 1000; break; case "EDITION_2024": case 1001: message.edition = 1001; break; case "EDITION_1_TEST_ONLY": case 1: message.edition = 1; break; case "EDITION_2_TEST_ONLY": case 2: message.edition = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: message.edition = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: message.edition = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: message.edition = 99999; break; case "EDITION_MAX": case 2147483647: message.edition = 2147483647; break; } if (object.value != null) message.value = String(object.value); return message; }; /** * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ EditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.value = ""; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; /** * Converts this EditionDefault to JSON. * @function toJSON * @memberof google.protobuf.FieldOptions.EditionDefault * @instance * @returns {Object.} JSON object */ EditionDefault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for EditionDefault * @function getTypeUrl * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; }; return EditionDefault; })(); return FieldOptions; })(); protobuf.OneofOptions = (function() { /** * Properties of an OneofOptions. * @memberof google.protobuf * @interface IOneofOptions * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** * Constructs a new OneofOptions. * @memberof google.protobuf * @classdesc Represents an OneofOptions. * @implements IOneofOptions * @constructor * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ function OneofOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * OneofOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.OneofOptions * @instance */ OneofOptions.prototype.features = null; /** * OneofOptions uninterpretedOption. * @member {Array.} uninterpretedOption * @memberof google.protobuf.OneofOptions * @instance */ OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** * Creates a new OneofOptions instance using the specified properties. * @function create * @memberof google.protobuf.OneofOptions * @static * @param {google.protobuf.IOneofOptions=} [properties] Properties to set * @returns {google.protobuf.OneofOptions} OneofOptions instance */ OneofOptions.create = function create(properties) { return new OneofOptions(properties); }; /** * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode * @memberof google.protobuf.OneofOptions * @static * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ OneofOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.OneofOptions * @static * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an OneofOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ OneofOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an OneofOptions message. * @function verify * @memberof google.protobuf.OneofOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ OneofOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } return null; }; /** * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.OneofOptions} OneofOptions */ OneofOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.OneofOptions) return object; var message = new $root.google.protobuf.OneofOptions(); if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.OneofOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } return message; }; /** * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.OneofOptions * @static * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) object.features = null; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; /** * Converts this OneofOptions to JSON. * @function toJSON * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for OneofOptions * @function getTypeUrl * @memberof google.protobuf.OneofOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.OneofOptions"; }; return OneofOptions; })(); protobuf.EnumOptions = (function() { /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions * @property {boolean|null} [allowAlias] EnumOptions allowAlias * @property {boolean|null} [deprecated] EnumOptions deprecated * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** * Constructs a new EnumOptions. * @memberof google.protobuf * @classdesc Represents an EnumOptions. * @implements IEnumOptions * @constructor * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ function EnumOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * EnumOptions allowAlias. * @member {boolean} allowAlias * @memberof google.protobuf.EnumOptions * @instance */ EnumOptions.prototype.allowAlias = false; /** * EnumOptions deprecated. * @member {boolean} deprecated * @memberof google.protobuf.EnumOptions * @instance */ EnumOptions.prototype.deprecated = false; /** * EnumOptions deprecatedLegacyJsonFieldConflicts. * @member {boolean} deprecatedLegacyJsonFieldConflicts * @memberof google.protobuf.EnumOptions * @instance */ EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; /** * EnumOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.EnumOptions * @instance */ EnumOptions.prototype.features = null; /** * EnumOptions uninterpretedOption. * @member {Array.} uninterpretedOption * @memberof google.protobuf.EnumOptions * @instance */ EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** * Creates a new EnumOptions instance using the specified properties. * @function create * @memberof google.protobuf.EnumOptions * @static * @param {google.protobuf.IEnumOptions=} [properties] Properties to set * @returns {google.protobuf.EnumOptions} EnumOptions instance */ EnumOptions.create = function create(properties) { return new EnumOptions(properties); }; /** * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode * @memberof google.protobuf.EnumOptions * @static * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.EnumOptions * @static * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an EnumOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ EnumOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { message.allowAlias = reader.bool(); break; } case 3: { message.deprecated = reader.bool(); break; } case 6: { message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } case 7: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an EnumOptions message. * @function verify * @memberof google.protobuf.EnumOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) if (typeof message.allowAlias !== "boolean") return "allowAlias: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") return "deprecatedLegacyJsonFieldConflicts: boolean expected"; if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } return null; }; /** * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.EnumOptions} EnumOptions */ EnumOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.EnumOptions) return object; var message = new $root.google.protobuf.EnumOptions(); if (object.allowAlias != null) message.allowAlias = Boolean(object.allowAlias); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.deprecatedLegacyJsonFieldConflicts != null) message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.EnumOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } return message; }; /** * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.EnumOptions * @static * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) { object.allowAlias = false; object.deprecated = false; object.deprecatedLegacyJsonFieldConflicts = false; object.features = null; } if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) object.allowAlias = message.allowAlias; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; /** * Converts this EnumOptions to JSON. * @function toJSON * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for EnumOptions * @function getTypeUrl * @memberof google.protobuf.EnumOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.EnumOptions"; }; return EnumOptions; })(); protobuf.EnumValueOptions = (function() { /** * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** * Constructs a new EnumValueOptions. * @memberof google.protobuf * @classdesc Represents an EnumValueOptions. * @implements IEnumValueOptions * @constructor * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ function EnumValueOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * EnumValueOptions deprecated. * @member {boolean} deprecated * @memberof google.protobuf.EnumValueOptions * @instance */ EnumValueOptions.prototype.deprecated = false; /** * EnumValueOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.EnumValueOptions * @instance */ EnumValueOptions.prototype.features = null; /** * EnumValueOptions debugRedact. * @member {boolean} debugRedact * @memberof google.protobuf.EnumValueOptions * @instance */ EnumValueOptions.prototype.debugRedact = false; /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption * @memberof google.protobuf.EnumValueOptions * @instance */ EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** * Creates a new EnumValueOptions instance using the specified properties. * @function create * @memberof google.protobuf.EnumValueOptions * @static * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ EnumValueOptions.create = function create(properties) { return new EnumValueOptions(properties); }; /** * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode * @memberof google.protobuf.EnumValueOptions * @static * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.EnumValueOptions * @static * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ EnumValueOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.deprecated = reader.bool(); break; } case 2: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 3: { message.debugRedact = reader.bool(); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an EnumValueOptions message. * @function verify * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ EnumValueOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } return null; }; /** * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ EnumValueOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.EnumValueOptions) return object; var message = new $root.google.protobuf.EnumValueOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } return message; }; /** * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.EnumValueOptions * @static * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) { object.deprecated = false; object.features = null; object.debugRedact = false; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; /** * Converts this EnumValueOptions to JSON. * @function toJSON * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for EnumValueOptions * @function getTypeUrl * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; return EnumValueOptions; })(); protobuf.ServiceOptions = (function() { /** * Properties of a ServiceOptions. * @memberof google.protobuf * @interface IServiceOptions * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features * @property {boolean|null} [deprecated] ServiceOptions deprecated * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** * Constructs a new ServiceOptions. * @memberof google.protobuf * @classdesc Represents a ServiceOptions. * @implements IServiceOptions * @constructor * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ function ServiceOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ServiceOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.ServiceOptions * @instance */ ServiceOptions.prototype.features = null; /** * ServiceOptions deprecated. * @member {boolean} deprecated * @memberof google.protobuf.ServiceOptions * @instance */ ServiceOptions.prototype.deprecated = false; /** * ServiceOptions uninterpretedOption. * @member {Array.} uninterpretedOption * @memberof google.protobuf.ServiceOptions * @instance */ ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** * ServiceOptions .google.api.defaultHost. * @member {string} .google.api.defaultHost * @memberof google.protobuf.ServiceOptions * @instance */ ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** * ServiceOptions .google.api.oauthScopes. * @member {string} .google.api.oauthScopes * @memberof google.protobuf.ServiceOptions * @instance */ ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** * Creates a new ServiceOptions instance using the specified properties. * @function create * @memberof google.protobuf.ServiceOptions * @static * @param {google.protobuf.IServiceOptions=} [properties] Properties to set * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ ServiceOptions.create = function create(properties) { return new ServiceOptions(properties); }; /** * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode * @memberof google.protobuf.ServiceOptions * @static * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.ServiceOptions * @static * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServiceOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 34: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 33: { message.deprecated = reader.bool(); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } case 1049: { message[".google.api.defaultHost"] = reader.string(); break; } case 1050: { message[".google.api.oauthScopes"] = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ServiceOptions message. * @function verify * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) if (!$util.isString(message[".google.api.defaultHost"])) return ".google.api.defaultHost: string expected"; if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) if (!$util.isString(message[".google.api.oauthScopes"])) return ".google.api.oauthScopes: string expected"; return null; }; /** * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.ServiceOptions} ServiceOptions */ ServiceOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.ServiceOptions) return object; var message = new $root.google.protobuf.ServiceOptions(); if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } if (object[".google.api.defaultHost"] != null) message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); if (object[".google.api.oauthScopes"] != null) message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.ServiceOptions * @static * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; if (options.defaults) { object.deprecated = false; object.features = null; object[".google.api.defaultHost"] = ""; object[".google.api.oauthScopes"] = ""; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** * Converts this ServiceOptions to JSON. * @function toJSON * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ServiceOptions * @function getTypeUrl * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; return ServiceOptions; })(); protobuf.MethodOptions = (function() { /** * Properties of a MethodOptions. * @memberof google.protobuf * @interface IMethodOptions * @property {boolean|null} [deprecated] MethodOptions deprecated * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature */ /** * Constructs a new MethodOptions. * @memberof google.protobuf * @classdesc Represents a MethodOptions. * @implements IMethodOptions * @constructor * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ function MethodOptions(properties) { this.uninterpretedOption = []; this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * MethodOptions deprecated. * @member {boolean} deprecated * @memberof google.protobuf.MethodOptions * @instance */ MethodOptions.prototype.deprecated = false; /** * MethodOptions idempotencyLevel. * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel * @memberof google.protobuf.MethodOptions * @instance */ MethodOptions.prototype.idempotencyLevel = 0; /** * MethodOptions features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.MethodOptions * @instance */ MethodOptions.prototype.features = null; /** * MethodOptions uninterpretedOption. * @member {Array.} uninterpretedOption * @memberof google.protobuf.MethodOptions * @instance */ MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** * MethodOptions .google.api.http. * @member {google.api.IHttpRule|null|undefined} .google.api.http * @memberof google.protobuf.MethodOptions * @instance */ MethodOptions.prototype[".google.api.http"] = null; /** * MethodOptions .google.api.methodSignature. * @member {Array.} .google.api.methodSignature * @memberof google.protobuf.MethodOptions * @instance */ MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** * Creates a new MethodOptions instance using the specified properties. * @function create * @memberof google.protobuf.MethodOptions * @static * @param {google.protobuf.IMethodOptions=} [properties] Properties to set * @returns {google.protobuf.MethodOptions} MethodOptions instance */ MethodOptions.create = function create(properties) { return new MethodOptions(properties); }; /** * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode * @memberof google.protobuf.MethodOptions * @static * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.MethodOptions * @static * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a MethodOptions message from the specified reader or buffer. * @function decode * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ MethodOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 33: { message.deprecated = reader.bool(); break; } case 34: { message.idempotencyLevel = reader.int32(); break; } case 35: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } case 72295728: { message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; } case 1051: { if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) message[".google.api.methodSignature"] = []; message[".google.api.methodSignature"].push(reader.string()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a MethodOptions message. * @function verify * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) switch (message.idempotencyLevel) { default: return "idempotencyLevel: enum value expected"; case 0: case 1: case 2: break; } if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; for (var i = 0; i < message.uninterpretedOption.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) return "uninterpretedOption." + error; } } if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); if (error) return ".google.api.http." + error; } if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { if (!Array.isArray(message[".google.api.methodSignature"])) return ".google.api.methodSignature: array expected"; for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) if (!$util.isString(message[".google.api.methodSignature"][i])) return ".google.api.methodSignature: string[] expected"; } return null; }; /** * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object * @returns {google.protobuf.MethodOptions} MethodOptions */ MethodOptions.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.MethodOptions) return object; var message = new $root.google.protobuf.MethodOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { default: if (typeof object.idempotencyLevel === "number") { message.idempotencyLevel = object.idempotencyLevel; break; } break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; break; case "NO_SIDE_EFFECTS": case 1: message.idempotencyLevel = 1; break; case "IDEMPOTENT": case 2: message.idempotencyLevel = 2; break; } if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.MethodOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } if (object[".google.api.http"] != null) { if (typeof object[".google.api.http"] !== "object") throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); } if (object[".google.api.methodSignature"]) { if (!Array.isArray(object[".google.api.methodSignature"])) throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); message[".google.api.methodSignature"] = []; for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); } return message; }; /** * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.MethodOptions * @static * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.uninterpretedOption = []; object[".google.api.methodSignature"] = []; } if (options.defaults) { object.deprecated = false; object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; object.features = null; object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { object[".google.api.methodSignature"] = []; for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; } if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** * Converts this MethodOptions to JSON. * @function toJSON * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for MethodOptions * @function getTypeUrl * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel * @enum {number} * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value * @property {number} IDEMPOTENT=2 IDEMPOTENT value */ MethodOptions.IdempotencyLevel = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; values[valuesById[2] = "IDEMPOTENT"] = 2; return values; })(); return MethodOptions; })(); protobuf.UninterpretedOption = (function() { /** * Properties of an UninterpretedOption. * @memberof google.protobuf * @interface IUninterpretedOption * @property {Array.|null} [name] UninterpretedOption name * @property {string|null} [identifierValue] UninterpretedOption identifierValue * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue * @property {number|null} [doubleValue] UninterpretedOption doubleValue * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** * Constructs a new UninterpretedOption. * @memberof google.protobuf * @classdesc Represents an UninterpretedOption. * @implements IUninterpretedOption * @constructor * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ function UninterpretedOption(properties) { this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * UninterpretedOption name. * @member {Array.} name * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.name = $util.emptyArray; /** * UninterpretedOption identifierValue. * @member {string} identifierValue * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.identifierValue = ""; /** * UninterpretedOption positiveIntValue. * @member {number|Long} positiveIntValue * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * UninterpretedOption negativeIntValue. * @member {number|Long} negativeIntValue * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * UninterpretedOption doubleValue. * @member {number} doubleValue * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.doubleValue = 0; /** * UninterpretedOption stringValue. * @member {Uint8Array} stringValue * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** * UninterpretedOption aggregateValue. * @member {string} aggregateValue * @memberof google.protobuf.UninterpretedOption * @instance */ UninterpretedOption.prototype.aggregateValue = ""; /** * Creates a new UninterpretedOption instance using the specified properties. * @function create * @memberof google.protobuf.UninterpretedOption * @static * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ UninterpretedOption.create = function create(properties) { return new UninterpretedOption(properties); }; /** * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode * @memberof google.protobuf.UninterpretedOption * @static * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && message.name.length) for (var i = 0; i < message.name.length; ++i) $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption * @static * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UninterpretedOption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 2: { if (!(message.name && message.name.length)) message.name = []; message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } case 3: { message.identifierValue = reader.string(); break; } case 4: { message.positiveIntValue = reader.uint64(); break; } case 5: { message.negativeIntValue = reader.int64(); break; } case 6: { message.doubleValue = reader.double(); break; } case 7: { message.stringValue = reader.bytes(); break; } case 8: { message.aggregateValue = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an UninterpretedOption message. * @function verify * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) { if (!Array.isArray(message.name)) return "name: array expected"; for (var i = 0; i < message.name.length; ++i) { var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); if (error) return "name." + error; } } if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) if (!$util.isString(message.identifierValue)) return "identifierValue: string expected"; if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) return "positiveIntValue: integer|Long expected"; if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) return "negativeIntValue: integer|Long expected"; if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) if (typeof message.doubleValue !== "number") return "doubleValue: number expected"; if (message.stringValue != null && message.hasOwnProperty("stringValue")) if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) return "stringValue: buffer expected"; if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) if (!$util.isString(message.aggregateValue)) return "aggregateValue: string expected"; return null; }; /** * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ UninterpretedOption.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.UninterpretedOption) return object; var message = new $root.google.protobuf.UninterpretedOption(); if (object.name) { if (!Array.isArray(object.name)) throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); message.name = []; for (var i = 0; i < object.name.length; ++i) { if (typeof object.name[i] !== "object") throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } } if (object.identifierValue != null) message.identifierValue = String(object.identifierValue); if (object.positiveIntValue != null) if ($util.Long) (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; else if (typeof object.positiveIntValue === "string") message.positiveIntValue = parseInt(object.positiveIntValue, 10); else if (typeof object.positiveIntValue === "number") message.positiveIntValue = object.positiveIntValue; else if (typeof object.positiveIntValue === "object") message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); if (object.negativeIntValue != null) if ($util.Long) (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; else if (typeof object.negativeIntValue === "string") message.negativeIntValue = parseInt(object.negativeIntValue, 10); else if (typeof object.negativeIntValue === "number") message.negativeIntValue = object.negativeIntValue; else if (typeof object.negativeIntValue === "object") message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); if (object.doubleValue != null) message.doubleValue = Number(object.doubleValue); if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); return message; }; /** * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.UninterpretedOption * @static * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.name = []; if (options.defaults) { object.identifierValue = ""; if ($util.Long) { var long = new $util.Long(0, 0, true); object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.positiveIntValue = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.negativeIntValue = options.longs === String ? "0" : 0; object.doubleValue = 0; if (options.bytes === String) object.stringValue = ""; else { object.stringValue = []; if (options.bytes !== Array) object.stringValue = $util.newBuffer(object.stringValue); } object.aggregateValue = ""; } if (message.name && message.name.length) { object.name = []; for (var j = 0; j < message.name.length; ++j) object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) object.identifierValue = message.identifierValue; if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) if (typeof message.positiveIntValue === "number") object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; else object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) if (typeof message.negativeIntValue === "number") object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; else object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; if (message.stringValue != null && message.hasOwnProperty("stringValue")) object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) object.aggregateValue = message.aggregateValue; return object; }; /** * Converts this UninterpretedOption to JSON. * @function toJSON * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for UninterpretedOption * @function getTypeUrl * @memberof google.protobuf.UninterpretedOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; UninterpretedOption.NamePart = (function() { /** * Properties of a NamePart. * @memberof google.protobuf.UninterpretedOption * @interface INamePart * @property {string} namePart NamePart namePart * @property {boolean} isExtension NamePart isExtension */ /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption * @classdesc Represents a NamePart. * @implements INamePart * @constructor * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set */ function NamePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * NamePart namePart. * @member {string} namePart * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ NamePart.prototype.namePart = ""; /** * NamePart isExtension. * @member {boolean} isExtension * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ NamePart.prototype.isExtension = false; /** * Creates a new NamePart instance using the specified properties. * @function create * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance */ NamePart.create = function create(properties) { return new NamePart(properties); }; /** * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encode * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ NamePart.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); return writer; }; /** * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ NamePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a NamePart message from the specified reader or buffer. * @function decode * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ NamePart.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.namePart = reader.string(); break; } case 2: { message.isExtension = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } if (!message.hasOwnProperty("namePart")) throw $util.ProtocolError("missing required 'namePart'", { instance: message }); if (!message.hasOwnProperty("isExtension")) throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; /** * Decodes a NamePart message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ NamePart.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a NamePart message. * @function verify * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ NamePart.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (!$util.isString(message.namePart)) return "namePart: string expected"; if (typeof message.isExtension !== "boolean") return "isExtension: boolean expected"; return null; }; /** * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {Object.} object Plain object * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart */ NamePart.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) return object; var message = new $root.google.protobuf.UninterpretedOption.NamePart(); if (object.namePart != null) message.namePart = String(object.namePart); if (object.isExtension != null) message.isExtension = Boolean(object.isExtension); return message; }; /** * Creates a plain object from a NamePart message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ NamePart.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.namePart = ""; object.isExtension = false; } if (message.namePart != null && message.hasOwnProperty("namePart")) object.namePart = message.namePart; if (message.isExtension != null && message.hasOwnProperty("isExtension")) object.isExtension = message.isExtension; return object; }; /** * Converts this NamePart to JSON. * @function toJSON * @memberof google.protobuf.UninterpretedOption.NamePart * @instance * @returns {Object.} JSON object */ NamePart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for NamePart * @function getTypeUrl * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; }; return NamePart; })(); return UninterpretedOption; })(); protobuf.FeatureSet = (function() { /** * Properties of a FeatureSet. * @memberof google.protobuf * @interface IFeatureSet * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat */ /** * Constructs a new FeatureSet. * @memberof google.protobuf * @classdesc Represents a FeatureSet. * @implements IFeatureSet * @constructor * @param {google.protobuf.IFeatureSet=} [properties] Properties to set */ function FeatureSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * FeatureSet fieldPresence. * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence * @memberof google.protobuf.FeatureSet * @instance */ FeatureSet.prototype.fieldPresence = 0; /** * FeatureSet enumType. * @member {google.protobuf.FeatureSet.EnumType} enumType * @memberof google.protobuf.FeatureSet * @instance */ FeatureSet.prototype.enumType = 0; /** * FeatureSet repeatedFieldEncoding. * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding * @memberof google.protobuf.FeatureSet * @instance */ FeatureSet.prototype.repeatedFieldEncoding = 0; /** * FeatureSet utf8Validation. * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation * @memberof google.protobuf.FeatureSet * @instance */ FeatureSet.prototype.utf8Validation = 0; /** * FeatureSet messageEncoding. * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding * @memberof google.protobuf.FeatureSet * @instance */ FeatureSet.prototype.messageEncoding = 0; /** * FeatureSet jsonFormat. * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat * @memberof google.protobuf.FeatureSet * @instance */ FeatureSet.prototype.jsonFormat = 0; /** * Creates a new FeatureSet instance using the specified properties. * @function create * @memberof google.protobuf.FeatureSet * @static * @param {google.protobuf.IFeatureSet=} [properties] Properties to set * @returns {google.protobuf.FeatureSet} FeatureSet instance */ FeatureSet.create = function create(properties) { return new FeatureSet(properties); }; /** * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encode * @memberof google.protobuf.FeatureSet * @static * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); return writer; }; /** * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.FeatureSet * @static * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a FeatureSet message from the specified reader or buffer. * @function decode * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.FeatureSet} FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.fieldPresence = reader.int32(); break; } case 2: { message.enumType = reader.int32(); break; } case 3: { message.repeatedFieldEncoding = reader.int32(); break; } case 4: { message.utf8Validation = reader.int32(); break; } case 5: { message.messageEncoding = reader.int32(); break; } case 6: { message.jsonFormat = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.FeatureSet} FeatureSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a FeatureSet message. * @function verify * @memberof google.protobuf.FeatureSet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FeatureSet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) switch (message.fieldPresence) { default: return "fieldPresence: enum value expected"; case 0: case 1: case 2: case 3: break; } if (message.enumType != null && message.hasOwnProperty("enumType")) switch (message.enumType) { default: return "enumType: enum value expected"; case 0: case 1: case 2: break; } if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) switch (message.repeatedFieldEncoding) { default: return "repeatedFieldEncoding: enum value expected"; case 0: case 1: case 2: break; } if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) switch (message.utf8Validation) { default: return "utf8Validation: enum value expected"; case 0: case 2: case 3: break; } if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) switch (message.messageEncoding) { default: return "messageEncoding: enum value expected"; case 0: case 1: case 2: break; } if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) switch (message.jsonFormat) { default: return "jsonFormat: enum value expected"; case 0: case 1: case 2: break; } return null; }; /** * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.FeatureSet * @static * @param {Object.} object Plain object * @returns {google.protobuf.FeatureSet} FeatureSet */ FeatureSet.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.FeatureSet) return object; var message = new $root.google.protobuf.FeatureSet(); switch (object.fieldPresence) { default: if (typeof object.fieldPresence === "number") { message.fieldPresence = object.fieldPresence; break; } break; case "FIELD_PRESENCE_UNKNOWN": case 0: message.fieldPresence = 0; break; case "EXPLICIT": case 1: message.fieldPresence = 1; break; case "IMPLICIT": case 2: message.fieldPresence = 2; break; case "LEGACY_REQUIRED": case 3: message.fieldPresence = 3; break; } switch (object.enumType) { default: if (typeof object.enumType === "number") { message.enumType = object.enumType; break; } break; case "ENUM_TYPE_UNKNOWN": case 0: message.enumType = 0; break; case "OPEN": case 1: message.enumType = 1; break; case "CLOSED": case 2: message.enumType = 2; break; } switch (object.repeatedFieldEncoding) { default: if (typeof object.repeatedFieldEncoding === "number") { message.repeatedFieldEncoding = object.repeatedFieldEncoding; break; } break; case "REPEATED_FIELD_ENCODING_UNKNOWN": case 0: message.repeatedFieldEncoding = 0; break; case "PACKED": case 1: message.repeatedFieldEncoding = 1; break; case "EXPANDED": case 2: message.repeatedFieldEncoding = 2; break; } switch (object.utf8Validation) { default: if (typeof object.utf8Validation === "number") { message.utf8Validation = object.utf8Validation; break; } break; case "UTF8_VALIDATION_UNKNOWN": case 0: message.utf8Validation = 0; break; case "VERIFY": case 2: message.utf8Validation = 2; break; case "NONE": case 3: message.utf8Validation = 3; break; } switch (object.messageEncoding) { default: if (typeof object.messageEncoding === "number") { message.messageEncoding = object.messageEncoding; break; } break; case "MESSAGE_ENCODING_UNKNOWN": case 0: message.messageEncoding = 0; break; case "LENGTH_PREFIXED": case 1: message.messageEncoding = 1; break; case "DELIMITED": case 2: message.messageEncoding = 2; break; } switch (object.jsonFormat) { default: if (typeof object.jsonFormat === "number") { message.jsonFormat = object.jsonFormat; break; } break; case "JSON_FORMAT_UNKNOWN": case 0: message.jsonFormat = 0; break; case "ALLOW": case 1: message.jsonFormat = 1; break; case "LEGACY_BEST_EFFORT": case 2: message.jsonFormat = 2; break; } return message; }; /** * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.FeatureSet * @static * @param {google.protobuf.FeatureSet} message FeatureSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ FeatureSet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; } if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; if (message.enumType != null && message.hasOwnProperty("enumType")) object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; return object; }; /** * Converts this FeatureSet to JSON. * @function toJSON * @memberof google.protobuf.FeatureSet * @instance * @returns {Object.} JSON object */ FeatureSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for FeatureSet * @function getTypeUrl * @memberof google.protobuf.FeatureSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.FeatureSet"; }; /** * FieldPresence enum. * @name google.protobuf.FeatureSet.FieldPresence * @enum {number} * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value * @property {number} EXPLICIT=1 EXPLICIT value * @property {number} IMPLICIT=2 IMPLICIT value * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value */ FeatureSet.FieldPresence = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; values[valuesById[1] = "EXPLICIT"] = 1; values[valuesById[2] = "IMPLICIT"] = 2; values[valuesById[3] = "LEGACY_REQUIRED"] = 3; return values; })(); /** * EnumType enum. * @name google.protobuf.FeatureSet.EnumType * @enum {number} * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value * @property {number} OPEN=1 OPEN value * @property {number} CLOSED=2 CLOSED value */ FeatureSet.EnumType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; values[valuesById[1] = "OPEN"] = 1; values[valuesById[2] = "CLOSED"] = 2; return values; })(); /** * RepeatedFieldEncoding enum. * @name google.protobuf.FeatureSet.RepeatedFieldEncoding * @enum {number} * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value * @property {number} PACKED=1 PACKED value * @property {number} EXPANDED=2 EXPANDED value */ FeatureSet.RepeatedFieldEncoding = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; values[valuesById[1] = "PACKED"] = 1; values[valuesById[2] = "EXPANDED"] = 2; return values; })(); /** * Utf8Validation enum. * @name google.protobuf.FeatureSet.Utf8Validation * @enum {number} * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value * @property {number} VERIFY=2 VERIFY value * @property {number} NONE=3 NONE value */ FeatureSet.Utf8Validation = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; values[valuesById[2] = "VERIFY"] = 2; values[valuesById[3] = "NONE"] = 3; return values; })(); /** * MessageEncoding enum. * @name google.protobuf.FeatureSet.MessageEncoding * @enum {number} * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value * @property {number} DELIMITED=2 DELIMITED value */ FeatureSet.MessageEncoding = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; values[valuesById[1] = "LENGTH_PREFIXED"] = 1; values[valuesById[2] = "DELIMITED"] = 2; return values; })(); /** * JsonFormat enum. * @name google.protobuf.FeatureSet.JsonFormat * @enum {number} * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value * @property {number} ALLOW=1 ALLOW value * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value */ FeatureSet.JsonFormat = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; values[valuesById[1] = "ALLOW"] = 1; values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; return values; })(); return FeatureSet; })(); protobuf.FeatureSetDefaults = (function() { /** * Properties of a FeatureSetDefaults. * @memberof google.protobuf * @interface IFeatureSetDefaults * @property {Array.|null} [defaults] FeatureSetDefaults defaults * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition */ /** * Constructs a new FeatureSetDefaults. * @memberof google.protobuf * @classdesc Represents a FeatureSetDefaults. * @implements IFeatureSetDefaults * @constructor * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set */ function FeatureSetDefaults(properties) { this.defaults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * FeatureSetDefaults defaults. * @member {Array.} defaults * @memberof google.protobuf.FeatureSetDefaults * @instance */ FeatureSetDefaults.prototype.defaults = $util.emptyArray; /** * FeatureSetDefaults minimumEdition. * @member {google.protobuf.Edition} minimumEdition * @memberof google.protobuf.FeatureSetDefaults * @instance */ FeatureSetDefaults.prototype.minimumEdition = 0; /** * FeatureSetDefaults maximumEdition. * @member {google.protobuf.Edition} maximumEdition * @memberof google.protobuf.FeatureSetDefaults * @instance */ FeatureSetDefaults.prototype.maximumEdition = 0; /** * Creates a new FeatureSetDefaults instance using the specified properties. * @function create * @memberof google.protobuf.FeatureSetDefaults * @static * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance */ FeatureSetDefaults.create = function create(properties) { return new FeatureSetDefaults(properties); }; /** * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encode * @memberof google.protobuf.FeatureSetDefaults * @static * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSetDefaults.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.defaults != null && message.defaults.length) for (var i = 0; i < message.defaults.length; ++i) $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); return writer; }; /** * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.FeatureSetDefaults * @static * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @function decode * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSetDefaults.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.defaults && message.defaults.length)) message.defaults = []; message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); break; } case 4: { message.minimumEdition = reader.int32(); break; } case 5: { message.maximumEdition = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a FeatureSetDefaults message. * @function verify * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FeatureSetDefaults.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.defaults != null && message.hasOwnProperty("defaults")) { if (!Array.isArray(message.defaults)) return "defaults: array expected"; for (var i = 0; i < message.defaults.length; ++i) { var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); if (error) return "defaults." + error; } } if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) switch (message.minimumEdition) { default: return "minimumEdition: enum value expected"; case 0: case 998: case 999: case 1000: case 1001: case 1: case 2: case 99997: case 99998: case 99999: case 2147483647: break; } if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) switch (message.maximumEdition) { default: return "maximumEdition: enum value expected"; case 0: case 998: case 999: case 1000: case 1001: case 1: case 2: case 99997: case 99998: case 99999: case 2147483647: break; } return null; }; /** * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} object Plain object * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults */ FeatureSetDefaults.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; var message = new $root.google.protobuf.FeatureSetDefaults(); if (object.defaults) { if (!Array.isArray(object.defaults)) throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); message.defaults = []; for (var i = 0; i < object.defaults.length; ++i) { if (typeof object.defaults[i] !== "object") throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); } } switch (object.minimumEdition) { default: if (typeof object.minimumEdition === "number") { message.minimumEdition = object.minimumEdition; break; } break; case "EDITION_UNKNOWN": case 0: message.minimumEdition = 0; break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; break; case "EDITION_PROTO3": case 999: message.minimumEdition = 999; break; case "EDITION_2023": case 1000: message.minimumEdition = 1000; break; case "EDITION_2024": case 1001: message.minimumEdition = 1001; break; case "EDITION_1_TEST_ONLY": case 1: message.minimumEdition = 1; break; case "EDITION_2_TEST_ONLY": case 2: message.minimumEdition = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: message.minimumEdition = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: message.minimumEdition = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: message.minimumEdition = 99999; break; case "EDITION_MAX": case 2147483647: message.minimumEdition = 2147483647; break; } switch (object.maximumEdition) { default: if (typeof object.maximumEdition === "number") { message.maximumEdition = object.maximumEdition; break; } break; case "EDITION_UNKNOWN": case 0: message.maximumEdition = 0; break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; break; case "EDITION_PROTO3": case 999: message.maximumEdition = 999; break; case "EDITION_2023": case 1000: message.maximumEdition = 1000; break; case "EDITION_2024": case 1001: message.maximumEdition = 1001; break; case "EDITION_1_TEST_ONLY": case 1: message.maximumEdition = 1; break; case "EDITION_2_TEST_ONLY": case 2: message.maximumEdition = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: message.maximumEdition = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: message.maximumEdition = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: message.maximumEdition = 99999; break; case "EDITION_MAX": case 2147483647: message.maximumEdition = 2147483647; break; } return message; }; /** * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.FeatureSetDefaults * @static * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ FeatureSetDefaults.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.defaults = []; if (options.defaults) { object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; } if (message.defaults && message.defaults.length) { object.defaults = []; for (var j = 0; j < message.defaults.length; ++j) object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); } if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; return object; }; /** * Converts this FeatureSetDefaults to JSON. * @function toJSON * @memberof google.protobuf.FeatureSetDefaults * @instance * @returns {Object.} JSON object */ FeatureSetDefaults.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for FeatureSetDefaults * @function getTypeUrl * @memberof google.protobuf.FeatureSetDefaults * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; }; FeatureSetDefaults.FeatureSetEditionDefault = (function() { /** * Properties of a FeatureSetEditionDefault. * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features */ /** * Constructs a new FeatureSetEditionDefault. * @memberof google.protobuf.FeatureSetDefaults * @classdesc Represents a FeatureSetEditionDefault. * @implements IFeatureSetEditionDefault * @constructor * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set */ function FeatureSetEditionDefault(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * FeatureSetEditionDefault edition. * @member {google.protobuf.Edition} edition * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ FeatureSetEditionDefault.prototype.edition = 0; /** * FeatureSetEditionDefault features. * @member {google.protobuf.IFeatureSet|null|undefined} features * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ FeatureSetEditionDefault.prototype.features = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. * @function create * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance */ FeatureSetEditionDefault.create = function create(properties) { return new FeatureSetEditionDefault(properties); }; /** * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. * @function encode * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSetEditionDefault.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.features != null && Object.hasOwnProperty.call(message, "features")) $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); return writer; }; /** * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. * @function decode * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSetEditionDefault.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 3: { message.edition = reader.int32(); break; } case 2: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a FeatureSetEditionDefault message. * @function verify * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FeatureSetEditionDefault.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.edition != null && message.hasOwnProperty("edition")) switch (message.edition) { default: return "edition: enum value expected"; case 0: case 998: case 999: case 1000: case 1001: case 1: case 2: case 99997: case 99998: case 99999: case 2147483647: break; } if (message.features != null && message.hasOwnProperty("features")) { var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) return "features." + error; } return null; }; /** * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {Object.} object Plain object * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault */ FeatureSetEditionDefault.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) return object; var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); switch (object.edition) { default: if (typeof object.edition === "number") { message.edition = object.edition; break; } break; case "EDITION_UNKNOWN": case 0: message.edition = 0; break; case "EDITION_PROTO2": case 998: message.edition = 998; break; case "EDITION_PROTO3": case 999: message.edition = 999; break; case "EDITION_2023": case 1000: message.edition = 1000; break; case "EDITION_2024": case 1001: message.edition = 1001; break; case "EDITION_1_TEST_ONLY": case 1: message.edition = 1; break; case "EDITION_2_TEST_ONLY": case 2: message.edition = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: message.edition = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: message.edition = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: message.edition = 99999; break; case "EDITION_MAX": case 2147483647: message.edition = 2147483647; break; } if (object.features != null) { if (typeof object.features !== "object") throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } return message; }; /** * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ FeatureSetEditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; return object; }; /** * Converts this FeatureSetEditionDefault to JSON. * @function toJSON * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance * @returns {Object.} JSON object */ FeatureSetEditionDefault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for FeatureSetEditionDefault * @function getTypeUrl * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; }; return FeatureSetEditionDefault; })(); return FeatureSetDefaults; })(); protobuf.SourceCodeInfo = (function() { /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo * @property {Array.|null} [location] SourceCodeInfo location */ /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf * @classdesc Represents a SourceCodeInfo. * @implements ISourceCodeInfo * @constructor * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ function SourceCodeInfo(properties) { this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * SourceCodeInfo location. * @member {Array.} location * @memberof google.protobuf.SourceCodeInfo * @instance */ SourceCodeInfo.prototype.location = $util.emptyArray; /** * Creates a new SourceCodeInfo instance using the specified properties. * @function create * @memberof google.protobuf.SourceCodeInfo * @static * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ SourceCodeInfo.create = function create(properties) { return new SourceCodeInfo(properties); }; /** * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode * @memberof google.protobuf.SourceCodeInfo * @static * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.location != null && message.location.length) for (var i = 0; i < message.location.length; ++i) $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SourceCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.location && message.location.length)) message.location = []; message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a SourceCodeInfo message. * @function verify * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.location != null && message.hasOwnProperty("location")) { if (!Array.isArray(message.location)) return "location: array expected"; for (var i = 0; i < message.location.length; ++i) { var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); if (error) return "location." + error; } } return null; }; /** * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ SourceCodeInfo.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; var message = new $root.google.protobuf.SourceCodeInfo(); if (object.location) { if (!Array.isArray(object.location)) throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); message.location = []; for (var i = 0; i < object.location.length; ++i) { if (typeof object.location[i] !== "object") throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); } } return message; }; /** * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.SourceCodeInfo * @static * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.location = []; if (message.location && message.location.length) { object.location = []; for (var j = 0; j < message.location.length; ++j) object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } return object; }; /** * Converts this SourceCodeInfo to JSON. * @function toJSON * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for SourceCodeInfo * @function getTypeUrl * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; SourceCodeInfo.Location = (function() { /** * Properties of a Location. * @memberof google.protobuf.SourceCodeInfo * @interface ILocation * @property {Array.|null} [path] Location path * @property {Array.|null} [span] Location span * @property {string|null} [leadingComments] Location leadingComments * @property {string|null} [trailingComments] Location trailingComments * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments */ /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo * @classdesc Represents a Location. * @implements ILocation * @constructor * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set */ function Location(properties) { this.path = []; this.span = []; this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Location path. * @member {Array.} path * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ Location.prototype.path = $util.emptyArray; /** * Location span. * @member {Array.} span * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ Location.prototype.span = $util.emptyArray; /** * Location leadingComments. * @member {string} leadingComments * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ Location.prototype.leadingComments = ""; /** * Location trailingComments. * @member {string} trailingComments * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ Location.prototype.trailingComments = ""; /** * Location leadingDetachedComments. * @member {Array.} leadingDetachedComments * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ Location.prototype.leadingDetachedComments = $util.emptyArray; /** * Creates a new Location instance using the specified properties. * @function create * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set * @returns {google.protobuf.SourceCodeInfo.Location} Location instance */ Location.create = function create(properties) { return new Location(properties); }; /** * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encode * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) writer.int32(message.path[i]); writer.ldelim(); } if (message.span != null && message.span.length) { writer.uint32(/* id 2, wireType 2 =*/18).fork(); for (var i = 0; i < message.span.length; ++i) writer.int32(message.span[i]); writer.ldelim(); } if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) for (var i = 0; i < message.leadingDetachedComments.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); return writer; }; /** * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Location message from the specified reader or buffer. * @function decode * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Location.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.path && message.path.length)) message.path = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.path.push(reader.int32()); } else message.path.push(reader.int32()); break; } case 2: { if (!(message.span && message.span.length)) message.span = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.span.push(reader.int32()); } else message.span.push(reader.int32()); break; } case 3: { message.leadingComments = reader.string(); break; } case 4: { message.trailingComments = reader.string(); break; } case 6: { if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) message.leadingDetachedComments = []; message.leadingDetachedComments.push(reader.string()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Location message. * @function verify * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.path != null && message.hasOwnProperty("path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } if (message.span != null && message.hasOwnProperty("span")) { if (!Array.isArray(message.span)) return "span: array expected"; for (var i = 0; i < message.span.length; ++i) if (!$util.isInteger(message.span[i])) return "span: integer[] expected"; } if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) if (!$util.isString(message.leadingComments)) return "leadingComments: string expected"; if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) if (!$util.isString(message.trailingComments)) return "trailingComments: string expected"; if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { if (!Array.isArray(message.leadingDetachedComments)) return "leadingDetachedComments: array expected"; for (var i = 0; i < message.leadingDetachedComments.length; ++i) if (!$util.isString(message.leadingDetachedComments[i])) return "leadingDetachedComments: string[] expected"; } return null; }; /** * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} object Plain object * @returns {google.protobuf.SourceCodeInfo.Location} Location */ Location.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; var message = new $root.google.protobuf.SourceCodeInfo.Location(); if (object.path) { if (!Array.isArray(object.path)) throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); message.path = []; for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.span) { if (!Array.isArray(object.span)) throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); message.span = []; for (var i = 0; i < object.span.length; ++i) message.span[i] = object.span[i] | 0; } if (object.leadingComments != null) message.leadingComments = String(object.leadingComments); if (object.trailingComments != null) message.trailingComments = String(object.trailingComments); if (object.leadingDetachedComments) { if (!Array.isArray(object.leadingDetachedComments)) throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); message.leadingDetachedComments = []; for (var i = 0; i < object.leadingDetachedComments.length; ++i) message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); } return message; }; /** * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {google.protobuf.SourceCodeInfo.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.path = []; object.span = []; object.leadingDetachedComments = []; } if (options.defaults) { object.leadingComments = ""; object.trailingComments = ""; } if (message.path && message.path.length) { object.path = []; for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.span && message.span.length) { object.span = []; for (var j = 0; j < message.span.length; ++j) object.span[j] = message.span[j]; } if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) object.leadingComments = message.leadingComments; if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) object.trailingComments = message.trailingComments; if (message.leadingDetachedComments && message.leadingDetachedComments.length) { object.leadingDetachedComments = []; for (var j = 0; j < message.leadingDetachedComments.length; ++j) object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; } return object; }; /** * Converts this Location to JSON. * @function toJSON * @memberof google.protobuf.SourceCodeInfo.Location * @instance * @returns {Object.} JSON object */ Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Location * @function getTypeUrl * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; }; return Location; })(); return SourceCodeInfo; })(); protobuf.GeneratedCodeInfo = (function() { /** * Properties of a GeneratedCodeInfo. * @memberof google.protobuf * @interface IGeneratedCodeInfo * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf * @classdesc Represents a GeneratedCodeInfo. * @implements IGeneratedCodeInfo * @constructor * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ function GeneratedCodeInfo(properties) { this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * GeneratedCodeInfo annotation. * @member {Array.} annotation * @memberof google.protobuf.GeneratedCodeInfo * @instance */ GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ GeneratedCodeInfo.create = function create(properties) { return new GeneratedCodeInfo(properties); }; /** * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.annotation != null && message.annotation.length) for (var i = 0; i < message.annotation.length; ++i) $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GeneratedCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.annotation && message.annotation.length)) message.annotation = []; message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GeneratedCodeInfo message. * @function verify * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.annotation != null && message.hasOwnProperty("annotation")) { if (!Array.isArray(message.annotation)) return "annotation: array expected"; for (var i = 0; i < message.annotation.length; ++i) { var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); if (error) return "annotation." + error; } } return null; }; /** * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ GeneratedCodeInfo.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; var message = new $root.google.protobuf.GeneratedCodeInfo(); if (object.annotation) { if (!Array.isArray(object.annotation)) throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); message.annotation = []; for (var i = 0; i < object.annotation.length; ++i) { if (typeof object.annotation[i] !== "object") throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); } } return message; }; /** * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.annotation = []; if (message.annotation && message.annotation.length) { object.annotation = []; for (var j = 0; j < message.annotation.length; ++j) object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } return object; }; /** * Converts this GeneratedCodeInfo to JSON. * @function toJSON * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; GeneratedCodeInfo.Annotation = (function() { /** * Properties of an Annotation. * @memberof google.protobuf.GeneratedCodeInfo * @interface IAnnotation * @property {Array.|null} [path] Annotation path * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** * Constructs a new Annotation. * @memberof google.protobuf.GeneratedCodeInfo * @classdesc Represents an Annotation. * @implements IAnnotation * @constructor * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ function Annotation(properties) { this.path = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Annotation path. * @member {Array.} path * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ Annotation.prototype.path = $util.emptyArray; /** * Annotation sourceFile. * @member {string} sourceFile * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ Annotation.prototype.sourceFile = ""; /** * Annotation begin. * @member {number} begin * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ Annotation.prototype.begin = 0; /** * Annotation end. * @member {number} end * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ Annotation.prototype.end = 0; /** * Annotation semantic. * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ Annotation.prototype.semantic = 0; /** * Creates a new Annotation instance using the specified properties. * @function create * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ Annotation.create = function create(properties) { return new Annotation(properties); }; /** * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.path != null && message.path.length) { writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.path.length; ++i) writer.int32(message.path[i]); writer.ldelim(); } if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; /** * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an Annotation message from the specified reader or buffer. * @function decode * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Annotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.path && message.path.length)) message.path = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) message.path.push(reader.int32()); } else message.path.push(reader.int32()); break; } case 2: { message.sourceFile = reader.string(); break; } case 3: { message.begin = reader.int32(); break; } case 4: { message.end = reader.int32(); break; } case 5: { message.semantic = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an Annotation message. * @function verify * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.path != null && message.hasOwnProperty("path")) { if (!Array.isArray(message.path)) return "path: array expected"; for (var i = 0; i < message.path.length; ++i) if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) if (!$util.isString(message.sourceFile)) return "sourceFile: string expected"; if (message.begin != null && message.hasOwnProperty("begin")) if (!$util.isInteger(message.begin)) return "begin: integer expected"; if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; if (message.semantic != null && message.hasOwnProperty("semantic")) switch (message.semantic) { default: return "semantic: enum value expected"; case 0: case 1: case 2: break; } return null; }; /** * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ Annotation.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); if (object.path) { if (!Array.isArray(object.path)) throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); message.path = []; for (var i = 0; i < object.path.length; ++i) message.path[i] = object.path[i] | 0; } if (object.sourceFile != null) message.sourceFile = String(object.sourceFile); if (object.begin != null) message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; switch (object.semantic) { default: if (typeof object.semantic === "number") { message.semantic = object.semantic; break; } break; case "NONE": case 0: message.semantic = 0; break; case "SET": case 1: message.semantic = 1; break; case "ALIAS": case 2: message.semantic = 2; break; } return message; }; /** * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.path = []; if (options.defaults) { object.sourceFile = ""; object.begin = 0; object.end = 0; object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) object.sourceFile = message.sourceFile; if (message.begin != null && message.hasOwnProperty("begin")) object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; /** * Converts this Annotation to JSON. * @function toJSON * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance * @returns {Object.} JSON object */ Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Annotation * @function getTypeUrl * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; }; /** * Semantic enum. * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic * @enum {number} * @property {number} NONE=0 NONE value * @property {number} SET=1 SET value * @property {number} ALIAS=2 ALIAS value */ Annotation.Semantic = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "NONE"] = 0; values[valuesById[1] = "SET"] = 1; values[valuesById[2] = "ALIAS"] = 2; return values; })(); return Annotation; })(); return GeneratedCodeInfo; })(); protobuf.Duration = (function() { /** * Properties of a Duration. * @memberof google.protobuf * @interface IDuration * @property {number|Long|null} [seconds] Duration seconds * @property {number|null} [nanos] Duration nanos */ /** * Constructs a new Duration. * @memberof google.protobuf * @classdesc Represents a Duration. * @implements IDuration * @constructor * @param {google.protobuf.IDuration=} [properties] Properties to set */ function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Duration seconds. * @member {number|Long} seconds * @memberof google.protobuf.Duration * @instance */ Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Duration nanos. * @member {number} nanos * @memberof google.protobuf.Duration * @instance */ Duration.prototype.nanos = 0; /** * Creates a new Duration instance using the specified properties. * @function create * @memberof google.protobuf.Duration * @static * @param {google.protobuf.IDuration=} [properties] Properties to set * @returns {google.protobuf.Duration} Duration instance */ Duration.create = function create(properties) { return new Duration(properties); }; /** * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode * @memberof google.protobuf.Duration * @static * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.Duration * @static * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Duration message from the specified reader or buffer. * @function decode * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.seconds = reader.int64(); break; } case 2: { message.nanos = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Duration message. * @function verify * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.seconds != null && message.hasOwnProperty("seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; if (message.nanos != null && message.hasOwnProperty("nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; }; /** * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object * @returns {google.protobuf.Duration} Duration */ Duration.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.Duration) return object; var message = new $root.google.protobuf.Duration(); if (object.seconds != null) if ($util.Long) (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") message.seconds = object.seconds; else if (typeof object.seconds === "object") message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); if (object.nanos != null) message.nanos = object.nanos | 0; return message; }; /** * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.Duration * @static * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.seconds = options.longs === String ? "0" : 0; object.nanos = 0; } if (message.seconds != null && message.hasOwnProperty("seconds")) if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; if (message.nanos != null && message.hasOwnProperty("nanos")) object.nanos = message.nanos; return object; }; /** * Converts this Duration to JSON. * @function toJSON * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Duration * @function getTypeUrl * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.Duration"; }; return Duration; })(); protobuf.Empty = (function() { /** * Properties of an Empty. * @memberof google.protobuf * @interface IEmpty */ /** * Constructs a new Empty. * @memberof google.protobuf * @classdesc Represents an Empty. * @implements IEmpty * @constructor * @param {google.protobuf.IEmpty=} [properties] Properties to set */ function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Creates a new Empty instance using the specified properties. * @function create * @memberof google.protobuf.Empty * @static * @param {google.protobuf.IEmpty=} [properties] Properties to set * @returns {google.protobuf.Empty} Empty instance */ Empty.create = function create(properties) { return new Empty(properties); }; /** * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode * @memberof google.protobuf.Empty * @static * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.Empty * @static * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an Empty message from the specified reader or buffer. * @function decode * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an Empty message. * @function verify * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object * @returns {google.protobuf.Empty} Empty */ Empty.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.Empty) return object; return new $root.google.protobuf.Empty(); }; /** * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.Empty * @static * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Empty.toObject = function toObject() { return {}; }; /** * Converts this Empty to JSON. * @function toJSON * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Empty * @function getTypeUrl * @memberof google.protobuf.Empty * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.Empty"; }; return Empty; })(); protobuf.Timestamp = (function() { /** * Properties of a Timestamp. * @memberof google.protobuf * @interface ITimestamp * @property {number|Long|null} [seconds] Timestamp seconds * @property {number|null} [nanos] Timestamp nanos */ /** * Constructs a new Timestamp. * @memberof google.protobuf * @classdesc Represents a Timestamp. * @implements ITimestamp * @constructor * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Timestamp seconds. * @member {number|Long} seconds * @memberof google.protobuf.Timestamp * @instance */ Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Timestamp nanos. * @member {number} nanos * @memberof google.protobuf.Timestamp * @instance */ Timestamp.prototype.nanos = 0; /** * Creates a new Timestamp instance using the specified properties. * @function create * @memberof google.protobuf.Timestamp * @static * @param {google.protobuf.ITimestamp=} [properties] Properties to set * @returns {google.protobuf.Timestamp} Timestamp instance */ Timestamp.create = function create(properties) { return new Timestamp(properties); }; /** * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode * @memberof google.protobuf.Timestamp * @static * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.Timestamp * @static * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Timestamp message from the specified reader or buffer. * @function decode * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.seconds = reader.int64(); break; } case 2: { message.nanos = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Timestamp message. * @function verify * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.seconds != null && message.hasOwnProperty("seconds")) if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) return "seconds: integer|Long expected"; if (message.nanos != null && message.hasOwnProperty("nanos")) if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; return null; }; /** * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object * @returns {google.protobuf.Timestamp} Timestamp */ Timestamp.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.Timestamp) return object; var message = new $root.google.protobuf.Timestamp(); if (object.seconds != null) if ($util.Long) (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; else if (typeof object.seconds === "string") message.seconds = parseInt(object.seconds, 10); else if (typeof object.seconds === "number") message.seconds = object.seconds; else if (typeof object.seconds === "object") message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); if (object.nanos != null) message.nanos = object.nanos | 0; return message; }; /** * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.Timestamp * @static * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { if ($util.Long) { var long = new $util.Long(0, 0, false); object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.seconds = options.longs === String ? "0" : 0; object.nanos = 0; } if (message.seconds != null && message.hasOwnProperty("seconds")) if (typeof message.seconds === "number") object.seconds = options.longs === String ? String(message.seconds) : message.seconds; else object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; if (message.nanos != null && message.hasOwnProperty("nanos")) object.nanos = message.nanos; return object; }; /** * Converts this Timestamp to JSON. * @function toJSON * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Timestamp * @function getTypeUrl * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.Timestamp"; }; return Timestamp; })(); protobuf.DoubleValue = (function() { /** * Properties of a DoubleValue. * @memberof google.protobuf * @interface IDoubleValue * @property {number|null} [value] DoubleValue value */ /** * Constructs a new DoubleValue. * @memberof google.protobuf * @classdesc Represents a DoubleValue. * @implements IDoubleValue * @constructor * @param {google.protobuf.IDoubleValue=} [properties] Properties to set */ function DoubleValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * DoubleValue value. * @member {number} value * @memberof google.protobuf.DoubleValue * @instance */ DoubleValue.prototype.value = 0; /** * Creates a new DoubleValue instance using the specified properties. * @function create * @memberof google.protobuf.DoubleValue * @static * @param {google.protobuf.IDoubleValue=} [properties] Properties to set * @returns {google.protobuf.DoubleValue} DoubleValue instance */ DoubleValue.create = function create(properties) { return new DoubleValue(properties); }; /** * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. * @function encode * @memberof google.protobuf.DoubleValue * @static * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ DoubleValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; }; /** * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.DoubleValue * @static * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a DoubleValue message from the specified reader or buffer. * @function decode * @memberof google.protobuf.DoubleValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.DoubleValue} DoubleValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DoubleValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.double(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a DoubleValue message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.DoubleValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.DoubleValue} DoubleValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ DoubleValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a DoubleValue message. * @function verify * @memberof google.protobuf.DoubleValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ DoubleValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; return null; }; /** * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.DoubleValue * @static * @param {Object.} object Plain object * @returns {google.protobuf.DoubleValue} DoubleValue */ DoubleValue.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.DoubleValue) return object; var message = new $root.google.protobuf.DoubleValue(); if (object.value != null) message.value = Number(object.value); return message; }; /** * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.DoubleValue * @static * @param {google.protobuf.DoubleValue} message DoubleValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ DoubleValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = 0; if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** * Converts this DoubleValue to JSON. * @function toJSON * @memberof google.protobuf.DoubleValue * @instance * @returns {Object.} JSON object */ DoubleValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for DoubleValue * @function getTypeUrl * @memberof google.protobuf.DoubleValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.DoubleValue"; }; return DoubleValue; })(); protobuf.FloatValue = (function() { /** * Properties of a FloatValue. * @memberof google.protobuf * @interface IFloatValue * @property {number|null} [value] FloatValue value */ /** * Constructs a new FloatValue. * @memberof google.protobuf * @classdesc Represents a FloatValue. * @implements IFloatValue * @constructor * @param {google.protobuf.IFloatValue=} [properties] Properties to set */ function FloatValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * FloatValue value. * @member {number} value * @memberof google.protobuf.FloatValue * @instance */ FloatValue.prototype.value = 0; /** * Creates a new FloatValue instance using the specified properties. * @function create * @memberof google.protobuf.FloatValue * @static * @param {google.protobuf.IFloatValue=} [properties] Properties to set * @returns {google.protobuf.FloatValue} FloatValue instance */ FloatValue.create = function create(properties) { return new FloatValue(properties); }; /** * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encode * @memberof google.protobuf.FloatValue * @static * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FloatValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; }; /** * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.FloatValue * @static * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FloatValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a FloatValue message from the specified reader or buffer. * @function decode * @memberof google.protobuf.FloatValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.FloatValue} FloatValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FloatValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.float(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a FloatValue message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.FloatValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.FloatValue} FloatValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FloatValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a FloatValue message. * @function verify * @memberof google.protobuf.FloatValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ FloatValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "number") return "value: number expected"; return null; }; /** * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.FloatValue * @static * @param {Object.} object Plain object * @returns {google.protobuf.FloatValue} FloatValue */ FloatValue.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.FloatValue) return object; var message = new $root.google.protobuf.FloatValue(); if (object.value != null) message.value = Number(object.value); return message; }; /** * Creates a plain object from a FloatValue message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.FloatValue * @static * @param {google.protobuf.FloatValue} message FloatValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ FloatValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = 0; if (message.value != null && message.hasOwnProperty("value")) object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** * Converts this FloatValue to JSON. * @function toJSON * @memberof google.protobuf.FloatValue * @instance * @returns {Object.} JSON object */ FloatValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for FloatValue * @function getTypeUrl * @memberof google.protobuf.FloatValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.FloatValue"; }; return FloatValue; })(); protobuf.Int64Value = (function() { /** * Properties of an Int64Value. * @memberof google.protobuf * @interface IInt64Value * @property {number|Long|null} [value] Int64Value value */ /** * Constructs a new Int64Value. * @memberof google.protobuf * @classdesc Represents an Int64Value. * @implements IInt64Value * @constructor * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ function Int64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Int64Value value. * @member {number|Long} value * @memberof google.protobuf.Int64Value * @instance */ Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new Int64Value instance using the specified properties. * @function create * @memberof google.protobuf.Int64Value * @static * @param {google.protobuf.IInt64Value=} [properties] Properties to set * @returns {google.protobuf.Int64Value} Int64Value instance */ Int64Value.create = function create(properties) { return new Int64Value(properties); }; /** * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encode * @memberof google.protobuf.Int64Value * @static * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Int64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; }; /** * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.Int64Value * @static * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Int64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an Int64Value message from the specified reader or buffer. * @function decode * @memberof google.protobuf.Int64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.Int64Value} Int64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Int64Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an Int64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.Int64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.Int64Value} Int64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Int64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an Int64Value message. * @function verify * @memberof google.protobuf.Int64Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Int64Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; }; /** * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.Int64Value * @static * @param {Object.} object Plain object * @returns {google.protobuf.Int64Value} Int64Value */ Int64Value.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.Int64Value) return object; var message = new $root.google.protobuf.Int64Value(); if (object.value != null) if ($util.Long) (message.value = $util.Long.fromValue(object.value)).unsigned = false; else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") message.value = object.value; else if (typeof object.value === "object") message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from an Int64Value message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.Int64Value * @static * @param {google.protobuf.Int64Value} message Int64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Int64Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.value = options.longs === String ? "0" : 0; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; /** * Converts this Int64Value to JSON. * @function toJSON * @memberof google.protobuf.Int64Value * @instance * @returns {Object.} JSON object */ Int64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Int64Value * @function getTypeUrl * @memberof google.protobuf.Int64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.Int64Value"; }; return Int64Value; })(); protobuf.UInt64Value = (function() { /** * Properties of a UInt64Value. * @memberof google.protobuf * @interface IUInt64Value * @property {number|Long|null} [value] UInt64Value value */ /** * Constructs a new UInt64Value. * @memberof google.protobuf * @classdesc Represents a UInt64Value. * @implements IUInt64Value * @constructor * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ function UInt64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * UInt64Value value. * @member {number|Long} value * @memberof google.protobuf.UInt64Value * @instance */ UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** * Creates a new UInt64Value instance using the specified properties. * @function create * @memberof google.protobuf.UInt64Value * @static * @param {google.protobuf.IUInt64Value=} [properties] Properties to set * @returns {google.protobuf.UInt64Value} UInt64Value instance */ UInt64Value.create = function create(properties) { return new UInt64Value(properties); }; /** * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encode * @memberof google.protobuf.UInt64Value * @static * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UInt64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; }; /** * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.UInt64Value * @static * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a UInt64Value message from the specified reader or buffer. * @function decode * @memberof google.protobuf.UInt64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.UInt64Value} UInt64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UInt64Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.uint64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a UInt64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.UInt64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.UInt64Value} UInt64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UInt64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a UInt64Value message. * @function verify * @memberof google.protobuf.UInt64Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ UInt64Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; return null; }; /** * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.UInt64Value * @static * @param {Object.} object Plain object * @returns {google.protobuf.UInt64Value} UInt64Value */ UInt64Value.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.UInt64Value) return object; var message = new $root.google.protobuf.UInt64Value(); if (object.value != null) if ($util.Long) (message.value = $util.Long.fromValue(object.value)).unsigned = true; else if (typeof object.value === "string") message.value = parseInt(object.value, 10); else if (typeof object.value === "number") message.value = object.value; else if (typeof object.value === "object") message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); return message; }; /** * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.UInt64Value * @static * @param {google.protobuf.UInt64Value} message UInt64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ UInt64Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.value = options.longs === String ? "0" : 0; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; return object; }; /** * Converts this UInt64Value to JSON. * @function toJSON * @memberof google.protobuf.UInt64Value * @instance * @returns {Object.} JSON object */ UInt64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for UInt64Value * @function getTypeUrl * @memberof google.protobuf.UInt64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.UInt64Value"; }; return UInt64Value; })(); protobuf.Int32Value = (function() { /** * Properties of an Int32Value. * @memberof google.protobuf * @interface IInt32Value * @property {number|null} [value] Int32Value value */ /** * Constructs a new Int32Value. * @memberof google.protobuf * @classdesc Represents an Int32Value. * @implements IInt32Value * @constructor * @param {google.protobuf.IInt32Value=} [properties] Properties to set */ function Int32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Int32Value value. * @member {number} value * @memberof google.protobuf.Int32Value * @instance */ Int32Value.prototype.value = 0; /** * Creates a new Int32Value instance using the specified properties. * @function create * @memberof google.protobuf.Int32Value * @static * @param {google.protobuf.IInt32Value=} [properties] Properties to set * @returns {google.protobuf.Int32Value} Int32Value instance */ Int32Value.create = function create(properties) { return new Int32Value(properties); }; /** * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. * @function encode * @memberof google.protobuf.Int32Value * @static * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Int32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); return writer; }; /** * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.Int32Value * @static * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Int32Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an Int32Value message from the specified reader or buffer. * @function decode * @memberof google.protobuf.Int32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.Int32Value} Int32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Int32Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an Int32Value message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.Int32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.Int32Value} Int32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Int32Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an Int32Value message. * @function verify * @memberof google.protobuf.Int32Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Int32Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; }; /** * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.Int32Value * @static * @param {Object.} object Plain object * @returns {google.protobuf.Int32Value} Int32Value */ Int32Value.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.Int32Value) return object; var message = new $root.google.protobuf.Int32Value(); if (object.value != null) message.value = object.value | 0; return message; }; /** * Creates a plain object from an Int32Value message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.Int32Value * @static * @param {google.protobuf.Int32Value} message Int32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Int32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = 0; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; /** * Converts this Int32Value to JSON. * @function toJSON * @memberof google.protobuf.Int32Value * @instance * @returns {Object.} JSON object */ Int32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Int32Value * @function getTypeUrl * @memberof google.protobuf.Int32Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.Int32Value"; }; return Int32Value; })(); protobuf.UInt32Value = (function() { /** * Properties of a UInt32Value. * @memberof google.protobuf * @interface IUInt32Value * @property {number|null} [value] UInt32Value value */ /** * Constructs a new UInt32Value. * @memberof google.protobuf * @classdesc Represents a UInt32Value. * @implements IUInt32Value * @constructor * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ function UInt32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * UInt32Value value. * @member {number} value * @memberof google.protobuf.UInt32Value * @instance */ UInt32Value.prototype.value = 0; /** * Creates a new UInt32Value instance using the specified properties. * @function create * @memberof google.protobuf.UInt32Value * @static * @param {google.protobuf.IUInt32Value=} [properties] Properties to set * @returns {google.protobuf.UInt32Value} UInt32Value instance */ UInt32Value.create = function create(properties) { return new UInt32Value(properties); }; /** * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encode * @memberof google.protobuf.UInt32Value * @static * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UInt32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; }; /** * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.UInt32Value * @static * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a UInt32Value message from the specified reader or buffer. * @function decode * @memberof google.protobuf.UInt32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.UInt32Value} UInt32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UInt32Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.uint32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a UInt32Value message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.UInt32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.UInt32Value} UInt32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ UInt32Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a UInt32Value message. * @function verify * @memberof google.protobuf.UInt32Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ UInt32Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (!$util.isInteger(message.value)) return "value: integer expected"; return null; }; /** * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.UInt32Value * @static * @param {Object.} object Plain object * @returns {google.protobuf.UInt32Value} UInt32Value */ UInt32Value.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.UInt32Value) return object; var message = new $root.google.protobuf.UInt32Value(); if (object.value != null) message.value = object.value >>> 0; return message; }; /** * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.UInt32Value * @static * @param {google.protobuf.UInt32Value} message UInt32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ UInt32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = 0; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; /** * Converts this UInt32Value to JSON. * @function toJSON * @memberof google.protobuf.UInt32Value * @instance * @returns {Object.} JSON object */ UInt32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for UInt32Value * @function getTypeUrl * @memberof google.protobuf.UInt32Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.UInt32Value"; }; return UInt32Value; })(); protobuf.BoolValue = (function() { /** * Properties of a BoolValue. * @memberof google.protobuf * @interface IBoolValue * @property {boolean|null} [value] BoolValue value */ /** * Constructs a new BoolValue. * @memberof google.protobuf * @classdesc Represents a BoolValue. * @implements IBoolValue * @constructor * @param {google.protobuf.IBoolValue=} [properties] Properties to set */ function BoolValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * BoolValue value. * @member {boolean} value * @memberof google.protobuf.BoolValue * @instance */ BoolValue.prototype.value = false; /** * Creates a new BoolValue instance using the specified properties. * @function create * @memberof google.protobuf.BoolValue * @static * @param {google.protobuf.IBoolValue=} [properties] Properties to set * @returns {google.protobuf.BoolValue} BoolValue instance */ BoolValue.create = function create(properties) { return new BoolValue(properties); }; /** * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. * @function encode * @memberof google.protobuf.BoolValue * @static * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BoolValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); return writer; }; /** * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.BoolValue * @static * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BoolValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a BoolValue message from the specified reader or buffer. * @function decode * @memberof google.protobuf.BoolValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.BoolValue} BoolValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BoolValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.bool(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a BoolValue message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.BoolValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.BoolValue} BoolValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BoolValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a BoolValue message. * @function verify * @memberof google.protobuf.BoolValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BoolValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (typeof message.value !== "boolean") return "value: boolean expected"; return null; }; /** * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.BoolValue * @static * @param {Object.} object Plain object * @returns {google.protobuf.BoolValue} BoolValue */ BoolValue.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.BoolValue) return object; var message = new $root.google.protobuf.BoolValue(); if (object.value != null) message.value = Boolean(object.value); return message; }; /** * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.BoolValue * @static * @param {google.protobuf.BoolValue} message BoolValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ BoolValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = false; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; /** * Converts this BoolValue to JSON. * @function toJSON * @memberof google.protobuf.BoolValue * @instance * @returns {Object.} JSON object */ BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for BoolValue * @function getTypeUrl * @memberof google.protobuf.BoolValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.BoolValue"; }; return BoolValue; })(); protobuf.StringValue = (function() { /** * Properties of a StringValue. * @memberof google.protobuf * @interface IStringValue * @property {string|null} [value] StringValue value */ /** * Constructs a new StringValue. * @memberof google.protobuf * @classdesc Represents a StringValue. * @implements IStringValue * @constructor * @param {google.protobuf.IStringValue=} [properties] Properties to set */ function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * StringValue value. * @member {string} value * @memberof google.protobuf.StringValue * @instance */ StringValue.prototype.value = ""; /** * Creates a new StringValue instance using the specified properties. * @function create * @memberof google.protobuf.StringValue * @static * @param {google.protobuf.IStringValue=} [properties] Properties to set * @returns {google.protobuf.StringValue} StringValue instance */ StringValue.create = function create(properties) { return new StringValue(properties); }; /** * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encode * @memberof google.protobuf.StringValue * @static * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ StringValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.StringValue * @static * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ StringValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a StringValue message from the specified reader or buffer. * @function decode * @memberof google.protobuf.StringValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.StringValue} StringValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ StringValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a StringValue message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.StringValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.StringValue} StringValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ StringValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a StringValue message. * @function verify * @memberof google.protobuf.StringValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ StringValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (!$util.isString(message.value)) return "value: string expected"; return null; }; /** * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.StringValue * @static * @param {Object.} object Plain object * @returns {google.protobuf.StringValue} StringValue */ StringValue.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.StringValue) return object; var message = new $root.google.protobuf.StringValue(); if (object.value != null) message.value = String(object.value); return message; }; /** * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.StringValue * @static * @param {google.protobuf.StringValue} message StringValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ StringValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = ""; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; /** * Converts this StringValue to JSON. * @function toJSON * @memberof google.protobuf.StringValue * @instance * @returns {Object.} JSON object */ StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for StringValue * @function getTypeUrl * @memberof google.protobuf.StringValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.StringValue"; }; return StringValue; })(); protobuf.BytesValue = (function() { /** * Properties of a BytesValue. * @memberof google.protobuf * @interface IBytesValue * @property {Uint8Array|null} [value] BytesValue value */ /** * Constructs a new BytesValue. * @memberof google.protobuf * @classdesc Represents a BytesValue. * @implements IBytesValue * @constructor * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ function BytesValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * BytesValue value. * @member {Uint8Array} value * @memberof google.protobuf.BytesValue * @instance */ BytesValue.prototype.value = $util.newBuffer([]); /** * Creates a new BytesValue instance using the specified properties. * @function create * @memberof google.protobuf.BytesValue * @static * @param {google.protobuf.IBytesValue=} [properties] Properties to set * @returns {google.protobuf.BytesValue} BytesValue instance */ BytesValue.create = function create(properties) { return new BytesValue(properties); }; /** * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encode * @memberof google.protobuf.BytesValue * @static * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BytesValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; }; /** * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.BytesValue * @static * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ BytesValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a BytesValue message from the specified reader or buffer. * @function decode * @memberof google.protobuf.BytesValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.BytesValue} BytesValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BytesValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.value = reader.bytes(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a BytesValue message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.BytesValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.BytesValue} BytesValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ BytesValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a BytesValue message. * @function verify * @memberof google.protobuf.BytesValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ BytesValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; }; /** * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.BytesValue * @static * @param {Object.} object Plain object * @returns {google.protobuf.BytesValue} BytesValue */ BytesValue.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.BytesValue) return object; var message = new $root.google.protobuf.BytesValue(); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); else if (object.value.length >= 0) message.value = object.value; return message; }; /** * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.BytesValue * @static * @param {google.protobuf.BytesValue} message BytesValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ BytesValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) if (options.bytes === String) object.value = ""; else { object.value = []; if (options.bytes !== Array) object.value = $util.newBuffer(object.value); } if (message.value != null && message.hasOwnProperty("value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** * Converts this BytesValue to JSON. * @function toJSON * @memberof google.protobuf.BytesValue * @instance * @returns {Object.} JSON object */ BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for BytesValue * @function getTypeUrl * @memberof google.protobuf.BytesValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.BytesValue"; }; return BytesValue; })(); protobuf.Any = (function() { /** * Properties of an Any. * @memberof google.protobuf * @interface IAny * @property {string|null} [type_url] Any type_url * @property {Uint8Array|null} [value] Any value */ /** * Constructs a new Any. * @memberof google.protobuf * @classdesc Represents an Any. * @implements IAny * @constructor * @param {google.protobuf.IAny=} [properties] Properties to set */ function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Any type_url. * @member {string} type_url * @memberof google.protobuf.Any * @instance */ Any.prototype.type_url = ""; /** * Any value. * @member {Uint8Array} value * @memberof google.protobuf.Any * @instance */ Any.prototype.value = $util.newBuffer([]); /** * Creates a new Any instance using the specified properties. * @function create * @memberof google.protobuf.Any * @static * @param {google.protobuf.IAny=} [properties] Properties to set * @returns {google.protobuf.Any} Any instance */ Any.create = function create(properties) { return new Any(properties); }; /** * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode * @memberof google.protobuf.Any * @static * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited * @memberof google.protobuf.Any * @static * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an Any message from the specified reader or buffer. * @function decode * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.type_url = reader.string(); break; } case 2: { message.value = reader.bytes(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an Any message. * @function verify * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.type_url != null && message.hasOwnProperty("type_url")) if (!$util.isString(message.type_url)) return "type_url: string expected"; if (message.value != null && message.hasOwnProperty("value")) if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) return "value: buffer expected"; return null; }; /** * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object * @returns {google.protobuf.Any} Any */ Any.fromObject = function fromObject(object) { if (object instanceof $root.google.protobuf.Any) return object; var message = new $root.google.protobuf.Any(); if (object.type_url != null) message.type_url = String(object.type_url); if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); else if (object.value.length >= 0) message.value = object.value; return message; }; /** * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject * @memberof google.protobuf.Any * @static * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.type_url = ""; if (options.bytes === String) object.value = ""; else { object.value = []; if (options.bytes !== Array) object.value = $util.newBuffer(object.value); } } if (message.type_url != null && message.hasOwnProperty("type_url")) object.type_url = message.type_url; if (message.value != null && message.hasOwnProperty("value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** * Converts this Any to JSON. * @function toJSON * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Any * @function getTypeUrl * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.protobuf.Any"; }; return Any; })(); return protobuf; })(); google.rpc = (function() { /** * Namespace rpc. * @memberof google * @namespace */ var rpc = {}; /** * Code enum. * @name google.rpc.Code * @enum {number} * @property {number} OK=0 OK value * @property {number} CANCELLED=1 CANCELLED value * @property {number} UNKNOWN=2 UNKNOWN value * @property {number} INVALID_ARGUMENT=3 INVALID_ARGUMENT value * @property {number} DEADLINE_EXCEEDED=4 DEADLINE_EXCEEDED value * @property {number} NOT_FOUND=5 NOT_FOUND value * @property {number} ALREADY_EXISTS=6 ALREADY_EXISTS value * @property {number} PERMISSION_DENIED=7 PERMISSION_DENIED value * @property {number} UNAUTHENTICATED=16 UNAUTHENTICATED value * @property {number} RESOURCE_EXHAUSTED=8 RESOURCE_EXHAUSTED value * @property {number} FAILED_PRECONDITION=9 FAILED_PRECONDITION value * @property {number} ABORTED=10 ABORTED value * @property {number} OUT_OF_RANGE=11 OUT_OF_RANGE value * @property {number} UNIMPLEMENTED=12 UNIMPLEMENTED value * @property {number} INTERNAL=13 INTERNAL value * @property {number} UNAVAILABLE=14 UNAVAILABLE value * @property {number} DATA_LOSS=15 DATA_LOSS value */ rpc.Code = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OK"] = 0; values[valuesById[1] = "CANCELLED"] = 1; values[valuesById[2] = "UNKNOWN"] = 2; values[valuesById[3] = "INVALID_ARGUMENT"] = 3; values[valuesById[4] = "DEADLINE_EXCEEDED"] = 4; values[valuesById[5] = "NOT_FOUND"] = 5; values[valuesById[6] = "ALREADY_EXISTS"] = 6; values[valuesById[7] = "PERMISSION_DENIED"] = 7; values[valuesById[16] = "UNAUTHENTICATED"] = 16; values[valuesById[8] = "RESOURCE_EXHAUSTED"] = 8; values[valuesById[9] = "FAILED_PRECONDITION"] = 9; values[valuesById[10] = "ABORTED"] = 10; values[valuesById[11] = "OUT_OF_RANGE"] = 11; values[valuesById[12] = "UNIMPLEMENTED"] = 12; values[valuesById[13] = "INTERNAL"] = 13; values[valuesById[14] = "UNAVAILABLE"] = 14; values[valuesById[15] = "DATA_LOSS"] = 15; return values; })(); rpc.Status = (function() { /** * Properties of a Status. * @memberof google.rpc * @interface IStatus * @property {number|null} [code] Status code * @property {string|null} [message] Status message * @property {Array.|null} [details] Status details */ /** * Constructs a new Status. * @memberof google.rpc * @classdesc Represents a Status. * @implements IStatus * @constructor * @param {google.rpc.IStatus=} [properties] Properties to set */ function Status(properties) { this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Status code. * @member {number} code * @memberof google.rpc.Status * @instance */ Status.prototype.code = 0; /** * Status message. * @member {string} message * @memberof google.rpc.Status * @instance */ Status.prototype.message = ""; /** * Status details. * @member {Array.} details * @memberof google.rpc.Status * @instance */ Status.prototype.details = $util.emptyArray; /** * Creates a new Status instance using the specified properties. * @function create * @memberof google.rpc.Status * @static * @param {google.rpc.IStatus=} [properties] Properties to set * @returns {google.rpc.Status} Status instance */ Status.create = function create(properties) { return new Status(properties); }; /** * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode * @memberof google.rpc.Status * @static * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.details != null && message.details.length) for (var i = 0; i < message.details.length; ++i) $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited * @memberof google.rpc.Status * @static * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Status message from the specified reader or buffer. * @function decode * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.rpc.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Status.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.code = reader.int32(); break; } case 2: { message.message = reader.string(); break; } case 3: { if (!(message.details && message.details.length)) message.details = []; message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.rpc.Status} Status * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Status message. * @function verify * @memberof google.rpc.Status * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.code != null && message.hasOwnProperty("code")) if (!$util.isInteger(message.code)) return "code: integer expected"; if (message.message != null && message.hasOwnProperty("message")) if (!$util.isString(message.message)) return "message: string expected"; if (message.details != null && message.hasOwnProperty("details")) { if (!Array.isArray(message.details)) return "details: array expected"; for (var i = 0; i < message.details.length; ++i) { var error = $root.google.protobuf.Any.verify(message.details[i]); if (error) return "details." + error; } } return null; }; /** * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.rpc.Status * @static * @param {Object.} object Plain object * @returns {google.rpc.Status} Status */ Status.fromObject = function fromObject(object) { if (object instanceof $root.google.rpc.Status) return object; var message = new $root.google.rpc.Status(); if (object.code != null) message.code = object.code | 0; if (object.message != null) message.message = String(object.message); if (object.details) { if (!Array.isArray(object.details)) throw TypeError(".google.rpc.Status.details: array expected"); message.details = []; for (var i = 0; i < object.details.length; ++i) { if (typeof object.details[i] !== "object") throw TypeError(".google.rpc.Status.details: object expected"); message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); } } return message; }; /** * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject * @memberof google.rpc.Status * @static * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.details = []; if (options.defaults) { object.code = 0; object.message = ""; } if (message.code != null && message.hasOwnProperty("code")) object.code = message.code; if (message.message != null && message.hasOwnProperty("message")) object.message = message.message; if (message.details && message.details.length) { object.details = []; for (var j = 0; j < message.details.length; ++j) object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); } return object; }; /** * Converts this Status to JSON. * @function toJSON * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Status * @function getTypeUrl * @memberof google.rpc.Status * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.rpc.Status"; }; return Status; })(); return rpc; })(); google.type = (function() { /** * Namespace type. * @memberof google * @namespace */ var type = {}; type.Date = (function() { /** * Properties of a Date. * @memberof google.type * @interface IDate * @property {number|null} [year] Date year * @property {number|null} [month] Date month * @property {number|null} [day] Date day */ /** * Constructs a new Date. * @memberof google.type * @classdesc Represents a Date. * @implements IDate * @constructor * @param {google.type.IDate=} [properties] Properties to set */ function Date(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Date year. * @member {number} year * @memberof google.type.Date * @instance */ Date.prototype.year = 0; /** * Date month. * @member {number} month * @memberof google.type.Date * @instance */ Date.prototype.month = 0; /** * Date day. * @member {number} day * @memberof google.type.Date * @instance */ Date.prototype.day = 0; /** * Creates a new Date instance using the specified properties. * @function create * @memberof google.type.Date * @static * @param {google.type.IDate=} [properties] Properties to set * @returns {google.type.Date} Date instance */ Date.create = function create(properties) { return new Date(properties); }; /** * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encode * @memberof google.type.Date * @static * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Date.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.year != null && Object.hasOwnProperty.call(message, "year")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); if (message.month != null && Object.hasOwnProperty.call(message, "month")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); if (message.day != null && Object.hasOwnProperty.call(message, "day")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); return writer; }; /** * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. * @function encodeDelimited * @memberof google.type.Date * @static * @param {google.type.IDate} message Date message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Date.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Date message from the specified reader or buffer. * @function decode * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Date.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.year = reader.int32(); break; } case 2: { message.month = reader.int32(); break; } case 3: { message.day = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Date message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.type.Date * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.type.Date} Date * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Date.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Date message. * @function verify * @memberof google.type.Date * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Date.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.year != null && message.hasOwnProperty("year")) if (!$util.isInteger(message.year)) return "year: integer expected"; if (message.month != null && message.hasOwnProperty("month")) if (!$util.isInteger(message.month)) return "month: integer expected"; if (message.day != null && message.hasOwnProperty("day")) if (!$util.isInteger(message.day)) return "day: integer expected"; return null; }; /** * Creates a Date message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.type.Date * @static * @param {Object.} object Plain object * @returns {google.type.Date} Date */ Date.fromObject = function fromObject(object) { if (object instanceof $root.google.type.Date) return object; var message = new $root.google.type.Date(); if (object.year != null) message.year = object.year | 0; if (object.month != null) message.month = object.month | 0; if (object.day != null) message.day = object.day | 0; return message; }; /** * Creates a plain object from a Date message. Also converts values to other types if specified. * @function toObject * @memberof google.type.Date * @static * @param {google.type.Date} message Date * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Date.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.year = 0; object.month = 0; object.day = 0; } if (message.year != null && message.hasOwnProperty("year")) object.year = message.year; if (message.month != null && message.hasOwnProperty("month")) object.month = message.month; if (message.day != null && message.hasOwnProperty("day")) object.day = message.day; return object; }; /** * Converts this Date to JSON. * @function toJSON * @memberof google.type.Date * @instance * @returns {Object.} JSON object */ Date.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Date * @function getTypeUrl * @memberof google.type.Date * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.type.Date"; }; return Date; })(); return type; })(); return google; })(); return $root; });