UNPKG

@ondewo/csi-client-nodejs

Version:

ONDEWO Communication System Integration (CSI) Client library for Nodejs

1,526 lines (1,320 loc) 59.9 kB
// source: google/iam/credentials/v1/common.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() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_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.iam.credentials.v1.GenerateAccessTokenRequest', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.GenerateAccessTokenResponse', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.GenerateIdTokenRequest', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.GenerateIdTokenResponse', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.SignBlobRequest', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.SignBlobResponse', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.SignJwtRequest', null, global); goog.exportSymbol('proto.google.iam.credentials.v1.SignJwtResponse', 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.iam.credentials.v1.GenerateAccessTokenRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.iam.credentials.v1.GenerateAccessTokenRequest.repeatedFields_, null); }; goog.inherits(proto.google.iam.credentials.v1.GenerateAccessTokenRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.displayName = 'proto.google.iam.credentials.v1.GenerateAccessTokenRequest'; } /** * 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.iam.credentials.v1.GenerateAccessTokenResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.iam.credentials.v1.GenerateAccessTokenResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.displayName = 'proto.google.iam.credentials.v1.GenerateAccessTokenResponse'; } /** * 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.iam.credentials.v1.SignBlobRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.iam.credentials.v1.SignBlobRequest.repeatedFields_, null); }; goog.inherits(proto.google.iam.credentials.v1.SignBlobRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.SignBlobRequest.displayName = 'proto.google.iam.credentials.v1.SignBlobRequest'; } /** * 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.iam.credentials.v1.SignBlobResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.iam.credentials.v1.SignBlobResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.SignBlobResponse.displayName = 'proto.google.iam.credentials.v1.SignBlobResponse'; } /** * 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.iam.credentials.v1.SignJwtRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.iam.credentials.v1.SignJwtRequest.repeatedFields_, null); }; goog.inherits(proto.google.iam.credentials.v1.SignJwtRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.SignJwtRequest.displayName = 'proto.google.iam.credentials.v1.SignJwtRequest'; } /** * 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.iam.credentials.v1.SignJwtResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.iam.credentials.v1.SignJwtResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.SignJwtResponse.displayName = 'proto.google.iam.credentials.v1.SignJwtResponse'; } /** * 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.iam.credentials.v1.GenerateIdTokenRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.iam.credentials.v1.GenerateIdTokenRequest.repeatedFields_, null); }; goog.inherits(proto.google.iam.credentials.v1.GenerateIdTokenRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.GenerateIdTokenRequest.displayName = 'proto.google.iam.credentials.v1.GenerateIdTokenRequest'; } /** * 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.iam.credentials.v1.GenerateIdTokenResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.iam.credentials.v1.GenerateIdTokenResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.credentials.v1.GenerateIdTokenResponse.displayName = 'proto.google.iam.credentials.v1.GenerateIdTokenResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.repeatedFields_ = [2,4]; 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.iam.credentials.v1.GenerateAccessTokenRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.GenerateAccessTokenRequest.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.iam.credentials.v1.GenerateAccessTokenRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), delegatesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, scopeList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, lifetime: (f = msg.getLifetime()) && google_protobuf_duration_pb.Duration.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.iam.credentials.v1.GenerateAccessTokenRequest} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.credentials.v1.GenerateAccessTokenRequest; return proto.google.iam.credentials.v1.GenerateAccessTokenRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.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.setName(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.addDelegates(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.addScope(value); break; case 7: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setLifetime(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.credentials.v1.GenerateAccessTokenRequest.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.iam.credentials.v1.GenerateAccessTokenRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDelegatesList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } f = message.getScopeList(); if (f.length > 0) { writer.writeRepeatedString( 4, f ); } f = message.getLifetime(); if (f != null) { writer.writeMessage( 7, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * optional string name = 1; * @return {string} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated string delegates = 2; * @return {!Array<string>} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.getDelegatesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array<string>} value * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.setDelegatesList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.addDelegates = 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.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.clearDelegatesList = function() { return this.setDelegatesList([]); }; /** * repeated string scope = 4; * @return {!Array<string>} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.getScopeList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4)); }; /** * @param {!Array<string>} value * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.setScopeList = function(value) { return jspb.Message.setField(this, 4, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.addScope = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.clearScopeList = function() { return this.setScopeList([]); }; /** * optional google.protobuf.Duration lifetime = 7; * @return {?proto.google.protobuf.Duration} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.getLifetime = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 7)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.setLifetime = function(value) { return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenRequest} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.clearLifetime = function() { return this.setLifetime(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.iam.credentials.v1.GenerateAccessTokenRequest.prototype.hasLifetime = function() { return jspb.Message.getField(this, 7) != null; }; 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.iam.credentials.v1.GenerateAccessTokenResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.GenerateAccessTokenResponse.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.iam.credentials.v1.GenerateAccessTokenResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.toObject = function(includeInstance, msg) { var f, obj = { accessToken: jspb.Message.getFieldWithDefault(msg, 1, ""), expireTime: (f = msg.getExpireTime()) && google_protobuf_timestamp_pb.Timestamp.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.iam.credentials.v1.GenerateAccessTokenResponse} */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.credentials.v1.GenerateAccessTokenResponse; return proto.google.iam.credentials.v1.GenerateAccessTokenResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.credentials.v1.GenerateAccessTokenResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenResponse} */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.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.setAccessToken(value); break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setExpireTime(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.credentials.v1.GenerateAccessTokenResponse.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.iam.credentials.v1.GenerateAccessTokenResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAccessToken(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getExpireTime(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional string access_token = 1; * @return {string} */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.getAccessToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenResponse} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.setAccessToken = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional google.protobuf.Timestamp expire_time = 3; * @return {?proto.google.protobuf.Timestamp} */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.getExpireTime = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenResponse} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.setExpireTime = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.iam.credentials.v1.GenerateAccessTokenResponse} returns this */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.clearExpireTime = function() { return this.setExpireTime(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.iam.credentials.v1.GenerateAccessTokenResponse.prototype.hasExpireTime = function() { return jspb.Message.getField(this, 3) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.iam.credentials.v1.SignBlobRequest.repeatedFields_ = [3]; 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.iam.credentials.v1.SignBlobRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.SignBlobRequest.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.iam.credentials.v1.SignBlobRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignBlobRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), delegatesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, payload: msg.getPayload_asB64() }; 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.iam.credentials.v1.SignBlobRequest} */ proto.google.iam.credentials.v1.SignBlobRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.credentials.v1.SignBlobRequest; return proto.google.iam.credentials.v1.SignBlobRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.credentials.v1.SignBlobRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.credentials.v1.SignBlobRequest} */ proto.google.iam.credentials.v1.SignBlobRequest.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.setName(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.addDelegates(value); break; case 5: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setPayload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.credentials.v1.SignBlobRequest.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.iam.credentials.v1.SignBlobRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignBlobRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDelegatesList(); if (f.length > 0) { writer.writeRepeatedString( 3, f ); } f = message.getPayload_asU8(); if (f.length > 0) { writer.writeBytes( 5, f ); } }; /** * optional string name = 1; * @return {string} */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.SignBlobRequest} returns this */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated string delegates = 3; * @return {!Array<string>} */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.getDelegatesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3)); }; /** * @param {!Array<string>} value * @return {!proto.google.iam.credentials.v1.SignBlobRequest} returns this */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.setDelegatesList = function(value) { return jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.iam.credentials.v1.SignBlobRequest} returns this */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.addDelegates = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.iam.credentials.v1.SignBlobRequest} returns this */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.clearDelegatesList = function() { return this.setDelegatesList([]); }; /** * optional bytes payload = 5; * @return {!(string|Uint8Array)} */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.getPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * optional bytes payload = 5; * This is a type-conversion wrapper around `getPayload()` * @return {string} */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.getPayload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPayload())); }; /** * optional bytes payload = 5; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getPayload()` * @return {!Uint8Array} */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.getPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPayload())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.google.iam.credentials.v1.SignBlobRequest} returns this */ proto.google.iam.credentials.v1.SignBlobRequest.prototype.setPayload = function(value) { return jspb.Message.setProto3BytesField(this, 5, 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.iam.credentials.v1.SignBlobResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.SignBlobResponse.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.iam.credentials.v1.SignBlobResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignBlobResponse.toObject = function(includeInstance, msg) { var f, obj = { keyId: jspb.Message.getFieldWithDefault(msg, 1, ""), signedBlob: msg.getSignedBlob_asB64() }; 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.iam.credentials.v1.SignBlobResponse} */ proto.google.iam.credentials.v1.SignBlobResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.credentials.v1.SignBlobResponse; return proto.google.iam.credentials.v1.SignBlobResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.credentials.v1.SignBlobResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.credentials.v1.SignBlobResponse} */ proto.google.iam.credentials.v1.SignBlobResponse.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.setKeyId(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setSignedBlob(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.credentials.v1.SignBlobResponse.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.iam.credentials.v1.SignBlobResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignBlobResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKeyId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getSignedBlob_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } }; /** * optional string key_id = 1; * @return {string} */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.getKeyId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.SignBlobResponse} returns this */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.setKeyId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes signed_blob = 4; * @return {!(string|Uint8Array)} */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.getSignedBlob = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * optional bytes signed_blob = 4; * This is a type-conversion wrapper around `getSignedBlob()` * @return {string} */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.getSignedBlob_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignedBlob())); }; /** * optional bytes signed_blob = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSignedBlob()` * @return {!Uint8Array} */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.getSignedBlob_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignedBlob())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.google.iam.credentials.v1.SignBlobResponse} returns this */ proto.google.iam.credentials.v1.SignBlobResponse.prototype.setSignedBlob = function(value) { return jspb.Message.setProto3BytesField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.iam.credentials.v1.SignJwtRequest.repeatedFields_ = [3]; 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.iam.credentials.v1.SignJwtRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.SignJwtRequest.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.iam.credentials.v1.SignJwtRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignJwtRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), delegatesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, payload: jspb.Message.getFieldWithDefault(msg, 5, "") }; 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.iam.credentials.v1.SignJwtRequest} */ proto.google.iam.credentials.v1.SignJwtRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.credentials.v1.SignJwtRequest; return proto.google.iam.credentials.v1.SignJwtRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.credentials.v1.SignJwtRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.credentials.v1.SignJwtRequest} */ proto.google.iam.credentials.v1.SignJwtRequest.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.setName(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.addDelegates(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setPayload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.credentials.v1.SignJwtRequest.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.iam.credentials.v1.SignJwtRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignJwtRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDelegatesList(); if (f.length > 0) { writer.writeRepeatedString( 3, f ); } f = message.getPayload(); if (f.length > 0) { writer.writeString( 5, f ); } }; /** * optional string name = 1; * @return {string} */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.SignJwtRequest} returns this */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated string delegates = 3; * @return {!Array<string>} */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.getDelegatesList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3)); }; /** * @param {!Array<string>} value * @return {!proto.google.iam.credentials.v1.SignJwtRequest} returns this */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.setDelegatesList = function(value) { return jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.iam.credentials.v1.SignJwtRequest} returns this */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.addDelegates = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.iam.credentials.v1.SignJwtRequest} returns this */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.clearDelegatesList = function() { return this.setDelegatesList([]); }; /** * optional string payload = 5; * @return {string} */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.getPayload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.SignJwtRequest} returns this */ proto.google.iam.credentials.v1.SignJwtRequest.prototype.setPayload = function(value) { return jspb.Message.setProto3StringField(this, 5, 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.iam.credentials.v1.SignJwtResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.SignJwtResponse.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.iam.credentials.v1.SignJwtResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignJwtResponse.toObject = function(includeInstance, msg) { var f, obj = { keyId: jspb.Message.getFieldWithDefault(msg, 1, ""), signedJwt: jspb.Message.getFieldWithDefault(msg, 2, "") }; 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.iam.credentials.v1.SignJwtResponse} */ proto.google.iam.credentials.v1.SignJwtResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.credentials.v1.SignJwtResponse; return proto.google.iam.credentials.v1.SignJwtResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.credentials.v1.SignJwtResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.credentials.v1.SignJwtResponse} */ proto.google.iam.credentials.v1.SignJwtResponse.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.setKeyId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSignedJwt(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.credentials.v1.SignJwtResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.credentials.v1.SignJwtResponse.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.iam.credentials.v1.SignJwtResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.SignJwtResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKeyId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getSignedJwt(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string key_id = 1; * @return {string} */ proto.google.iam.credentials.v1.SignJwtResponse.prototype.getKeyId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.SignJwtResponse} returns this */ proto.google.iam.credentials.v1.SignJwtResponse.prototype.setKeyId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string signed_jwt = 2; * @return {string} */ proto.google.iam.credentials.v1.SignJwtResponse.prototype.getSignedJwt = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.iam.credentials.v1.SignJwtResponse} returns this */ proto.google.iam.credentials.v1.SignJwtResponse.prototype.setSignedJwt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.iam.credentials.v1.GenerateIdTokenRequest.repeatedFields_ = [2]; 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.iam.credentials.v1.GenerateIdTokenRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.credentials.v1.GenerateIdTokenRequest.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.iam.credentials.v1.GenerateIdTokenRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.credentials.v1.GenerateIdTokenRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), delegatesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, audience: jspb.Message.getFieldWithDefault(msg, 3, ""), includeEmail: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.B