UNPKG

@ondewo/csi-client-nodejs

Version:

ONDEWO Communication System Integration (CSI) Client library for Nodejs

770 lines (665 loc) 24.7 kB
// source: google/iam/v1/iam_policy.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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var google_iam_v1_policy_pb = require('../../../google/iam/v1/policy_pb.js'); goog.object.extend(proto, google_iam_v1_policy_pb); goog.exportSymbol('proto.google.iam.v1.GetIamPolicyRequest', null, global); goog.exportSymbol('proto.google.iam.v1.SetIamPolicyRequest', null, global); goog.exportSymbol('proto.google.iam.v1.TestIamPermissionsRequest', null, global); goog.exportSymbol('proto.google.iam.v1.TestIamPermissionsResponse', 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.v1.SetIamPolicyRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.iam.v1.SetIamPolicyRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.v1.SetIamPolicyRequest.displayName = 'proto.google.iam.v1.SetIamPolicyRequest'; } /** * 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.v1.GetIamPolicyRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.iam.v1.GetIamPolicyRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.v1.GetIamPolicyRequest.displayName = 'proto.google.iam.v1.GetIamPolicyRequest'; } /** * 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.v1.TestIamPermissionsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.iam.v1.TestIamPermissionsRequest.repeatedFields_, null); }; goog.inherits(proto.google.iam.v1.TestIamPermissionsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.v1.TestIamPermissionsRequest.displayName = 'proto.google.iam.v1.TestIamPermissionsRequest'; } /** * 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.v1.TestIamPermissionsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.iam.v1.TestIamPermissionsResponse.repeatedFields_, null); }; goog.inherits(proto.google.iam.v1.TestIamPermissionsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.iam.v1.TestIamPermissionsResponse.displayName = 'proto.google.iam.v1.TestIamPermissionsResponse'; } 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.v1.SetIamPolicyRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.v1.SetIamPolicyRequest.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.v1.SetIamPolicyRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.SetIamPolicyRequest.toObject = function(includeInstance, msg) { var f, obj = { resource: jspb.Message.getFieldWithDefault(msg, 1, ""), policy: (f = msg.getPolicy()) && google_iam_v1_policy_pb.Policy.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.v1.SetIamPolicyRequest} */ proto.google.iam.v1.SetIamPolicyRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.v1.SetIamPolicyRequest; return proto.google.iam.v1.SetIamPolicyRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.v1.SetIamPolicyRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.v1.SetIamPolicyRequest} */ proto.google.iam.v1.SetIamPolicyRequest.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.setResource(value); break; case 2: var value = new google_iam_v1_policy_pb.Policy; reader.readMessage(value,google_iam_v1_policy_pb.Policy.deserializeBinaryFromReader); msg.setPolicy(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.v1.SetIamPolicyRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.v1.SetIamPolicyRequest.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.v1.SetIamPolicyRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.SetIamPolicyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResource(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPolicy(); if (f != null) { writer.writeMessage( 2, f, google_iam_v1_policy_pb.Policy.serializeBinaryToWriter ); } }; /** * optional string resource = 1; * @return {string} */ proto.google.iam.v1.SetIamPolicyRequest.prototype.getResource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.v1.SetIamPolicyRequest} returns this */ proto.google.iam.v1.SetIamPolicyRequest.prototype.setResource = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional Policy policy = 2; * @return {?proto.google.iam.v1.Policy} */ proto.google.iam.v1.SetIamPolicyRequest.prototype.getPolicy = function() { return /** @type{?proto.google.iam.v1.Policy} */ ( jspb.Message.getWrapperField(this, google_iam_v1_policy_pb.Policy, 2)); }; /** * @param {?proto.google.iam.v1.Policy|undefined} value * @return {!proto.google.iam.v1.SetIamPolicyRequest} returns this */ proto.google.iam.v1.SetIamPolicyRequest.prototype.setPolicy = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.iam.v1.SetIamPolicyRequest} returns this */ proto.google.iam.v1.SetIamPolicyRequest.prototype.clearPolicy = function() { return this.setPolicy(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.iam.v1.SetIamPolicyRequest.prototype.hasPolicy = function() { return jspb.Message.getField(this, 2) != 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.v1.GetIamPolicyRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.v1.GetIamPolicyRequest.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.v1.GetIamPolicyRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.GetIamPolicyRequest.toObject = function(includeInstance, msg) { var f, obj = { resource: jspb.Message.getFieldWithDefault(msg, 1, "") }; 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.v1.GetIamPolicyRequest} */ proto.google.iam.v1.GetIamPolicyRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.v1.GetIamPolicyRequest; return proto.google.iam.v1.GetIamPolicyRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.v1.GetIamPolicyRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.v1.GetIamPolicyRequest} */ proto.google.iam.v1.GetIamPolicyRequest.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.setResource(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.v1.GetIamPolicyRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.v1.GetIamPolicyRequest.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.v1.GetIamPolicyRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.GetIamPolicyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResource(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string resource = 1; * @return {string} */ proto.google.iam.v1.GetIamPolicyRequest.prototype.getResource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.v1.GetIamPolicyRequest} returns this */ proto.google.iam.v1.GetIamPolicyRequest.prototype.setResource = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.iam.v1.TestIamPermissionsRequest.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.v1.TestIamPermissionsRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.v1.TestIamPermissionsRequest.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.v1.TestIamPermissionsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.TestIamPermissionsRequest.toObject = function(includeInstance, msg) { var f, obj = { resource: jspb.Message.getFieldWithDefault(msg, 1, ""), permissionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == 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.iam.v1.TestIamPermissionsRequest} */ proto.google.iam.v1.TestIamPermissionsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.v1.TestIamPermissionsRequest; return proto.google.iam.v1.TestIamPermissionsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.v1.TestIamPermissionsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.v1.TestIamPermissionsRequest} */ proto.google.iam.v1.TestIamPermissionsRequest.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.setResource(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.addPermissions(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.v1.TestIamPermissionsRequest.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.v1.TestIamPermissionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.TestIamPermissionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResource(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPermissionsList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } }; /** * optional string resource = 1; * @return {string} */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.getResource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.iam.v1.TestIamPermissionsRequest} returns this */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.setResource = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated string permissions = 2; * @return {!Array<string>} */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.getPermissionsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array<string>} value * @return {!proto.google.iam.v1.TestIamPermissionsRequest} returns this */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.setPermissionsList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.iam.v1.TestIamPermissionsRequest} returns this */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.addPermissions = 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.v1.TestIamPermissionsRequest} returns this */ proto.google.iam.v1.TestIamPermissionsRequest.prototype.clearPermissionsList = function() { return this.setPermissionsList([]); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.iam.v1.TestIamPermissionsResponse.repeatedFields_ = [1]; 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.v1.TestIamPermissionsResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.iam.v1.TestIamPermissionsResponse.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.v1.TestIamPermissionsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.TestIamPermissionsResponse.toObject = function(includeInstance, msg) { var f, obj = { permissionsList: (f = jspb.Message.getRepeatedField(msg, 1)) == 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.iam.v1.TestIamPermissionsResponse} */ proto.google.iam.v1.TestIamPermissionsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.iam.v1.TestIamPermissionsResponse; return proto.google.iam.v1.TestIamPermissionsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.iam.v1.TestIamPermissionsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.iam.v1.TestIamPermissionsResponse} */ proto.google.iam.v1.TestIamPermissionsResponse.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.addPermissions(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.iam.v1.TestIamPermissionsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.iam.v1.TestIamPermissionsResponse.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.v1.TestIamPermissionsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.iam.v1.TestIamPermissionsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPermissionsList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } }; /** * repeated string permissions = 1; * @return {!Array<string>} */ proto.google.iam.v1.TestIamPermissionsResponse.prototype.getPermissionsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array<string>} value * @return {!proto.google.iam.v1.TestIamPermissionsResponse} returns this */ proto.google.iam.v1.TestIamPermissionsResponse.prototype.setPermissionsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.google.iam.v1.TestIamPermissionsResponse} returns this */ proto.google.iam.v1.TestIamPermissionsResponse.prototype.addPermissions = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.iam.v1.TestIamPermissionsResponse} returns this */ proto.google.iam.v1.TestIamPermissionsResponse.prototype.clearPermissionsList = function() { return this.setPermissionsList([]); }; goog.object.extend(exports, proto.google.iam.v1);