@zitadel/node
Version:
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.
7,343 lines • 253 kB
JavaScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.5
// protoc unknown
// source: zitadel/system.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import Long from "long";
import { Duration } from "../google/protobuf/duration.js";
import { Timestamp } from "../google/protobuf/timestamp.js";
import { keyTypeFromJSON, keyTypeToJSON } from "./auth_n_key.js";
import { instanceFeatureFromJSON, instanceFeatureToJSON } from "./feature.js";
import { Domain, domainFieldNameFromJSON, domainFieldNameToJSON, DomainSearchQuery, fieldNameFromJSON, fieldNameToJSON, Instance, InstanceDetail, Query, } from "./instance.js";
import { Member, memberFieldColumnNameFromJSON, memberFieldColumnNameToJSON, SearchQuery, } from "./member.js";
import { ListDetails, ListQuery, ObjectDetails } from "./object.js";
import { Notification, unitFromJSON, unitToJSON } from "./quota.js";
export const protobufPackage = "zitadel.system.v1";
function createBaseHealthzRequest() {
return {};
}
export const HealthzRequest = {
encode(_, writer = new BinaryWriter()) {
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseHealthzRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return HealthzRequest.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseHealthzRequest();
return message;
},
};
function createBaseHealthzResponse() {
return {};
}
export const HealthzResponse = {
encode(_, writer = new BinaryWriter()) {
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseHealthzResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return HealthzResponse.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseHealthzResponse();
return message;
},
};
function createBaseListInstancesRequest() {
return { query: undefined, sortingColumn: 0, queries: [] };
}
export const ListInstancesRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.query !== undefined) {
ListQuery.encode(message.query, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.queries) {
Query.encode(v, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListInstancesRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.query = ListQuery.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.queries.push(Query.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
query: isSet(object.query) ? ListQuery.fromJSON(object.query) : undefined,
sortingColumn: isSet(object.sortingColumn) ? fieldNameFromJSON(object.sortingColumn) : 0,
queries: globalThis.Array.isArray(object?.queries) ? object.queries.map((e) => Query.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.query !== undefined) {
obj.query = ListQuery.toJSON(message.query);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = fieldNameToJSON(message.sortingColumn);
}
if (message.queries?.length) {
obj.queries = message.queries.map((e) => Query.toJSON(e));
}
return obj;
},
create(base) {
return ListInstancesRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListInstancesRequest();
message.query = (object.query !== undefined && object.query !== null)
? ListQuery.fromPartial(object.query)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.queries = object.queries?.map((e) => Query.fromPartial(e)) || [];
return message;
},
};
function createBaseListInstancesResponse() {
return { details: undefined, sortingColumn: 0, result: [] };
}
export const ListInstancesResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ListDetails.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.result) {
Instance.encode(v, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListInstancesResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ListDetails.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.result.push(Instance.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? ListDetails.fromJSON(object.details) : undefined,
sortingColumn: isSet(object.sortingColumn) ? fieldNameFromJSON(object.sortingColumn) : 0,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => Instance.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ListDetails.toJSON(message.details);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = fieldNameToJSON(message.sortingColumn);
}
if (message.result?.length) {
obj.result = message.result.map((e) => Instance.toJSON(e));
}
return obj;
},
create(base) {
return ListInstancesResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListInstancesResponse();
message.details = (object.details !== undefined && object.details !== null)
? ListDetails.fromPartial(object.details)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.result = object.result?.map((e) => Instance.fromPartial(e)) || [];
return message;
},
};
function createBaseGetInstanceRequest() {
return { instanceId: "" };
}
export const GetInstanceRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGetInstanceRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "" };
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
return obj;
},
create(base) {
return GetInstanceRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetInstanceRequest();
message.instanceId = object.instanceId ?? "";
return message;
},
};
function createBaseGetInstanceResponse() {
return { instance: undefined };
}
export const GetInstanceResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
InstanceDetail.encode(message.instance, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGetInstanceResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instance = InstanceDetail.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { instance: isSet(object.instance) ? InstanceDetail.fromJSON(object.instance) : undefined };
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = InstanceDetail.toJSON(message.instance);
}
return obj;
},
create(base) {
return GetInstanceResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetInstanceResponse();
message.instance = (object.instance !== undefined && object.instance !== null)
? InstanceDetail.fromPartial(object.instance)
: undefined;
return message;
},
};
function createBaseAddInstanceRequest() {
return {
instanceName: "",
firstOrgName: "",
customDomain: "",
ownerUserName: "",
ownerEmail: undefined,
ownerProfile: undefined,
ownerPassword: undefined,
defaultLanguage: "",
};
}
export const AddInstanceRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceName !== "") {
writer.uint32(10).string(message.instanceName);
}
if (message.firstOrgName !== "") {
writer.uint32(18).string(message.firstOrgName);
}
if (message.customDomain !== "") {
writer.uint32(26).string(message.customDomain);
}
if (message.ownerUserName !== "") {
writer.uint32(34).string(message.ownerUserName);
}
if (message.ownerEmail !== undefined) {
AddInstanceRequest_Email.encode(message.ownerEmail, writer.uint32(42).fork()).join();
}
if (message.ownerProfile !== undefined) {
AddInstanceRequest_Profile.encode(message.ownerProfile, writer.uint32(50).fork()).join();
}
if (message.ownerPassword !== undefined) {
AddInstanceRequest_Password.encode(message.ownerPassword, writer.uint32(58).fork()).join();
}
if (message.defaultLanguage !== "") {
writer.uint32(66).string(message.defaultLanguage);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddInstanceRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceName = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.firstOrgName = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.customDomain = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.ownerUserName = reader.string();
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.ownerEmail = AddInstanceRequest_Email.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.ownerProfile = AddInstanceRequest_Profile.decode(reader, reader.uint32());
continue;
}
case 7: {
if (tag !== 58) {
break;
}
message.ownerPassword = AddInstanceRequest_Password.decode(reader, reader.uint32());
continue;
}
case 8: {
if (tag !== 66) {
break;
}
message.defaultLanguage = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceName: isSet(object.instanceName) ? globalThis.String(object.instanceName) : "",
firstOrgName: isSet(object.firstOrgName) ? globalThis.String(object.firstOrgName) : "",
customDomain: isSet(object.customDomain) ? globalThis.String(object.customDomain) : "",
ownerUserName: isSet(object.ownerUserName) ? globalThis.String(object.ownerUserName) : "",
ownerEmail: isSet(object.ownerEmail) ? AddInstanceRequest_Email.fromJSON(object.ownerEmail) : undefined,
ownerProfile: isSet(object.ownerProfile) ? AddInstanceRequest_Profile.fromJSON(object.ownerProfile) : undefined,
ownerPassword: isSet(object.ownerPassword)
? AddInstanceRequest_Password.fromJSON(object.ownerPassword)
: undefined,
defaultLanguage: isSet(object.defaultLanguage) ? globalThis.String(object.defaultLanguage) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instanceName !== "") {
obj.instanceName = message.instanceName;
}
if (message.firstOrgName !== "") {
obj.firstOrgName = message.firstOrgName;
}
if (message.customDomain !== "") {
obj.customDomain = message.customDomain;
}
if (message.ownerUserName !== "") {
obj.ownerUserName = message.ownerUserName;
}
if (message.ownerEmail !== undefined) {
obj.ownerEmail = AddInstanceRequest_Email.toJSON(message.ownerEmail);
}
if (message.ownerProfile !== undefined) {
obj.ownerProfile = AddInstanceRequest_Profile.toJSON(message.ownerProfile);
}
if (message.ownerPassword !== undefined) {
obj.ownerPassword = AddInstanceRequest_Password.toJSON(message.ownerPassword);
}
if (message.defaultLanguage !== "") {
obj.defaultLanguage = message.defaultLanguage;
}
return obj;
},
create(base) {
return AddInstanceRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddInstanceRequest();
message.instanceName = object.instanceName ?? "";
message.firstOrgName = object.firstOrgName ?? "";
message.customDomain = object.customDomain ?? "";
message.ownerUserName = object.ownerUserName ?? "";
message.ownerEmail = (object.ownerEmail !== undefined && object.ownerEmail !== null)
? AddInstanceRequest_Email.fromPartial(object.ownerEmail)
: undefined;
message.ownerProfile = (object.ownerProfile !== undefined && object.ownerProfile !== null)
? AddInstanceRequest_Profile.fromPartial(object.ownerProfile)
: undefined;
message.ownerPassword = (object.ownerPassword !== undefined && object.ownerPassword !== null)
? AddInstanceRequest_Password.fromPartial(object.ownerPassword)
: undefined;
message.defaultLanguage = object.defaultLanguage ?? "";
return message;
},
};
function createBaseAddInstanceRequest_Profile() {
return { firstName: "", lastName: "", preferredLanguage: "" };
}
export const AddInstanceRequest_Profile = {
encode(message, writer = new BinaryWriter()) {
if (message.firstName !== "") {
writer.uint32(10).string(message.firstName);
}
if (message.lastName !== "") {
writer.uint32(18).string(message.lastName);
}
if (message.preferredLanguage !== "") {
writer.uint32(42).string(message.preferredLanguage);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddInstanceRequest_Profile();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.firstName = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.lastName = reader.string();
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.preferredLanguage = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
firstName: isSet(object.firstName) ? globalThis.String(object.firstName) : "",
lastName: isSet(object.lastName) ? globalThis.String(object.lastName) : "",
preferredLanguage: isSet(object.preferredLanguage) ? globalThis.String(object.preferredLanguage) : "",
};
},
toJSON(message) {
const obj = {};
if (message.firstName !== "") {
obj.firstName = message.firstName;
}
if (message.lastName !== "") {
obj.lastName = message.lastName;
}
if (message.preferredLanguage !== "") {
obj.preferredLanguage = message.preferredLanguage;
}
return obj;
},
create(base) {
return AddInstanceRequest_Profile.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddInstanceRequest_Profile();
message.firstName = object.firstName ?? "";
message.lastName = object.lastName ?? "";
message.preferredLanguage = object.preferredLanguage ?? "";
return message;
},
};
function createBaseAddInstanceRequest_Email() {
return { email: "", isEmailVerified: false };
}
export const AddInstanceRequest_Email = {
encode(message, writer = new BinaryWriter()) {
if (message.email !== "") {
writer.uint32(10).string(message.email);
}
if (message.isEmailVerified !== false) {
writer.uint32(16).bool(message.isEmailVerified);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddInstanceRequest_Email();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.email = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.isEmailVerified = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
email: isSet(object.email) ? globalThis.String(object.email) : "",
isEmailVerified: isSet(object.isEmailVerified) ? globalThis.Boolean(object.isEmailVerified) : false,
};
},
toJSON(message) {
const obj = {};
if (message.email !== "") {
obj.email = message.email;
}
if (message.isEmailVerified !== false) {
obj.isEmailVerified = message.isEmailVerified;
}
return obj;
},
create(base) {
return AddInstanceRequest_Email.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddInstanceRequest_Email();
message.email = object.email ?? "";
message.isEmailVerified = object.isEmailVerified ?? false;
return message;
},
};
function createBaseAddInstanceRequest_Password() {
return { password: "", passwordChangeRequired: false };
}
export const AddInstanceRequest_Password = {
encode(message, writer = new BinaryWriter()) {
if (message.password !== "") {
writer.uint32(10).string(message.password);
}
if (message.passwordChangeRequired !== false) {
writer.uint32(16).bool(message.passwordChangeRequired);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddInstanceRequest_Password();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.password = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.passwordChangeRequired = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
password: isSet(object.password) ? globalThis.String(object.password) : "",
passwordChangeRequired: isSet(object.passwordChangeRequired)
? globalThis.Boolean(object.passwordChangeRequired)
: false,
};
},
toJSON(message) {
const obj = {};
if (message.password !== "") {
obj.password = message.password;
}
if (message.passwordChangeRequired !== false) {
obj.passwordChangeRequired = message.passwordChangeRequired;
}
return obj;
},
create(base) {
return AddInstanceRequest_Password.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddInstanceRequest_Password();
message.password = object.password ?? "";
message.passwordChangeRequired = object.passwordChangeRequired ?? false;
return message;
},
};
function createBaseAddInstanceResponse() {
return { instanceId: "", details: undefined };
}
export const AddInstanceResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddInstanceResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return AddInstanceResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddInstanceResponse();
message.instanceId = object.instanceId ?? "";
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseCreateInstanceRequest() {
return {
instanceName: "",
firstOrgName: "",
customDomain: "",
human: undefined,
machine: undefined,
defaultLanguage: "",
};
}
export const CreateInstanceRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceName !== "") {
writer.uint32(10).string(message.instanceName);
}
if (message.firstOrgName !== "") {
writer.uint32(18).string(message.firstOrgName);
}
if (message.customDomain !== "") {
writer.uint32(26).string(message.customDomain);
}
if (message.human !== undefined) {
CreateInstanceRequest_Human.encode(message.human, writer.uint32(34).fork()).join();
}
if (message.machine !== undefined) {
CreateInstanceRequest_Machine.encode(message.machine, writer.uint32(42).fork()).join();
}
if (message.defaultLanguage !== "") {
writer.uint32(50).string(message.defaultLanguage);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceName = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.firstOrgName = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.customDomain = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.human = CreateInstanceRequest_Human.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.machine = CreateInstanceRequest_Machine.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.defaultLanguage = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceName: isSet(object.instanceName) ? globalThis.String(object.instanceName) : "",
firstOrgName: isSet(object.firstOrgName) ? globalThis.String(object.firstOrgName) : "",
customDomain: isSet(object.customDomain) ? globalThis.String(object.customDomain) : "",
human: isSet(object.human) ? CreateInstanceRequest_Human.fromJSON(object.human) : undefined,
machine: isSet(object.machine) ? CreateInstanceRequest_Machine.fromJSON(object.machine) : undefined,
defaultLanguage: isSet(object.defaultLanguage) ? globalThis.String(object.defaultLanguage) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instanceName !== "") {
obj.instanceName = message.instanceName;
}
if (message.firstOrgName !== "") {
obj.firstOrgName = message.firstOrgName;
}
if (message.customDomain !== "") {
obj.customDomain = message.customDomain;
}
if (message.human !== undefined) {
obj.human = CreateInstanceRequest_Human.toJSON(message.human);
}
if (message.machine !== undefined) {
obj.machine = CreateInstanceRequest_Machine.toJSON(message.machine);
}
if (message.defaultLanguage !== "") {
obj.defaultLanguage = message.defaultLanguage;
}
return obj;
},
create(base) {
return CreateInstanceRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest();
message.instanceName = object.instanceName ?? "";
message.firstOrgName = object.firstOrgName ?? "";
message.customDomain = object.customDomain ?? "";
message.human = (object.human !== undefined && object.human !== null)
? CreateInstanceRequest_Human.fromPartial(object.human)
: undefined;
message.machine = (object.machine !== undefined && object.machine !== null)
? CreateInstanceRequest_Machine.fromPartial(object.machine)
: undefined;
message.defaultLanguage = object.defaultLanguage ?? "";
return message;
},
};
function createBaseCreateInstanceRequest_Profile() {
return { firstName: "", lastName: "", preferredLanguage: "" };
}
export const CreateInstanceRequest_Profile = {
encode(message, writer = new BinaryWriter()) {
if (message.firstName !== "") {
writer.uint32(10).string(message.firstName);
}
if (message.lastName !== "") {
writer.uint32(18).string(message.lastName);
}
if (message.preferredLanguage !== "") {
writer.uint32(26).string(message.preferredLanguage);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_Profile();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.firstName = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.lastName = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.preferredLanguage = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
firstName: isSet(object.firstName) ? globalThis.String(object.firstName) : "",
lastName: isSet(object.lastName) ? globalThis.String(object.lastName) : "",
preferredLanguage: isSet(object.preferredLanguage) ? globalThis.String(object.preferredLanguage) : "",
};
},
toJSON(message) {
const obj = {};
if (message.firstName !== "") {
obj.firstName = message.firstName;
}
if (message.lastName !== "") {
obj.lastName = message.lastName;
}
if (message.preferredLanguage !== "") {
obj.preferredLanguage = message.preferredLanguage;
}
return obj;
},
create(base) {
return CreateInstanceRequest_Profile.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_Profile();
message.firstName = object.firstName ?? "";
message.lastName = object.lastName ?? "";
message.preferredLanguage = object.preferredLanguage ?? "";
return message;
},
};
function createBaseCreateInstanceRequest_Email() {
return { email: "", isEmailVerified: false };
}
export const CreateInstanceRequest_Email = {
encode(message, writer = new BinaryWriter()) {
if (message.email !== "") {
writer.uint32(10).string(message.email);
}
if (message.isEmailVerified !== false) {
writer.uint32(16).bool(message.isEmailVerified);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_Email();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.email = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.isEmailVerified = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
email: isSet(object.email) ? globalThis.String(object.email) : "",
isEmailVerified: isSet(object.isEmailVerified) ? globalThis.Boolean(object.isEmailVerified) : false,
};
},
toJSON(message) {
const obj = {};
if (message.email !== "") {
obj.email = message.email;
}
if (message.isEmailVerified !== false) {
obj.isEmailVerified = message.isEmailVerified;
}
return obj;
},
create(base) {
return CreateInstanceRequest_Email.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_Email();
message.email = object.email ?? "";
message.isEmailVerified = object.isEmailVerified ?? false;
return message;
},
};
function createBaseCreateInstanceRequest_Password() {
return { password: "", passwordChangeRequired: false };
}
export const CreateInstanceRequest_Password = {
encode(message, writer = new BinaryWriter()) {
if (message.password !== "") {
writer.uint32(10).string(message.password);
}
if (message.passwordChangeRequired !== false) {
writer.uint32(16).bool(message.passwordChangeRequired);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_Password();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.password = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.passwordChangeRequired = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
password: isSet(object.password) ? globalThis.String(object.password) : "",
passwordChangeRequired: isSet(object.passwordChangeRequired)
? globalThis.Boolean(object.passwordChangeRequired)
: false,
};
},
toJSON(message) {
const obj = {};
if (message.password !== "") {
obj.password = message.password;
}
if (message.passwordChangeRequired !== false) {
obj.passwordChangeRequired = message.passwordChangeRequired;
}
return obj;
},
create(base) {
return CreateInstanceRequest_Password.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_Password();
message.password = object.password ?? "";
message.passwordChangeRequired = object.passwordChangeRequired ?? false;
return message;
},
};
function createBaseCreateInstanceRequest_Human() {
return { userName: "", email: undefined, profile: undefined, password: undefined };
}
export const CreateInstanceRequest_Human = {
encode(message, writer = new BinaryWriter()) {
if (message.userName !== "") {
writer.uint32(10).string(message.userName);
}
if (message.email !== undefined) {
CreateInstanceRequest_Email.encode(message.email, writer.uint32(18).fork()).join();
}
if (message.profile !== undefined) {
CreateInstanceRequest_Profile.encode(message.profile, writer.uint32(26).fork()).join();
}
if (message.password !== undefined) {
CreateInstanceRequest_Password.encode(message.password, writer.uint32(34).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_Human();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userName = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.email = CreateInstanceRequest_Email.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.profile = CreateInstanceRequest_Profile.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.password = CreateInstanceRequest_Password.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userName: isSet(object.userName) ? globalThis.String(object.userName) : "",
email: isSet(object.email) ? CreateInstanceRequest_Email.fromJSON(object.email) : undefined,
profile: isSet(object.profile) ? CreateInstanceRequest_Profile.fromJSON(object.profile) : undefined,
password: isSet(object.password) ? CreateInstanceRequest_Password.fromJSON(object.password) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userName !== "") {
obj.userName = message.userName;
}
if (message.email !== undefined) {
obj.email = CreateInstanceRequest_Email.toJSON(message.email);
}
if (message.profile !== undefined) {
obj.profile = CreateInstanceRequest_Profile.toJSON(message.profile);
}
if (message.password !== undefined) {
obj.password = CreateInstanceRequest_Password.toJSON(message.password);
}
return obj;
},
create(base) {
return CreateInstanceRequest_Human.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_Human();
message.userName = object.userName ?? "";
message.email = (object.email !== undefined && object.email !== null)
? CreateInstanceRequest_Email.fromPartial(object.email)
: undefined;
message.profile = (object.profile !== undefined && object.profile !== null)
? CreateInstanceRequest_Profile.fromPartial(object.profile)
: undefined;
message.password = (object.password !== undefined && object.password !== null)
? CreateInstanceRequest_Password.fromPartial(object.password)
: undefined;
return message;
},
};
function createBaseCreateInstanceRequest_PersonalAccessToken() {
return { expirationDate: undefined };
}
export const CreateInstanceRequest_PersonalAccessToken = {
encode(message, writer = new BinaryWriter()) {
if (message.expirationDate !== undefined) {
Timestamp.encode(toTimestamp(message.expirationDate), writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_PersonalAccessToken();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.expirationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { expirationDate: isSet(object.expirationDate) ? fromJsonTimestamp(object.expirationDate) : undefined };
},
toJSON(message) {
const obj = {};
if (message.expirationDate !== undefined) {
obj.expirationDate = message.expirationDate.toISOString();
}
return obj;
},
create(base) {
return CreateInstanceRequest_PersonalAccessToken.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_PersonalAccessToken();
message.expirationDate = object.expirationDate ?? undefined;
return message;
},
};
function createBaseCreateInstanceRequest_MachineKey() {
return { type: 0, expirationDate: undefined };
}
export const CreateInstanceRequest_MachineKey = {
encode(message, writer = new BinaryWriter()) {
if (message.type !== 0) {
writer.uint32(8).int32(message.type);
}
if (message.expirationDate !== undefined) {
Timestamp.encode(toTimestamp(message.expirationDate), writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_MachineKey();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
break;
}
message.type = reader.int32();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.expirationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
type: isSet(object.type) ? keyTypeFromJSON(object.type) : 0,
expirationDate: isSet(object.expirationDate) ? fromJsonTimestamp(object.expirationDate) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.type !== 0) {
obj.type = keyTypeToJSON(message.type);
}
if (message.expirationDate !== undefined) {
obj.expirationDate = message.expirationDate.toISOString();
}
return obj;
},
create(base) {
return CreateInstanceRequest_MachineKey.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_MachineKey();
message.type = object.type ?? 0;
message.expirationDate = object.expirationDate ?? undefined;
return message;
},
};
function createBaseCreateInstanceRequest_Machine() {
return { userName: "", name: "", personalAccessToken: undefined, machineKey: undefined };
}
export const CreateInstanceRequest_Machine = {
encode(message, writer = new BinaryWriter()) {
if (message.userName !== "") {
writer.uint32(10).string(message.userName);
}
if (message.name !== "") {
writer.uint32(18).string(message.name);
}
if (message.personalAccessToken !== undefined) {
CreateInstanceRequest_PersonalAccessToken.encode(message.personalAccessToken, writer.uint32(26).fork()).join();
}
if (message.machineKey !== undefined) {
CreateInstanceRequest_MachineKey.encode(message.machineKey, writer.uint32(34).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceRequest_Machine();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userName = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.name = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.personalAccessToken = CreateInstanceRequest_PersonalAccessToken.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.machineKey = CreateInstanceRequest_MachineKey.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userName: isSet(object.userName) ? globalThis.String(object.userName) : "",
name: isSet(object.name) ? globalThis.String(object.name) : "",
personalAccessToken: isSet(object.personalAccessToken)
? CreateInstanceRequest_PersonalAccessToken.fromJSON(object.personalAccessToken)
: undefined,
machineKey: isSet(object.machineKey) ? CreateInstanceRequest_MachineKey.fromJSON(object.machineKey) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userName !== "") {
obj.userName = message.userName;
}
if (message.name !== "") {
obj.name = message.name;
}
if (message.personalAccessToken !== undefined) {
obj.personalAccessToken = CreateInstanceRequest_PersonalAccessToken.toJSON(message.personalAccessToken);
}
if (message.machineKey !== undefined) {
obj.machineKey = CreateInstanceRequest_MachineKey.toJSON(message.machineKey);
}
return obj;
},
create(base) {
return CreateInstanceRequest_Machine.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceRequest_Machine();
message.userName = object.userName ?? "";
message.name = object.name ?? "";
message.personalAccessToken = (object.personalAccessToken !== undefined && object.personalAccessToken !== null)
? CreateInstanceRequest_PersonalAccessToken.fromPartial(object.personalAccessToken)
: undefined;
message.machineKey = (object.machineKey !== undefined && object.machineKey !== null)
? CreateInstanceRequest_MachineKey.fromPartial(object.machineKey)
: undefined;
return message;
},
};
function createBaseCreateInstanceResponse() {
return { instanceId: "", details: undefined, pat: "", machineKey: Buffer.alloc(0) };
}
export const CreateInstanceResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(18).fork()).join();
}
if (message.pat !== "") {
writer.uint32(26).string(message.pat);
}
if (message.machineKey.length !== 0) {
writer.uint32(34).bytes(message.machineKey);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateInstanceResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.pat = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.machineKey = Buffer.from(reader.bytes());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined,
pat: isSet(object.pat) ? globalThis.String(object.pat) : "",
machineKey: isSet(object.machineKey) ? Buffer.from(bytesFromBase64(object.machineKey)) : Buffer.alloc(0),
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
if (message.pat !== "") {
obj.pat = message.pat;
}
if (message.machineKey.length !== 0) {
obj.machineKey = base64FromBytes(message.machineKey);
}
return obj;
},
create(base) {
return CreateInstanceResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateInstanceResponse();
message.instanceId = object.instanceId ?? "";
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
message.pat = object.pat ?? "";
message.machineKey = object.machineKey ?? Buffer.alloc(0);
return message;
},
};
function createBaseUpdateInstanceRequest() {
return { instanceId: "", instanceName: "" };
}
export const UpdateInstanceRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.instanceName !== "") {
writer.uint32(18).string(message.instanceName);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseUpdateInstanceRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.instanceName = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
instanceName: isSet(object.instanceName) ? globalThis.String(object.instanceName) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.instanceName !== "") {
obj.instanceName = message.instanceName;
}
return obj;
},
create(base) {
return UpdateInstanceRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateInstanceRequest();
message.instanceId = object.instanceId ?? "";
message.instanceName = object.instanceName ?? "";
return message;
},
};
function createBaseUpdateInstanceResponse() {
return { details: undefined };
}
export const UpdateInstanceResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseUpdateInstanceResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return UpdateInstanceResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateInstanceResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRemoveInstanceRequest() {
return { instanceId: "" };
}
export const RemoveInstanceRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveInstanceRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "" };
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
return obj;
},
create(base) {
return RemoveInstanceRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveInstanceRequest();
message.instanceId = object.instanceId ?? "";
return message;
},
};
function createBaseRemoveInstanceResponse() {
return { details: undefined };
}
export const RemoveInstanceResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveInstanceResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return RemoveInstanceResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveInstanceResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseListIAMMembersRequest() {
return { query: undefined, instanceId: "", queries: [], sortingColumn: 0 };
}
export const ListIAMMembersRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.query !== undefined) {
ListQuery.encode(message.query, writer.uint32(10).fork()).join();
}
if (message.instanceId !== "") {
writer.uint32(18).string(message.instanceId);
}
for (const v of message.queries) {
SearchQuery.encode(v, writer.uint32(26).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(32).int32(message.sortingColumn);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListIAMMembersRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.query = ListQuery.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.instanceId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.queries.push(SearchQuery.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 32) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
query: isSet(object.query) ? ListQuery.fromJSON(object.query) : undefined,
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
queries: globalThis.Array.isArray(object?.queries) ? object.queries.map((e) => SearchQuery.fromJSON(e)) : [],
sortingColumn: isSet(object.sortingColumn) ? memberFieldColumnNameFromJSON(object.sortingColumn) : 0,
};
},
toJSON(message) {
const obj = {};
if (message.query !== undefined) {
obj.query = ListQuery.toJSON(message.query);
}
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.queries?.length) {
obj.queries = message.queries.map((e) => SearchQuery.toJSON(e));
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = memberFieldColumnNameToJSON(message.sortingColumn);
}
return obj;
},
create(base) {
return ListIAMMembersRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListIAMMembersRequest();
message.query = (object.query !== undefined && object.query !== null)
? ListQuery.fromPartial(object.query)
: undefined;
message.instanceId = object.instanceId ?? "";
message.queries = object.queries?.map((e) => SearchQuery.fromPartial(e)) || [];
message.sortingColumn = object.sortingColumn ?? 0;
return message;
},
};
function createBaseListIAMMembersResponse() {
return { details: undefined, result: [] };
}
export const ListIAMMembersResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ListDetails.encode(message.details, writer.uint32(10).fork()).join();
}
for (const v of message.result) {
Member.encode(v, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListIAMMembersResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ListDetails.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.result.push(Member.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? ListDetails.fromJSON(object.details) : undefined,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => Member.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ListDetails.toJSON(message.details);
}
if (message.result?.length) {
obj.result = message.result.map((e) => Member.toJSON(e));
}
return obj;
},
create(base) {
return ListIAMMembersResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListIAMMembersResponse();
message.details = (object.details !== undefined && object.details !== null)
? ListDetails.fromPartial(object.details)
: undefined;
message.result = object.result?.map((e) => Member.fromPartial(e)) || [];
return message;
},
};
function createBaseGetUsageRequest() {
return { instanceId: "" };
}
export const GetUsageRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGetUsageRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "" };
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
return obj;
},
create(base) {
return GetUsageRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetUsageRequest();
message.instanceId = object.instanceId ?? "";
return message;
},
};
function createBaseAddQuotaRequest() {
return {
instanceId: "",
unit: 0,
from: undefined,
resetInterval: undefined,
amount: Long.UZERO,
limit: false,
notifications: [],
};
}
export const AddQuotaRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.unit !== 0) {
writer.uint32(16).int32(message.unit);
}
if (message.from !== undefined) {
Timestamp.encode(toTimestamp(message.from), writer.uint32(26).fork()).join();
}
if (message.resetInterval !== undefined) {
Duration.encode(message.resetInterval, writer.uint32(34).fork()).join();
}
if (!message.amount.equals(Long.UZERO)) {
writer.uint32(40).uint64(message.amount.toString());
}
if (message.limit !== false) {
writer.uint32(48).bool(message.limit);
}
for (const v of message.notifications) {
Notification.encode(v, writer.uint32(58).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddQuotaRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.unit = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.from = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.resetInterval = Duration.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 40) {
break;
}
message.amount = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 6: {
if (tag !== 48) {
break;
}
message.limit = reader.bool();
continue;
}
case 7: {
if (tag !== 58) {
break;
}
message.notifications.push(Notification.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
unit: isSet(object.unit) ? unitFromJSON(object.unit) : 0,
from: isSet(object.from) ? fromJsonTimestamp(object.from) : undefined,
resetInterval: isSet(object.resetInterval) ? Duration.fromJSON(object.resetInterval) : undefined,
amount: isSet(object.amount) ? Long.fromValue(object.amount) : Long.UZERO,
limit: isSet(object.limit) ? globalThis.Boolean(object.limit) : false,
notifications: globalThis.Array.isArray(object?.notifications)
? object.notifications.map((e) => Notification.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.unit !== 0) {
obj.unit = unitToJSON(message.unit);
}
if (message.from !== undefined) {
obj.from = message.from.toISOString();
}
if (message.resetInterval !== undefined) {
obj.resetInterval = Duration.toJSON(message.resetInterval);
}
if (!message.amount.equals(Long.UZERO)) {
obj.amount = (message.amount || Long.UZERO).toString();
}
if (message.limit !== false) {
obj.limit = message.limit;
}
if (message.notifications?.length) {
obj.notifications = message.notifications.map((e) => Notification.toJSON(e));
}
return obj;
},
create(base) {
return AddQuotaRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddQuotaRequest();
message.instanceId = object.instanceId ?? "";
message.unit = object.unit ?? 0;
message.from = object.from ?? undefined;
message.resetInterval = (object.resetInterval !== undefined && object.resetInterval !== null)
? Duration.fromPartial(object.resetInterval)
: undefined;
message.amount = (object.amount !== undefined && object.amount !== null)
? Long.fromValue(object.amount)
: Long.UZERO;
message.limit = object.limit ?? false;
message.notifications = object.notifications?.map((e) => Notification.fromPartial(e)) || [];
return message;
},
};
function createBaseAddQuotaResponse() {
return { details: undefined };
}
export const AddQuotaResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddQuotaResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return AddQuotaResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddQuotaResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseSetQuotaRequest() {
return {
instanceId: "",
unit: 0,
from: undefined,
resetInterval: undefined,
amount: Long.UZERO,
limit: false,
notifications: [],
};
}
export const SetQuotaRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.unit !== 0) {
writer.uint32(16).int32(message.unit);
}
if (message.from !== undefined) {
Timestamp.encode(toTimestamp(message.from), writer.uint32(26).fork()).join();
}
if (message.resetInterval !== undefined) {
Duration.encode(message.resetInterval, writer.uint32(34).fork()).join();
}
if (!message.amount.equals(Long.UZERO)) {
writer.uint32(40).uint64(message.amount.toString());
}
if (message.limit !== false) {
writer.uint32(48).bool(message.limit);
}
for (const v of message.notifications) {
Notification.encode(v, writer.uint32(58).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetQuotaRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.unit = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.from = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.resetInterval = Duration.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 40) {
break;
}
message.amount = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 6: {
if (tag !== 48) {
break;
}
message.limit = reader.bool();
continue;
}
case 7: {
if (tag !== 58) {
break;
}
message.notifications.push(Notification.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
unit: isSet(object.unit) ? unitFromJSON(object.unit) : 0,
from: isSet(object.from) ? fromJsonTimestamp(object.from) : undefined,
resetInterval: isSet(object.resetInterval) ? Duration.fromJSON(object.resetInterval) : undefined,
amount: isSet(object.amount) ? Long.fromValue(object.amount) : Long.UZERO,
limit: isSet(object.limit) ? globalThis.Boolean(object.limit) : false,
notifications: globalThis.Array.isArray(object?.notifications)
? object.notifications.map((e) => Notification.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.unit !== 0) {
obj.unit = unitToJSON(message.unit);
}
if (message.from !== undefined) {
obj.from = message.from.toISOString();
}
if (message.resetInterval !== undefined) {
obj.resetInterval = Duration.toJSON(message.resetInterval);
}
if (!message.amount.equals(Long.UZERO)) {
obj.amount = (message.amount || Long.UZERO).toString();
}
if (message.limit !== false) {
obj.limit = message.limit;
}
if (message.notifications?.length) {
obj.notifications = message.notifications.map((e) => Notification.toJSON(e));
}
return obj;
},
create(base) {
return SetQuotaRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetQuotaRequest();
message.instanceId = object.instanceId ?? "";
message.unit = object.unit ?? 0;
message.from = object.from ?? undefined;
message.resetInterval = (object.resetInterval !== undefined && object.resetInterval !== null)
? Duration.fromPartial(object.resetInterval)
: undefined;
message.amount = (object.amount !== undefined && object.amount !== null)
? Long.fromValue(object.amount)
: Long.UZERO;
message.limit = object.limit ?? false;
message.notifications = object.notifications?.map((e) => Notification.fromPartial(e)) || [];
return message;
},
};
function createBaseSetQuotaResponse() {
return { details: undefined };
}
export const SetQuotaResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetQuotaResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return SetQuotaResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetQuotaResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRemoveQuotaRequest() {
return { instanceId: "", unit: 0 };
}
export const RemoveQuotaRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.unit !== 0) {
writer.uint32(16).int32(message.unit);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveQuotaRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.unit = reader.int32();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
unit: isSet(object.unit) ? unitFromJSON(object.unit) : 0,
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.unit !== 0) {
obj.unit = unitToJSON(message.unit);
}
return obj;
},
create(base) {
return RemoveQuotaRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveQuotaRequest();
message.instanceId = object.instanceId ?? "";
message.unit = object.unit ?? 0;
return message;
},
};
function createBaseRemoveQuotaResponse() {
return { details: undefined };
}
export const RemoveQuotaResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveQuotaResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return RemoveQuotaResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveQuotaResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseSetLimitsRequest() {
return { instanceId: "", auditLogRetention: undefined, block: undefined };
}
export const SetLimitsRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.auditLogRetention !== undefined) {
Duration.encode(message.auditLogRetention, writer.uint32(18).fork()).join();
}
if (message.block !== undefined) {
writer.uint32(24).bool(message.block);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetLimitsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.auditLogRetention = Duration.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.block = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
auditLogRetention: isSet(object.auditLogRetention) ? Duration.fromJSON(object.auditLogRetention) : undefined,
block: isSet(object.block) ? globalThis.Boolean(object.block) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.auditLogRetention !== undefined) {
obj.auditLogRetention = Duration.toJSON(message.auditLogRetention);
}
if (message.block !== undefined) {
obj.block = message.block;
}
return obj;
},
create(base) {
return SetLimitsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetLimitsRequest();
message.instanceId = object.instanceId ?? "";
message.auditLogRetention = (object.auditLogRetention !== undefined && object.auditLogRetention !== null)
? Duration.fromPartial(object.auditLogRetention)
: undefined;
message.block = object.block ?? undefined;
return message;
},
};
function createBaseSetLimitsResponse() {
return { details: undefined };
}
export const SetLimitsResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetLimitsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return SetLimitsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetLimitsResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseBulkSetLimitsRequest() {
return { limits: [] };
}
export const BulkSetLimitsRequest = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.limits) {
SetLimitsRequest.encode(v, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseBulkSetLimitsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.limits.push(SetLimitsRequest.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
limits: globalThis.Array.isArray(object?.limits)
? object.limits.map((e) => SetLimitsRequest.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.limits?.length) {
obj.limits = message.limits.map((e) => SetLimitsRequest.toJSON(e));
}
return obj;
},
create(base) {
return BulkSetLimitsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseBulkSetLimitsRequest();
message.limits = object.limits?.map((e) => SetLimitsRequest.fromPartial(e)) || [];
return message;
},
};
function createBaseBulkSetLimitsResponse() {
return { details: undefined, targetDetails: [] };
}
export const BulkSetLimitsResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
for (const v of message.targetDetails) {
ObjectDetails.encode(v, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseBulkSetLimitsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.targetDetails.push(ObjectDetails.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined,
targetDetails: globalThis.Array.isArray(object?.targetDetails)
? object.targetDetails.map((e) => ObjectDetails.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
if (message.targetDetails?.length) {
obj.targetDetails = message.targetDetails.map((e) => ObjectDetails.toJSON(e));
}
return obj;
},
create(base) {
return BulkSetLimitsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseBulkSetLimitsResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
message.targetDetails = object.targetDetails?.map((e) => ObjectDetails.fromPartial(e)) || [];
return message;
},
};
function createBaseResetLimitsRequest() {
return { instanceId: "" };
}
export const ResetLimitsRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseResetLimitsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "" };
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
return obj;
},
create(base) {
return ResetLimitsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseResetLimitsRequest();
message.instanceId = object.instanceId ?? "";
return message;
},
};
function createBaseResetLimitsResponse() {
return { details: undefined };
}
export const ResetLimitsResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseResetLimitsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return ResetLimitsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseResetLimitsResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseExistsDomainRequest() {
return { domain: "" };
}
export const ExistsDomainRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.domain !== "") {
writer.uint32(10).string(message.domain);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseExistsDomainRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.domain = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { domain: isSet(object.domain) ? globalThis.String(object.domain) : "" };
},
toJSON(message) {
const obj = {};
if (message.domain !== "") {
obj.domain = message.domain;
}
return obj;
},
create(base) {
return ExistsDomainRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseExistsDomainRequest();
message.domain = object.domain ?? "";
return message;
},
};
function createBaseExistsDomainResponse() {
return { exists: false };
}
export const ExistsDomainResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.exists !== false) {
writer.uint32(8).bool(message.exists);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseExistsDomainResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
break;
}
message.exists = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { exists: isSet(object.exists) ? globalThis.Boolean(object.exists) : false };
},
toJSON(message) {
const obj = {};
if (message.exists !== false) {
obj.exists = message.exists;
}
return obj;
},
create(base) {
return ExistsDomainResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseExistsDomainResponse();
message.exists = object.exists ?? false;
return message;
},
};
function createBaseListDomainsRequest() {
return { instanceId: "", query: undefined, sortingColumn: 0, queries: [] };
}
export const ListDomainsRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.query !== undefined) {
ListQuery.encode(message.query, writer.uint32(18).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(24).int32(message.sortingColumn);
}
for (const v of message.queries) {
DomainSearchQuery.encode(v, writer.uint32(34).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListDomainsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.query = ListQuery.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.queries.push(DomainSearchQuery.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
query: isSet(object.query) ? ListQuery.fromJSON(object.query) : undefined,
sortingColumn: isSet(object.sortingColumn) ? domainFieldNameFromJSON(object.sortingColumn) : 0,
queries: globalThis.Array.isArray(object?.queries)
? object.queries.map((e) => DomainSearchQuery.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.query !== undefined) {
obj.query = ListQuery.toJSON(message.query);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = domainFieldNameToJSON(message.sortingColumn);
}
if (message.queries?.length) {
obj.queries = message.queries.map((e) => DomainSearchQuery.toJSON(e));
}
return obj;
},
create(base) {
return ListDomainsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListDomainsRequest();
message.instanceId = object.instanceId ?? "";
message.query = (object.query !== undefined && object.query !== null)
? ListQuery.fromPartial(object.query)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.queries = object.queries?.map((e) => DomainSearchQuery.fromPartial(e)) || [];
return message;
},
};
function createBaseListDomainsResponse() {
return { details: undefined, sortingColumn: 0, result: [] };
}
export const ListDomainsResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ListDetails.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.result) {
Domain.encode(v, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListDomainsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ListDetails.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.result.push(Domain.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? ListDetails.fromJSON(object.details) : undefined,
sortingColumn: isSet(object.sortingColumn) ? domainFieldNameFromJSON(object.sortingColumn) : 0,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => Domain.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ListDetails.toJSON(message.details);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = domainFieldNameToJSON(message.sortingColumn);
}
if (message.result?.length) {
obj.result = message.result.map((e) => Domain.toJSON(e));
}
return obj;
},
create(base) {
return ListDomainsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListDomainsResponse();
message.details = (object.details !== undefined && object.details !== null)
? ListDetails.fromPartial(object.details)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.result = object.result?.map((e) => Domain.fromPartial(e)) || [];
return message;
},
};
function createBaseAddDomainRequest() {
return { instanceId: "", domain: "" };
}
export const AddDomainRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.domain !== "") {
writer.uint32(18).string(message.domain);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddDomainRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.domain = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.domain !== "") {
obj.domain = message.domain;
}
return obj;
},
create(base) {
return AddDomainRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddDomainRequest();
message.instanceId = object.instanceId ?? "";
message.domain = object.domain ?? "";
return message;
},
};
function createBaseAddDomainResponse() {
return { details: undefined };
}
export const AddDomainResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddDomainResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return AddDomainResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddDomainResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRemoveDomainRequest() {
return { instanceId: "", domain: "" };
}
export const RemoveDomainRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.domain !== "") {
writer.uint32(18).string(message.domain);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveDomainRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.domain = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.domain !== "") {
obj.domain = message.domain;
}
return obj;
},
create(base) {
return RemoveDomainRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveDomainRequest();
message.instanceId = object.instanceId ?? "";
message.domain = object.domain ?? "";
return message;
},
};
function createBaseRemoveDomainResponse() {
return { details: undefined };
}
export const RemoveDomainResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveDomainResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return RemoveDomainResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveDomainResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseSetPrimaryDomainRequest() {
return { instanceId: "", domain: "" };
}
export const SetPrimaryDomainRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.domain !== "") {
writer.uint32(18).string(message.domain);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetPrimaryDomainRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.domain = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.domain !== "") {
obj.domain = message.domain;
}
return obj;
},
create(base) {
return SetPrimaryDomainRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetPrimaryDomainRequest();
message.instanceId = object.instanceId ?? "";
message.domain = object.domain ?? "";
return message;
},
};
function createBaseSetPrimaryDomainResponse() {
return { details: undefined };
}
export const SetPrimaryDomainResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetPrimaryDomainResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return SetPrimaryDomainResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetPrimaryDomainResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseChangeSubscriptionRequest() {
return { domain: "", subscriptionName: "", requestLimit: Long.UZERO, actionMinsLimit: Long.UZERO };
}
export const ChangeSubscriptionRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.domain !== "") {
writer.uint32(10).string(message.domain);
}
if (message.subscriptionName !== "") {
writer.uint32(18).string(message.subscriptionName);
}
if (!message.requestLimit.equals(Long.UZERO)) {
writer.uint32(24).uint64(message.requestLimit.toString());
}
if (!message.actionMinsLimit.equals(Long.UZERO)) {
writer.uint32(32).uint64(message.actionMinsLimit.toString());
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseChangeSubscriptionRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.domain = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.subscriptionName = reader.string();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.requestLimit = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 4: {
if (tag !== 32) {
break;
}
message.actionMinsLimit = Long.fromString(reader.uint64().toString(), true);
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
subscriptionName: isSet(object.subscriptionName) ? globalThis.String(object.subscriptionName) : "",
requestLimit: isSet(object.requestLimit) ? Long.fromValue(object.requestLimit) : Long.UZERO,
actionMinsLimit: isSet(object.actionMinsLimit) ? Long.fromValue(object.actionMinsLimit) : Long.UZERO,
};
},
toJSON(message) {
const obj = {};
if (message.domain !== "") {
obj.domain = message.domain;
}
if (message.subscriptionName !== "") {
obj.subscriptionName = message.subscriptionName;
}
if (!message.requestLimit.equals(Long.UZERO)) {
obj.requestLimit = (message.requestLimit || Long.UZERO).toString();
}
if (!message.actionMinsLimit.equals(Long.UZERO)) {
obj.actionMinsLimit = (message.actionMinsLimit || Long.UZERO).toString();
}
return obj;
},
create(base) {
return ChangeSubscriptionRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseChangeSubscriptionRequest();
message.domain = object.domain ?? "";
message.subscriptionName = object.subscriptionName ?? "";
message.requestLimit = (object.requestLimit !== undefined && object.requestLimit !== null)
? Long.fromValue(object.requestLimit)
: Long.UZERO;
message.actionMinsLimit = (object.actionMinsLimit !== undefined && object.actionMinsLimit !== null)
? Long.fromValue(object.actionMinsLimit)
: Long.UZERO;
return message;
},
};
function createBaseChangeSubscriptionResponse() {
return { details: undefined };
}
export const ChangeSubscriptionResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseChangeSubscriptionResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return ChangeSubscriptionResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseChangeSubscriptionResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseListViewsRequest() {
return {};
}
export const ListViewsRequest = {
encode(_, writer = new BinaryWriter()) {
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListViewsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return ListViewsRequest.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseListViewsRequest();
return message;
},
};
function createBaseListViewsResponse() {
return { result: [] };
}
export const ListViewsResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.result) {
View.encode(v, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListViewsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.result.push(View.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => View.fromJSON(e)) : [] };
},
toJSON(message) {
const obj = {};
if (message.result?.length) {
obj.result = message.result.map((e) => View.toJSON(e));
}
return obj;
},
create(base) {
return ListViewsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListViewsResponse();
message.result = object.result?.map((e) => View.fromPartial(e)) || [];
return message;
},
};
function createBaseClearViewRequest() {
return { database: "", viewName: "" };
}
export const ClearViewRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.database !== "") {
writer.uint32(10).string(message.database);
}
if (message.viewName !== "") {
writer.uint32(18).string(message.viewName);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseClearViewRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.database = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.viewName = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
database: isSet(object.database) ? globalThis.String(object.database) : "",
viewName: isSet(object.viewName) ? globalThis.String(object.viewName) : "",
};
},
toJSON(message) {
const obj = {};
if (message.database !== "") {
obj.database = message.database;
}
if (message.viewName !== "") {
obj.viewName = message.viewName;
}
return obj;
},
create(base) {
return ClearViewRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseClearViewRequest();
message.database = object.database ?? "";
message.viewName = object.viewName ?? "";
return message;
},
};
function createBaseClearViewResponse() {
return {};
}
export const ClearViewResponse = {
encode(_, writer = new BinaryWriter()) {
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseClearViewResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return ClearViewResponse.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseClearViewResponse();
return message;
},
};
function createBaseListFailedEventsRequest() {
return {};
}
export const ListFailedEventsRequest = {
encode(_, writer = new BinaryWriter()) {
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListFailedEventsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return ListFailedEventsRequest.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseListFailedEventsRequest();
return message;
},
};
function createBaseListFailedEventsResponse() {
return { result: [] };
}
export const ListFailedEventsResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.result) {
FailedEvent.encode(v, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListFailedEventsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.result.push(FailedEvent.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => FailedEvent.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.result?.length) {
obj.result = message.result.map((e) => FailedEvent.toJSON(e));
}
return obj;
},
create(base) {
return ListFailedEventsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListFailedEventsResponse();
message.result = object.result?.map((e) => FailedEvent.fromPartial(e)) || [];
return message;
},
};
function createBaseRemoveFailedEventRequest() {
return { database: "", viewName: "", failedSequence: Long.UZERO, instanceId: "" };
}
export const RemoveFailedEventRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.database !== "") {
writer.uint32(10).string(message.database);
}
if (message.viewName !== "") {
writer.uint32(18).string(message.viewName);
}
if (!message.failedSequence.equals(Long.UZERO)) {
writer.uint32(24).uint64(message.failedSequence.toString());
}
if (message.instanceId !== "") {
writer.uint32(34).string(message.instanceId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveFailedEventRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.database = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.viewName = reader.string();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.failedSequence = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.instanceId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
database: isSet(object.database) ? globalThis.String(object.database) : "",
viewName: isSet(object.viewName) ? globalThis.String(object.viewName) : "",
failedSequence: isSet(object.failedSequence) ? Long.fromValue(object.failedSequence) : Long.UZERO,
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
};
},
toJSON(message) {
const obj = {};
if (message.database !== "") {
obj.database = message.database;
}
if (message.viewName !== "") {
obj.viewName = message.viewName;
}
if (!message.failedSequence.equals(Long.UZERO)) {
obj.failedSequence = (message.failedSequence || Long.UZERO).toString();
}
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
return obj;
},
create(base) {
return RemoveFailedEventRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveFailedEventRequest();
message.database = object.database ?? "";
message.viewName = object.viewName ?? "";
message.failedSequence = (object.failedSequence !== undefined && object.failedSequence !== null)
? Long.fromValue(object.failedSequence)
: Long.UZERO;
message.instanceId = object.instanceId ?? "";
return message;
},
};
function createBaseRemoveFailedEventResponse() {
return {};
}
export const RemoveFailedEventResponse = {
encode(_, writer = new BinaryWriter()) {
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveFailedEventResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return RemoveFailedEventResponse.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseRemoveFailedEventResponse();
return message;
},
};
function createBaseView() {
return {
database: "",
viewName: "",
processedSequence: Long.UZERO,
eventTimestamp: undefined,
lastSuccessfulSpoolerRun: undefined,
instance: "",
};
}
export const View = {
encode(message, writer = new BinaryWriter()) {
if (message.database !== "") {
writer.uint32(10).string(message.database);
}
if (message.viewName !== "") {
writer.uint32(18).string(message.viewName);
}
if (!message.processedSequence.equals(Long.UZERO)) {
writer.uint32(24).uint64(message.processedSequence.toString());
}
if (message.eventTimestamp !== undefined) {
Timestamp.encode(toTimestamp(message.eventTimestamp), writer.uint32(34).fork()).join();
}
if (message.lastSuccessfulSpoolerRun !== undefined) {
Timestamp.encode(toTimestamp(message.lastSuccessfulSpoolerRun), writer.uint32(42).fork()).join();
}
if (message.instance !== "") {
writer.uint32(50).string(message.instance);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseView();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.database = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.viewName = reader.string();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.processedSequence = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.eventTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.lastSuccessfulSpoolerRun = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.instance = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
database: isSet(object.database) ? globalThis.String(object.database) : "",
viewName: isSet(object.viewName) ? globalThis.String(object.viewName) : "",
processedSequence: isSet(object.processedSequence) ? Long.fromValue(object.processedSequence) : Long.UZERO,
eventTimestamp: isSet(object.eventTimestamp) ? fromJsonTimestamp(object.eventTimestamp) : undefined,
lastSuccessfulSpoolerRun: isSet(object.lastSuccessfulSpoolerRun)
? fromJsonTimestamp(object.lastSuccessfulSpoolerRun)
: undefined,
instance: isSet(object.instance) ? globalThis.String(object.instance) : "",
};
},
toJSON(message) {
const obj = {};
if (message.database !== "") {
obj.database = message.database;
}
if (message.viewName !== "") {
obj.viewName = message.viewName;
}
if (!message.processedSequence.equals(Long.UZERO)) {
obj.processedSequence = (message.processedSequence || Long.UZERO).toString();
}
if (message.eventTimestamp !== undefined) {
obj.eventTimestamp = message.eventTimestamp.toISOString();
}
if (message.lastSuccessfulSpoolerRun !== undefined) {
obj.lastSuccessfulSpoolerRun = message.lastSuccessfulSpoolerRun.toISOString();
}
if (message.instance !== "") {
obj.instance = message.instance;
}
return obj;
},
create(base) {
return View.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseView();
message.database = object.database ?? "";
message.viewName = object.viewName ?? "";
message.processedSequence = (object.processedSequence !== undefined && object.processedSequence !== null)
? Long.fromValue(object.processedSequence)
: Long.UZERO;
message.eventTimestamp = object.eventTimestamp ?? undefined;
message.lastSuccessfulSpoolerRun = object.lastSuccessfulSpoolerRun ?? undefined;
message.instance = object.instance ?? "";
return message;
},
};
function createBaseFailedEvent() {
return {
database: "",
viewName: "",
failedSequence: Long.UZERO,
failureCount: Long.UZERO,
errorMessage: "",
lastFailed: undefined,
};
}
export const FailedEvent = {
encode(message, writer = new BinaryWriter()) {
if (message.database !== "") {
writer.uint32(10).string(message.database);
}
if (message.viewName !== "") {
writer.uint32(18).string(message.viewName);
}
if (!message.failedSequence.equals(Long.UZERO)) {
writer.uint32(24).uint64(message.failedSequence.toString());
}
if (!message.failureCount.equals(Long.UZERO)) {
writer.uint32(32).uint64(message.failureCount.toString());
}
if (message.errorMessage !== "") {
writer.uint32(42).string(message.errorMessage);
}
if (message.lastFailed !== undefined) {
Timestamp.encode(toTimestamp(message.lastFailed), writer.uint32(50).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseFailedEvent();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.database = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.viewName = reader.string();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.failedSequence = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 4: {
if (tag !== 32) {
break;
}
message.failureCount = Long.fromString(reader.uint64().toString(), true);
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.errorMessage = reader.string();
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.lastFailed = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
database: isSet(object.database) ? globalThis.String(object.database) : "",
viewName: isSet(object.viewName) ? globalThis.String(object.viewName) : "",
failedSequence: isSet(object.failedSequence) ? Long.fromValue(object.failedSequence) : Long.UZERO,
failureCount: isSet(object.failureCount) ? Long.fromValue(object.failureCount) : Long.UZERO,
errorMessage: isSet(object.errorMessage) ? globalThis.String(object.errorMessage) : "",
lastFailed: isSet(object.lastFailed) ? fromJsonTimestamp(object.lastFailed) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.database !== "") {
obj.database = message.database;
}
if (message.viewName !== "") {
obj.viewName = message.viewName;
}
if (!message.failedSequence.equals(Long.UZERO)) {
obj.failedSequence = (message.failedSequence || Long.UZERO).toString();
}
if (!message.failureCount.equals(Long.UZERO)) {
obj.failureCount = (message.failureCount || Long.UZERO).toString();
}
if (message.errorMessage !== "") {
obj.errorMessage = message.errorMessage;
}
if (message.lastFailed !== undefined) {
obj.lastFailed = message.lastFailed.toISOString();
}
return obj;
},
create(base) {
return FailedEvent.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseFailedEvent();
message.database = object.database ?? "";
message.viewName = object.viewName ?? "";
message.failedSequence = (object.failedSequence !== undefined && object.failedSequence !== null)
? Long.fromValue(object.failedSequence)
: Long.UZERO;
message.failureCount = (object.failureCount !== undefined && object.failureCount !== null)
? Long.fromValue(object.failureCount)
: Long.UZERO;
message.errorMessage = object.errorMessage ?? "";
message.lastFailed = object.lastFailed ?? undefined;
return message;
},
};
function createBaseSetInstanceFeatureRequest() {
return { instanceId: "", featureId: 0, bool: undefined };
}
export const SetInstanceFeatureRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instanceId !== "") {
writer.uint32(10).string(message.instanceId);
}
if (message.featureId !== 0) {
writer.uint32(16).int32(message.featureId);
}
if (message.bool !== undefined) {
writer.uint32(24).bool(message.bool);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetInstanceFeatureRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instanceId = reader.string();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.featureId = reader.int32();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.bool = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
featureId: isSet(object.featureId) ? instanceFeatureFromJSON(object.featureId) : 0,
bool: isSet(object.bool) ? globalThis.Boolean(object.bool) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.instanceId !== "") {
obj.instanceId = message.instanceId;
}
if (message.featureId !== 0) {
obj.featureId = instanceFeatureToJSON(message.featureId);
}
if (message.bool !== undefined) {
obj.bool = message.bool;
}
return obj;
},
create(base) {
return SetInstanceFeatureRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetInstanceFeatureRequest();
message.instanceId = object.instanceId ?? "";
message.featureId = object.featureId ?? 0;
message.bool = object.bool ?? undefined;
return message;
},
};
function createBaseSetInstanceFeatureResponse() {
return { details: undefined };
}
export const SetInstanceFeatureResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ObjectDetails.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetInstanceFeatureResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ObjectDetails.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? ObjectDetails.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ObjectDetails.toJSON(message.details);
}
return obj;
},
create(base) {
return SetInstanceFeatureResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetInstanceFeatureResponse();
message.details = (object.details !== undefined && object.details !== null)
? ObjectDetails.fromPartial(object.details)
: undefined;
return message;
},
};
export const SystemServiceDefinition = {
name: "SystemService",
fullName: "zitadel.system.v1.SystemService",
methods: {
/**
* Indicates if ZITADEL is running.
* It respondes as soon as ZITADEL started
*/
healthz: {
name: "Healthz",
requestType: HealthzRequest,
requestStream: false,
responseType: HealthzResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
73,
10,
7,
71,
101,
110,
101,
114,
97,
108,
74,
24,
10,
3,
50,
48,
48,
18,
17,
10,
15,
90,
73,
84,
65,
68,
69,
76,
32,
115,
116,
97,
114,
116,
101,
100,
74,
36,
10,
7,
100,
101,
102,
97,
117,
108,
116,
18,
25,
10,
23,
90,
73,
84,
65,
68,
69,
76,
32,
78,
79,
84,
32,
115,
116,
97,
114,
116,
101,
100,
32,
121,
101,
116,
]),
],
578365826: [Buffer.from([10, 18, 8, 47, 104, 101, 97, 108, 116, 104, 122])],
},
},
},
/**
* Returns a list of ZITADEL instances
*
* Deprecated: Use [ListInstances](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-list-instances.api.mdx) instead to list instances
*/
listInstances: {
name: "ListInstances",
requestType: ListInstancesRequest,
requestStream: false,
responseType: ListInstancesResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
22,
10,
20,
115,
121,
115,
116,
101,
109,
46,
105,
110,
115,
116,
97,
110,
99,
101,
46,
114,
101,
97,
100,
]),
],
578365826: [
Buffer.from([
23,
58,
1,
42,
34,
18,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
95,
115,
101,
97,
114,
99,
104,
]),
],
},
},
},
/**
* Returns the detail of an instance
*
* Deprecated: Use [GetInstance](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-get-instance.api.mdx) instead to get the details of the instance in context
*/
getInstance: {
name: "GetInstance",
requestType: GetInstanceRequest,
requestStream: false,
responseType: GetInstanceResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
22,
10,
20,
115,
121,
115,
116,
101,
109,
46,
105,
110,
115,
116,
97,
110,
99,
101,
46,
114,
101,
97,
100,
]),
],
578365826: [
Buffer.from([
26,
18,
24,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Deprecated: Use CreateInstance instead
* Creates a new instance with all needed setup data
* This might take some time
*/
addInstance: {
name: "AddInstance",
requestType: AddInstanceRequest,
requestStream: false,
responseType: AddInstanceResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
23,
10,
21,
115,
121,
115,
116,
101,
109,
46,
105,
110,
115,
116,
97,
110,
99,
101,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [Buffer.from([15, 58, 1, 42, 34, 10, 47, 105, 110, 115, 116, 97, 110, 99, 101, 115])],
},
},
},
/**
* Updates name of an existing instance
*
* Deprecated: Use [UpdateInstance](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-update-instance.api.mdx) instead to update the name of the instance in context
*/
updateInstance: {
name: "UpdateInstance",
requestType: UpdateInstanceRequest,
requestStream: false,
responseType: UpdateInstanceResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
23,
10,
21,
115,
121,
115,
116,
101,
109,
46,
105,
110,
115,
116,
97,
110,
99,
101,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
29,
58,
1,
42,
26,
24,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Creates a new instance with all needed setup data
* This might take some time
*/
createInstance: {
name: "CreateInstance",
requestType: CreateInstanceRequest,
requestStream: false,
responseType: CreateInstanceResponse,
responseStream: false,
options: {
_unknownFields: {
400002: [
Buffer.from([
23,
10,
21,
115,
121,
115,
116,
101,
109,
46,
105,
110,
115,
116,
97,
110,
99,
101,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
23,
58,
1,
42,
34,
18,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
95,
99,
114,
101,
97,
116,
101,
]),
],
},
},
},
/**
* Removes an instance
* This might take some time
*
* Deprecated: Use [DeleteInstance](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-delete-instance.api.mdx) instead to delete an instance
*/
removeInstance: {
name: "RemoveInstance",
requestType: RemoveInstanceRequest,
requestStream: false,
responseType: RemoveInstanceResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
24,
10,
22,
115,
121,
115,
116,
101,
109,
46,
105,
110,
115,
116,
97,
110,
99,
101,
46,
100,
101,
108,
101,
116,
101,
]),
],
578365826: [
Buffer.from([
26,
42,
24,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Returns all instance members matching the request
* all queries need to match (ANDed)
* Deprecated: Use the Admin APIs ListIAMMembers instead
*/
listIAMMembers: {
name: "ListIAMMembers",
requestType: ListIAMMembersRequest,
requestStream: false,
responseType: ListIAMMembersResponse,
responseStream: false,
options: {
_unknownFields: {
400002: [
Buffer.from([
24,
10,
22,
115,
121,
115,
116,
101,
109,
46,
105,
97,
109,
46,
109,
101,
109,
98,
101,
114,
46,
114,
101,
97,
100,
]),
],
578365826: [
Buffer.from([
45,
58,
1,
42,
34,
40,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
109,
101,
109,
98,
101,
114,
115,
47,
95,
115,
101,
97,
114,
99,
104,
]),
],
},
},
},
/**
* Checks if a domain exists
*
* Deprecated: Use [ListCustomDomains](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-list-custom-domains.api.mdx) instead to check existence of an instance
*/
existsDomain: {
name: "ExistsDomain",
requestType: ExistsDomainRequest,
requestStream: false,
responseType: ExistsDomainResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
20,
10,
18,
115,
121,
115,
116,
101,
109,
46,
100,
111,
109,
97,
105,
110,
46,
114,
101,
97,
100,
]),
],
578365826: [
Buffer.from([
30,
58,
1,
42,
34,
25,
47,
100,
111,
109,
97,
105,
110,
115,
47,
123,
100,
111,
109,
97,
105,
110,
125,
47,
95,
101,
120,
105,
115,
116,
115,
]),
],
},
},
},
/**
* Returns the custom domains of an instance
* Checks if a domain exists
* Deprecated: Use the Admin APIs ListInstanceDomains on the admin API instead
*/
listDomains: {
name: "ListDomains",
requestType: ListDomainsRequest,
requestStream: false,
responseType: ListDomainsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
20,
10,
18,
115,
121,
115,
116,
101,
109,
46,
100,
111,
109,
97,
105,
110,
46,
114,
101,
97,
100,
]),
],
578365826: [
Buffer.from([
45,
58,
1,
42,
34,
40,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
100,
111,
109,
97,
105,
110,
115,
47,
95,
115,
101,
97,
114,
99,
104,
]),
],
},
},
},
/**
* Adds a domain to an instance
*
* Deprecated: Use [AddCustomDomain](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-add-custom-domain.api.mdx) instead to add a custom domain to the instance in context
*/
addDomain: {
name: "AddDomain",
requestType: AddDomainRequest,
requestStream: false,
responseType: AddDomainResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
21,
10,
19,
115,
121,
115,
116,
101,
109,
46,
100,
111,
109,
97,
105,
110,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
37,
58,
1,
42,
34,
32,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
100,
111,
109,
97,
105,
110,
115,
]),
],
},
},
},
/**
* Removes the domain of an instance
*
* Deprecated: Use [RemoveDomain](apis/resources/instance_service_v2/zitadel-instance-v-2-beta-instance-service-remove-custom-domain.api.mdx) instead to remove a custom domain from the instance in context
*/
removeDomain: {
name: "RemoveDomain",
requestType: RemoveDomainRequest,
requestStream: false,
responseType: RemoveDomainResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([2, 88, 1])],
400002: [
Buffer.from([
22,
10,
20,
115,
121,
115,
116,
101,
109,
46,
100,
111,
109,
97,
105,
110,
46,
100,
101,
108,
101,
116,
101,
]),
],
578365826: [
Buffer.from([
43,
42,
41,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
100,
111,
109,
97,
105,
110,
115,
47,
123,
100,
111,
109,
97,
105,
110,
125,
]),
],
},
},
},
/** Sets the primary domain of an instance */
setPrimaryDomain: {
name: "SetPrimaryDomain",
requestType: SetPrimaryDomainRequest,
requestStream: false,
responseType: SetPrimaryDomainResponse,
responseStream: false,
options: {
_unknownFields: {
400002: [
Buffer.from([
21,
10,
19,
115,
121,
115,
116,
101,
109,
46,
100,
111,
109,
97,
105,
110,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
50,
58,
1,
42,
34,
45,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
100,
111,
109,
97,
105,
110,
115,
47,
95,
115,
101,
116,
95,
112,
114,
105,
109,
97,
114,
121,
]),
],
},
},
},
/**
* Returns all stored read models of ZITADEL
* views are used for search optimisation and optimise request latencies
* they represent the delta of the event happend on the objects
*/
listViews: {
name: "ListViews",
requestType: ListViewsRequest,
requestStream: false,
responseType: ListViewsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
44,
10,
5,
118,
105,
101,
119,
115,
74,
35,
10,
3,
50,
48,
48,
18,
28,
10,
26,
86,
105,
101,
119,
115,
32,
102,
111,
114,
32,
113,
117,
101,
114,
121,
32,
111,
112,
101,
114,
97,
116,
105,
111,
110,
115,
]),
],
400002: [
Buffer.from([19, 10, 17, 115, 121, 115, 116, 101, 109, 46, 100, 101, 98, 117, 103, 46, 114, 101, 97, 100]),
],
578365826: [
Buffer.from([19, 58, 1, 42, 34, 14, 47, 118, 105, 101, 119, 115, 47, 95, 115, 101, 97, 114, 99, 104]),
],
},
},
},
/**
* Truncates the delta of the change stream
* be carefull with this function because ZITADEL has to
* recompute the deltas after they got cleared.
* Search requests will return wrong results until all deltas are recomputed
*/
clearView: {
name: "ClearView",
requestType: ClearViewRequest,
requestStream: false,
responseType: ClearViewResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
30,
10,
5,
118,
105,
101,
119,
115,
74,
21,
10,
3,
50,
48,
48,
18,
14,
10,
12,
86,
105,
101,
119,
32,
99,
108,
101,
97,
114,
101,
100,
]),
],
400002: [
Buffer.from([
20,
10,
18,
115,
121,
115,
116,
101,
109,
46,
100,
101,
98,
117,
103,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
31,
34,
29,
47,
118,
105,
101,
119,
115,
47,
123,
100,
97,
116,
97,
98,
97,
115,
101,
125,
47,
123,
118,
105,
101,
119,
95,
110,
97,
109,
101,
125,
]),
],
},
},
},
/**
* Returns event descriptions which cannot be processed.
* It's possible that some events need some retries.
* For example if the SMTP-API wasn't able to send an email at the first time
*/
listFailedEvents: {
name: "ListFailedEvents",
requestType: ListFailedEventsRequest,
requestStream: false,
responseType: ListFailedEventsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
70,
10,
13,
102,
97,
105,
108,
101,
100,
32,
101,
118,
101,
110,
116,
115,
74,
53,
10,
3,
50,
48,
48,
18,
46,
10,
44,
69,
118,
101,
110,
116,
115,
32,
119,
104,
105,
99,
104,
32,
119,
101,
114,
101,
32,
110,
111,
116,
32,
112,
114,
111,
99,
101,
115,
115,
101,
100,
32,
98,
121,
32,
116,
104,
101,
32,
118,
105,
101,
119,
115,
]),
],
400002: [
Buffer.from([19, 10, 17, 115, 121, 115, 116, 101, 109, 46, 100, 101, 98, 117, 103, 46, 114, 101, 97, 100]),
],
578365826: [
Buffer.from([
26,
58,
1,
42,
34,
21,
47,
102,
97,
105,
108,
101,
100,
101,
118,
101,
110,
116,
115,
47,
95,
115,
101,
97,
114,
99,
104,
]),
],
},
},
},
/**
* Deletes the event from failed events view.
* the event is not removed from the change stream
* This call is usefull if the system was able to process the event later.
* e.g. if the second try of sending an email was successful. the first try produced a
* failed event. You can find out if it worked on the `failure_count`
*/
removeFailedEvent: {
name: "RemoveFailedEvent",
requestType: RemoveFailedEventRequest,
requestStream: false,
responseType: RemoveFailedEventResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
116,
10,
13,
102,
97,
105,
108,
101,
100,
32,
101,
118,
101,
110,
116,
115,
74,
37,
10,
3,
50,
48,
48,
18,
30,
10,
28,
69,
118,
101,
110,
116,
115,
32,
114,
101,
109,
111,
118,
101,
100,
32,
102,
114,
111,
109,
32,
116,
104,
101,
32,
108,
105,
115,
116,
74,
60,
10,
3,
52,
48,
48,
18,
53,
10,
22,
102,
97,
105,
108,
101,
100,
32,
101,
118,
101,
110,
116,
32,
110,
111,
116,
32,
102,
111,
117,
110,
100,
18,
27,
10,
25,
26,
23,
35,
47,
100,
101,
102,
105,
110,
105,
116,
105,
111,
110,
115,
47,
114,
112,
99,
83,
116,
97,
116,
117,
115,
]),
],
400002: [
Buffer.from([
21,
10,
19,
115,
121,
115,
116,
101,
109,
46,
100,
101,
98,
117,
103,
46,
100,
101,
108,
101,
116,
101,
]),
],
578365826: [
Buffer.from([
56,
42,
54,
47,
102,
97,
105,
108,
101,
100,
101,
118,
101,
110,
116,
115,
47,
123,
100,
97,
116,
97,
98,
97,
115,
101,
125,
47,
123,
118,
105,
101,
119,
95,
110,
97,
109,
101,
125,
47,
123,
102,
97,
105,
108,
101,
100,
95,
115,
101,
113,
117,
101,
110,
99,
101,
125,
]),
],
},
},
},
/**
* Creates a new quota
* Returns an error if the quota already exists for the specified unit
* Deprecated: use SetQuota instead
*/
addQuota: {
name: "AddQuota",
requestType: AddQuotaRequest,
requestStream: false,
responseType: AddQuotaResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
23,
10,
13,
85,
115,
97,
103,
101,
32,
67,
111,
110,
116,
114,
111,
108,
10,
6,
81,
117,
111,
116,
97,
115,
]),
],
400002: [
Buffer.from([
20,
10,
18,
115,
121,
115,
116,
101,
109,
46,
113,
117,
111,
116,
97,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
36,
58,
1,
42,
34,
31,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
113,
117,
111,
116,
97,
115,
]),
],
},
},
},
/**
* Sets quota configuration properties
* Creates a new quota if it doesn't exist for the specified unit
*/
setQuota: {
name: "SetQuota",
requestType: SetQuotaRequest,
requestStream: false,
responseType: SetQuotaResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
23,
10,
13,
85,
115,
97,
103,
101,
32,
67,
111,
110,
116,
114,
111,
108,
10,
6,
81,
117,
111,
116,
97,
115,
]),
],
400002: [
Buffer.from([
20,
10,
18,
115,
121,
115,
116,
101,
109,
46,
113,
117,
111,
116,
97,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
36,
58,
1,
42,
26,
31,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
113,
117,
111,
116,
97,
115,
]),
],
},
},
},
/** Removes a quota */
removeQuota: {
name: "RemoveQuota",
requestType: RemoveQuotaRequest,
requestStream: false,
responseType: RemoveQuotaResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
23,
10,
13,
85,
115,
97,
103,
101,
32,
67,
111,
110,
116,
114,
111,
108,
10,
6,
81,
117,
111,
116,
97,
115,
]),
],
400002: [
Buffer.from([
21,
10,
19,
115,
121,
115,
116,
101,
109,
46,
113,
117,
111,
116,
97,
46,
100,
101,
108,
101,
116,
101,
]),
],
578365826: [
Buffer.from([
40,
42,
38,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
113,
117,
111,
116,
97,
115,
47,
123,
117,
110,
105,
116,
125,
]),
],
},
},
},
/** Set a feature flag on an instance */
setInstanceFeature: {
name: "SetInstanceFeature",
requestType: SetInstanceFeatureRequest,
requestStream: false,
responseType: SetInstanceFeatureResponse,
responseStream: false,
options: {
_unknownFields: {
400002: [
Buffer.from([
22,
10,
20,
115,
121,
115,
116,
101,
109,
46,
102,
101,
97,
116,
117,
114,
101,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
51,
58,
1,
42,
26,
46,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
102,
101,
97,
116,
117,
114,
101,
115,
47,
123,
102,
101,
97,
116,
117,
114,
101,
95,
105,
100,
125,
]),
],
},
},
},
/** Sets instance level limits */
setLimits: {
name: "SetLimits",
requestType: SetLimitsRequest,
requestStream: false,
responseType: SetLimitsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
129,
1,
10,
13,
85,
115,
97,
103,
101,
32,
67,
111,
110,
116,
114,
111,
108,
10,
6,
76,
105,
109,
105,
116,
115,
74,
28,
10,
3,
50,
48,
48,
18,
21,
10,
19,
73,
110,
115,
116,
97,
110,
99,
101,
32,
108,
105,
109,
105,
116,
115,
32,
115,
101,
116,
74,
74,
10,
3,
52,
48,
48,
18,
67,
10,
36,
65,
116,
32,
108,
101,
97,
115,
116,
32,
111,
110,
101,
32,
108,
105,
109,
105,
116,
32,
109,
117,
115,
116,
32,
98,
101,
32,
115,
112,
101,
99,
105,
102,
105,
101,
100,
18,
27,
10,
25,
26,
23,
35,
47,
100,
101,
102,
105,
110,
105,
116,
105,
111,
110,
115,
47,
114,
112,
99,
83,
116,
97,
116,
117,
115,
]),
],
400002: [
Buffer.from([
21,
10,
19,
115,
121,
115,
116,
101,
109,
46,
108,
105,
109,
105,
116,
115,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
36,
58,
1,
42,
26,
31,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
108,
105,
109,
105,
116,
115,
]),
],
},
},
},
/** Sets many instance level limits */
bulkSetLimits: {
name: "BulkSetLimits",
requestType: BulkSetLimitsRequest,
requestStream: false,
responseType: BulkSetLimitsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
147,
1,
10,
13,
85,
115,
97,
103,
101,
32,
67,
111,
110,
116,
114,
111,
108,
10,
6,
76,
105,
109,
105,
116,
115,
74,
28,
10,
3,
50,
48,
48,
18,
21,
10,
19,
73,
110,
115,
116,
97,
110,
99,
101,
32,
108,
105,
109,
105,
116,
115,
32,
115,
101,
116,
74,
92,
10,
3,
52,
48,
48,
18,
85,
10,
54,
65,
116,
32,
108,
101,
97,
115,
116,
32,
111,
110,
101,
32,
108,
105,
109,
105,
116,
32,
109,
117,
115,
116,
32,
98,
101,
32,
115,
112,
101,
99,
105,
102,
105,
101,
100,
32,
102,
111,
114,
32,
101,
97,
99,
104,
32,
105,
110,
115,
116,
97,
110,
99,
101,
18,
27,
10,
25,
26,
23,
35,
47,
100,
101,
102,
105,
110,
105,
116,
105,
111,
110,
115,
47,
114,
112,
99,
83,
116,
97,
116,
117,
115,
]),
],
400002: [
Buffer.from([
21,
10,
19,
115,
121,
115,
116,
101,
109,
46,
108,
105,
109,
105,
116,
115,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
28,
58,
1,
42,
26,
23,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
108,
105,
109,
105,
116,
115,
47,
95,
98,
117,
108,
107,
]),
],
},
},
},
/** Resets instance level limits */
resetLimits: {
name: "ResetLimits",
requestType: ResetLimitsRequest,
requestStream: false,
responseType: ResetLimitsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
158,
1,
10,
13,
85,
115,
97,
103,
101,
32,
67,
111,
110,
116,
114,
111,
108,
10,
6,
76,
105,
109,
105,
116,
115,
74,
48,
10,
3,
50,
48,
48,
18,
41,
10,
39,
76,
105,
109,
105,
116,
115,
32,
97,
114,
101,
32,
114,
101,
115,
101,
116,
32,
116,
111,
32,
116,
104,
101,
32,
115,
121,
115,
116,
101,
109,
32,
100,
101,
102,
97,
117,
108,
116,
115,
74,
83,
10,
3,
52,
48,
52,
18,
76,
10,
45,
76,
105,
109,
105,
116,
115,
32,
97,
114,
101,
32,
97,
108,
114,
101,
97,
100,
121,
32,
115,
101,
116,
32,
116,
111,
32,
116,
104,
101,
32,
115,
121,
115,
116,
101,
109,
32,
100,
101,
102,
97,
117,
108,
116,
115,
18,
27,
10,
25,
26,
23,
35,
47,
100,
101,
102,
105,
110,
105,
116,
105,
111,
110,
115,
47,
114,
112,
99,
83,
116,
97,
116,
117,
115,
]),
],
400002: [
Buffer.from([
22,
10,
20,
115,
121,
115,
116,
101,
109,
46,
108,
105,
109,
105,
116,
115,
46,
100,
101,
108,
101,
116,
101,
]),
],
578365826: [
Buffer.from([
33,
42,
31,
47,
105,
110,
115,
116,
97,
110,
99,
101,
115,
47,
123,
105,
110,
115,
116,
97,
110,
99,
101,
95,
105,
100,
125,
47,
108,
105,
109,
105,
116,
115,
]),
],
},
},
},
},
};
function bytesFromBase64(b64) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
}
function base64FromBytes(arr) {
return globalThis.Buffer.from(arr).toString("base64");
}
function toTimestamp(date) {
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
const nanos = (date.getTime() % 1_000) * 1_000_000;
return { seconds, nanos };
}
function fromTimestamp(t) {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
return new globalThis.Date(millis);
}
function fromJsonTimestamp(o) {
if (o instanceof globalThis.Date) {
return o;
}
else if (typeof o === "string") {
return new globalThis.Date(o);
}
else {
return fromTimestamp(Timestamp.fromJSON(o));
}
}
function numberToLong(number) {
return Long.fromNumber(number);
}
function isSet(value) {
return value !== null && value !== undefined;
}