@animeapis/identity
Version:
Identity client for Node.js
885 lines (802 loc) • 1.26 MB
JavaScript
// 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_identity_protos || ($protobuf.roots._animeapis_identity_protos = {});
$root.animeshon = (function() {
/**
* Namespace animeshon.
* @exports animeshon
* @namespace
*/
var animeshon = {};
animeshon.identity = (function() {
/**
* Namespace identity.
* @memberof animeshon
* @namespace
*/
var identity = {};
identity.v1alpha1 = (function() {
/**
* Namespace v1alpha1.
* @memberof animeshon.identity
* @namespace
*/
var v1alpha1 = {};
v1alpha1.Identity = (function() {
/**
* Constructs a new Identity service.
* @memberof animeshon.identity.v1alpha1
* @classdesc Represents an Identity
* @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 Identity(rpcImpl, requestDelimited, responseDelimited) {
$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
}
(Identity.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Identity;
/**
* Creates new Identity service using the specified rpc implementation.
* @function create
* @memberof animeshon.identity.v1alpha1.Identity
* @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 {Identity} RPC service. Useful where requests and/or responses are streamed.
*/
Identity.create = function create(rpcImpl, requestDelimited, responseDelimited) {
return new this(rpcImpl, requestDelimited, responseDelimited);
};
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#getUserProfile}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef GetUserProfileCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.UserProfile} [response] UserProfile
*/
/**
* Calls GetUserProfile.
* @function getUserProfile
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserProfileRequest} request GetUserProfileRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.GetUserProfileCallback} callback Node-style callback called with the error, if any, and UserProfile
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.getUserProfile = function getUserProfile(request, callback) {
return this.rpcCall(getUserProfile, $root.animeshon.identity.v1alpha1.GetUserProfileRequest, $root.animeshon.identity.v1alpha1.UserProfile, request, callback);
}, "name", { value: "GetUserProfile" });
/**
* Calls GetUserProfile.
* @function getUserProfile
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserProfileRequest} request GetUserProfileRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.UserProfile>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#getUser}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef GetUserCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.User} [response] User
*/
/**
* Calls GetUser.
* @function getUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserRequest} request GetUserRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.GetUserCallback} callback Node-style callback called with the error, if any, and User
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.getUser = function getUser(request, callback) {
return this.rpcCall(getUser, $root.animeshon.identity.v1alpha1.GetUserRequest, $root.animeshon.identity.v1alpha1.User, request, callback);
}, "name", { value: "GetUser" });
/**
* Calls GetUser.
* @function getUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserRequest} request GetUserRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.User>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#listUsers}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef ListUsersCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.ListUsersResponse} [response] ListUsersResponse
*/
/**
* Calls ListUsers.
* @function listUsers
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IListUsersRequest} request ListUsersRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.ListUsersCallback} callback Node-style callback called with the error, if any, and ListUsersResponse
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.listUsers = function listUsers(request, callback) {
return this.rpcCall(listUsers, $root.animeshon.identity.v1alpha1.ListUsersRequest, $root.animeshon.identity.v1alpha1.ListUsersResponse, request, callback);
}, "name", { value: "ListUsers" });
/**
* Calls ListUsers.
* @function listUsers
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IListUsersRequest} request ListUsersRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.ListUsersResponse>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#createUser}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef CreateUserCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.User} [response] User
*/
/**
* Calls CreateUser.
* @function createUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.ICreateUserRequest} request CreateUserRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.CreateUserCallback} callback Node-style callback called with the error, if any, and User
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.createUser = function createUser(request, callback) {
return this.rpcCall(createUser, $root.animeshon.identity.v1alpha1.CreateUserRequest, $root.animeshon.identity.v1alpha1.User, request, callback);
}, "name", { value: "CreateUser" });
/**
* Calls CreateUser.
* @function createUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.ICreateUserRequest} request CreateUserRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.User>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#updateUser}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef UpdateUserCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.User} [response] User
*/
/**
* Calls UpdateUser.
* @function updateUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateUserRequest} request UpdateUserRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.UpdateUserCallback} callback Node-style callback called with the error, if any, and User
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.updateUser = function updateUser(request, callback) {
return this.rpcCall(updateUser, $root.animeshon.identity.v1alpha1.UpdateUserRequest, $root.animeshon.identity.v1alpha1.User, request, callback);
}, "name", { value: "UpdateUser" });
/**
* Calls UpdateUser.
* @function updateUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateUserRequest} request UpdateUserRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.User>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#deleteUser}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef DeleteUserCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {google.protobuf.Empty} [response] Empty
*/
/**
* Calls DeleteUser.
* @function deleteUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IDeleteUserRequest} request DeleteUserRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.DeleteUserCallback} callback Node-style callback called with the error, if any, and Empty
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.deleteUser = function deleteUser(request, callback) {
return this.rpcCall(deleteUser, $root.animeshon.identity.v1alpha1.DeleteUserRequest, $root.google.protobuf.Empty, request, callback);
}, "name", { value: "DeleteUser" });
/**
* Calls DeleteUser.
* @function deleteUser
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IDeleteUserRequest} request DeleteUserRequest message or plain object
* @returns {Promise<google.protobuf.Empty>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#getUserSettings}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef GetUserSettingsCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.UserSettings} [response] UserSettings
*/
/**
* Calls GetUserSettings.
* @function getUserSettings
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserSettingsRequest} request GetUserSettingsRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.GetUserSettingsCallback} callback Node-style callback called with the error, if any, and UserSettings
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.getUserSettings = function getUserSettings(request, callback) {
return this.rpcCall(getUserSettings, $root.animeshon.identity.v1alpha1.GetUserSettingsRequest, $root.animeshon.identity.v1alpha1.UserSettings, request, callback);
}, "name", { value: "GetUserSettings" });
/**
* Calls GetUserSettings.
* @function getUserSettings
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserSettingsRequest} request GetUserSettingsRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.UserSettings>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#updateUserSettings}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef UpdateUserSettingsCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.UserSettings} [response] UserSettings
*/
/**
* Calls UpdateUserSettings.
* @function updateUserSettings
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateUserSettingsRequest} request UpdateUserSettingsRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.UpdateUserSettingsCallback} callback Node-style callback called with the error, if any, and UserSettings
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.updateUserSettings = function updateUserSettings(request, callback) {
return this.rpcCall(updateUserSettings, $root.animeshon.identity.v1alpha1.UpdateUserSettingsRequest, $root.animeshon.identity.v1alpha1.UserSettings, request, callback);
}, "name", { value: "UpdateUserSettings" });
/**
* Calls UpdateUserSettings.
* @function updateUserSettings
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateUserSettingsRequest} request UpdateUserSettingsRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.UserSettings>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#getUserNotifications}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef GetUserNotificationsCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.UserNotifications} [response] UserNotifications
*/
/**
* Calls GetUserNotifications.
* @function getUserNotifications
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserNotificationsRequest} request GetUserNotificationsRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.GetUserNotificationsCallback} callback Node-style callback called with the error, if any, and UserNotifications
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.getUserNotifications = function getUserNotifications(request, callback) {
return this.rpcCall(getUserNotifications, $root.animeshon.identity.v1alpha1.GetUserNotificationsRequest, $root.animeshon.identity.v1alpha1.UserNotifications, request, callback);
}, "name", { value: "GetUserNotifications" });
/**
* Calls GetUserNotifications.
* @function getUserNotifications
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserNotificationsRequest} request GetUserNotificationsRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.UserNotifications>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#updateUserNotifications}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef UpdateUserNotificationsCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.UserNotifications} [response] UserNotifications
*/
/**
* Calls UpdateUserNotifications.
* @function updateUserNotifications
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateUserNotificationsRequest} request UpdateUserNotificationsRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.UpdateUserNotificationsCallback} callback Node-style callback called with the error, if any, and UserNotifications
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.updateUserNotifications = function updateUserNotifications(request, callback) {
return this.rpcCall(updateUserNotifications, $root.animeshon.identity.v1alpha1.UpdateUserNotificationsRequest, $root.animeshon.identity.v1alpha1.UserNotifications, request, callback);
}, "name", { value: "UpdateUserNotifications" });
/**
* Calls UpdateUserNotifications.
* @function updateUserNotifications
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateUserNotificationsRequest} request UpdateUserNotificationsRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.UserNotifications>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#getUserDefaults}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef GetUserDefaultsCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.UserDefaults} [response] UserDefaults
*/
/**
* Calls GetUserDefaults.
* @function getUserDefaults
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserDefaultsRequest} request GetUserDefaultsRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.GetUserDefaultsCallback} callback Node-style callback called with the error, if any, and UserDefaults
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.getUserDefaults = function getUserDefaults(request, callback) {
return this.rpcCall(getUserDefaults, $root.animeshon.identity.v1alpha1.GetUserDefaultsRequest, $root.animeshon.identity.v1alpha1.UserDefaults, request, callback);
}, "name", { value: "GetUserDefaults" });
/**
* Calls GetUserDefaults.
* @function getUserDefaults
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetUserDefaultsRequest} request GetUserDefaultsRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.UserDefaults>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#getGroup}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef GetGroupCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.Group} [response] Group
*/
/**
* Calls GetGroup.
* @function getGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetGroupRequest} request GetGroupRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.GetGroupCallback} callback Node-style callback called with the error, if any, and Group
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.getGroup = function getGroup(request, callback) {
return this.rpcCall(getGroup, $root.animeshon.identity.v1alpha1.GetGroupRequest, $root.animeshon.identity.v1alpha1.Group, request, callback);
}, "name", { value: "GetGroup" });
/**
* Calls GetGroup.
* @function getGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IGetGroupRequest} request GetGroupRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.Group>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#listGroups}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef ListGroupsCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.ListGroupsResponse} [response] ListGroupsResponse
*/
/**
* Calls ListGroups.
* @function listGroups
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IListGroupsRequest} request ListGroupsRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.ListGroupsCallback} callback Node-style callback called with the error, if any, and ListGroupsResponse
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.listGroups = function listGroups(request, callback) {
return this.rpcCall(listGroups, $root.animeshon.identity.v1alpha1.ListGroupsRequest, $root.animeshon.identity.v1alpha1.ListGroupsResponse, request, callback);
}, "name", { value: "ListGroups" });
/**
* Calls ListGroups.
* @function listGroups
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IListGroupsRequest} request ListGroupsRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.ListGroupsResponse>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#createGroup}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef CreateGroupCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.Group} [response] Group
*/
/**
* Calls CreateGroup.
* @function createGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.ICreateGroupRequest} request CreateGroupRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.CreateGroupCallback} callback Node-style callback called with the error, if any, and Group
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.createGroup = function createGroup(request, callback) {
return this.rpcCall(createGroup, $root.animeshon.identity.v1alpha1.CreateGroupRequest, $root.animeshon.identity.v1alpha1.Group, request, callback);
}, "name", { value: "CreateGroup" });
/**
* Calls CreateGroup.
* @function createGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.ICreateGroupRequest} request CreateGroupRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.Group>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#updateGroup}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef UpdateGroupCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {animeshon.identity.v1alpha1.Group} [response] Group
*/
/**
* Calls UpdateGroup.
* @function updateGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateGroupRequest} request UpdateGroupRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.UpdateGroupCallback} callback Node-style callback called with the error, if any, and Group
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.updateGroup = function updateGroup(request, callback) {
return this.rpcCall(updateGroup, $root.animeshon.identity.v1alpha1.UpdateGroupRequest, $root.animeshon.identity.v1alpha1.Group, request, callback);
}, "name", { value: "UpdateGroup" });
/**
* Calls UpdateGroup.
* @function updateGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IUpdateGroupRequest} request UpdateGroupRequest message or plain object
* @returns {Promise<animeshon.identity.v1alpha1.Group>} Promise
* @variation 2
*/
/**
* Callback as used by {@link animeshon.identity.v1alpha1.Identity#deleteGroup}.
* @memberof animeshon.identity.v1alpha1.Identity
* @typedef DeleteGroupCallback
* @type {function}
* @param {Error|null} error Error, if any
* @param {google.protobuf.Empty} [response] Empty
*/
/**
* Calls DeleteGroup.
* @function deleteGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IDeleteGroupRequest} request DeleteGroupRequest message or plain object
* @param {animeshon.identity.v1alpha1.Identity.DeleteGroupCallback} callback Node-style callback called with the error, if any, and Empty
* @returns {undefined}
* @variation 1
*/
Object.defineProperty(Identity.prototype.deleteGroup = function deleteGroup(request, callback) {
return this.rpcCall(deleteGroup, $root.animeshon.identity.v1alpha1.DeleteGroupRequest, $root.google.protobuf.Empty, request, callback);
}, "name", { value: "DeleteGroup" });
/**
* Calls DeleteGroup.
* @function deleteGroup
* @memberof animeshon.identity.v1alpha1.Identity
* @instance
* @param {animeshon.identity.v1alpha1.IDeleteGroupRequest} request DeleteGroupRequest message or plain object
* @returns {Promise<google.protobuf.Empty>} Promise
* @variation 2
*/
return Identity;
})();
/**
* Gender enum.
* @name animeshon.identity.v1alpha1.Gender
* @enum {number}
* @property {number} GENDER_UNSPECIFIED=0 GENDER_UNSPECIFIED value
* @property {number} MALE=1 MALE value
* @property {number} FEMALE=2 FEMALE value
* @property {number} OTHER=3 OTHER value
*/
v1alpha1.Gender = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "GENDER_UNSPECIFIED"] = 0;
values[valuesById[1] = "MALE"] = 1;
values[valuesById[2] = "FEMALE"] = 2;
values[valuesById[3] = "OTHER"] = 3;
return values;
})();
v1alpha1.UserProfile = (function() {
/**
* Properties of a UserProfile.
* @memberof animeshon.identity.v1alpha1
* @interface IUserProfile
* @property {string|null} [name] UserProfile name
* @property {string|null} [profileImage] UserProfile profileImage
* @property {string|null} [bannerImage] UserProfile bannerImage
* @property {string|null} [username] UserProfile username
* @property {string|null} [discriminator] UserProfile discriminator
* @property {google.type.IDate|null} [birthday] UserProfile birthday
* @property {animeshon.identity.v1alpha1.Gender|null} [gender] UserProfile gender
*/
/**
* Constructs a new UserProfile.
* @memberof animeshon.identity.v1alpha1
* @classdesc Represents a UserProfile.
* @implements IUserProfile
* @constructor
* @param {animeshon.identity.v1alpha1.IUserProfile=} [properties] Properties to set
*/
function UserProfile(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]];
}
/**
* UserProfile name.
* @member {string} name
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.name = "";
/**
* UserProfile profileImage.
* @member {string} profileImage
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.profileImage = "";
/**
* UserProfile bannerImage.
* @member {string} bannerImage
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.bannerImage = "";
/**
* UserProfile username.
* @member {string} username
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.username = "";
/**
* UserProfile discriminator.
* @member {string} discriminator
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.discriminator = "";
/**
* UserProfile birthday.
* @member {google.type.IDate|null|undefined} birthday
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.birthday = null;
/**
* UserProfile gender.
* @member {animeshon.identity.v1alpha1.Gender} gender
* @memberof animeshon.identity.v1alpha1.UserProfile
* @instance
*/
UserProfile.prototype.gender = 0;
/**
* Creates a new UserProfile instance using the specified properties.
* @function create
* @memberof animeshon.identity.v1alpha1.UserProfile
* @static
* @param {animeshon.identity.v1alpha1.IUserProfile=} [properties] Properties to set
* @returns {animeshon.identity.v1alpha1.UserProfile} UserProfile instance
*/
UserProfile.create = function create(properties) {
return new UserProfile(properties);
};
/**
* Encodes the specified UserProfile message. Does not implicitly {@link animeshon.identity.v1alpha1.UserProfile.verify|verify} messages.
* @function encode
* @memberof animeshon.identity.v1alpha1.UserProfile
* @static
* @param {animeshon.identity.v1alpha1.IUserProfile} message UserProfile message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
UserProfile.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);
if (message.profileImage != null && Object.hasOwnProperty.call(message, "profileImage"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.profileImage);
if (message.bannerImage != null && Object.hasOwnProperty.call(message, "bannerImage"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.bannerImage);
if (message.username != null && Object.hasOwnProperty.call(message, "username"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.username);
if (message.discriminator != null && Object.hasOwnProperty.call(message, "discriminator"))
writer.uint32(/* id 5, wireType 2 =*/42).string(message.discriminator);
if (message.birthday != null && Object.hasOwnProperty.call(message, "birthday"))
$root.google.type.Date.encode(message.birthday, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
if (message.gender != null && Object.hasOwnProperty.call(message, "gender"))
writer.uint32(/* id 7, wireType 0 =*/56).int32(message.gender);
return writer;
};
/**
* Encodes the specified UserProfile message, length delimited. Does not implicitly {@link animeshon.identity.v1alpha1.UserProfile.verify|verify} messages.
* @function encodeDelimited
* @memberof animeshon.identity.v1alpha1.UserProfile
* @static
* @param {animeshon.identity.v1alpha1.IUserProfile} message UserProfile message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
UserProfile.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a UserProfile message from the specified reader or buffer.
* @function decode
* @memberof animeshon.identity.v1alpha1.UserProfile
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {animeshon.identity.v1alpha1.UserProfile} UserProfile
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
UserProfile.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.identity.v1alpha1.UserProfile();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.name = reader.string();
break;
case 2:
message.profileImage = reader.string();
break;
case 3:
message.bannerImage = reader.string();
break;
case 4:
message.username = reader.string();
break;
case 5:
message.discriminator = reader.string();
break;
case 6:
message.birthday = $root.google.type.Date.decode(reader, reader.uint32());
break;
case 7:
message.gender = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a UserProfile message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof animeshon.identity.v1alpha1.UserProfile
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {animeshon.identity.v1alpha1.UserProfile} UserProfile
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
UserProfile.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a UserProfile message.
* @function verify
* @memberof animeshon.identity.v1alpha1.UserProfile
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
UserProfile.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";
if (message.profileImage != null && message.hasOwnProperty("profileImage"))
if (!$util.isString(message.profileImage))
return "profileImage: string expected";
if (message.bannerImage != null && message.hasOwnProperty("bannerImage"))
if (!$util.isString(message.bannerImage))
return "bannerImage: string expected";
if (message.username != null && message.hasOwnProperty("username"))
if (!$util.isString(message.username))
return "username: string expected";
if (message.discriminator != null && message.hasOwnProperty("discriminator"))
if (!$util.isString(message.discriminator))
return "discriminator: string expected";
if (message.birthday != null && message.hasOwnProperty("birthday")) {
var error = $root.google.type.Date.verify(message.birthday);
if (error)
return "birthday." + error;
}
if (message.gender != null && message.hasOwnProperty("gender"))
switch (message.gender) {
default:
return "gender: enum value expected";
case 0:
case 1:
case 2:
case 3:
break;
}