UNPKG

@google-cloud/redis

Version:
881 lines (793 loc) 2.17 MB
// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots._google_cloud_redis_protos || ($protobuf.roots._google_cloud_redis_protos = {}); $root.google = (function() { /** * Namespace google. * @exports google * @namespace */ var google = {}; google.cloud = (function() { /** * Namespace cloud. * @memberof google * @namespace */ var cloud = {}; cloud.redis = (function() { /** * Namespace redis. * @memberof google.cloud * @namespace */ var redis = {}; redis.v1 = (function() { /** * Namespace v1. * @memberof google.cloud.redis * @namespace */ var v1 = {}; v1.CloudRedis = (function() { /** * Constructs a new CloudRedis service. * @memberof google.cloud.redis.v1 * @classdesc Represents a CloudRedis * @extends $protobuf.rpc.Service * @constructor * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ function CloudRedis(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } (CloudRedis.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudRedis; /** * Creates new CloudRedis service using the specified rpc implementation. * @function create * @memberof google.cloud.redis.v1.CloudRedis * @static * @param {$protobuf.RPCImpl} rpcImpl RPC implementation * @param {boolean} [requestDelimited=false] Whether requests are length-delimited * @param {boolean} [responseDelimited=false] Whether responses are length-delimited * @returns {CloudRedis} RPC service. Useful where requests and/or responses are streamed. */ CloudRedis.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|listInstances}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef ListInstancesCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.redis.v1.ListInstancesResponse} [response] ListInstancesResponse */ /** * Calls ListInstances. * @function listInstances * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IListInstancesRequest} request ListInstancesRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.ListInstancesCallback} callback Node-style callback called with the error, if any, and ListInstancesResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.listInstances = function listInstances(request, callback) { return this.rpcCall(listInstances, $root.google.cloud.redis.v1.ListInstancesRequest, $root.google.cloud.redis.v1.ListInstancesResponse, request, callback); }, "name", { value: "ListInstances" }); /** * Calls ListInstances. * @function listInstances * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IListInstancesRequest} request ListInstancesRequest message or plain object * @returns {Promise<google.cloud.redis.v1.ListInstancesResponse>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|getInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef GetInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.redis.v1.Instance} [response] Instance */ /** * Calls GetInstance. * @function getInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IGetInstanceRequest} request GetInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.GetInstanceCallback} callback Node-style callback called with the error, if any, and Instance * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.getInstance = function getInstance(request, callback) { return this.rpcCall(getInstance, $root.google.cloud.redis.v1.GetInstanceRequest, $root.google.cloud.redis.v1.Instance, request, callback); }, "name", { value: "GetInstance" }); /** * Calls GetInstance. * @function getInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IGetInstanceRequest} request GetInstanceRequest message or plain object * @returns {Promise<google.cloud.redis.v1.Instance>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|getInstanceAuthString}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef GetInstanceAuthStringCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.cloud.redis.v1.InstanceAuthString} [response] InstanceAuthString */ /** * Calls GetInstanceAuthString. * @function getInstanceAuthString * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IGetInstanceAuthStringRequest} request GetInstanceAuthStringRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.GetInstanceAuthStringCallback} callback Node-style callback called with the error, if any, and InstanceAuthString * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.getInstanceAuthString = function getInstanceAuthString(request, callback) { return this.rpcCall(getInstanceAuthString, $root.google.cloud.redis.v1.GetInstanceAuthStringRequest, $root.google.cloud.redis.v1.InstanceAuthString, request, callback); }, "name", { value: "GetInstanceAuthString" }); /** * Calls GetInstanceAuthString. * @function getInstanceAuthString * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IGetInstanceAuthStringRequest} request GetInstanceAuthStringRequest message or plain object * @returns {Promise<google.cloud.redis.v1.InstanceAuthString>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|createInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef CreateInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls CreateInstance. * @function createInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.ICreateInstanceRequest} request CreateInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.CreateInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.createInstance = function createInstance(request, callback) { return this.rpcCall(createInstance, $root.google.cloud.redis.v1.CreateInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateInstance" }); /** * Calls CreateInstance. * @function createInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.ICreateInstanceRequest} request CreateInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|updateInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef UpdateInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls UpdateInstance. * @function updateInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IUpdateInstanceRequest} request UpdateInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.UpdateInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.updateInstance = function updateInstance(request, callback) { return this.rpcCall(updateInstance, $root.google.cloud.redis.v1.UpdateInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateInstance" }); /** * Calls UpdateInstance. * @function updateInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IUpdateInstanceRequest} request UpdateInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|upgradeInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef UpgradeInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls UpgradeInstance. * @function upgradeInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IUpgradeInstanceRequest} request UpgradeInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.UpgradeInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.upgradeInstance = function upgradeInstance(request, callback) { return this.rpcCall(upgradeInstance, $root.google.cloud.redis.v1.UpgradeInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpgradeInstance" }); /** * Calls UpgradeInstance. * @function upgradeInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IUpgradeInstanceRequest} request UpgradeInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|importInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef ImportInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls ImportInstance. * @function importInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IImportInstanceRequest} request ImportInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.ImportInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.importInstance = function importInstance(request, callback) { return this.rpcCall(importInstance, $root.google.cloud.redis.v1.ImportInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "ImportInstance" }); /** * Calls ImportInstance. * @function importInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IImportInstanceRequest} request ImportInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|exportInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef ExportInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls ExportInstance. * @function exportInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IExportInstanceRequest} request ExportInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.ExportInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.exportInstance = function exportInstance(request, callback) { return this.rpcCall(exportInstance, $root.google.cloud.redis.v1.ExportInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "ExportInstance" }); /** * Calls ExportInstance. * @function exportInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IExportInstanceRequest} request ExportInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|failoverInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef FailoverInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls FailoverInstance. * @function failoverInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IFailoverInstanceRequest} request FailoverInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.FailoverInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.failoverInstance = function failoverInstance(request, callback) { return this.rpcCall(failoverInstance, $root.google.cloud.redis.v1.FailoverInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "FailoverInstance" }); /** * Calls FailoverInstance. * @function failoverInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IFailoverInstanceRequest} request FailoverInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|deleteInstance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef DeleteInstanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls DeleteInstance. * @function deleteInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IDeleteInstanceRequest} request DeleteInstanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.DeleteInstanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.deleteInstance = function deleteInstance(request, callback) { return this.rpcCall(deleteInstance, $root.google.cloud.redis.v1.DeleteInstanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteInstance" }); /** * Calls DeleteInstance. * @function deleteInstance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IDeleteInstanceRequest} request DeleteInstanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ /** * Callback as used by {@link google.cloud.redis.v1.CloudRedis|rescheduleMaintenance}. * @memberof google.cloud.redis.v1.CloudRedis * @typedef RescheduleMaintenanceCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ /** * Calls RescheduleMaintenance. * @function rescheduleMaintenance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IRescheduleMaintenanceRequest} request RescheduleMaintenanceRequest message or plain object * @param {google.cloud.redis.v1.CloudRedis.RescheduleMaintenanceCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudRedis.prototype.rescheduleMaintenance = function rescheduleMaintenance(request, callback) { return this.rpcCall(rescheduleMaintenance, $root.google.cloud.redis.v1.RescheduleMaintenanceRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "RescheduleMaintenance" }); /** * Calls RescheduleMaintenance. * @function rescheduleMaintenance * @memberof google.cloud.redis.v1.CloudRedis * @instance * @param {google.cloud.redis.v1.IRescheduleMaintenanceRequest} request RescheduleMaintenanceRequest message or plain object * @returns {Promise<google.longrunning.Operation>} Promise * @variation 2 */ return CloudRedis; })(); v1.NodeInfo = (function() { /** * Properties of a NodeInfo. * @memberof google.cloud.redis.v1 * @interface INodeInfo * @property {string|null} [id] NodeInfo id * @property {string|null} [zone] NodeInfo zone */ /** * Constructs a new NodeInfo. * @memberof google.cloud.redis.v1 * @classdesc Represents a NodeInfo. * @implements INodeInfo * @constructor * @param {google.cloud.redis.v1.INodeInfo=} [properties] Properties to set */ function NodeInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * NodeInfo id. * @member {string} id * @memberof google.cloud.redis.v1.NodeInfo * @instance */ NodeInfo.prototype.id = ""; /** * NodeInfo zone. * @member {string} zone * @memberof google.cloud.redis.v1.NodeInfo * @instance */ NodeInfo.prototype.zone = ""; /** * Creates a new NodeInfo instance using the specified properties. * @function create * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {google.cloud.redis.v1.INodeInfo=} [properties] Properties to set * @returns {google.cloud.redis.v1.NodeInfo} NodeInfo instance */ NodeInfo.create = function create(properties) { return new NodeInfo(properties); }; /** * Encodes the specified NodeInfo message. Does not implicitly {@link google.cloud.redis.v1.NodeInfo.verify|verify} messages. * @function encode * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {google.cloud.redis.v1.INodeInfo} message NodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ NodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); return writer; }; /** * Encodes the specified NodeInfo message, length delimited. Does not implicitly {@link google.cloud.redis.v1.NodeInfo.verify|verify} messages. * @function encodeDelimited * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {google.cloud.redis.v1.INodeInfo} message NodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ NodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a NodeInfo message from the specified reader or buffer. * @function decode * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {google.cloud.redis.v1.NodeInfo} NodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ NodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.redis.v1.NodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.id = reader.string(); break; } case 2: { message.zone = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a NodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {google.cloud.redis.v1.NodeInfo} NodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ NodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a NodeInfo message. * @function verify * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ NodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; if (message.zone != null && message.hasOwnProperty("zone")) if (!$util.isString(message.zone)) return "zone: string expected"; return null; }; /** * Creates a NodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {Object.<string,*>} object Plain object * @returns {google.cloud.redis.v1.NodeInfo} NodeInfo */ NodeInfo.fromObject = function fromObject(object) { if (object instanceof $root.google.cloud.redis.v1.NodeInfo) return object; var message = new $root.google.cloud.redis.v1.NodeInfo(); if (object.id != null) message.id = String(object.id); if (object.zone != null) message.zone = String(object.zone); return message; }; /** * Creates a plain object from a NodeInfo message. Also converts values to other types if specified. * @function toObject * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {google.cloud.redis.v1.NodeInfo} message NodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ NodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = ""; object.zone = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.zone != null && message.hasOwnProperty("zone")) object.zone = message.zone; return object; }; /** * Converts this NodeInfo to JSON. * @function toJSON * @memberof google.cloud.redis.v1.NodeInfo * @instance * @returns {Object.<string,*>} JSON object */ NodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for NodeInfo * @function getTypeUrl * @memberof google.cloud.redis.v1.NodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ NodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/google.cloud.redis.v1.NodeInfo"; }; return NodeInfo; })(); v1.Instance = (function() { /** * Properties of an Instance. * @memberof google.cloud.redis.v1 * @interface IInstance * @property {string|null} [name] Instance name * @property {string|null} [displayName] Instance displayName * @property {Object.<string,string>|null} [labels] Instance labels * @property {string|null} [locationId] Instance locationId * @property {string|null} [alternativeLocationId] Instance alternativeLocationId * @property {string|null} [redisVersion] Instance redisVersion * @property {string|null} [reservedIpRange] Instance reservedIpRange * @property {string|null} [secondaryIpRange] Instance secondaryIpRange * @property {string|null} [host] Instance host * @property {number|null} [port] Instance port * @property {string|null} [currentLocationId] Instance currentLocationId * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime * @property {google.cloud.redis.v1.Instance.State|null} [state] Instance state * @property {string|null} [statusMessage] Instance statusMessage * @property {Object.<string,string>|null} [redisConfigs] Instance redisConfigs * @property {google.cloud.redis.v1.Instance.Tier|null} [tier] Instance tier * @property {number|null} [memorySizeGb] Instance memorySizeGb * @property {string|null} [authorizedNetwork] Instance authorizedNetwork * @property {string|null} [persistenceIamIdentity] Instance persistenceIamIdentity * @property {google.cloud.redis.v1.Instance.ConnectMode|null} [connectMode] Instance connectMode * @property {boolean|null} [authEnabled] Instance authEnabled * @property {Array.<google.cloud.redis.v1.ITlsCertificate>|null} [serverCaCerts] Instance serverCaCerts * @property {google.cloud.redis.v1.Instance.TransitEncryptionMode|null} [transitEncryptionMode] Instance transitEncryptionMode * @property {google.cloud.redis.v1.IMaintenancePolicy|null} [maintenancePolicy] Instance maintenancePolicy * @property {google.cloud.redis.v1.IMaintenanceSchedule|null} [maintenanceSchedule] Instance maintenanceSchedule * @property {number|null} [replicaCount] Instance replicaCount * @property {Array.<google.cloud.redis.v1.INodeInfo>|null} [nodes] Instance nodes * @property {string|null} [readEndpoint] Instance readEndpoint * @property {number|null} [readEndpointPort] Instance readEndpointPort * @property {google.cloud.redis.v1.Instance.ReadReplicasMode|null} [readReplicasMode] Instance readReplicasMode * @property {string|null} [customerManagedKey] Instance customerManagedKey * @property {google.cloud.redis.v1.IPersistenceConfig|null} [persistenceConfig] Instance persistenceConfig * @property {Array.<google.cloud.redis.v1.Instance.SuspensionReason>|null} [suspensionReasons] Instance suspensionReasons * @property {string|null} [maintenanceVersion] Instance maintenanceVersion * @property {Array.<string>|null} [availableMaintenanceVersions] Instance availableMaintenanceVersions */ /** * Constructs a new Instance. * @memberof google.cloud.redis.v1 * @classdesc Represents an Instance. * @implements IInstance * @constructor * @param {google.cloud.redis.v1.IInstance=} [properties] Properties to set */ function Instance(properties) { this.labels = {}; this.redisConfigs = {}; this.serverCaCerts = []; this.nodes = []; this.suspensionReasons = []; this.availableMaintenanceVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Instance name. * @member {string} name * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.name = ""; /** * Instance displayName. * @member {string} displayName * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.displayName = ""; /** * Instance labels. * @member {Object.<string,string>} labels * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.labels = $util.emptyObject; /** * Instance locationId. * @member {string} locationId * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.locationId = ""; /** * Instance alternativeLocationId. * @member {string} alternativeLocationId * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.alternativeLocationId = ""; /** * Instance redisVersion. * @member {string} redisVersion * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.redisVersion = ""; /** * Instance reservedIpRange. * @member {string} reservedIpRange * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.reservedIpRange = ""; /** * Instance secondaryIpRange. * @member {string} secondaryIpRange * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.secondaryIpRange = ""; /** * Instance host. * @member {string} host * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.host = ""; /** * Instance port. * @member {number} port * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.port = 0; /** * Instance currentLocationId. * @member {string} currentLocationId * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.currentLocationId = ""; /** * Instance createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.createTime = null; /** * Instance state. * @member {google.cloud.redis.v1.Instance.State} state * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.state = 0; /** * Instance statusMessage. * @member {string} statusMessage * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.statusMessage = ""; /** * Instance redisConfigs. * @member {Object.<string,string>} redisConfigs * @memberof google.cloud.redis.v1.Instance * @instance */ Instance.prototype.redisConfigs = $util.emptyObject; /** * Instance tier. * @member {google.cloud.redis.v1.Instance.Tier} tier