UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

1,577 lines (1,395 loc) 88 kB
// source: google/rpc/context/attribute_context.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); goog.object.extend(proto, google_protobuf_struct_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.google.rpc.context.AttributeContext', null, global); goog.exportSymbol('proto.google.rpc.context.AttributeContext.Api', null, global); goog.exportSymbol('proto.google.rpc.context.AttributeContext.Auth', null, global); goog.exportSymbol('proto.google.rpc.context.AttributeContext.Peer', null, global); goog.exportSymbol('proto.google.rpc.context.AttributeContext.Request', null, global); goog.exportSymbol('proto.google.rpc.context.AttributeContext.Resource', null, global); goog.exportSymbol('proto.google.rpc.context.AttributeContext.Response', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.context.AttributeContext.repeatedFields_, null); }; goog.inherits(proto.google.rpc.context.AttributeContext, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.displayName = 'proto.google.rpc.context.AttributeContext'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext.Peer = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.rpc.context.AttributeContext.Peer, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.Peer.displayName = 'proto.google.rpc.context.AttributeContext.Peer'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext.Api = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.rpc.context.AttributeContext.Api, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.Api.displayName = 'proto.google.rpc.context.AttributeContext.Api'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext.Auth = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.context.AttributeContext.Auth.repeatedFields_, null); }; goog.inherits(proto.google.rpc.context.AttributeContext.Auth, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.Auth.displayName = 'proto.google.rpc.context.AttributeContext.Auth'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext.Request = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.rpc.context.AttributeContext.Request, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.Request.displayName = 'proto.google.rpc.context.AttributeContext.Request'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext.Response = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.rpc.context.AttributeContext.Response, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.Response.displayName = 'proto.google.rpc.context.AttributeContext.Response'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.google.rpc.context.AttributeContext.Resource = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.rpc.context.AttributeContext.Resource, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.rpc.context.AttributeContext.Resource.displayName = 'proto.google.rpc.context.AttributeContext.Resource'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.rpc.context.AttributeContext.repeatedFields_ = [8]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.google.rpc.context.AttributeContext.prototype.toObject = function(opt_includeInstance) { return proto.google.rpc.context.AttributeContext.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.rpc.context.AttributeContext} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.toObject = function(includeInstance, msg) { var f, obj = { origin: (f = msg.getOrigin()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f), source: (f = msg.getSource()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f), destination: (f = msg.getDestination()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f), request: (f = msg.getRequest()) && proto.google.rpc.context.AttributeContext.Request.toObject(includeInstance, f), response: (f = msg.getResponse()) && proto.google.rpc.context.AttributeContext.Response.toObject(includeInstance, f), resource: (f = msg.getResource()) && proto.google.rpc.context.AttributeContext.Resource.toObject(includeInstance, f), api: (f = msg.getApi()) && proto.google.rpc.context.AttributeContext.Api.toObject(includeInstance, f), extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), google_protobuf_any_pb.Any.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.rpc.context.AttributeContext} */ proto.google.rpc.context.AttributeContext.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.rpc.context.AttributeContext; return proto.google.rpc.context.AttributeContext.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.rpc.context.AttributeContext} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.rpc.context.AttributeContext} */ proto.google.rpc.context.AttributeContext.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 7: var value = new proto.google.rpc.context.AttributeContext.Peer; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader); msg.setOrigin(value); break; case 1: var value = new proto.google.rpc.context.AttributeContext.Peer; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader); msg.setSource(value); break; case 2: var value = new proto.google.rpc.context.AttributeContext.Peer; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader); msg.setDestination(value); break; case 3: var value = new proto.google.rpc.context.AttributeContext.Request; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader); msg.setRequest(value); break; case 4: var value = new proto.google.rpc.context.AttributeContext.Response; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader); msg.setResponse(value); break; case 5: var value = new proto.google.rpc.context.AttributeContext.Resource; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader); msg.setResource(value); break; case 6: var value = new proto.google.rpc.context.AttributeContext.Api; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader); msg.setApi(value); break; case 8: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.addExtensions(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.rpc.context.AttributeContext.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.rpc.context.AttributeContext.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.rpc.context.AttributeContext} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOrigin(); if (f != null) { writer.writeMessage( 7, f, proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter ); } f = message.getSource(); if (f != null) { writer.writeMessage( 1, f, proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter ); } f = message.getDestination(); if (f != null) { writer.writeMessage( 2, f, proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter ); } f = message.getRequest(); if (f != null) { writer.writeMessage( 3, f, proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter ); } f = message.getResponse(); if (f != null) { writer.writeMessage( 4, f, proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter ); } f = message.getResource(); if (f != null) { writer.writeMessage( 5, f, proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter ); } f = message.getApi(); if (f != null) { writer.writeMessage( 6, f, proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter ); } f = message.getExtensionsList(); if (f.length > 0) { writer.writeRepeatedMessage( 8, f, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.google.rpc.context.AttributeContext.Peer.prototype.toObject = function(opt_includeInstance) { return proto.google.rpc.context.AttributeContext.Peer.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.rpc.context.AttributeContext.Peer} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Peer.toObject = function(includeInstance, msg) { var f, obj = { ip: jspb.Message.getFieldWithDefault(msg, 1, ""), port: jspb.Message.getFieldWithDefault(msg, 2, 0), labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [], principal: jspb.Message.getFieldWithDefault(msg, 7, ""), regionCode: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.rpc.context.AttributeContext.Peer} */ proto.google.rpc.context.AttributeContext.Peer.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.rpc.context.AttributeContext.Peer; return proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.rpc.context.AttributeContext.Peer} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.rpc.context.AttributeContext.Peer} */ proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setIp(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setPort(value); break; case 6: var value = msg.getLabelsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setPrincipal(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setRegionCode(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.rpc.context.AttributeContext.Peer.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.rpc.context.AttributeContext.Peer} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIp(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPort(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getLabelsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getPrincipal(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getRegionCode(); if (f.length > 0) { writer.writeString( 8, f ); } }; /** * optional string ip = 1; * @return {string} */ proto.google.rpc.context.AttributeContext.Peer.prototype.getIp = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this */ proto.google.rpc.context.AttributeContext.Peer.prototype.setIp = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int64 port = 2; * @return {number} */ proto.google.rpc.context.AttributeContext.Peer.prototype.getPort = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this */ proto.google.rpc.context.AttributeContext.Peer.prototype.setPort = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * map<string, string> labels = 6; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.google.rpc.context.AttributeContext.Peer.prototype.getLabelsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 6, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this */ proto.google.rpc.context.AttributeContext.Peer.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); return this;}; /** * optional string principal = 7; * @return {string} */ proto.google.rpc.context.AttributeContext.Peer.prototype.getPrincipal = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this */ proto.google.rpc.context.AttributeContext.Peer.prototype.setPrincipal = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string region_code = 8; * @return {string} */ proto.google.rpc.context.AttributeContext.Peer.prototype.getRegionCode = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this */ proto.google.rpc.context.AttributeContext.Peer.prototype.setRegionCode = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.google.rpc.context.AttributeContext.Api.prototype.toObject = function(opt_includeInstance) { return proto.google.rpc.context.AttributeContext.Api.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.rpc.context.AttributeContext.Api} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Api.toObject = function(includeInstance, msg) { var f, obj = { service: jspb.Message.getFieldWithDefault(msg, 1, ""), operation: jspb.Message.getFieldWithDefault(msg, 2, ""), protocol: jspb.Message.getFieldWithDefault(msg, 3, ""), version: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.rpc.context.AttributeContext.Api} */ proto.google.rpc.context.AttributeContext.Api.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.rpc.context.AttributeContext.Api; return proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.rpc.context.AttributeContext.Api} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.rpc.context.AttributeContext.Api} */ proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setService(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setOperation(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setProtocol(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setVersion(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.rpc.context.AttributeContext.Api.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.rpc.context.AttributeContext.Api} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getService(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getOperation(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getProtocol(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getVersion(); if (f.length > 0) { writer.writeString( 4, f ); } }; /** * optional string service = 1; * @return {string} */ proto.google.rpc.context.AttributeContext.Api.prototype.getService = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Api} returns this */ proto.google.rpc.context.AttributeContext.Api.prototype.setService = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string operation = 2; * @return {string} */ proto.google.rpc.context.AttributeContext.Api.prototype.getOperation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Api} returns this */ proto.google.rpc.context.AttributeContext.Api.prototype.setOperation = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string protocol = 3; * @return {string} */ proto.google.rpc.context.AttributeContext.Api.prototype.getProtocol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Api} returns this */ proto.google.rpc.context.AttributeContext.Api.prototype.setProtocol = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string version = 4; * @return {string} */ proto.google.rpc.context.AttributeContext.Api.prototype.getVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Api} returns this */ proto.google.rpc.context.AttributeContext.Api.prototype.setVersion = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.rpc.context.AttributeContext.Auth.repeatedFields_ = [2,5]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.google.rpc.context.AttributeContext.Auth.prototype.toObject = function(opt_includeInstance) { return proto.google.rpc.context.AttributeContext.Auth.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.rpc.context.AttributeContext.Auth} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Auth.toObject = function(includeInstance, msg) { var f, obj = { principal: jspb.Message.getFieldWithDefault(msg, 1, ""), audiencesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, presenter: jspb.Message.getFieldWithDefault(msg, 3, ""), claims: (f = msg.getClaims()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), accessLevelsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.rpc.context.AttributeContext.Auth} */ proto.google.rpc.context.AttributeContext.Auth.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.rpc.context.AttributeContext.Auth; return proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.rpc.context.AttributeContext.Auth} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.rpc.context.AttributeContext.Auth} */ proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setPrincipal(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.addAudiences(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setPresenter(value); break; case 4: var value = new google_protobuf_struct_pb.Struct; reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); msg.setClaims(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.addAccessLevels(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.rpc.context.AttributeContext.Auth.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.rpc.context.AttributeContext.Auth} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPrincipal(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getAudiencesList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } f = message.getPresenter(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getClaims(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_struct_pb.Struct.serializeBinaryToWriter ); } f = message.getAccessLevelsList(); if (f.length > 0) { writer.writeRepeatedString( 5, f ); } }; /** * optional string principal = 1; * @return {string} */ proto.google.rpc.context.AttributeContext.Auth.prototype.getPrincipal = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.setPrincipal = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated string audiences = 2; * @return {!Array<string>} */ proto.google.rpc.context.AttributeContext.Auth.prototype.getAudiencesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array<string>} value * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.setAudiencesList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.addAudiences = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.clearAudiencesList = function() { return this.setAudiencesList([]); }; /** * optional string presenter = 3; * @return {string} */ proto.google.rpc.context.AttributeContext.Auth.prototype.getPresenter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.setPresenter = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional google.protobuf.Struct claims = 4; * @return {?proto.google.protobuf.Struct} */ proto.google.rpc.context.AttributeContext.Auth.prototype.getClaims = function() { return /** @type{?proto.google.protobuf.Struct} */ ( jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); }; /** * @param {?proto.google.protobuf.Struct|undefined} value * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.setClaims = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.clearClaims = function() { return this.setClaims(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.rpc.context.AttributeContext.Auth.prototype.hasClaims = function() { return jspb.Message.getField(this, 4) != null; }; /** * repeated string access_levels = 5; * @return {!Array<string>} */ proto.google.rpc.context.AttributeContext.Auth.prototype.getAccessLevelsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5)); }; /** * @param {!Array<string>} value * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.setAccessLevelsList = function(value) { return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.addAccessLevels = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this */ proto.google.rpc.context.AttributeContext.Auth.prototype.clearAccessLevelsList = function() { return this.setAccessLevelsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.google.rpc.context.AttributeContext.Request.prototype.toObject = function(opt_includeInstance) { return proto.google.rpc.context.AttributeContext.Request.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.google.rpc.context.AttributeContext.Request} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Request.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), method: jspb.Message.getFieldWithDefault(msg, 2, ""), headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], path: jspb.Message.getFieldWithDefault(msg, 4, ""), host: jspb.Message.getFieldWithDefault(msg, 5, ""), scheme: jspb.Message.getFieldWithDefault(msg, 6, ""), query: jspb.Message.getFieldWithDefault(msg, 7, ""), time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), size: jspb.Message.getFieldWithDefault(msg, 10, 0), protocol: jspb.Message.getFieldWithDefault(msg, 11, ""), reason: jspb.Message.getFieldWithDefault(msg, 12, ""), auth: (f = msg.getAuth()) && proto.google.rpc.context.AttributeContext.Auth.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.rpc.context.AttributeContext.Request} */ proto.google.rpc.context.AttributeContext.Request.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.rpc.context.AttributeContext.Request; return proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.rpc.context.AttributeContext.Request} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.rpc.context.AttributeContext.Request} */ proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setMethod(value); break; case 3: var value = msg.getHeadersMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setPath(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setHost(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setScheme(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setQuery(value); break; case 9: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTime(value); break; case 10: var value = /** @type {number} */ (reader.readInt64()); msg.setSize(value); break; case 11: var value = /** @type {string} */ (reader.readString()); msg.setProtocol(value); break; case 12: var value = /** @type {string} */ (reader.readString()); msg.setReason(value); break; case 13: var value = new proto.google.rpc.context.AttributeContext.Auth; reader.readMessage(value,proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader); msg.setAuth(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.rpc.context.AttributeContext.Request.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.rpc.context.AttributeContext.Request} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getMethod(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getHeadersMap(true); if (f && f.getLength() > 0) { f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getPath(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getHost(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getScheme(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getQuery(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getTime(); if (f != null) { writer.writeMessage( 9, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getSize(); if (f !== 0) { writer.writeInt64( 10, f ); } f = message.getProtocol(); if (f.length > 0) { writer.writeString( 11, f ); } f = message.getReason(); if (f.length > 0) { writer.writeString( 12, f ); } f = message.getAuth(); if (f != null) { writer.writeMessage( 13, f, proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter ); } }; /** * optional string id = 1; * @return {string} */ proto.google.rpc.context.AttributeContext.Request.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string method = 2; * @return {string} */ proto.google.rpc.context.AttributeContext.Request.prototype.getMethod = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.setMethod = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * map<string, string> headers = 3; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.google.rpc.context.AttributeContext.Request.prototype.getHeadersMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 3, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.clearHeadersMap = function() { this.getHeadersMap().clear(); return this;}; /** * optional string path = 4; * @return {string} */ proto.google.rpc.context.AttributeContext.Request.prototype.getPath = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.setPath = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string host = 5; * @return {string} */ proto.google.rpc.context.AttributeContext.Request.prototype.getHost = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.setHost = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string scheme = 6; * @return {string} */ proto.google.rpc.context.AttributeContext.Request.prototype.getScheme = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.setScheme = function(value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string query = 7; * @return {string} */ proto.google.rpc.context.AttributeContext.Request.prototype.getQuery = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.google.rpc.context.AttributeContext.Request} returns this */ proto.google.rpc.context.AttributeContext.Request.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional google.protobuf.Timestamp time = 9; * @return {?proto.google.protobuf.Timestamp} */ proto.google.rpc.context.AttributeContext.Request.prototype.getTime = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined}