UNPKG

@animeapis/resourcemanager

Version:
881 lines (797 loc) 933 kB
// Copyright 2022 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").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._animeapis_resourcemanager_protos || ($protobuf.roots._animeapis_resourcemanager_protos = {}); $root.animeshon = (function() { /** * Namespace animeshon. * @exports animeshon * @namespace */ var animeshon = {}; animeshon.resourcemanager = (function() { /** * Namespace resourcemanager. * @memberof animeshon * @namespace */ var resourcemanager = {}; resourcemanager.v1alpha1 = (function() { /** * Namespace v1alpha1. * @memberof animeshon.resourcemanager * @namespace */ var v1alpha1 = {}; v1alpha1.ResourceManager = (function() { /** * Constructs a new ResourceManager service. * @memberof animeshon.resourcemanager.v1alpha1 * @classdesc Represents a ResourceManager * @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 ResourceManager(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } (ResourceManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ResourceManager; /** * Creates new ResourceManager service using the specified rpc implementation. * @function create * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @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 {ResourceManager} RPC service. Useful where requests and/or responses are streamed. */ ResourceManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { return new this(rpcImpl, requestDelimited, responseDelimited); }; /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#getOrganization}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef GetOrganizationCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.Organization} [response] Organization */ /** * Calls GetOrganization. * @function getOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IGetOrganizationRequest} request GetOrganizationRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.GetOrganizationCallback} callback Node-style callback called with the error, if any, and Organization * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.getOrganization = function getOrganization(request, callback) { return this.rpcCall(getOrganization, $root.animeshon.resourcemanager.v1alpha1.GetOrganizationRequest, $root.animeshon.resourcemanager.v1alpha1.Organization, request, callback); }, "name", { value: "GetOrganization" }); /** * Calls GetOrganization. * @function getOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IGetOrganizationRequest} request GetOrganizationRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.Organization>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#listOrganizations}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef ListOrganizationsCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.ListOrganizationsResponse} [response] ListOrganizationsResponse */ /** * Calls ListOrganizations. * @function listOrganizations * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IListOrganizationsRequest} request ListOrganizationsRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.ListOrganizationsCallback} callback Node-style callback called with the error, if any, and ListOrganizationsResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.listOrganizations = function listOrganizations(request, callback) { return this.rpcCall(listOrganizations, $root.animeshon.resourcemanager.v1alpha1.ListOrganizationsRequest, $root.animeshon.resourcemanager.v1alpha1.ListOrganizationsResponse, request, callback); }, "name", { value: "ListOrganizations" }); /** * Calls ListOrganizations. * @function listOrganizations * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IListOrganizationsRequest} request ListOrganizationsRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.ListOrganizationsResponse>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#createOrganization}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef CreateOrganizationCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.Organization} [response] Organization */ /** * Calls CreateOrganization. * @function createOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.ICreateOrganizationRequest} request CreateOrganizationRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.CreateOrganizationCallback} callback Node-style callback called with the error, if any, and Organization * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.createOrganization = function createOrganization(request, callback) { return this.rpcCall(createOrganization, $root.animeshon.resourcemanager.v1alpha1.CreateOrganizationRequest, $root.animeshon.resourcemanager.v1alpha1.Organization, request, callback); }, "name", { value: "CreateOrganization" }); /** * Calls CreateOrganization. * @function createOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.ICreateOrganizationRequest} request CreateOrganizationRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.Organization>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#updateOrganization}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef UpdateOrganizationCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.Organization} [response] Organization */ /** * Calls UpdateOrganization. * @function updateOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IUpdateOrganizationRequest} request UpdateOrganizationRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.UpdateOrganizationCallback} callback Node-style callback called with the error, if any, and Organization * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.updateOrganization = function updateOrganization(request, callback) { return this.rpcCall(updateOrganization, $root.animeshon.resourcemanager.v1alpha1.UpdateOrganizationRequest, $root.animeshon.resourcemanager.v1alpha1.Organization, request, callback); }, "name", { value: "UpdateOrganization" }); /** * Calls UpdateOrganization. * @function updateOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IUpdateOrganizationRequest} request UpdateOrganizationRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.Organization>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#deleteOrganization}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef DeleteOrganizationCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** * Calls DeleteOrganization. * @function deleteOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IDeleteOrganizationRequest} request DeleteOrganizationRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.DeleteOrganizationCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.deleteOrganization = function deleteOrganization(request, callback) { return this.rpcCall(deleteOrganization, $root.animeshon.resourcemanager.v1alpha1.DeleteOrganizationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteOrganization" }); /** * Calls DeleteOrganization. * @function deleteOrganization * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IDeleteOrganizationRequest} request DeleteOrganizationRequest message or plain object * @returns {Promise<google.protobuf.Empty>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#getTeam}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef GetTeamCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.Team} [response] Team */ /** * Calls GetTeam. * @function getTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IGetTeamRequest} request GetTeamRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.GetTeamCallback} callback Node-style callback called with the error, if any, and Team * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.getTeam = function getTeam(request, callback) { return this.rpcCall(getTeam, $root.animeshon.resourcemanager.v1alpha1.GetTeamRequest, $root.animeshon.resourcemanager.v1alpha1.Team, request, callback); }, "name", { value: "GetTeam" }); /** * Calls GetTeam. * @function getTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IGetTeamRequest} request GetTeamRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.Team>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#listTeams}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef ListTeamsCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.ListTeamsResponse} [response] ListTeamsResponse */ /** * Calls ListTeams. * @function listTeams * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IListTeamsRequest} request ListTeamsRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.ListTeamsCallback} callback Node-style callback called with the error, if any, and ListTeamsResponse * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.listTeams = function listTeams(request, callback) { return this.rpcCall(listTeams, $root.animeshon.resourcemanager.v1alpha1.ListTeamsRequest, $root.animeshon.resourcemanager.v1alpha1.ListTeamsResponse, request, callback); }, "name", { value: "ListTeams" }); /** * Calls ListTeams. * @function listTeams * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IListTeamsRequest} request ListTeamsRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.ListTeamsResponse>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#createTeam}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef CreateTeamCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.Team} [response] Team */ /** * Calls CreateTeam. * @function createTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.ICreateTeamRequest} request CreateTeamRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.CreateTeamCallback} callback Node-style callback called with the error, if any, and Team * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.createTeam = function createTeam(request, callback) { return this.rpcCall(createTeam, $root.animeshon.resourcemanager.v1alpha1.CreateTeamRequest, $root.animeshon.resourcemanager.v1alpha1.Team, request, callback); }, "name", { value: "CreateTeam" }); /** * Calls CreateTeam. * @function createTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.ICreateTeamRequest} request CreateTeamRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.Team>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#updateTeam}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef UpdateTeamCallback * @type {function} * @param {Error|null} error Error, if any * @param {animeshon.resourcemanager.v1alpha1.Team} [response] Team */ /** * Calls UpdateTeam. * @function updateTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IUpdateTeamRequest} request UpdateTeamRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.UpdateTeamCallback} callback Node-style callback called with the error, if any, and Team * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.updateTeam = function updateTeam(request, callback) { return this.rpcCall(updateTeam, $root.animeshon.resourcemanager.v1alpha1.UpdateTeamRequest, $root.animeshon.resourcemanager.v1alpha1.Team, request, callback); }, "name", { value: "UpdateTeam" }); /** * Calls UpdateTeam. * @function updateTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IUpdateTeamRequest} request UpdateTeamRequest message or plain object * @returns {Promise<animeshon.resourcemanager.v1alpha1.Team>} Promise * @variation 2 */ /** * Callback as used by {@link animeshon.resourcemanager.v1alpha1.ResourceManager#deleteTeam}. * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @typedef DeleteTeamCallback * @type {function} * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ /** * Calls DeleteTeam. * @function deleteTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IDeleteTeamRequest} request DeleteTeamRequest message or plain object * @param {animeshon.resourcemanager.v1alpha1.ResourceManager.DeleteTeamCallback} callback Node-style callback called with the error, if any, and Empty * @returns {undefined} * @variation 1 */ Object.defineProperty(ResourceManager.prototype.deleteTeam = function deleteTeam(request, callback) { return this.rpcCall(deleteTeam, $root.animeshon.resourcemanager.v1alpha1.DeleteTeamRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteTeam" }); /** * Calls DeleteTeam. * @function deleteTeam * @memberof animeshon.resourcemanager.v1alpha1.ResourceManager * @instance * @param {animeshon.resourcemanager.v1alpha1.IDeleteTeamRequest} request DeleteTeamRequest message or plain object * @returns {Promise<google.protobuf.Empty>} Promise * @variation 2 */ return ResourceManager; })(); v1alpha1.Organization = (function() { /** * Properties of an Organization. * @memberof animeshon.resourcemanager.v1alpha1 * @interface IOrganization * @property {string|null} [name] Organization name */ /** * Constructs a new Organization. * @memberof animeshon.resourcemanager.v1alpha1 * @classdesc Represents an Organization. * @implements IOrganization * @constructor * @param {animeshon.resourcemanager.v1alpha1.IOrganization=} [properties] Properties to set */ function Organization(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]]; } /** * Organization name. * @member {string} name * @memberof animeshon.resourcemanager.v1alpha1.Organization * @instance */ Organization.prototype.name = ""; /** * Creates a new Organization instance using the specified properties. * @function create * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {animeshon.resourcemanager.v1alpha1.IOrganization=} [properties] Properties to set * @returns {animeshon.resourcemanager.v1alpha1.Organization} Organization instance */ Organization.create = function create(properties) { return new Organization(properties); }; /** * Encodes the specified Organization message. Does not implicitly {@link animeshon.resourcemanager.v1alpha1.Organization.verify|verify} messages. * @function encode * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {animeshon.resourcemanager.v1alpha1.IOrganization} message Organization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Organization.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** * Encodes the specified Organization message, length delimited. Does not implicitly {@link animeshon.resourcemanager.v1alpha1.Organization.verify|verify} messages. * @function encodeDelimited * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {animeshon.resourcemanager.v1alpha1.IOrganization} message Organization message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Organization.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an Organization message from the specified reader or buffer. * @function decode * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {animeshon.resourcemanager.v1alpha1.Organization} Organization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Organization.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.animeshon.resourcemanager.v1alpha1.Organization(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an Organization message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {animeshon.resourcemanager.v1alpha1.Organization} Organization * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Organization.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an Organization message. * @function verify * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Organization.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; }; /** * Creates an Organization message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {Object.<string,*>} object Plain object * @returns {animeshon.resourcemanager.v1alpha1.Organization} Organization */ Organization.fromObject = function fromObject(object) { if (object instanceof $root.animeshon.resourcemanager.v1alpha1.Organization) return object; var message = new $root.animeshon.resourcemanager.v1alpha1.Organization(); if (object.name != null) message.name = String(object.name); return message; }; /** * Creates a plain object from an Organization message. Also converts values to other types if specified. * @function toObject * @memberof animeshon.resourcemanager.v1alpha1.Organization * @static * @param {animeshon.resourcemanager.v1alpha1.Organization} message Organization * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ Organization.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** * Converts this Organization to JSON. * @function toJSON * @memberof animeshon.resourcemanager.v1alpha1.Organization * @instance * @returns {Object.<string,*>} JSON object */ Organization.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return Organization; })(); v1alpha1.Team = (function() { /** * Properties of a Team. * @memberof animeshon.resourcemanager.v1alpha1 * @interface ITeam * @property {string|null} [name] Team name */ /** * Constructs a new Team. * @memberof animeshon.resourcemanager.v1alpha1 * @classdesc Represents a Team. * @implements ITeam * @constructor * @param {animeshon.resourcemanager.v1alpha1.ITeam=} [properties] Properties to set */ function Team(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]]; } /** * Team name. * @member {string} name * @memberof animeshon.resourcemanager.v1alpha1.Team * @instance */ Team.prototype.name = ""; /** * Creates a new Team instance using the specified properties. * @function create * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {animeshon.resourcemanager.v1alpha1.ITeam=} [properties] Properties to set * @returns {animeshon.resourcemanager.v1alpha1.Team} Team instance */ Team.create = function create(properties) { return new Team(properties); }; /** * Encodes the specified Team message. Does not implicitly {@link animeshon.resourcemanager.v1alpha1.Team.verify|verify} messages. * @function encode * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {animeshon.resourcemanager.v1alpha1.ITeam} message Team message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Team.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** * Encodes the specified Team message, length delimited. Does not implicitly {@link animeshon.resourcemanager.v1alpha1.Team.verify|verify} messages. * @function encodeDelimited * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {animeshon.resourcemanager.v1alpha1.ITeam} message Team message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Team.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Team message from the specified reader or buffer. * @function decode * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {animeshon.resourcemanager.v1alpha1.Team} Team * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Team.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.animeshon.resourcemanager.v1alpha1.Team(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.name = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Team message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {animeshon.resourcemanager.v1alpha1.Team} Team * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Team.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Team message. * @function verify * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Team.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; return null; }; /** * Creates a Team message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {Object.<string,*>} object Plain object * @returns {animeshon.resourcemanager.v1alpha1.Team} Team */ Team.fromObject = function fromObject(object) { if (object instanceof $root.animeshon.resourcemanager.v1alpha1.Team) return object; var message = new $root.animeshon.resourcemanager.v1alpha1.Team(); if (object.name != null) message.name = String(object.name); return message; }; /** * Creates a plain object from a Team message. Also converts values to other types if specified. * @function toObject * @memberof animeshon.resourcemanager.v1alpha1.Team * @static * @param {animeshon.resourcemanager.v1alpha1.Team} message Team * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ Team.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; return object; }; /** * Converts this Team to JSON. * @function toJSON * @memberof animeshon.resourcemanager.v1alpha1.Team * @instance * @returns {Object.<string,*>} JSON object */ Team.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; return Team; })(); v1alpha1.GetOrganizationRequest = (function() { /** * Properties of a GetOrganizationRequest. * @memberof animeshon.resourcemanager.v1alpha1 * @interface IGetOrganizationRequest * @property {string|null} [name] GetOrganizationRequest name */ /** * Constructs a new GetOrganizationRequest. * @memberof animeshon.resourcemanager.v1alpha1 * @classdesc Represents a GetOrganizationRequest. * @implements IGetOrganizationRequest * @constructor * @param {animeshon.resourcemanager.v1alpha1.IGetOrganizationRequest=} [properties] Properties to set */ function GetOrganizationRequest(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]]; } /** * GetOrganizationRequest name. * @member {string} name * @memberof animeshon.resourcemanager.v1alpha1.GetOrganizationRequest * @instance */ GetOrganizationRequest.prototype.name = ""; /** * Creates a new GetOrganizationRequest instance using the specified properties. * @function create * @memberof animeshon.resourcemanager.v1alpha1.GetOrganizationRequest * @static * @param {animeshon.resourcemanager.v1alpha1.IGetOrganizationRequest=} [properties] Properties to set * @returns {animeshon.resourcemanager.v1alpha1.GetOrganizationRequest} GetOrganizationRequest instance */ GetOrganizationRequest.create = function create(properties) { return new GetOrganizationRequest(properties); }; /** * Encodes the specified GetOrganizationRequest message. Does not implicitly {@link animeshon.resourcemanager.v1alpha1.GetOrganizationRequest.verify|verify} messages. * @function encode * @memberof animeshon.resourcemanager.v1alpha1.GetOrganizationRequest * @static * @param {animeshon.resourcemanager.v1alpha1.IGetOrganizationRequest} message GetOrganizationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GetOrganizationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** * Encodes the specified GetOrganizationRequest message, length delimited. Does not implicitly {@link animeshon.resourcemanager.v1alpha1.GetOrganizationRequest.verify|verify} messages. * @function encodeDelimited * @memberof animeshon.resourcemanager.v1alpha1.GetOrganizationRequest * @static * @param {animeshon.resourcemanager.v1alpha1.IGetOrganizationRequest} message GetOrganizationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GetOrganizationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GetOrganizationRequest message from the specified reader or buffer. * @function decode * @memberof animeshon.resourcemanager.v1alpha1.GetOrganizationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {animeshon.resourcemanager.v1alpha1.GetOrganizationRequest} GetOrganizationRequest