UNPKG

@zitadel/node

Version:

Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.

122 lines (121 loc) 4.89 kB
// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.7.5 // protoc unknown // source: zitadel/settings/v2beta/domain_settings.proto /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { resourceOwnerTypeFromJSON, resourceOwnerTypeToJSON } from "./settings.js"; export const protobufPackage = "zitadel.settings.v2beta"; function createBaseDomainSettings() { return { loginNameIncludesDomain: false, requireOrgDomainVerification: false, smtpSenderAddressMatchesInstanceDomain: false, resourceOwnerType: 0, }; } export const DomainSettings = { encode(message, writer = new BinaryWriter()) { if (message.loginNameIncludesDomain !== false) { writer.uint32(8).bool(message.loginNameIncludesDomain); } if (message.requireOrgDomainVerification !== false) { writer.uint32(16).bool(message.requireOrgDomainVerification); } if (message.smtpSenderAddressMatchesInstanceDomain !== false) { writer.uint32(24).bool(message.smtpSenderAddressMatchesInstanceDomain); } if (message.resourceOwnerType !== 0) { writer.uint32(48).int32(message.resourceOwnerType); } 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 = createBaseDomainSettings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 8) { break; } message.loginNameIncludesDomain = reader.bool(); continue; } case 2: { if (tag !== 16) { break; } message.requireOrgDomainVerification = reader.bool(); continue; } case 3: { if (tag !== 24) { break; } message.smtpSenderAddressMatchesInstanceDomain = reader.bool(); continue; } case 6: { if (tag !== 48) { break; } message.resourceOwnerType = reader.int32(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { loginNameIncludesDomain: isSet(object.loginNameIncludesDomain) ? globalThis.Boolean(object.loginNameIncludesDomain) : false, requireOrgDomainVerification: isSet(object.requireOrgDomainVerification) ? globalThis.Boolean(object.requireOrgDomainVerification) : false, smtpSenderAddressMatchesInstanceDomain: isSet(object.smtpSenderAddressMatchesInstanceDomain) ? globalThis.Boolean(object.smtpSenderAddressMatchesInstanceDomain) : false, resourceOwnerType: isSet(object.resourceOwnerType) ? resourceOwnerTypeFromJSON(object.resourceOwnerType) : 0, }; }, toJSON(message) { const obj = {}; if (message.loginNameIncludesDomain !== false) { obj.loginNameIncludesDomain = message.loginNameIncludesDomain; } if (message.requireOrgDomainVerification !== false) { obj.requireOrgDomainVerification = message.requireOrgDomainVerification; } if (message.smtpSenderAddressMatchesInstanceDomain !== false) { obj.smtpSenderAddressMatchesInstanceDomain = message.smtpSenderAddressMatchesInstanceDomain; } if (message.resourceOwnerType !== 0) { obj.resourceOwnerType = resourceOwnerTypeToJSON(message.resourceOwnerType); } return obj; }, create(base) { return DomainSettings.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseDomainSettings(); message.loginNameIncludesDomain = object.loginNameIncludesDomain ?? false; message.requireOrgDomainVerification = object.requireOrgDomainVerification ?? false; message.smtpSenderAddressMatchesInstanceDomain = object.smtpSenderAddressMatchesInstanceDomain ?? false; message.resourceOwnerType = object.resourceOwnerType ?? 0; return message; }, }; function isSet(value) { return value !== null && value !== undefined; }