Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: upgrade ts proto (#9123)

boojack72752fed2943
diff --git a/frontend/src/types/proto/google/api/client.ts b/frontend/src/types/proto/google/api/client.ts
index 0ff1bec657..e0e583296f 100644
--- a/frontend/src/types/proto/google/api/client.ts
+++ b/frontend/src/types/proto/google/api/client.ts
@@ -504,8 +504,8 @@ export const CommonLanguageSettings = {
fromJSON(object: any): CommonLanguageSettings {
return {
- referenceDocsUri: isSet(object.referenceDocsUri) ? String(object.referenceDocsUri) : "",
- destinations: Array.isArray(object?.destinations)
+ referenceDocsUri: isSet(object.referenceDocsUri) ? globalThis.String(object.referenceDocsUri) : "",
+ destinations: globalThis.Array.isArray(object?.destinations)
? object.destinations.map((e: any) => clientLibraryDestinationFromJSON(e))
: [],
};
@@ -513,11 +513,11 @@ export const CommonLanguageSettings = {
toJSON(message: CommonLanguageSettings): unknown {
const obj: any = {};
- message.referenceDocsUri !== undefined && (obj.referenceDocsUri = message.referenceDocsUri);
- if (message.destinations) {
+ if (message.referenceDocsUri !== "") {
+ obj.referenceDocsUri = message.referenceDocsUri;
+ }
+ if (message.destinations?.length) {
obj.destinations = message.destinations.map((e) => clientLibraryDestinationToJSON(e));
- } else {
- obj.destinations = [];
}
return obj;
},
@@ -525,7 +525,6 @@ export const CommonLanguageSettings = {
create(base?: DeepPartial<CommonLanguageSettings>): CommonLanguageSettings {
return CommonLanguageSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CommonLanguageSettings>): CommonLanguageSettings {
const message = createBaseCommonLanguageSettings();
message.referenceDocsUri = object.referenceDocsUri ?? "";
@@ -683,9 +682,9 @@ export const ClientLibrarySettings = {
fromJSON(object: any): ClientLibrarySettings {
return {
- version: isSet(object.version) ? String(object.version) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
launchStage: isSet(object.launchStage) ? launchStageFromJSON(object.launchStage) : 0,
- restNumericEnums: isSet(object.restNumericEnums) ? Boolean(object.restNumericEnums) : false,
+ restNumericEnums: isSet(object.restNumericEnums) ? globalThis.Boolean(object.restNumericEnums) : false,
javaSettings: isSet(object.javaSettings) ? JavaSettings.fromJSON(object.javaSettings) : undefined,
cppSettings: isSet(object.cppSettings) ? CppSettings.fromJSON(object.cppSettings) : undefined,
phpSettings: isSet(object.phpSettings) ? PhpSettings.fromJSON(object.phpSettings) : undefined,
@@ -699,32 +698,45 @@ export const ClientLibrarySettings = {
toJSON(message: ClientLibrarySettings): unknown {
const obj: any = {};
- message.version !== undefined && (obj.version = message.version);
- message.launchStage !== undefined && (obj.launchStage = launchStageToJSON(message.launchStage));
- message.restNumericEnums !== undefined && (obj.restNumericEnums = message.restNumericEnums);
- message.javaSettings !== undefined &&
- (obj.javaSettings = message.javaSettings ? JavaSettings.toJSON(message.javaSettings) : undefined);
- message.cppSettings !== undefined &&
- (obj.cppSettings = message.cppSettings ? CppSettings.toJSON(message.cppSettings) : undefined);
- message.phpSettings !== undefined &&
- (obj.phpSettings = message.phpSettings ? PhpSettings.toJSON(message.phpSettings) : undefined);
- message.pythonSettings !== undefined &&
- (obj.pythonSettings = message.pythonSettings ? PythonSettings.toJSON(message.pythonSettings) : undefined);
- message.nodeSettings !== undefined &&
- (obj.nodeSettings = message.nodeSettings ? NodeSettings.toJSON(message.nodeSettings) : undefined);
- message.dotnetSettings !== undefined &&
- (obj.dotnetSettings = message.dotnetSettings ? DotnetSettings.toJSON(message.dotnetSettings) : undefined);
- message.rubySettings !== undefined &&
- (obj.rubySettings = message.rubySettings ? RubySettings.toJSON(message.rubySettings) : undefined);
- message.goSettings !== undefined &&
- (obj.goSettings = message.goSettings ? GoSettings.toJSON(message.goSettings) : undefined);
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.launchStage !== 0) {
+ obj.launchStage = launchStageToJSON(message.launchStage);
+ }
+ if (message.restNumericEnums === true) {
+ obj.restNumericEnums = message.restNumericEnums;
+ }
+ if (message.javaSettings !== undefined) {
+ obj.javaSettings = JavaSettings.toJSON(message.javaSettings);
+ }
+ if (message.cppSettings !== undefined) {
+ obj.cppSettings = CppSettings.toJSON(message.cppSettings);
+ }
+ if (message.phpSettings !== undefined) {
+ obj.phpSettings = PhpSettings.toJSON(message.phpSettings);
+ }
+ if (message.pythonSettings !== undefined) {
+ obj.pythonSettings = PythonSettings.toJSON(message.pythonSettings);
+ }
+ if (message.nodeSettings !== undefined) {
+ obj.nodeSettings = NodeSettings.toJSON(message.nodeSettings);
+ }
+ if (message.dotnetSettings !== undefined) {
+ obj.dotnetSettings = DotnetSettings.toJSON(message.dotnetSettings);
+ }
+ if (message.rubySettings !== undefined) {
+ obj.rubySettings = RubySettings.toJSON(message.rubySettings);
+ }
+ if (message.goSettings !== undefined) {
+ obj.goSettings = GoSettings.toJSON(message.goSettings);
+ }
return obj;
},
create(base?: DeepPartial<ClientLibrarySettings>): ClientLibrarySettings {
return ClientLibrarySettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ClientLibrarySettings>): ClientLibrarySettings {
const message = createBaseClientLibrarySettings();
message.version = object.version ?? "";
@@ -896,59 +908,65 @@ export const Publishing = {
fromJSON(object: any): Publishing {
return {
- methodSettings: Array.isArray(object?.methodSettings)
+ methodSettings: globalThis.Array.isArray(object?.methodSettings)
? object.methodSettings.map((e: any) => MethodSettings.fromJSON(e))
: [],
- newIssueUri: isSet(object.newIssueUri) ? String(object.newIssueUri) : "",
- documentationUri: isSet(object.documentationUri) ? String(object.documentationUri) : "",
- apiShortName: isSet(object.apiShortName) ? String(object.apiShortName) : "",
- githubLabel: isSet(object.githubLabel) ? String(object.githubLabel) : "",
- codeownerGithubTeams: Array.isArray(object?.codeownerGithubTeams)
- ? object.codeownerGithubTeams.map((e: any) => String(e))
+ newIssueUri: isSet(object.newIssueUri) ? globalThis.String(object.newIssueUri) : "",
+ documentationUri: isSet(object.documentationUri) ? globalThis.String(object.documentationUri) : "",
+ apiShortName: isSet(object.apiShortName) ? globalThis.String(object.apiShortName) : "",
+ githubLabel: isSet(object.githubLabel) ? globalThis.String(object.githubLabel) : "",
+ codeownerGithubTeams: globalThis.Array.isArray(object?.codeownerGithubTeams)
+ ? object.codeownerGithubTeams.map((e: any) => globalThis.String(e))
: [],
- docTagPrefix: isSet(object.docTagPrefix) ? String(object.docTagPrefix) : "",
+ docTagPrefix: isSet(object.docTagPrefix) ? globalThis.String(object.docTagPrefix) : "",
organization: isSet(object.organization) ? clientLibraryOrganizationFromJSON(object.organization) : 0,
- librarySettings: Array.isArray(object?.librarySettings)
+ librarySettings: globalThis.Array.isArray(object?.librarySettings)
? object.librarySettings.map((e: any) => ClientLibrarySettings.fromJSON(e))
: [],
protoReferenceDocumentationUri: isSet(object.protoReferenceDocumentationUri)
- ? String(object.protoReferenceDocumentationUri)
+ ? globalThis.String(object.protoReferenceDocumentationUri)
: "",
};
},
toJSON(message: Publishing): unknown {
const obj: any = {};
- if (message.methodSettings) {
- obj.methodSettings = message.methodSettings.map((e) => e ? MethodSettings.toJSON(e) : undefined);
- } else {
- obj.methodSettings = [];
- }
- message.newIssueUri !== undefined && (obj.newIssueUri = message.newIssueUri);
- message.documentationUri !== undefined && (obj.documentationUri = message.documentationUri);
- message.apiShortName !== undefined && (obj.apiShortName = message.apiShortName);
- message.githubLabel !== undefined && (obj.githubLabel = message.githubLabel);
- if (message.codeownerGithubTeams) {
- obj.codeownerGithubTeams = message.codeownerGithubTeams.map((e) => e);
- } else {
- obj.codeownerGithubTeams = [];
- }
- message.docTagPrefix !== undefined && (obj.docTagPrefix = message.docTagPrefix);
- message.organization !== undefined && (obj.organization = clientLibraryOrganizationToJSON(message.organization));
- if (message.librarySettings) {
- obj.librarySettings = message.librarySettings.map((e) => e ? ClientLibrarySettings.toJSON(e) : undefined);
- } else {
- obj.librarySettings = [];
- }
- message.protoReferenceDocumentationUri !== undefined &&
- (obj.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri);
+ if (message.methodSettings?.length) {
+ obj.methodSettings = message.methodSettings.map((e) => MethodSettings.toJSON(e));
+ }
+ if (message.newIssueUri !== "") {
+ obj.newIssueUri = message.newIssueUri;
+ }
+ if (message.documentationUri !== "") {
+ obj.documentationUri = message.documentationUri;
+ }
+ if (message.apiShortName !== "") {
+ obj.apiShortName = message.apiShortName;
+ }
+ if (message.githubLabel !== "") {
+ obj.githubLabel = message.githubLabel;
+ }
+ if (message.codeownerGithubTeams?.length) {
+ obj.codeownerGithubTeams = message.codeownerGithubTeams;
+ }
+ if (message.docTagPrefix !== "") {
+ obj.docTagPrefix = message.docTagPrefix;
+ }
+ if (message.organization !== 0) {
+ obj.organization = clientLibraryOrganizationToJSON(message.organization);
+ }
+ if (message.librarySettings?.length) {
+ obj.librarySettings = message.librarySettings.map((e) => ClientLibrarySettings.toJSON(e));
+ }
+ if (message.protoReferenceDocumentationUri !== "") {
+ obj.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri;
+ }
return obj;
},
create(base?: DeepPartial<Publishing>): Publishing {
return Publishing.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Publishing>): Publishing {
const message = createBasePublishing();
message.methodSettings = object.methodSettings?.map((e) => MethodSettings.fromPartial(e)) || [];
@@ -1025,7 +1043,7 @@ export const JavaSettings = {
fromJSON(object: any): JavaSettings {
return {
- libraryPackage: isSet(object.libraryPackage) ? String(object.libraryPackage) : "",
+ libraryPackage: isSet(object.libraryPackage) ? globalThis.String(object.libraryPackage) : "",
serviceClassNames: isObject(object.serviceClassNames)
? Object.entries(object.serviceClassNames).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -1038,29 +1056,34 @@ export const JavaSettings = {
toJSON(message: JavaSettings): unknown {
const obj: any = {};
- message.libraryPackage !== undefined && (obj.libraryPackage = message.libraryPackage);
- obj.serviceClassNames = {};
+ if (message.libraryPackage !== "") {
+ obj.libraryPackage = message.libraryPackage;
+ }
if (message.serviceClassNames) {
- Object.entries(message.serviceClassNames).forEach(([k, v]) => {
- obj.serviceClassNames[k] = v;
- });
+ const entries = Object.entries(message.serviceClassNames);
+ if (entries.length > 0) {
+ obj.serviceClassNames = {};
+ entries.forEach(([k, v]) => {
+ obj.serviceClassNames[k] = v;
+ });
+ }
+ }
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
}
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
return obj;
},
create(base?: DeepPartial<JavaSettings>): JavaSettings {
return JavaSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<JavaSettings>): JavaSettings {
const message = createBaseJavaSettings();
message.libraryPackage = object.libraryPackage ?? "";
message.serviceClassNames = Object.entries(object.serviceClassNames ?? {}).reduce<{ [key: string]: string }>(
(acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
},
@@ -1119,20 +1142,26 @@ export const JavaSettings_ServiceClassNamesEntry = {
},
fromJSON(object: any): JavaSettings_ServiceClassNamesEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: JavaSettings_ServiceClassNamesEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<JavaSettings_ServiceClassNamesEntry>): JavaSettings_ServiceClassNamesEntry {
return JavaSettings_ServiceClassNamesEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<JavaSettings_ServiceClassNamesEntry>): JavaSettings_ServiceClassNamesEntry {
const message = createBaseJavaSettings_ServiceClassNamesEntry();
message.key = object.key ?? "";
@@ -1182,15 +1211,15 @@ export const CppSettings = {
toJSON(message: CppSettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
return obj;
},
create(base?: DeepPartial<CppSettings>): CppSettings {
return CppSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CppSettings>): CppSettings {
const message = createBaseCppSettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1241,15 +1270,15 @@ export const PhpSettings = {
toJSON(message: PhpSettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
return obj;
},
create(base?: DeepPartial<PhpSettings>): PhpSettings {
return PhpSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PhpSettings>): PhpSettings {
const message = createBasePhpSettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1300,15 +1329,15 @@ export const PythonSettings = {
toJSON(message: PythonSettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
return obj;
},
create(base?: DeepPartial<PythonSettings>): PythonSettings {
return PythonSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PythonSettings>): PythonSettings {
const message = createBasePythonSettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1359,15 +1388,15 @@ export const NodeSettings = {
toJSON(message: NodeSettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
return obj;
},
create(base?: DeepPartial<NodeSettings>): NodeSettings {
return NodeSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<NodeSettings>): NodeSettings {
const message = createBaseNodeSettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1490,48 +1519,49 @@ export const DotnetSettings = {
return acc;
}, {})
: {},
- ignoredResources: Array.isArray(object?.ignoredResources)
- ? object.ignoredResources.map((e: any) => String(e))
+ ignoredResources: globalThis.Array.isArray(object?.ignoredResources)
+ ? object.ignoredResources.map((e: any) => globalThis.String(e))
: [],
- forcedNamespaceAliases: Array.isArray(object?.forcedNamespaceAliases)
- ? object.forcedNamespaceAliases.map((e: any) => String(e))
+ forcedNamespaceAliases: globalThis.Array.isArray(object?.forcedNamespaceAliases)
+ ? object.forcedNamespaceAliases.map((e: any) => globalThis.String(e))
: [],
- handwrittenSignatures: Array.isArray(object?.handwrittenSignatures)
- ? object.handwrittenSignatures.map((e: any) => String(e))
+ handwrittenSignatures: globalThis.Array.isArray(object?.handwrittenSignatures)
+ ? object.handwrittenSignatures.map((e: any) => globalThis.String(e))
: [],
};
},
toJSON(message: DotnetSettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
- obj.renamedServices = {};
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
if (message.renamedServices) {
- Object.entries(message.renamedServices).forEach(([k, v]) => {
- obj.renamedServices[k] = v;
- });
+ const entries = Object.entries(message.renamedServices);
+ if (entries.length > 0) {
+ obj.renamedServices = {};
+ entries.forEach(([k, v]) => {
+ obj.renamedServices[k] = v;
+ });
+ }
}
- obj.renamedResources = {};
if (message.renamedResources) {
- Object.entries(message.renamedResources).forEach(([k, v]) => {
- obj.renamedResources[k] = v;
- });
+ const entries = Object.entries(message.renamedResources);
+ if (entries.length > 0) {
+ obj.renamedResources = {};
+ entries.forEach(([k, v]) => {
+ obj.renamedResources[k] = v;
+ });
+ }
}
- if (message.ignoredResources) {
- obj.ignoredResources = message.ignoredResources.map((e) => e);
- } else {
- obj.ignoredResources = [];
+ if (message.ignoredResources?.length) {
+ obj.ignoredResources = message.ignoredResources;
}
- if (message.forcedNamespaceAliases) {
- obj.forcedNamespaceAliases = message.forcedNamespaceAliases.map((e) => e);
- } else {
- obj.forcedNamespaceAliases = [];
+ if (message.forcedNamespaceAliases?.length) {
+ obj.forcedNamespaceAliases = message.forcedNamespaceAliases;
}
- if (message.handwrittenSignatures) {
- obj.handwrittenSignatures = message.handwrittenSignatures.map((e) => e);
- } else {
- obj.handwrittenSignatures = [];
+ if (message.handwrittenSignatures?.length) {
+ obj.handwrittenSignatures = message.handwrittenSignatures;
}
return obj;
},
@@ -1539,7 +1569,6 @@ export const DotnetSettings = {
create(base?: DeepPartial<DotnetSettings>): DotnetSettings {
return DotnetSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DotnetSettings>): DotnetSettings {
const message = createBaseDotnetSettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1548,7 +1577,7 @@ export const DotnetSettings = {
message.renamedServices = Object.entries(object.renamedServices ?? {}).reduce<{ [key: string]: string }>(
(acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
},
@@ -1557,7 +1586,7 @@ export const DotnetSettings = {
message.renamedResources = Object.entries(object.renamedResources ?? {}).reduce<{ [key: string]: string }>(
(acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
},
@@ -1616,20 +1645,26 @@ export const DotnetSettings_RenamedServicesEntry = {
},
fromJSON(object: any): DotnetSettings_RenamedServicesEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: DotnetSettings_RenamedServicesEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<DotnetSettings_RenamedServicesEntry>): DotnetSettings_RenamedServicesEntry {
return DotnetSettings_RenamedServicesEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DotnetSettings_RenamedServicesEntry>): DotnetSettings_RenamedServicesEntry {
const message = createBaseDotnetSettings_RenamedServicesEntry();
message.key = object.key ?? "";
@@ -1684,20 +1719,26 @@ export const DotnetSettings_RenamedResourcesEntry = {
},
fromJSON(object: any): DotnetSettings_RenamedResourcesEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: DotnetSettings_RenamedResourcesEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<DotnetSettings_RenamedResourcesEntry>): DotnetSettings_RenamedResourcesEntry {
return DotnetSettings_RenamedResourcesEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DotnetSettings_RenamedResourcesEntry>): DotnetSettings_RenamedResourcesEntry {
const message = createBaseDotnetSettings_RenamedResourcesEntry();
message.key = object.key ?? "";
@@ -1747,15 +1788,15 @@ export const RubySettings = {
toJSON(message: RubySettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
return obj;
},
create(base?: DeepPartial<RubySettings>): RubySettings {
return RubySettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RubySettings>): RubySettings {
const message = createBaseRubySettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1806,15 +1847,15 @@ export const GoSettings = {
toJSON(message: GoSettings): unknown {
const obj: any = {};
- message.common !== undefined &&
- (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);
+ if (message.common !== undefined) {
+ obj.common = CommonLanguageSettings.toJSON(message.common);
+ }
return obj;
},
create(base?: DeepPartial<GoSettings>): GoSettings {
return GoSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GoSettings>): GoSettings {
const message = createBaseGoSettings();
message.common = (object.common !== undefined && object.common !== null)
@@ -1871,23 +1912,25 @@ export const MethodSettings = {
fromJSON(object: any): MethodSettings {
return {
- selector: isSet(object.selector) ? String(object.selector) : "",
+ selector: isSet(object.selector) ? globalThis.String(object.selector) : "",
longRunning: isSet(object.longRunning) ? MethodSettings_LongRunning.fromJSON(object.longRunning) : undefined,
};
},
toJSON(message: MethodSettings): unknown {
const obj: any = {};
- message.selector !== undefined && (obj.selector = message.selector);
- message.longRunning !== undefined &&
- (obj.longRunning = message.longRunning ? MethodSettings_LongRunning.toJSON(message.longRunning) : undefined);
+ if (message.selector !== "") {
+ obj.selector = message.selector;
+ }
+ if (message.longRunning !== undefined) {
+ obj.longRunning = MethodSettings_LongRunning.toJSON(message.longRunning);
+ }
return obj;
},
create(base?: DeepPartial<MethodSettings>): MethodSettings {
return MethodSettings.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MethodSettings>): MethodSettings {
const message = createBaseMethodSettings();
message.selector = object.selector ?? "";
@@ -1966,7 +2009,7 @@ export const MethodSettings_LongRunning = {
fromJSON(object: any): MethodSettings_LongRunning {
return {
initialPollDelay: isSet(object.initialPollDelay) ? Duration.fromJSON(object.initialPollDelay) : undefined,
- pollDelayMultiplier: isSet(object.pollDelayMultiplier) ? Number(object.pollDelayMultiplier) : 0,
+ pollDelayMultiplier: isSet(object.pollDelayMultiplier) ? globalThis.Number(object.pollDelayMultiplier) : 0,
maxPollDelay: isSet(object.maxPollDelay) ? Duration.fromJSON(object.maxPollDelay) : undefined,
totalPollTimeout: isSet(object.totalPollTimeout) ? Duration.fromJSON(object.totalPollTimeout) : undefined,
};
@@ -1974,20 +2017,24 @@ export const MethodSettings_LongRunning = {
toJSON(message: MethodSettings_LongRunning): unknown {
const obj: any = {};
- message.initialPollDelay !== undefined &&
- (obj.initialPollDelay = message.initialPollDelay ? Duration.toJSON(message.initialPollDelay) : undefined);
- message.pollDelayMultiplier !== undefined && (obj.pollDelayMultiplier = message.pollDelayMultiplier);
- message.maxPollDelay !== undefined &&
- (obj.maxPollDelay = message.maxPollDelay ? Duration.toJSON(message.maxPollDelay) : undefined);
- message.totalPollTimeout !== undefined &&
- (obj.totalPollTimeout = message.totalPollTimeout ? Duration.toJSON(message.totalPollTimeout) : undefined);
+ if (message.initialPollDelay !== undefined) {
+ obj.initialPollDelay = Duration.toJSON(message.initialPollDelay);
+ }
+ if (message.pollDelayMultiplier !== 0) {
+ obj.pollDelayMultiplier = message.pollDelayMultiplier;
+ }
+ if (message.maxPollDelay !== undefined) {
+ obj.maxPollDelay = Duration.toJSON(message.maxPollDelay);
+ }
+ if (message.totalPollTimeout !== undefined) {
+ obj.totalPollTimeout = Duration.toJSON(message.totalPollTimeout);
+ }
return obj;
},
create(base?: DeepPartial<MethodSettings_LongRunning>): MethodSettings_LongRunning {
return MethodSettings_LongRunning.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MethodSettings_LongRunning>): MethodSettings_LongRunning {
const message = createBaseMethodSettings_LongRunning();
message.initialPollDelay = (object.initialPollDelay !== undefined && object.initialPollDelay !== null)
@@ -2007,7 +2054,7 @@ export const MethodSettings_LongRunning = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts b/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts
index f5de03844f..d56806c896 100644
--- a/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts
+++ b/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts
@@ -347,7 +347,7 @@ export interface SourceInfo {
* A map from the parse node id (e.g. `Expr.id`) to the code point offset
* within the source.
*/
- positions: { [key: Long]: number };
+ positions: Map<Long, number>;
/**
* A map from the parse node id where a macro replacement was made to the
* call `Expr` that resulted in a macro expansion.
@@ -358,7 +358,7 @@ export interface SourceInfo {
* in the map corresponds to the expression id of the expanded macro, and the
* value is the call `Expr` that was replaced.
*/
- macroCalls: { [key: Long]: Expr };
+ macroCalls: Map<Long, Expr>;
}
export interface SourceInfo_PositionsEntry {
@@ -443,16 +443,18 @@ export const ParsedExpr = {
toJSON(message: ParsedExpr): unknown {
const obj: any = {};
- message.expr !== undefined && (obj.expr = message.expr ? Expr.toJSON(message.expr) : undefined);
- message.sourceInfo !== undefined &&
- (obj.sourceInfo = message.sourceInfo ? SourceInfo.toJSON(message.sourceInfo) : undefined);
+ if (message.expr !== undefined) {
+ obj.expr = Expr.toJSON(message.expr);
+ }
+ if (message.sourceInfo !== undefined) {
+ obj.sourceInfo = SourceInfo.toJSON(message.sourceInfo);
+ }
return obj;
},
create(base?: DeepPartial<ParsedExpr>): ParsedExpr {
return ParsedExpr.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ParsedExpr>): ParsedExpr {
const message = createBaseParsedExpr();
message.expr = (object.expr !== undefined && object.expr !== null) ? Expr.fromPartial(object.expr) : undefined;
@@ -594,29 +596,36 @@ export const Expr = {
toJSON(message: Expr): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = (message.id || Long.ZERO).toString());
- message.constExpr !== undefined &&
- (obj.constExpr = message.constExpr ? Constant.toJSON(message.constExpr) : undefined);
- message.identExpr !== undefined &&
- (obj.identExpr = message.identExpr ? Expr_Ident.toJSON(message.identExpr) : undefined);
- message.selectExpr !== undefined &&
- (obj.selectExpr = message.selectExpr ? Expr_Select.toJSON(message.selectExpr) : undefined);
- message.callExpr !== undefined &&
- (obj.callExpr = message.callExpr ? Expr_Call.toJSON(message.callExpr) : undefined);
- message.listExpr !== undefined &&
- (obj.listExpr = message.listExpr ? Expr_CreateList.toJSON(message.listExpr) : undefined);
- message.structExpr !== undefined &&
- (obj.structExpr = message.structExpr ? Expr_CreateStruct.toJSON(message.structExpr) : undefined);
- message.comprehensionExpr !== undefined && (obj.comprehensionExpr = message.comprehensionExpr
- ? Expr_Comprehension.toJSON(message.comprehensionExpr)
- : undefined);
+ if (!message.id.isZero()) {
+ obj.id = (message.id || Long.ZERO).toString();
+ }
+ if (message.constExpr !== undefined) {
+ obj.constExpr = Constant.toJSON(message.constExpr);
+ }
+ if (message.identExpr !== undefined) {
+ obj.identExpr = Expr_Ident.toJSON(message.identExpr);
+ }
+ if (message.selectExpr !== undefined) {
+ obj.selectExpr = Expr_Select.toJSON(message.selectExpr);
+ }
+ if (message.callExpr !== undefined) {
+ obj.callExpr = Expr_Call.toJSON(message.callExpr);
+ }
+ if (message.listExpr !== undefined) {
+ obj.listExpr = Expr_CreateList.toJSON(message.listExpr);
+ }
+ if (message.structExpr !== undefined) {
+ obj.structExpr = Expr_CreateStruct.toJSON(message.structExpr);
+ }
+ if (message.comprehensionExpr !== undefined) {
+ obj.comprehensionExpr = Expr_Comprehension.toJSON(message.comprehensionExpr);
+ }
return obj;
},
create(base?: DeepPartial<Expr>): Expr {
return Expr.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr>): Expr {
const message = createBaseExpr();
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.ZERO;
@@ -681,19 +690,20 @@ export const Expr_Ident = {
},
fromJSON(object: any): Expr_Ident {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: Expr_Ident): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<Expr_Ident>): Expr_Ident {
return Expr_Ident.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_Ident>): Expr_Ident {
const message = createBaseExpr_Ident();
message.name = object.name ?? "";
@@ -759,23 +769,28 @@ export const Expr_Select = {
fromJSON(object: any): Expr_Select {
return {
operand: isSet(object.operand) ? Expr.fromJSON(object.operand) : undefined,
- field: isSet(object.field) ? String(object.field) : "",
- testOnly: isSet(object.testOnly) ? Boolean(object.testOnly) : false,
+ field: isSet(object.field) ? globalThis.String(object.field) : "",
+ testOnly: isSet(object.testOnly) ? globalThis.Boolean(object.testOnly) : false,
};
},
toJSON(message: Expr_Select): unknown {
const obj: any = {};
- message.operand !== undefined && (obj.operand = message.operand ? Expr.toJSON(message.operand) : undefined);
- message.field !== undefined && (obj.field = message.field);
- message.testOnly !== undefined && (obj.testOnly = message.testOnly);
+ if (message.operand !== undefined) {
+ obj.operand = Expr.toJSON(message.operand);
+ }
+ if (message.field !== "") {
+ obj.field = message.field;
+ }
+ if (message.testOnly === true) {
+ obj.testOnly = message.testOnly;
+ }
return obj;
},
create(base?: DeepPartial<Expr_Select>): Expr_Select {
return Expr_Select.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_Select>): Expr_Select {
const message = createBaseExpr_Select();
message.operand = (object.operand !== undefined && object.operand !== null)
@@ -845,19 +860,21 @@ export const Expr_Call = {
fromJSON(object: any): Expr_Call {
return {
target: isSet(object.target) ? Expr.fromJSON(object.target) : undefined,
- function: isSet(object.function) ? String(object.function) : "",
- args: Array.isArray(object?.args) ? object.args.map((e: any) => Expr.fromJSON(e)) : [],
+ function: isSet(object.function) ? globalThis.String(object.function) : "",
+ args: globalThis.Array.isArray(object?.args) ? object.args.map((e: any) => Expr.fromJSON(e)) : [],
};
},
toJSON(message: Expr_Call): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target ? Expr.toJSON(message.target) : undefined);
- message.function !== undefined && (obj.function = message.function);
- if (message.args) {
- obj.args = message.args.map((e) => e ? Expr.toJSON(e) : undefined);
- } else {
- obj.args = [];
+ if (message.target !== undefined) {
+ obj.target = Expr.toJSON(message.target);
+ }
+ if (message.function !== "") {
+ obj.function = message.function;
+ }
+ if (message.args?.length) {
+ obj.args = message.args.map((e) => Expr.toJSON(e));
}
return obj;
},
@@ -865,7 +882,6 @@ export const Expr_Call = {
create(base?: DeepPartial<Expr_Call>): Expr_Call {
return Expr_Call.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_Call>): Expr_Call {
const message = createBaseExpr_Call();
message.target = (object.target !== undefined && object.target !== null)
@@ -936,22 +952,20 @@ export const Expr_CreateList = {
fromJSON(object: any): Expr_CreateList {
return {
- elements: Array.isArray(object?.elements) ? object.elements.map((e: any) => Expr.fromJSON(e)) : [],
- optionalIndices: Array.isArray(object?.optionalIndices) ? object.optionalIndices.map((e: any) => Number(e)) : [],
+ elements: globalThis.Array.isArray(object?.elements) ? object.elements.map((e: any) => Expr.fromJSON(e)) : [],
+ optionalIndices: globalThis.Array.isArray(object?.optionalIndices)
+ ? object.optionalIndices.map((e: any) => globalThis.Number(e))
+ : [],
};
},
toJSON(message: Expr_CreateList): unknown {
const obj: any = {};
- if (message.elements) {
- obj.elements = message.elements.map((e) => e ? Expr.toJSON(e) : undefined);
- } else {
- obj.elements = [];
+ if (message.elements?.length) {
+ obj.elements = message.elements.map((e) => Expr.toJSON(e));
}
- if (message.optionalIndices) {
+ if (message.optionalIndices?.length) {
obj.optionalIndices = message.optionalIndices.map((e) => Math.round(e));
- } else {
- obj.optionalIndices = [];
}
return obj;
},
@@ -959,7 +973,6 @@ export const Expr_CreateList = {
create(base?: DeepPartial<Expr_CreateList>): Expr_CreateList {
return Expr_CreateList.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_CreateList>): Expr_CreateList {
const message = createBaseExpr_CreateList();
message.elements = object.elements?.map((e) => Expr.fromPartial(e)) || [];
@@ -1015,8 +1028,8 @@ export const Expr_CreateStruct = {
fromJSON(object: any): Expr_CreateStruct {
return {
- messageName: isSet(object.messageName) ? String(object.messageName) : "",
- entries: Array.isArray(object?.entries)
+ messageName: isSet(object.messageName) ? globalThis.String(object.messageName) : "",
+ entries: globalThis.Array.isArray(object?.entries)
? object.entries.map((e: any) => Expr_CreateStruct_Entry.fromJSON(e))
: [],
};
@@ -1024,11 +1037,11 @@ export const Expr_CreateStruct = {
toJSON(message: Expr_CreateStruct): unknown {
const obj: any = {};
- message.messageName !== undefined && (obj.messageName = message.messageName);
- if (message.entries) {
- obj.entries = message.entries.map((e) => e ? Expr_CreateStruct_Entry.toJSON(e) : undefined);
- } else {
- obj.entries = [];
+ if (message.messageName !== "") {
+ obj.messageName = message.messageName;
+ }
+ if (message.entries?.length) {
+ obj.entries = message.entries.map((e) => Expr_CreateStruct_Entry.toJSON(e));
}
return obj;
},
@@ -1036,7 +1049,6 @@ export const Expr_CreateStruct = {
create(base?: DeepPartial<Expr_CreateStruct>): Expr_CreateStruct {
return Expr_CreateStruct.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_CreateStruct>): Expr_CreateStruct {
const message = createBaseExpr_CreateStruct();
message.messageName = object.messageName ?? "";
@@ -1123,27 +1135,36 @@ export const Expr_CreateStruct_Entry = {
fromJSON(object: any): Expr_CreateStruct_Entry {
return {
id: isSet(object.id) ? Long.fromValue(object.id) : Long.ZERO,
- fieldKey: isSet(object.fieldKey) ? String(object.fieldKey) : undefined,
+ fieldKey: isSet(object.fieldKey) ? globalThis.String(object.fieldKey) : undefined,
mapKey: isSet(object.mapKey) ? Expr.fromJSON(object.mapKey) : undefined,
value: isSet(object.value) ? Expr.fromJSON(object.value) : undefined,
- optionalEntry: isSet(object.optionalEntry) ? Boolean(object.optionalEntry) : false,
+ optionalEntry: isSet(object.optionalEntry) ? globalThis.Boolean(object.optionalEntry) : false,
};
},
toJSON(message: Expr_CreateStruct_Entry): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = (message.id || Long.ZERO).toString());
- message.fieldKey !== undefined && (obj.fieldKey = message.fieldKey);
- message.mapKey !== undefined && (obj.mapKey = message.mapKey ? Expr.toJSON(message.mapKey) : undefined);
- message.value !== undefined && (obj.value = message.value ? Expr.toJSON(message.value) : undefined);
- message.optionalEntry !== undefined && (obj.optionalEntry = message.optionalEntry);
+ if (!message.id.isZero()) {
+ obj.id = (message.id || Long.ZERO).toString();
+ }
+ if (message.fieldKey !== undefined) {
+ obj.fieldKey = message.fieldKey;
+ }
+ if (message.mapKey !== undefined) {
+ obj.mapKey = Expr.toJSON(message.mapKey);
+ }
+ if (message.value !== undefined) {
+ obj.value = Expr.toJSON(message.value);
+ }
+ if (message.optionalEntry === true) {
+ obj.optionalEntry = message.optionalEntry;
+ }
return obj;
},
create(base?: DeepPartial<Expr_CreateStruct_Entry>): Expr_CreateStruct_Entry {
return Expr_CreateStruct_Entry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_CreateStruct_Entry>): Expr_CreateStruct_Entry {
const message = createBaseExpr_CreateStruct_Entry();
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.ZERO;
@@ -1262,9 +1283,9 @@ export const Expr_Comprehension = {
fromJSON(object: any): Expr_Comprehension {
return {
- iterVar: isSet(object.iterVar) ? String(object.iterVar) : "",
+ iterVar: isSet(object.iterVar) ? globalThis.String(object.iterVar) : "",
iterRange: isSet(object.iterRange) ? Expr.fromJSON(object.iterRange) : undefined,
- accuVar: isSet(object.accuVar) ? String(object.accuVar) : "",
+ accuVar: isSet(object.accuVar) ? globalThis.String(object.accuVar) : "",
accuInit: isSet(object.accuInit) ? Expr.fromJSON(object.accuInit) : undefined,
loopCondition: isSet(object.loopCondition) ? Expr.fromJSON(object.loopCondition) : undefined,
loopStep: isSet(object.loopStep) ? Expr.fromJSON(object.loopStep) : undefined,
@@ -1274,21 +1295,33 @@ export const Expr_Comprehension = {
toJSON(message: Expr_Comprehension): unknown {
const obj: any = {};
- message.iterVar !== undefined && (obj.iterVar = message.iterVar);
- message.iterRange !== undefined && (obj.iterRange = message.iterRange ? Expr.toJSON(message.iterRange) : undefined);
- message.accuVar !== undefined && (obj.accuVar = message.accuVar);
- message.accuInit !== undefined && (obj.accuInit = message.accuInit ? Expr.toJSON(message.accuInit) : undefined);
- message.loopCondition !== undefined &&
- (obj.loopCondition = message.loopCondition ? Expr.toJSON(message.loopCondition) : undefined);
- message.loopStep !== undefined && (obj.loopStep = message.loopStep ? Expr.toJSON(message.loopStep) : undefined);
- message.result !== undefined && (obj.result = message.result ? Expr.toJSON(message.result) : undefined);
+ if (message.iterVar !== "") {
+ obj.iterVar = message.iterVar;
+ }
+ if (message.iterRange !== undefined) {
+ obj.iterRange = Expr.toJSON(message.iterRange);
+ }
+ if (message.accuVar !== "") {
+ obj.accuVar = message.accuVar;
+ }
+ if (message.accuInit !== undefined) {
+ obj.accuInit = Expr.toJSON(message.accuInit);
+ }
+ if (message.loopCondition !== undefined) {
+ obj.loopCondition = Expr.toJSON(message.loopCondition);
+ }
+ if (message.loopStep !== undefined) {
+ obj.loopStep = Expr.toJSON(message.loopStep);
+ }
+ if (message.result !== undefined) {
+ obj.result = Expr.toJSON(message.result);
+ }
return obj;
},
create(base?: DeepPartial<Expr_Comprehension>): Expr_Comprehension {
return Expr_Comprehension.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr_Comprehension>): Expr_Comprehension {
const message = createBaseExpr_Comprehension();
message.iterVar = object.iterVar ?? "";
@@ -1440,11 +1473,11 @@ export const Constant = {
fromJSON(object: any): Constant {
return {
nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined,
- boolValue: isSet(object.boolValue) ? Boolean(object.boolValue) : undefined,
+ boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined,
int64Value: isSet(object.int64Value) ? Long.fromValue(object.int64Value) : undefined,
uint64Value: isSet(object.uint64Value) ? Long.fromValue(object.uint64Value) : undefined,
- doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : undefined,
- stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined,
+ doubleValue: isSet(object.doubleValue) ? globalThis.Number(object.doubleValue) : undefined,
+ stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
bytesValue: isSet(object.bytesValue) ? bytesFromBase64(object.bytesValue) : undefined,
durationValue: isSet(object.durationValue) ? Duration.fromJSON(object.durationValue) : undefined,
timestampValue: isSet(object.timestampValue) ? fromJsonTimestamp(object.timestampValue) : undefined,
@@ -1453,25 +1486,39 @@ export const Constant = {
toJSON(message: Constant): unknown {
const obj: any = {};
- message.nullValue !== undefined &&
- (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);
- message.boolValue !== undefined && (obj.boolValue = message.boolValue);
- message.int64Value !== undefined && (obj.int64Value = (message.int64Value || undefined).toString());
- message.uint64Value !== undefined && (obj.uint64Value = (message.uint64Value || undefined).toString());
- message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);
- message.stringValue !== undefined && (obj.stringValue = message.stringValue);
- message.bytesValue !== undefined &&
- (obj.bytesValue = message.bytesValue !== undefined ? base64FromBytes(message.bytesValue) : undefined);
- message.durationValue !== undefined &&
- (obj.durationValue = message.durationValue ? Duration.toJSON(message.durationValue) : undefined);
- message.timestampValue !== undefined && (obj.timestampValue = message.timestampValue.toISOString());
+ if (message.nullValue !== undefined) {
+ obj.nullValue = nullValueToJSON(message.nullValue);
+ }
+ if (message.boolValue !== undefined) {
+ obj.boolValue = message.boolValue;
+ }
+ if (message.int64Value !== undefined) {
+ obj.int64Value = (message.int64Value || Long.ZERO).toString();
+ }
+ if (message.uint64Value !== undefined) {
+ obj.uint64Value = (message.uint64Value || Long.UZERO).toString();
+ }
+ if (message.doubleValue !== undefined) {
+ obj.doubleValue = message.doubleValue;
+ }
+ if (message.stringValue !== undefined) {
+ obj.stringValue = message.stringValue;
+ }
+ if (message.bytesValue !== undefined) {
+ obj.bytesValue = base64FromBytes(message.bytesValue);
+ }
+ if (message.durationValue !== undefined) {
+ obj.durationValue = Duration.toJSON(message.durationValue);
+ }
+ if (message.timestampValue !== undefined) {
+ obj.timestampValue = message.timestampValue.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<Constant>): Constant {
return Constant.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Constant>): Constant {
const message = createBaseConstant();
message.nullValue = object.nullValue ?? undefined;
@@ -1494,7 +1541,7 @@ export const Constant = {
};
function createBaseSourceInfo(): SourceInfo {
- return { syntaxVersion: "", location: "", lineOffsets: [], positions: {}, macroCalls: {} };
+ return { syntaxVersion: "", location: "", lineOffsets: [], positions: new Map(), macroCalls: new Map() };
}
export const SourceInfo = {
@@ -1510,10 +1557,10 @@ export const SourceInfo = {
writer.int32(v);
}
writer.ldelim();
- Object.entries(message.positions).forEach(([key, value]) => {
+ message.positions.forEach((value, key) => {
SourceInfo_PositionsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim();
});
- Object.entries(message.macroCalls).forEach(([key, value]) => {
+ message.macroCalls.forEach((value, key) => {
SourceInfo_MacroCallsEntry.encode({ key: key as any, value }, writer.uint32(42).fork()).ldelim();
});
return writer;
@@ -1564,7 +1611,7 @@ export const SourceInfo = {
const entry4 = SourceInfo_PositionsEntry.decode(reader, reader.uint32());
if (entry4.value !== undefined) {
- message.positions[entry4.key] = entry4.value;
+ message.positions.set(entry4.key, entry4.value);
}
continue;
case 5:
@@ -1574,7 +1621,7 @@ export const SourceInfo = {
const entry5 = SourceInfo_MacroCallsEntry.decode(reader, reader.uint32());
if (entry5.value !== undefined) {
- message.macroCalls[entry5.key] = entry5.value;
+ message.macroCalls.set(entry5.key, entry5.value);
}
continue;
}
@@ -1588,43 +1635,47 @@ export const SourceInfo = {
fromJSON(object: any): SourceInfo {
return {
- syntaxVersion: isSet(object.syntaxVersion) ? String(object.syntaxVersion) : "",
- location: isSet(object.location) ? String(object.location) : "",
- lineOffsets: Array.isArray(object?.lineOffsets) ? object.lineOffsets.map((e: any) => Number(e)) : [],
+ syntaxVersion: isSet(object.syntaxVersion) ? globalThis.String(object.syntaxVersion) : "",
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
+ lineOffsets: globalThis.Array.isArray(object?.lineOffsets)
+ ? object.lineOffsets.map((e: any) => globalThis.Number(e))
+ : [],
positions: isObject(object.positions)
- ? Object.entries(object.positions).reduce<{ [key: Long]: number }>((acc, [key, value]) => {
- acc[Number(key)] = Number(value);
+ ? Object.entries(object.positions).reduce<Map<Long, number>>((acc, [key, value]) => {
+ acc.set(Long.fromValue(key), Number(value));
return acc;
- }, {})
- : {},
+ }, new Map())
+ : new Map(),
macroCalls: isObject(object.macroCalls)
- ? Object.entries(object.macroCalls).reduce<{ [key: Long]: Expr }>((acc, [key, value]) => {
- acc[Number(key)] = Expr.fromJSON(value);
+ ? Object.entries(object.macroCalls).reduce<Map<Long, Expr>>((acc, [key, value]) => {
+ acc.set(Long.fromValue(key), Expr.fromJSON(value));
return acc;
- }, {})
- : {},
+ }, new Map())
+ : new Map(),
};
},
toJSON(message: SourceInfo): unknown {
const obj: any = {};
- message.syntaxVersion !== undefined && (obj.syntaxVersion = message.syntaxVersion);
- message.location !== undefined && (obj.location = message.location);
- if (message.lineOffsets) {
+ if (message.syntaxVersion !== "") {
+ obj.syntaxVersion = message.syntaxVersion;
+ }
+ if (message.location !== "") {
+ obj.location = message.location;
+ }
+ if (message.lineOffsets?.length) {
obj.lineOffsets = message.lineOffsets.map((e) => Math.round(e));
- } else {
- obj.lineOffsets = [];
}
- obj.positions = {};
- if (message.positions) {
- Object.entries(message.positions).forEach(([k, v]) => {
- obj.positions[k] = Math.round(v);
+ if (message.positions?.size) {
+ obj.positions = {};
+ message.positions.forEach((v, k) => {
+ obj.positions[longToNumber(k)] = Math.round(v);
});
}
- obj.macroCalls = {};
- if (message.macroCalls) {
- Object.entries(message.macroCalls).forEach(([k, v]) => {
- obj.macroCalls[k] = Expr.toJSON(v);
+ if (message.macroCalls?.size) {
+ obj.macroCalls = {};
+ message.macroCalls.forEach((v, k) => {
+ obj.macroCalls[longToNumber(k)] = Expr.toJSON(v);
});
}
return obj;
@@ -1633,24 +1684,29 @@ export const SourceInfo = {
create(base?: DeepPartial<SourceInfo>): SourceInfo {
return SourceInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourceInfo>): SourceInfo {
const message = createBaseSourceInfo();
message.syntaxVersion = object.syntaxVersion ?? "";
message.location = object.location ?? "";
message.lineOffsets = object.lineOffsets?.map((e) => e) || [];
- message.positions = Object.entries(object.positions ?? {}).reduce<{ [key: Long]: number }>((acc, [key, value]) => {
- if (value !== undefined) {
- acc[Number(key)] = Number(value);
- }
- return acc;
- }, {});
- message.macroCalls = Object.entries(object.macroCalls ?? {}).reduce<{ [key: Long]: Expr }>((acc, [key, value]) => {
- if (value !== undefined) {
- acc[Number(key)] = Expr.fromPartial(value);
- }
- return acc;
- }, {});
+ message.positions = (() => {
+ const m = new Map();
+ (object.positions as Map<Long, number> ?? new Map()).forEach((value, key) => {
+ if (value !== undefined) {
+ m.set(key, globalThis.Number(value));
+ }
+ });
+ return m;
+ })();
+ message.macroCalls = (() => {
+ const m = new Map();
+ (object.macroCalls as Map<Long, Expr> ?? new Map()).forEach((value, key) => {
+ if (value !== undefined) {
+ m.set(key, Expr.fromPartial(value));
+ }
+ });
+ return m;
+ })();
return message;
},
};
@@ -1703,21 +1759,24 @@ export const SourceInfo_PositionsEntry = {
fromJSON(object: any): SourceInfo_PositionsEntry {
return {
key: isSet(object.key) ? Long.fromValue(object.key) : Long.ZERO,
- value: isSet(object.value) ? Number(object.value) : 0,
+ value: isSet(object.value) ? globalThis.Number(object.value) : 0,
};
},
toJSON(message: SourceInfo_PositionsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = (message.key || Long.ZERO).toString());
- message.value !== undefined && (obj.value = Math.round(message.value));
+ if (!message.key.isZero()) {
+ obj.key = (message.key || Long.ZERO).toString();
+ }
+ if (message.value !== 0) {
+ obj.value = Math.round(message.value);
+ }
return obj;
},
create(base?: DeepPartial<SourceInfo_PositionsEntry>): SourceInfo_PositionsEntry {
return SourceInfo_PositionsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourceInfo_PositionsEntry>): SourceInfo_PositionsEntry {
const message = createBaseSourceInfo_PositionsEntry();
message.key = (object.key !== undefined && object.key !== null) ? Long.fromValue(object.key) : Long.ZERO;
@@ -1780,15 +1839,18 @@ export const SourceInfo_MacroCallsEntry = {
toJSON(message: SourceInfo_MacroCallsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = (message.key || Long.ZERO).toString());
- message.value !== undefined && (obj.value = message.value ? Expr.toJSON(message.value) : undefined);
+ if (!message.key.isZero()) {
+ obj.key = (message.key || Long.ZERO).toString();
+ }
+ if (message.value !== undefined) {
+ obj.value = Expr.toJSON(message.value);
+ }
return obj;
},
create(base?: DeepPartial<SourceInfo_MacroCallsEntry>): SourceInfo_MacroCallsEntry {
return SourceInfo_MacroCallsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourceInfo_MacroCallsEntry>): SourceInfo_MacroCallsEntry {
const message = createBaseSourceInfo_MacroCallsEntry();
message.key = (object.key !== undefined && object.key !== null) ? Long.fromValue(object.key) : Long.ZERO;
@@ -1864,26 +1926,33 @@ export const SourcePosition = {
fromJSON(object: any): SourcePosition {
return {
- location: isSet(object.location) ? String(object.location) : "",
- offset: isSet(object.offset) ? Number(object.offset) : 0,
- line: isSet(object.line) ? Number(object.line) : 0,
- column: isSet(object.column) ? Number(object.column) : 0,
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
+ offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
+ line: isSet(object.line) ? globalThis.Number(object.line) : 0,
+ column: isSet(object.column) ? globalThis.Number(object.column) : 0,
};
},
toJSON(message: SourcePosition): unknown {
const obj: any = {};
- message.location !== undefined && (obj.location = message.location);
- message.offset !== undefined && (obj.offset = Math.round(message.offset));
- message.line !== undefined && (obj.line = Math.round(message.line));
- message.column !== undefined && (obj.column = Math.round(message.column));
+ if (message.location !== "") {
+ obj.location = message.location;
+ }
+ if (message.offset !== 0) {
+ obj.offset = Math.round(message.offset);
+ }
+ if (message.line !== 0) {
+ obj.line = Math.round(message.line);
+ }
+ if (message.column !== 0) {
+ obj.column = Math.round(message.column);
+ }
return obj;
},
create(base?: DeepPartial<SourcePosition>): SourcePosition {
return SourcePosition.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourcePosition>): SourcePosition {
const message = createBaseSourcePosition();
message.location = object.location ?? "";
@@ -1894,30 +1963,11 @@ export const SourcePosition = {
},
};
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
function bytesFromBase64(b64: string): Uint8Array {
- if (tsProtoGlobalThis.Buffer) {
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
- const bin = tsProtoGlobalThis.atob(b64);
+ const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
@@ -1927,21 +1977,21 @@ function bytesFromBase64(b64: string): Uint8Array {
}
function base64FromBytes(arr: Uint8Array): string {
- if (tsProtoGlobalThis.Buffer) {
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
- bin.push(String.fromCharCode(byte));
+ bin.push(globalThis.String.fromCharCode(byte));
});
- return tsProtoGlobalThis.btoa(bin.join(""));
+ return globalThis.btoa(bin.join(""));
}
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -1955,14 +2005,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
@@ -1972,6 +2022,13 @@ function numberToLong(number: number) {
return Long.fromNumber(number);
}
+function longToNumber(long: Long): number {
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
+ }
+ return long.toNumber();
+}
+
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/google/api/http.ts b/frontend/src/types/proto/google/api/http.ts
index 1224357b4d..3ff0ba33ab 100644
--- a/frontend/src/types/proto/google/api/http.ts
+++ b/frontend/src/types/proto/google/api/http.ts
@@ -421,29 +421,27 @@ export const Http = {
fromJSON(object: any): Http {
return {
- rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [],
+ rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [],
fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion)
- ? Boolean(object.fullyDecodeReservedExpansion)
+ ? globalThis.Boolean(object.fullyDecodeReservedExpansion)
: false,
};
},
toJSON(message: Http): unknown {
const obj: any = {};
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => HttpRule.toJSON(e));
+ }
+ if (message.fullyDecodeReservedExpansion === true) {
+ obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
}
- message.fullyDecodeReservedExpansion !== undefined &&
- (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion);
return obj;
},
create(base?: DeepPartial<Http>): Http {
return Http.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Http>): Http {
const message = createBaseHttp();
message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || [];
@@ -590,16 +588,16 @@ export const HttpRule = {
fromJSON(object: any): HttpRule {
return {
- selector: isSet(object.selector) ? String(object.selector) : "",
- get: isSet(object.get) ? String(object.get) : undefined,
- put: isSet(object.put) ? String(object.put) : undefined,
- post: isSet(object.post) ? String(object.post) : undefined,
- delete: isSet(object.delete) ? String(object.delete) : undefined,
- patch: isSet(object.patch) ? String(object.patch) : undefined,
+ selector: isSet(object.selector) ? globalThis.String(object.selector) : "",
+ get: isSet(object.get) ? globalThis.String(object.get) : undefined,
+ put: isSet(object.put) ? globalThis.String(object.put) : undefined,
+ post: isSet(object.post) ? globalThis.String(object.post) : undefined,
+ delete: isSet(object.delete) ? globalThis.String(object.delete) : undefined,
+ patch: isSet(object.patch) ? globalThis.String(object.patch) : undefined,
custom: isSet(object.custom) ? CustomHttpPattern.fromJSON(object.custom) : undefined,
- body: isSet(object.body) ? String(object.body) : "",
- responseBody: isSet(object.responseBody) ? String(object.responseBody) : "",
- additionalBindings: Array.isArray(object?.additionalBindings)
+ body: isSet(object.body) ? globalThis.String(object.body) : "",
+ responseBody: isSet(object.responseBody) ? globalThis.String(object.responseBody) : "",
+ additionalBindings: globalThis.Array.isArray(object?.additionalBindings)
? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e))
: [],
};
@@ -607,20 +605,35 @@ export const HttpRule = {
toJSON(message: HttpRule): unknown {
const obj: any = {};
- message.selector !== undefined && (obj.selector = message.selector);
- message.get !== undefined && (obj.get = message.get);
- message.put !== undefined && (obj.put = message.put);
- message.post !== undefined && (obj.post = message.post);
- message.delete !== undefined && (obj.delete = message.delete);
- message.patch !== undefined && (obj.patch = message.patch);
- message.custom !== undefined &&
- (obj.custom = message.custom ? CustomHttpPattern.toJSON(message.custom) : undefined);
- message.body !== undefined && (obj.body = message.body);
- message.responseBody !== undefined && (obj.responseBody = message.responseBody);
- if (message.additionalBindings) {
- obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined);
- } else {
- obj.additionalBindings = [];
+ if (message.selector !== "") {
+ obj.selector = message.selector;
+ }
+ if (message.get !== undefined) {
+ obj.get = message.get;
+ }
+ if (message.put !== undefined) {
+ obj.put = message.put;
+ }
+ if (message.post !== undefined) {
+ obj.post = message.post;
+ }
+ if (message.delete !== undefined) {
+ obj.delete = message.delete;
+ }
+ if (message.patch !== undefined) {
+ obj.patch = message.patch;
+ }
+ if (message.custom !== undefined) {
+ obj.custom = CustomHttpPattern.toJSON(message.custom);
+ }
+ if (message.body !== "") {
+ obj.body = message.body;
+ }
+ if (message.responseBody !== "") {
+ obj.responseBody = message.responseBody;
+ }
+ if (message.additionalBindings?.length) {
+ obj.additionalBindings = message.additionalBindings.map((e) => HttpRule.toJSON(e));
}
return obj;
},
@@ -628,7 +641,6 @@ export const HttpRule = {
create(base?: DeepPartial<HttpRule>): HttpRule {
return HttpRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<HttpRule>): HttpRule {
const message = createBaseHttpRule();
message.selector = object.selector ?? "";
@@ -693,20 +705,26 @@ export const CustomHttpPattern = {
},
fromJSON(object: any): CustomHttpPattern {
- return { kind: isSet(object.kind) ? String(object.kind) : "", path: isSet(object.path) ? String(object.path) : "" };
+ return {
+ kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
+ path: isSet(object.path) ? globalThis.String(object.path) : "",
+ };
},
toJSON(message: CustomHttpPattern): unknown {
const obj: any = {};
- message.kind !== undefined && (obj.kind = message.kind);
- message.path !== undefined && (obj.path = message.path);
+ if (message.kind !== "") {
+ obj.kind = message.kind;
+ }
+ if (message.path !== "") {
+ obj.path = message.path;
+ }
return obj;
},
create(base?: DeepPartial<CustomHttpPattern>): CustomHttpPattern {
return CustomHttpPattern.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CustomHttpPattern>): CustomHttpPattern {
const message = createBaseCustomHttpPattern();
message.kind = object.kind ?? "";
@@ -718,7 +736,7 @@ export const CustomHttpPattern = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index adf5ff4af4..e5804c3efe 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -1386,15 +1386,15 @@ export const FileDescriptorSet = {
},
fromJSON(object: any): FileDescriptorSet {
- return { file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [] };
+ return {
+ file: globalThis.Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [],
+ };
},
toJSON(message: FileDescriptorSet): unknown {
const obj: any = {};
- if (message.file) {
- obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.file = [];
+ if (message.file?.length) {
+ obj.file = message.file.map((e) => FileDescriptorProto.toJSON(e));
}
return obj;
},
@@ -1402,7 +1402,6 @@ export const FileDescriptorSet = {
create(base?: DeepPartial<FileDescriptorSet>): FileDescriptorSet {
return FileDescriptorSet.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FileDescriptorSet>): FileDescriptorSet {
const message = createBaseFileDescriptorSet();
message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || [];
@@ -1605,79 +1604,83 @@ export const FileDescriptorProto = {
fromJSON(object: any): FileDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- package: isSet(object.package) ? String(object.package) : "",
- dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => String(e)) : [],
- publicDependency: Array.isArray(object?.publicDependency)
- ? object.publicDependency.map((e: any) => Number(e))
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ package: isSet(object.package) ? globalThis.String(object.package) : "",
+ dependency: globalThis.Array.isArray(object?.dependency)
+ ? object.dependency.map((e: any) => globalThis.String(e))
+ : [],
+ publicDependency: globalThis.Array.isArray(object?.publicDependency)
+ ? object.publicDependency.map((e: any) => globalThis.Number(e))
+ : [],
+ weakDependency: globalThis.Array.isArray(object?.weakDependency)
+ ? object.weakDependency.map((e: any) => globalThis.Number(e))
: [],
- weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => Number(e)) : [],
- messageType: Array.isArray(object?.messageType)
+ messageType: globalThis.Array.isArray(object?.messageType)
? object.messageType.map((e: any) => DescriptorProto.fromJSON(e))
: [],
- enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [],
- service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) : [],
- extension: Array.isArray(object?.extension)
+ enumType: globalThis.Array.isArray(object?.enumType)
+ ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e))
+ : [],
+ service: globalThis.Array.isArray(object?.service)
+ ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e))
+ : [],
+ extension: globalThis.Array.isArray(object?.extension)
? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e))
: [],
options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
- syntax: isSet(object.syntax) ? String(object.syntax) : "",
- edition: isSet(object.edition) ? String(object.edition) : "",
+ syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "",
+ edition: isSet(object.edition) ? globalThis.String(object.edition) : "",
};
},
toJSON(message: FileDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.package !== undefined && (obj.package = message.package);
- if (message.dependency) {
- obj.dependency = message.dependency.map((e) => e);
- } else {
- obj.dependency = [];
- }
- if (message.publicDependency) {
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.package !== "") {
+ obj.package = message.package;
+ }
+ if (message.dependency?.length) {
+ obj.dependency = message.dependency;
+ }
+ if (message.publicDependency?.length) {
obj.publicDependency = message.publicDependency.map((e) => Math.round(e));
- } else {
- obj.publicDependency = [];
}
- if (message.weakDependency) {
+ if (message.weakDependency?.length) {
obj.weakDependency = message.weakDependency.map((e) => Math.round(e));
- } else {
- obj.weakDependency = [];
- }
- if (message.messageType) {
- obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined);
- } else {
- obj.messageType = [];
- }
- if (message.enumType) {
- obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.enumType = [];
- }
- if (message.service) {
- obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.service = [];
- }
- if (message.extension) {
- obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.extension = [];
- }
- message.options !== undefined && (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined);
- message.sourceCodeInfo !== undefined &&
- (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);
- message.syntax !== undefined && (obj.syntax = message.syntax);
- message.edition !== undefined && (obj.edition = message.edition);
+ }
+ if (message.messageType?.length) {
+ obj.messageType = message.messageType.map((e) => DescriptorProto.toJSON(e));
+ }
+ if (message.enumType?.length) {
+ obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e));
+ }
+ if (message.service?.length) {
+ obj.service = message.service.map((e) => ServiceDescriptorProto.toJSON(e));
+ }
+ if (message.extension?.length) {
+ obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e));
+ }
+ if (message.options !== undefined) {
+ obj.options = FileOptions.toJSON(message.options);
+ }
+ if (message.sourceCodeInfo !== undefined) {
+ obj.sourceCodeInfo = SourceCodeInfo.toJSON(message.sourceCodeInfo);
+ }
+ if (message.syntax !== "") {
+ obj.syntax = message.syntax;
+ }
+ if (message.edition !== "") {
+ obj.edition = message.edition;
+ }
return obj;
},
create(base?: DeepPartial<FileDescriptorProto>): FileDescriptorProto {
return FileDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FileDescriptorProto>): FileDescriptorProto {
const message = createBaseFileDescriptorProto();
message.name = object.name ?? "";
@@ -1839,73 +1842,66 @@ export const DescriptorProto = {
fromJSON(object: any): DescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [],
- extension: Array.isArray(object?.extension)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ field: globalThis.Array.isArray(object?.field)
+ ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e))
+ : [],
+ extension: globalThis.Array.isArray(object?.extension)
? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e))
: [],
- nestedType: Array.isArray(object?.nestedType)
+ nestedType: globalThis.Array.isArray(object?.nestedType)
? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e))
: [],
- enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [],
- extensionRange: Array.isArray(object?.extensionRange)
+ enumType: globalThis.Array.isArray(object?.enumType)
+ ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e))
+ : [],
+ extensionRange: globalThis.Array.isArray(object?.extensionRange)
? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e))
: [],
- oneofDecl: Array.isArray(object?.oneofDecl)
+ oneofDecl: globalThis.Array.isArray(object?.oneofDecl)
? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e))
: [],
options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined,
- reservedRange: Array.isArray(object?.reservedRange)
+ reservedRange: globalThis.Array.isArray(object?.reservedRange)
? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e))
: [],
- reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [],
+ reservedName: globalThis.Array.isArray(object?.reservedName)
+ ? object.reservedName.map((e: any) => globalThis.String(e))
+ : [],
};
},
toJSON(message: DescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.field) {
- obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.field = [];
- }
- if (message.extension) {
- obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.extension = [];
- }
- if (message.nestedType) {
- obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined);
- } else {
- obj.nestedType = [];
- }
- if (message.enumType) {
- obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.enumType = [];
- }
- if (message.extensionRange) {
- obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined);
- } else {
- obj.extensionRange = [];
- }
- if (message.oneofDecl) {
- obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.oneofDecl = [];
- }
- message.options !== undefined &&
- (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined);
- if (message.reservedRange) {
- obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined);
- } else {
- obj.reservedRange = [];
- }
- if (message.reservedName) {
- obj.reservedName = message.reservedName.map((e) => e);
- } else {
- obj.reservedName = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.field?.length) {
+ obj.field = message.field.map((e) => FieldDescriptorProto.toJSON(e));
+ }
+ if (message.extension?.length) {
+ obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e));
+ }
+ if (message.nestedType?.length) {
+ obj.nestedType = message.nestedType.map((e) => DescriptorProto.toJSON(e));
+ }
+ if (message.enumType?.length) {
+ obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e));
+ }
+ if (message.extensionRange?.length) {
+ obj.extensionRange = message.extensionRange.map((e) => DescriptorProto_ExtensionRange.toJSON(e));
+ }
+ if (message.oneofDecl?.length) {
+ obj.oneofDecl = message.oneofDecl.map((e) => OneofDescriptorProto.toJSON(e));
+ }
+ if (message.options !== undefined) {
+ obj.options = MessageOptions.toJSON(message.options);
+ }
+ if (message.reservedRange?.length) {
+ obj.reservedRange = message.reservedRange.map((e) => DescriptorProto_ReservedRange.toJSON(e));
+ }
+ if (message.reservedName?.length) {
+ obj.reservedName = message.reservedName;
}
return obj;
},
@@ -1913,7 +1909,6 @@ export const DescriptorProto = {
create(base?: DeepPartial<DescriptorProto>): DescriptorProto {
return DescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DescriptorProto>): DescriptorProto {
const message = createBaseDescriptorProto();
message.name = object.name ?? "";
@@ -1989,25 +1984,29 @@ export const DescriptorProto_ExtensionRange = {
fromJSON(object: any): DescriptorProto_ExtensionRange {
return {
- start: isSet(object.start) ? Number(object.start) : 0,
- end: isSet(object.end) ? Number(object.end) : 0,
+ start: isSet(object.start) ? globalThis.Number(object.start) : 0,
+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,
options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined,
};
},
toJSON(message: DescriptorProto_ExtensionRange): unknown {
const obj: any = {};
- message.start !== undefined && (obj.start = Math.round(message.start));
- message.end !== undefined && (obj.end = Math.round(message.end));
- message.options !== undefined &&
- (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined);
+ if (message.start !== 0) {
+ obj.start = Math.round(message.start);
+ }
+ if (message.end !== 0) {
+ obj.end = Math.round(message.end);
+ }
+ if (message.options !== undefined) {
+ obj.options = ExtensionRangeOptions.toJSON(message.options);
+ }
return obj;
},
create(base?: DeepPartial<DescriptorProto_ExtensionRange>): DescriptorProto_ExtensionRange {
return DescriptorProto_ExtensionRange.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DescriptorProto_ExtensionRange>): DescriptorProto_ExtensionRange {
const message = createBaseDescriptorProto_ExtensionRange();
message.start = object.start ?? 0;
@@ -2065,20 +2064,26 @@ export const DescriptorProto_ReservedRange = {
},
fromJSON(object: any): DescriptorProto_ReservedRange {
- return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 };
+ return {
+ start: isSet(object.start) ? globalThis.Number(object.start) : 0,
+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,
+ };
},
toJSON(message: DescriptorProto_ReservedRange): unknown {
const obj: any = {};
- message.start !== undefined && (obj.start = Math.round(message.start));
- message.end !== undefined && (obj.end = Math.round(message.end));
+ if (message.start !== 0) {
+ obj.start = Math.round(message.start);
+ }
+ if (message.end !== 0) {
+ obj.end = Math.round(message.end);
+ }
return obj;
},
create(base?: DeepPartial<DescriptorProto_ReservedRange>): DescriptorProto_ReservedRange {
return DescriptorProto_ReservedRange.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DescriptorProto_ReservedRange>): DescriptorProto_ReservedRange {
const message = createBaseDescriptorProto_ReservedRange();
message.start = object.start ?? 0;
@@ -2124,7 +2129,7 @@ export const ExtensionRangeOptions = {
fromJSON(object: any): ExtensionRangeOptions {
return {
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -2132,10 +2137,8 @@ export const ExtensionRangeOptions = {
toJSON(message: ExtensionRangeOptions): unknown {
const obj: any = {};
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -2143,7 +2146,6 @@ export const ExtensionRangeOptions = {
create(base?: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {
return ExtensionRangeOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {
const message = createBaseExtensionRangeOptions();
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
@@ -2300,40 +2302,61 @@ export const FieldDescriptorProto = {
fromJSON(object: any): FieldDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- number: isSet(object.number) ? Number(object.number) : 0,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ number: isSet(object.number) ? globalThis.Number(object.number) : 0,
label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1,
type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1,
- typeName: isSet(object.typeName) ? String(object.typeName) : "",
- extendee: isSet(object.extendee) ? String(object.extendee) : "",
- defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "",
- oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0,
- jsonName: isSet(object.jsonName) ? String(object.jsonName) : "",
+ typeName: isSet(object.typeName) ? globalThis.String(object.typeName) : "",
+ extendee: isSet(object.extendee) ? globalThis.String(object.extendee) : "",
+ defaultValue: isSet(object.defaultValue) ? globalThis.String(object.defaultValue) : "",
+ oneofIndex: isSet(object.oneofIndex) ? globalThis.Number(object.oneofIndex) : 0,
+ jsonName: isSet(object.jsonName) ? globalThis.String(object.jsonName) : "",
options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined,
- proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false,
+ proto3Optional: isSet(object.proto3Optional) ? globalThis.Boolean(object.proto3Optional) : false,
};
},
toJSON(message: FieldDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.number !== undefined && (obj.number = Math.round(message.number));
- message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label));
- message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type));
- message.typeName !== undefined && (obj.typeName = message.typeName);
- message.extendee !== undefined && (obj.extendee = message.extendee);
- message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);
- message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex));
- message.jsonName !== undefined && (obj.jsonName = message.jsonName);
- message.options !== undefined && (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined);
- message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.number !== 0) {
+ obj.number = Math.round(message.number);
+ }
+ if (message.label !== 1) {
+ obj.label = fieldDescriptorProto_LabelToJSON(message.label);
+ }
+ if (message.type !== 1) {
+ obj.type = fieldDescriptorProto_TypeToJSON(message.type);
+ }
+ if (message.typeName !== "") {
+ obj.typeName = message.typeName;
+ }
+ if (message.extendee !== "") {
+ obj.extendee = message.extendee;
+ }
+ if (message.defaultValue !== "") {
+ obj.defaultValue = message.defaultValue;
+ }
+ if (message.oneofIndex !== 0) {
+ obj.oneofIndex = Math.round(message.oneofIndex);
+ }
+ if (message.jsonName !== "") {
+ obj.jsonName = message.jsonName;
+ }
+ if (message.options !== undefined) {
+ obj.options = FieldOptions.toJSON(message.options);
+ }
+ if (message.proto3Optional === true) {
+ obj.proto3Optional = message.proto3Optional;
+ }
return obj;
},
create(base?: DeepPartial<FieldDescriptorProto>): FieldDescriptorProto {
return FieldDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FieldDescriptorProto>): FieldDescriptorProto {
const message = createBaseFieldDescriptorProto();
message.name = object.name ?? "";
@@ -2400,22 +2423,25 @@ export const OneofDescriptorProto = {
fromJSON(object: any): OneofDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined,
};
},
toJSON(message: OneofDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.options !== undefined && (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.options !== undefined) {
+ obj.options = OneofOptions.toJSON(message.options);
+ }
return obj;
},
create(base?: DeepPartial<OneofDescriptorProto>): OneofDescriptorProto {
return OneofDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OneofDescriptorProto>): OneofDescriptorProto {
const message = createBaseOneofDescriptorProto();
message.name = object.name ?? "";
@@ -2503,36 +2529,36 @@ export const EnumDescriptorProto = {
fromJSON(object: any): EnumDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ value: globalThis.Array.isArray(object?.value)
+ ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e))
+ : [],
options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined,
- reservedRange: Array.isArray(object?.reservedRange)
+ reservedRange: globalThis.Array.isArray(object?.reservedRange)
? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e))
: [],
- reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [],
+ reservedName: globalThis.Array.isArray(object?.reservedName)
+ ? object.reservedName.map((e: any) => globalThis.String(e))
+ : [],
};
},
toJSON(message: EnumDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.value) {
- obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.value = [];
- }
- message.options !== undefined && (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined);
- if (message.reservedRange) {
- obj.reservedRange = message.reservedRange.map((e) =>
- e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined
- );
- } else {
- obj.reservedRange = [];
- }
- if (message.reservedName) {
- obj.reservedName = message.reservedName.map((e) => e);
- } else {
- obj.reservedName = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.value?.length) {
+ obj.value = message.value.map((e) => EnumValueDescriptorProto.toJSON(e));
+ }
+ if (message.options !== undefined) {
+ obj.options = EnumOptions.toJSON(message.options);
+ }
+ if (message.reservedRange?.length) {
+ obj.reservedRange = message.reservedRange.map((e) => EnumDescriptorProto_EnumReservedRange.toJSON(e));
+ }
+ if (message.reservedName?.length) {
+ obj.reservedName = message.reservedName;
}
return obj;
},
@@ -2540,7 +2566,6 @@ export const EnumDescriptorProto = {
create(base?: DeepPartial<EnumDescriptorProto>): EnumDescriptorProto {
return EnumDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<EnumDescriptorProto>): EnumDescriptorProto {
const message = createBaseEnumDescriptorProto();
message.name = object.name ?? "";
@@ -2601,20 +2626,26 @@ export const EnumDescriptorProto_EnumReservedRange = {
},
fromJSON(object: any): EnumDescriptorProto_EnumReservedRange {
- return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 };
+ return {
+ start: isSet(object.start) ? globalThis.Number(object.start) : 0,
+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,
+ };
},
toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown {
const obj: any = {};
- message.start !== undefined && (obj.start = Math.round(message.start));
- message.end !== undefined && (obj.end = Math.round(message.end));
+ if (message.start !== 0) {
+ obj.start = Math.round(message.start);
+ }
+ if (message.end !== 0) {
+ obj.end = Math.round(message.end);
+ }
return obj;
},
create(base?: DeepPartial<EnumDescriptorProto_EnumReservedRange>): EnumDescriptorProto_EnumReservedRange {
return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<EnumDescriptorProto_EnumReservedRange>): EnumDescriptorProto_EnumReservedRange {
const message = createBaseEnumDescriptorProto_EnumReservedRange();
message.start = object.start ?? 0;
@@ -2680,25 +2711,29 @@ export const EnumValueDescriptorProto = {
fromJSON(object: any): EnumValueDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- number: isSet(object.number) ? Number(object.number) : 0,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ number: isSet(object.number) ? globalThis.Number(object.number) : 0,
options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined,
};
},
toJSON(message: EnumValueDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.number !== undefined && (obj.number = Math.round(message.number));
- message.options !== undefined &&
- (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.number !== 0) {
+ obj.number = Math.round(message.number);
+ }
+ if (message.options !== undefined) {
+ obj.options = EnumValueOptions.toJSON(message.options);
+ }
return obj;
},
create(base?: DeepPartial<EnumValueDescriptorProto>): EnumValueDescriptorProto {
return EnumValueDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<EnumValueDescriptorProto>): EnumValueDescriptorProto {
const message = createBaseEnumValueDescriptorProto();
message.name = object.name ?? "";
@@ -2767,29 +2802,31 @@ export const ServiceDescriptorProto = {
fromJSON(object: any): ServiceDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ method: globalThis.Array.isArray(object?.method)
+ ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e))
+ : [],
options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined,
};
},
toJSON(message: ServiceDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.method) {
- obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined);
- } else {
- obj.method = [];
- }
- message.options !== undefined &&
- (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.method?.length) {
+ obj.method = message.method.map((e) => MethodDescriptorProto.toJSON(e));
+ }
+ if (message.options !== undefined) {
+ obj.options = ServiceOptions.toJSON(message.options);
+ }
return obj;
},
create(base?: DeepPartial<ServiceDescriptorProto>): ServiceDescriptorProto {
return ServiceDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ServiceDescriptorProto>): ServiceDescriptorProto {
const message = createBaseServiceDescriptorProto();
message.name = object.name ?? "";
@@ -2895,31 +2932,41 @@ export const MethodDescriptorProto = {
fromJSON(object: any): MethodDescriptorProto {
return {
- name: isSet(object.name) ? String(object.name) : "",
- inputType: isSet(object.inputType) ? String(object.inputType) : "",
- outputType: isSet(object.outputType) ? String(object.outputType) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ inputType: isSet(object.inputType) ? globalThis.String(object.inputType) : "",
+ outputType: isSet(object.outputType) ? globalThis.String(object.outputType) : "",
options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined,
- clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false,
- serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false,
+ clientStreaming: isSet(object.clientStreaming) ? globalThis.Boolean(object.clientStreaming) : false,
+ serverStreaming: isSet(object.serverStreaming) ? globalThis.Boolean(object.serverStreaming) : false,
};
},
toJSON(message: MethodDescriptorProto): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.inputType !== undefined && (obj.inputType = message.inputType);
- message.outputType !== undefined && (obj.outputType = message.outputType);
- message.options !== undefined &&
- (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined);
- message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming);
- message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.inputType !== "") {
+ obj.inputType = message.inputType;
+ }
+ if (message.outputType !== "") {
+ obj.outputType = message.outputType;
+ }
+ if (message.options !== undefined) {
+ obj.options = MethodOptions.toJSON(message.options);
+ }
+ if (message.clientStreaming === true) {
+ obj.clientStreaming = message.clientStreaming;
+ }
+ if (message.serverStreaming === true) {
+ obj.serverStreaming = message.serverStreaming;
+ }
return obj;
},
create(base?: DeepPartial<MethodDescriptorProto>): MethodDescriptorProto {
return MethodDescriptorProto.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MethodDescriptorProto>): MethodDescriptorProto {
const message = createBaseMethodDescriptorProto();
message.name = object.name ?? "";
@@ -3193,29 +3240,29 @@ export const FileOptions = {
fromJSON(object: any): FileOptions {
return {
- javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "",
- javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "",
- javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false,
+ javaPackage: isSet(object.javaPackage) ? globalThis.String(object.javaPackage) : "",
+ javaOuterClassname: isSet(object.javaOuterClassname) ? globalThis.String(object.javaOuterClassname) : "",
+ javaMultipleFiles: isSet(object.javaMultipleFiles) ? globalThis.Boolean(object.javaMultipleFiles) : false,
javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash)
- ? Boolean(object.javaGenerateEqualsAndHash)
+ ? globalThis.Boolean(object.javaGenerateEqualsAndHash)
: false,
- javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false,
+ javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? globalThis.Boolean(object.javaStringCheckUtf8) : false,
optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1,
- goPackage: isSet(object.goPackage) ? String(object.goPackage) : "",
- ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false,
- javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false,
- pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false,
- phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false,
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
- ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false,
- objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "",
- csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "",
- swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "",
- phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "",
- phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "",
- phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "",
- rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "",
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ goPackage: isSet(object.goPackage) ? globalThis.String(object.goPackage) : "",
+ ccGenericServices: isSet(object.ccGenericServices) ? globalThis.Boolean(object.ccGenericServices) : false,
+ javaGenericServices: isSet(object.javaGenericServices) ? globalThis.Boolean(object.javaGenericServices) : false,
+ pyGenericServices: isSet(object.pyGenericServices) ? globalThis.Boolean(object.pyGenericServices) : false,
+ phpGenericServices: isSet(object.phpGenericServices) ? globalThis.Boolean(object.phpGenericServices) : false,
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
+ ccEnableArenas: isSet(object.ccEnableArenas) ? globalThis.Boolean(object.ccEnableArenas) : false,
+ objcClassPrefix: isSet(object.objcClassPrefix) ? globalThis.String(object.objcClassPrefix) : "",
+ csharpNamespace: isSet(object.csharpNamespace) ? globalThis.String(object.csharpNamespace) : "",
+ swiftPrefix: isSet(object.swiftPrefix) ? globalThis.String(object.swiftPrefix) : "",
+ phpClassPrefix: isSet(object.phpClassPrefix) ? globalThis.String(object.phpClassPrefix) : "",
+ phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "",
+ phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "",
+ rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "",
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3223,31 +3270,68 @@ export const FileOptions = {
toJSON(message: FileOptions): unknown {
const obj: any = {};
- message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage);
- message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname);
- message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles);
- message.javaGenerateEqualsAndHash !== undefined &&
- (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash);
- message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8);
- message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor));
- message.goPackage !== undefined && (obj.goPackage = message.goPackage);
- message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices);
- message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices);
- message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices);
- message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices);
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas);
- message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix);
- message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace);
- message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix);
- message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix);
- message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace);
- message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace);
- message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage);
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.javaPackage !== "") {
+ obj.javaPackage = message.javaPackage;
+ }
+ if (message.javaOuterClassname !== "") {
+ obj.javaOuterClassname = message.javaOuterClassname;
+ }
+ if (message.javaMultipleFiles === true) {
+ obj.javaMultipleFiles = message.javaMultipleFiles;
+ }
+ if (message.javaGenerateEqualsAndHash === true) {
+ obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;
+ }
+ if (message.javaStringCheckUtf8 === true) {
+ obj.javaStringCheckUtf8 = message.javaStringCheckUtf8;
+ }
+ if (message.optimizeFor !== 1) {
+ obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor);
+ }
+ if (message.goPackage !== "") {
+ obj.goPackage = message.goPackage;
+ }
+ if (message.ccGenericServices === true) {
+ obj.ccGenericServices = message.ccGenericServices;
+ }
+ if (message.javaGenericServices === true) {
+ obj.javaGenericServices = message.javaGenericServices;
+ }
+ if (message.pyGenericServices === true) {
+ obj.pyGenericServices = message.pyGenericServices;
+ }
+ if (message.phpGenericServices === true) {
+ obj.phpGenericServices = message.phpGenericServices;
+ }
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.ccEnableArenas === true) {
+ obj.ccEnableArenas = message.ccEnableArenas;
+ }
+ if (message.objcClassPrefix !== "") {
+ obj.objcClassPrefix = message.objcClassPrefix;
+ }
+ if (message.csharpNamespace !== "") {
+ obj.csharpNamespace = message.csharpNamespace;
+ }
+ if (message.swiftPrefix !== "") {
+ obj.swiftPrefix = message.swiftPrefix;
+ }
+ if (message.phpClassPrefix !== "") {
+ obj.phpClassPrefix = message.phpClassPrefix;
+ }
+ if (message.phpNamespace !== "") {
+ obj.phpNamespace = message.phpNamespace;
+ }
+ if (message.phpMetadataNamespace !== "") {
+ obj.phpMetadataNamespace = message.phpMetadataNamespace;
+ }
+ if (message.rubyPackage !== "") {
+ obj.rubyPackage = message.rubyPackage;
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3255,7 +3339,6 @@ export const FileOptions = {
create(base?: DeepPartial<FileOptions>): FileOptions {
return FileOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FileOptions>): FileOptions {
const message = createBaseFileOptions();
message.javaPackage = object.javaPackage ?? "";
@@ -3377,16 +3460,18 @@ export const MessageOptions = {
fromJSON(object: any): MessageOptions {
return {
- messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false,
+ messageSetWireFormat: isSet(object.messageSetWireFormat)
+ ? globalThis.Boolean(object.messageSetWireFormat)
+ : false,
noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor)
- ? Boolean(object.noStandardDescriptorAccessor)
+ ? globalThis.Boolean(object.noStandardDescriptorAccessor)
: false,
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
- mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
+ mapEntry: isSet(object.mapEntry) ? globalThis.Boolean(object.mapEntry) : false,
deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
- ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
+ ? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts)
: false,
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3394,17 +3479,23 @@ export const MessageOptions = {
toJSON(message: MessageOptions): unknown {
const obj: any = {};
- message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat);
- message.noStandardDescriptorAccessor !== undefined &&
- (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);
- message.deprecatedLegacyJsonFieldConflicts !== undefined &&
- (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.messageSetWireFormat === true) {
+ obj.messageSetWireFormat = message.messageSetWireFormat;
+ }
+ if (message.noStandardDescriptorAccessor === true) {
+ obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;
+ }
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.mapEntry === true) {
+ obj.mapEntry = message.mapEntry;
+ }
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
+ obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3412,7 +3503,6 @@ export const MessageOptions = {
create(base?: DeepPartial<MessageOptions>): MessageOptions {
return MessageOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MessageOptions>): MessageOptions {
const message = createBaseMessageOptions();
message.messageSetWireFormat = object.messageSetWireFormat ?? false;
@@ -3575,16 +3665,16 @@ export const FieldOptions = {
fromJSON(object: any): FieldOptions {
return {
ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0,
- packed: isSet(object.packed) ? Boolean(object.packed) : false,
+ packed: isSet(object.packed) ? globalThis.Boolean(object.packed) : false,
jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0,
- lazy: isSet(object.lazy) ? Boolean(object.lazy) : false,
- unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
- weak: isSet(object.weak) ? Boolean(object.weak) : false,
- debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,
+ lazy: isSet(object.lazy) ? globalThis.Boolean(object.lazy) : false,
+ unverifiedLazy: isSet(object.unverifiedLazy) ? globalThis.Boolean(object.unverifiedLazy) : false,
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
+ weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false,
+ debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,
retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,
target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3592,20 +3682,38 @@ export const FieldOptions = {
toJSON(message: FieldOptions): unknown {
const obj: any = {};
- message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype));
- message.packed !== undefined && (obj.packed = message.packed);
- message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype));
- message.lazy !== undefined && (obj.lazy = message.lazy);
- message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- message.weak !== undefined && (obj.weak = message.weak);
- message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);
- message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));
- message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.ctype !== 0) {
+ obj.ctype = fieldOptions_CTypeToJSON(message.ctype);
+ }
+ if (message.packed === true) {
+ obj.packed = message.packed;
+ }
+ if (message.jstype !== 0) {
+ obj.jstype = fieldOptions_JSTypeToJSON(message.jstype);
+ }
+ if (message.lazy === true) {
+ obj.lazy = message.lazy;
+ }
+ if (message.unverifiedLazy === true) {
+ obj.unverifiedLazy = message.unverifiedLazy;
+ }
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.weak === true) {
+ obj.weak = message.weak;
+ }
+ if (message.debugRedact === true) {
+ obj.debugRedact = message.debugRedact;
+ }
+ if (message.retention !== 0) {
+ obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);
+ }
+ if (message.target !== 0) {
+ obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3613,7 +3721,6 @@ export const FieldOptions = {
create(base?: DeepPartial<FieldOptions>): FieldOptions {
return FieldOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FieldOptions>): FieldOptions {
const message = createBaseFieldOptions();
message.ctype = object.ctype ?? 0;
@@ -3668,7 +3775,7 @@ export const OneofOptions = {
fromJSON(object: any): OneofOptions {
return {
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3676,10 +3783,8 @@ export const OneofOptions = {
toJSON(message: OneofOptions): unknown {
const obj: any = {};
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3687,7 +3792,6 @@ export const OneofOptions = {
create(base?: DeepPartial<OneofOptions>): OneofOptions {
return OneofOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OneofOptions>): OneofOptions {
const message = createBaseOneofOptions();
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
@@ -3762,12 +3866,12 @@ export const EnumOptions = {
fromJSON(object: any): EnumOptions {
return {
- allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
+ allowAlias: isSet(object.allowAlias) ? globalThis.Boolean(object.allowAlias) : false,
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
- ? Boolean(object.deprecatedLegacyJsonFieldConflicts)
+ ? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts)
: false,
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3775,14 +3879,17 @@ export const EnumOptions = {
toJSON(message: EnumOptions): unknown {
const obj: any = {};
- message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- message.deprecatedLegacyJsonFieldConflicts !== undefined &&
- (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.allowAlias === true) {
+ obj.allowAlias = message.allowAlias;
+ }
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.deprecatedLegacyJsonFieldConflicts === true) {
+ obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3790,7 +3897,6 @@ export const EnumOptions = {
create(base?: DeepPartial<EnumOptions>): EnumOptions {
return EnumOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<EnumOptions>): EnumOptions {
const message = createBaseEnumOptions();
message.allowAlias = object.allowAlias ?? false;
@@ -3848,8 +3954,8 @@ export const EnumValueOptions = {
fromJSON(object: any): EnumValueOptions {
return {
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3857,11 +3963,11 @@ export const EnumValueOptions = {
toJSON(message: EnumValueOptions): unknown {
const obj: any = {};
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3869,7 +3975,6 @@ export const EnumValueOptions = {
create(base?: DeepPartial<EnumValueOptions>): EnumValueOptions {
return EnumValueOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions {
const message = createBaseEnumValueOptions();
message.deprecated = object.deprecated ?? false;
@@ -3925,8 +4030,8 @@ export const ServiceOptions = {
fromJSON(object: any): ServiceOptions {
return {
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -3934,11 +4039,11 @@ export const ServiceOptions = {
toJSON(message: ServiceOptions): unknown {
const obj: any = {};
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -3946,7 +4051,6 @@ export const ServiceOptions = {
create(base?: DeepPartial<ServiceOptions>): ServiceOptions {
return ServiceOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions {
const message = createBaseServiceOptions();
message.deprecated = object.deprecated ?? false;
@@ -4012,11 +4116,11 @@ export const MethodOptions = {
fromJSON(object: any): MethodOptions {
return {
- deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
idempotencyLevel: isSet(object.idempotencyLevel)
? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel)
: 0,
- uninterpretedOption: Array.isArray(object?.uninterpretedOption)
+ uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
};
@@ -4024,13 +4128,14 @@ export const MethodOptions = {
toJSON(message: MethodOptions): unknown {
const obj: any = {};
- message.deprecated !== undefined && (obj.deprecated = message.deprecated);
- message.idempotencyLevel !== undefined &&
- (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel));
- if (message.uninterpretedOption) {
- obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);
- } else {
- obj.uninterpretedOption = [];
+ if (message.deprecated === true) {
+ obj.deprecated = message.deprecated;
+ }
+ if (message.idempotencyLevel !== 0) {
+ obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);
+ }
+ if (message.uninterpretedOption?.length) {
+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
return obj;
},
@@ -4038,7 +4143,6 @@ export const MethodOptions = {
create(base?: DeepPartial<MethodOptions>): MethodOptions {
return MethodOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MethodOptions>): MethodOptions {
const message = createBaseMethodOptions();
message.deprecated = object.deprecated ?? false;
@@ -4153,39 +4257,47 @@ export const UninterpretedOption = {
fromJSON(object: any): UninterpretedOption {
return {
- name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [],
- identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "",
+ name: globalThis.Array.isArray(object?.name)
+ ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e))
+ : [],
+ identifierValue: isSet(object.identifierValue) ? globalThis.String(object.identifierValue) : "",
positiveIntValue: isSet(object.positiveIntValue) ? Long.fromValue(object.positiveIntValue) : Long.UZERO,
negativeIntValue: isSet(object.negativeIntValue) ? Long.fromValue(object.negativeIntValue) : Long.ZERO,
- doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0,
+ doubleValue: isSet(object.doubleValue) ? globalThis.Number(object.doubleValue) : 0,
stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(0),
- aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "",
+ aggregateValue: isSet(object.aggregateValue) ? globalThis.String(object.aggregateValue) : "",
};
},
toJSON(message: UninterpretedOption): unknown {
const obj: any = {};
- if (message.name) {
- obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined);
- } else {
- obj.name = [];
- }
- message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue);
- message.positiveIntValue !== undefined &&
- (obj.positiveIntValue = (message.positiveIntValue || Long.UZERO).toString());
- message.negativeIntValue !== undefined &&
- (obj.negativeIntValue = (message.negativeIntValue || Long.ZERO).toString());
- message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);
- message.stringValue !== undefined &&
- (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : new Uint8Array(0)));
- message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue);
+ if (message.name?.length) {
+ obj.name = message.name.map((e) => UninterpretedOption_NamePart.toJSON(e));
+ }
+ if (message.identifierValue !== "") {
+ obj.identifierValue = message.identifierValue;
+ }
+ if (!message.positiveIntValue.isZero()) {
+ obj.positiveIntValue = (message.positiveIntValue || Long.UZERO).toString();
+ }
+ if (!message.negativeIntValue.isZero()) {
+ obj.negativeIntValue = (message.negativeIntValue || Long.ZERO).toString();
+ }
+ if (message.doubleValue !== 0) {
+ obj.doubleValue = message.doubleValue;
+ }
+ if (message.stringValue.length !== 0) {
+ obj.stringValue = base64FromBytes(message.stringValue);
+ }
+ if (message.aggregateValue !== "") {
+ obj.aggregateValue = message.aggregateValue;
+ }
return obj;
},
create(base?: DeepPartial<UninterpretedOption>): UninterpretedOption {
return UninterpretedOption.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UninterpretedOption>): UninterpretedOption {
const message = createBaseUninterpretedOption();
message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || [];
@@ -4250,22 +4362,25 @@ export const UninterpretedOption_NamePart = {
fromJSON(object: any): UninterpretedOption_NamePart {
return {
- namePart: isSet(object.namePart) ? String(object.namePart) : "",
- isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false,
+ namePart: isSet(object.namePart) ? globalThis.String(object.namePart) : "",
+ isExtension: isSet(object.isExtension) ? globalThis.Boolean(object.isExtension) : false,
};
},
toJSON(message: UninterpretedOption_NamePart): unknown {
const obj: any = {};
- message.namePart !== undefined && (obj.namePart = message.namePart);
- message.isExtension !== undefined && (obj.isExtension = message.isExtension);
+ if (message.namePart !== "") {
+ obj.namePart = message.namePart;
+ }
+ if (message.isExtension === true) {
+ obj.isExtension = message.isExtension;
+ }
return obj;
},
create(base?: DeepPartial<UninterpretedOption_NamePart>): UninterpretedOption_NamePart {
return UninterpretedOption_NamePart.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UninterpretedOption_NamePart>): UninterpretedOption_NamePart {
const message = createBaseUninterpretedOption_NamePart();
message.namePart = object.namePart ?? "";
@@ -4311,7 +4426,7 @@ export const SourceCodeInfo = {
fromJSON(object: any): SourceCodeInfo {
return {
- location: Array.isArray(object?.location)
+ location: globalThis.Array.isArray(object?.location)
? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e))
: [],
};
@@ -4319,10 +4434,8 @@ export const SourceCodeInfo = {
toJSON(message: SourceCodeInfo): unknown {
const obj: any = {};
- if (message.location) {
- obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined);
- } else {
- obj.location = [];
+ if (message.location?.length) {
+ obj.location = message.location.map((e) => SourceCodeInfo_Location.toJSON(e));
}
return obj;
},
@@ -4330,7 +4443,6 @@ export const SourceCodeInfo = {
create(base?: DeepPartial<SourceCodeInfo>): SourceCodeInfo {
return SourceCodeInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourceCodeInfo>): SourceCodeInfo {
const message = createBaseSourceCodeInfo();
message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || [];
@@ -4439,34 +4551,32 @@ export const SourceCodeInfo_Location = {
fromJSON(object: any): SourceCodeInfo_Location {
return {
- path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [],
- span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [],
- leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "",
- trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "",
- leadingDetachedComments: Array.isArray(object?.leadingDetachedComments)
- ? object.leadingDetachedComments.map((e: any) => String(e))
+ path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [],
+ span: globalThis.Array.isArray(object?.span) ? object.span.map((e: any) => globalThis.Number(e)) : [],
+ leadingComments: isSet(object.leadingComments) ? globalThis.String(object.leadingComments) : "",
+ trailingComments: isSet(object.trailingComments) ? globalThis.String(object.trailingComments) : "",
+ leadingDetachedComments: globalThis.Array.isArray(object?.leadingDetachedComments)
+ ? object.leadingDetachedComments.map((e: any) => globalThis.String(e))
: [],
};
},
toJSON(message: SourceCodeInfo_Location): unknown {
const obj: any = {};
- if (message.path) {
+ if (message.path?.length) {
obj.path = message.path.map((e) => Math.round(e));
- } else {
- obj.path = [];
}
- if (message.span) {
+ if (message.span?.length) {
obj.span = message.span.map((e) => Math.round(e));
- } else {
- obj.span = [];
}
- message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments);
- message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments);
- if (message.leadingDetachedComments) {
- obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e);
- } else {
- obj.leadingDetachedComments = [];
+ if (message.leadingComments !== "") {
+ obj.leadingComments = message.leadingComments;
+ }
+ if (message.trailingComments !== "") {
+ obj.trailingComments = message.trailingComments;
+ }
+ if (message.leadingDetachedComments?.length) {
+ obj.leadingDetachedComments = message.leadingDetachedComments;
}
return obj;
},
@@ -4474,7 +4584,6 @@ export const SourceCodeInfo_Location = {
create(base?: DeepPartial<SourceCodeInfo_Location>): SourceCodeInfo_Location {
return SourceCodeInfo_Location.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourceCodeInfo_Location>): SourceCodeInfo_Location {
const message = createBaseSourceCodeInfo_Location();
message.path = object.path?.map((e) => e) || [];
@@ -4523,7 +4632,7 @@ export const GeneratedCodeInfo = {
fromJSON(object: any): GeneratedCodeInfo {
return {
- annotation: Array.isArray(object?.annotation)
+ annotation: globalThis.Array.isArray(object?.annotation)
? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e))
: [],
};
@@ -4531,10 +4640,8 @@ export const GeneratedCodeInfo = {
toJSON(message: GeneratedCodeInfo): unknown {
const obj: any = {};
- if (message.annotation) {
- obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined);
- } else {
- obj.annotation = [];
+ if (message.annotation?.length) {
+ obj.annotation = message.annotation.map((e) => GeneratedCodeInfo_Annotation.toJSON(e));
}
return obj;
},
@@ -4542,7 +4649,6 @@ export const GeneratedCodeInfo = {
create(base?: DeepPartial<GeneratedCodeInfo>): GeneratedCodeInfo {
return GeneratedCodeInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GeneratedCodeInfo>): GeneratedCodeInfo {
const message = createBaseGeneratedCodeInfo();
message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || [];
@@ -4639,32 +4745,37 @@ export const GeneratedCodeInfo_Annotation = {
fromJSON(object: any): GeneratedCodeInfo_Annotation {
return {
- path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [],
- sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",
- begin: isSet(object.begin) ? Number(object.begin) : 0,
- end: isSet(object.end) ? Number(object.end) : 0,
+ path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [],
+ sourceFile: isSet(object.sourceFile) ? globalThis.String(object.sourceFile) : "",
+ begin: isSet(object.begin) ? globalThis.Number(object.begin) : 0,
+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,
semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,
};
},
toJSON(message: GeneratedCodeInfo_Annotation): unknown {
const obj: any = {};
- if (message.path) {
+ if (message.path?.length) {
obj.path = message.path.map((e) => Math.round(e));
- } else {
- obj.path = [];
}
- message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);
- message.begin !== undefined && (obj.begin = Math.round(message.begin));
- message.end !== undefined && (obj.end = Math.round(message.end));
- message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));
+ if (message.sourceFile !== "") {
+ obj.sourceFile = message.sourceFile;
+ }
+ if (message.begin !== 0) {
+ obj.begin = Math.round(message.begin);
+ }
+ if (message.end !== 0) {
+ obj.end = Math.round(message.end);
+ }
+ if (message.semantic !== 0) {
+ obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic);
+ }
return obj;
},
create(base?: DeepPartial<GeneratedCodeInfo_Annotation>): GeneratedCodeInfo_Annotation {
return GeneratedCodeInfo_Annotation.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GeneratedCodeInfo_Annotation>): GeneratedCodeInfo_Annotation {
const message = createBaseGeneratedCodeInfo_Annotation();
message.path = object.path?.map((e) => e) || [];
@@ -4676,30 +4787,11 @@ export const GeneratedCodeInfo_Annotation = {
},
};
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
function bytesFromBase64(b64: string): Uint8Array {
- if (tsProtoGlobalThis.Buffer) {
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
- const bin = tsProtoGlobalThis.atob(b64);
+ const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
@@ -4709,21 +4801,21 @@ function bytesFromBase64(b64: string): Uint8Array {
}
function base64FromBytes(arr: Uint8Array): string {
- if (tsProtoGlobalThis.Buffer) {
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
- bin.push(String.fromCharCode(byte));
+ bin.push(globalThis.String.fromCharCode(byte));
});
- return tsProtoGlobalThis.btoa(bin.join(""));
+ return globalThis.btoa(bin.join(""));
}
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/duration.ts b/frontend/src/types/proto/google/protobuf/duration.ts
index 81da59e2cb..1f149731af 100644
--- a/frontend/src/types/proto/google/protobuf/duration.ts
+++ b/frontend/src/types/proto/google/protobuf/duration.ts
@@ -130,21 +130,24 @@ export const Duration = {
fromJSON(object: any): Duration {
return {
seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO,
- nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
};
},
toJSON(message: Duration): unknown {
const obj: any = {};
- message.seconds !== undefined && (obj.seconds = (message.seconds || Long.ZERO).toString());
- message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
+ if (!message.seconds.isZero()) {
+ obj.seconds = (message.seconds || Long.ZERO).toString();
+ }
+ if (message.nanos !== 0) {
+ obj.nanos = Math.round(message.nanos);
+ }
return obj;
},
create(base?: DeepPartial<Duration>): Duration {
return Duration.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Duration>): Duration {
const message = createBaseDuration();
message.seconds = (object.seconds !== undefined && object.seconds !== null)
@@ -158,7 +161,7 @@ export const Duration = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/empty.ts b/frontend/src/types/proto/google/protobuf/empty.ts
index 8c48851cd5..10e191f232 100644
--- a/frontend/src/types/proto/google/protobuf/empty.ts
+++ b/frontend/src/types/proto/google/protobuf/empty.ts
@@ -53,7 +53,6 @@ export const Empty = {
create(base?: DeepPartial<Empty>): Empty {
return Empty.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<Empty>): Empty {
const message = createBaseEmpty();
return message;
@@ -63,7 +62,7 @@ export const Empty = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/field_mask.ts b/frontend/src/types/proto/google/protobuf/field_mask.ts
index e513b89bfc..df023e211e 100644
--- a/frontend/src/types/proto/google/protobuf/field_mask.ts
+++ b/frontend/src/types/proto/google/protobuf/field_mask.ts
@@ -246,10 +246,10 @@ export const FieldMask = {
fromJSON(object: any): FieldMask {
return {
- paths: typeof (object) === "string"
- ? object.split(",").filter(Boolean)
- : Array.isArray(object?.paths)
- ? object.paths.map(String)
+ paths: typeof object === "string"
+ ? object.split(",").filter(globalThis.Boolean)
+ : globalThis.Array.isArray(object?.paths)
+ ? object.paths.map(globalThis.String)
: [],
};
},
@@ -261,7 +261,6 @@ export const FieldMask = {
create(base?: DeepPartial<FieldMask>): FieldMask {
return FieldMask.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FieldMask>): FieldMask {
const message = createBaseFieldMask();
message.paths = object.paths?.map((e) => e) || [];
@@ -282,7 +281,7 @@ export const FieldMask = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.ts
index 97cae05154..dbdf7a289a 100644
--- a/frontend/src/types/proto/google/protobuf/struct.ts
+++ b/frontend/src/types/proto/google/protobuf/struct.ts
@@ -154,11 +154,14 @@ export const Struct = {
toJSON(message: Struct): unknown {
const obj: any = {};
- obj.fields = {};
if (message.fields) {
- Object.entries(message.fields).forEach(([k, v]) => {
- obj.fields[k] = v;
- });
+ const entries = Object.entries(message.fields);
+ if (entries.length > 0) {
+ obj.fields = {};
+ entries.forEach(([k, v]) => {
+ obj.fields[k] = v;
+ });
+ }
}
return obj;
},
@@ -166,7 +169,6 @@ export const Struct = {
create(base?: DeepPartial<Struct>): Struct {
return Struct.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Struct>): Struct {
const message = createBaseStruct();
message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: any | undefined }>(
@@ -248,20 +250,26 @@ export const Struct_FieldsEntry = {
},
fromJSON(object: any): Struct_FieldsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object?.value) ? object.value : undefined };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object?.value) ? object.value : undefined,
+ };
},
toJSON(message: Struct_FieldsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== undefined) {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<Struct_FieldsEntry>): Struct_FieldsEntry {
return Struct_FieldsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Struct_FieldsEntry>): Struct_FieldsEntry {
const message = createBaseStruct_FieldsEntry();
message.key = object.key ?? "";
@@ -365,30 +373,40 @@ export const Value = {
fromJSON(object: any): Value {
return {
nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined,
- numberValue: isSet(object.numberValue) ? Number(object.numberValue) : undefined,
- stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined,
- boolValue: isSet(object.boolValue) ? Boolean(object.boolValue) : undefined,
+ numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : undefined,
+ stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
+ boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined,
structValue: isObject(object.structValue) ? object.structValue : undefined,
- listValue: Array.isArray(object.listValue) ? [...object.listValue] : undefined,
+ listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : undefined,
};
},
toJSON(message: Value): unknown {
const obj: any = {};
- message.nullValue !== undefined &&
- (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);
- message.numberValue !== undefined && (obj.numberValue = message.numberValue);
- message.stringValue !== undefined && (obj.stringValue = message.stringValue);
- message.boolValue !== undefined && (obj.boolValue = message.boolValue);
- message.structValue !== undefined && (obj.structValue = message.structValue);
- message.listValue !== undefined && (obj.listValue = message.listValue);
+ if (message.nullValue !== undefined) {
+ obj.nullValue = nullValueToJSON(message.nullValue);
+ }
+ if (message.numberValue !== undefined) {
+ obj.numberValue = message.numberValue;
+ }
+ if (message.stringValue !== undefined) {
+ obj.stringValue = message.stringValue;
+ }
+ if (message.boolValue !== undefined) {
+ obj.boolValue = message.boolValue;
+ }
+ if (message.structValue !== undefined) {
+ obj.structValue = message.structValue;
+ }
+ if (message.listValue !== undefined) {
+ obj.listValue = message.listValue;
+ }
return obj;
},
create(base?: DeepPartial<Value>): Value {
return Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Value>): Value {
const message = createBaseValue();
message.nullValue = object.nullValue ?? undefined;
@@ -410,7 +428,7 @@ export const Value = {
result.numberValue = value;
} else if (typeof value === "string") {
result.stringValue = value;
- } else if (Array.isArray(value)) {
+ } else if (globalThis.Array.isArray(value)) {
result.listValue = value;
} else if (typeof value === "object") {
result.structValue = value;
@@ -474,15 +492,13 @@ export const ListValue = {
},
fromJSON(object: any): ListValue {
- return { values: Array.isArray(object?.values) ? [...object.values] : [] };
+ return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
},
toJSON(message: ListValue): unknown {
const obj: any = {};
- if (message.values) {
- obj.values = message.values.map((e) => e);
- } else {
- obj.values = [];
+ if (message.values?.length) {
+ obj.values = message.values;
}
return obj;
},
@@ -490,7 +506,6 @@ export const ListValue = {
create(base?: DeepPartial<ListValue>): ListValue {
return ListValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListValue>): ListValue {
const message = createBaseListValue();
message.values = object.values?.map((e) => e) || [];
@@ -504,7 +519,7 @@ export const ListValue = {
},
unwrap(message: ListValue): Array<any> {
- if (message?.hasOwnProperty("values") && Array.isArray(message.values)) {
+ if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
return message.values;
} else {
return message as any;
@@ -515,7 +530,7 @@ export const ListValue = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.ts
index a2faf65199..51695e08d0 100644
--- a/frontend/src/types/proto/google/protobuf/timestamp.ts
+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts
@@ -159,21 +159,24 @@ export const Timestamp = {
fromJSON(object: any): Timestamp {
return {
seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO,
- nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
};
},
toJSON(message: Timestamp): unknown {
const obj: any = {};
- message.seconds !== undefined && (obj.seconds = (message.seconds || Long.ZERO).toString());
- message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
+ if (!message.seconds.isZero()) {
+ obj.seconds = (message.seconds || Long.ZERO).toString();
+ }
+ if (message.nanos !== 0) {
+ obj.nanos = Math.round(message.nanos);
+ }
return obj;
},
create(base?: DeepPartial<Timestamp>): Timestamp {
return Timestamp.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Timestamp>): Timestamp {
const message = createBaseTimestamp();
message.seconds = (object.seconds !== undefined && object.seconds !== null)
@@ -187,7 +190,7 @@ export const Timestamp = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/protobuf/wrappers.ts b/frontend/src/types/proto/google/protobuf/wrappers.ts
index f1aa1b49f8..5e836d2016 100644
--- a/frontend/src/types/proto/google/protobuf/wrappers.ts
+++ b/frontend/src/types/proto/google/protobuf/wrappers.ts
@@ -130,19 +130,20 @@ export const DoubleValue = {
},
fromJSON(object: any): DoubleValue {
- return { value: isSet(object.value) ? Number(object.value) : 0 };
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
},
toJSON(message: DoubleValue): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = message.value);
+ if (message.value !== 0) {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<DoubleValue>): DoubleValue {
return DoubleValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DoubleValue>): DoubleValue {
const message = createBaseDoubleValue();
message.value = object.value ?? 0;
@@ -186,19 +187,20 @@ export const FloatValue = {
},
fromJSON(object: any): FloatValue {
- return { value: isSet(object.value) ? Number(object.value) : 0 };
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
},
toJSON(message: FloatValue): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = message.value);
+ if (message.value !== 0) {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<FloatValue>): FloatValue {
return FloatValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FloatValue>): FloatValue {
const message = createBaseFloatValue();
message.value = object.value ?? 0;
@@ -247,14 +249,15 @@ export const Int64Value = {
toJSON(message: Int64Value): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = (message.value || Long.ZERO).toString());
+ if (!message.value.isZero()) {
+ obj.value = (message.value || Long.ZERO).toString();
+ }
return obj;
},
create(base?: DeepPartial<Int64Value>): Int64Value {
return Int64Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Int64Value>): Int64Value {
const message = createBaseInt64Value();
message.value = (object.value !== undefined && object.value !== null) ? Long.fromValue(object.value) : Long.ZERO;
@@ -303,14 +306,15 @@ export const UInt64Value = {
toJSON(message: UInt64Value): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = (message.value || Long.UZERO).toString());
+ if (!message.value.isZero()) {
+ obj.value = (message.value || Long.UZERO).toString();
+ }
return obj;
},
create(base?: DeepPartial<UInt64Value>): UInt64Value {
return UInt64Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UInt64Value>): UInt64Value {
const message = createBaseUInt64Value();
message.value = (object.value !== undefined && object.value !== null) ? Long.fromValue(object.value) : Long.UZERO;
@@ -354,19 +358,20 @@ export const Int32Value = {
},
fromJSON(object: any): Int32Value {
- return { value: isSet(object.value) ? Number(object.value) : 0 };
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
},
toJSON(message: Int32Value): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = Math.round(message.value));
+ if (message.value !== 0) {
+ obj.value = Math.round(message.value);
+ }
return obj;
},
create(base?: DeepPartial<Int32Value>): Int32Value {
return Int32Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Int32Value>): Int32Value {
const message = createBaseInt32Value();
message.value = object.value ?? 0;
@@ -410,19 +415,20 @@ export const UInt32Value = {
},
fromJSON(object: any): UInt32Value {
- return { value: isSet(object.value) ? Number(object.value) : 0 };
+ return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
},
toJSON(message: UInt32Value): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = Math.round(message.value));
+ if (message.value !== 0) {
+ obj.value = Math.round(message.value);
+ }
return obj;
},
create(base?: DeepPartial<UInt32Value>): UInt32Value {
return UInt32Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UInt32Value>): UInt32Value {
const message = createBaseUInt32Value();
message.value = object.value ?? 0;
@@ -466,19 +472,20 @@ export const BoolValue = {
},
fromJSON(object: any): BoolValue {
- return { value: isSet(object.value) ? Boolean(object.value) : false };
+ return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
},
toJSON(message: BoolValue): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = message.value);
+ if (message.value === true) {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<BoolValue>): BoolValue {
return BoolValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BoolValue>): BoolValue {
const message = createBaseBoolValue();
message.value = object.value ?? false;
@@ -522,19 +529,20 @@ export const StringValue = {
},
fromJSON(object: any): StringValue {
- return { value: isSet(object.value) ? String(object.value) : "" };
+ return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
},
toJSON(message: StringValue): unknown {
const obj: any = {};
- message.value !== undefined && (obj.value = message.value);
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<StringValue>): StringValue {
return StringValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<StringValue>): StringValue {
const message = createBaseStringValue();
message.value = object.value ?? "";
@@ -583,15 +591,15 @@ export const BytesValue = {
toJSON(message: BytesValue): unknown {
const obj: any = {};
- message.value !== undefined &&
- (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array(0)));
+ if (message.value.length !== 0) {
+ obj.value = base64FromBytes(message.value);
+ }
return obj;
},
create(base?: DeepPartial<BytesValue>): BytesValue {
return BytesValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BytesValue>): BytesValue {
const message = createBaseBytesValue();
message.value = object.value ?? new Uint8Array(0);
@@ -599,30 +607,11 @@ export const BytesValue = {
},
};
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
function bytesFromBase64(b64: string): Uint8Array {
- if (tsProtoGlobalThis.Buffer) {
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
- const bin = tsProtoGlobalThis.atob(b64);
+ const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
@@ -632,21 +621,21 @@ function bytesFromBase64(b64: string): Uint8Array {
}
function base64FromBytes(arr: Uint8Array): string {
- if (tsProtoGlobalThis.Buffer) {
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
- bin.push(String.fromCharCode(byte));
+ bin.push(globalThis.String.fromCharCode(byte));
});
- return tsProtoGlobalThis.btoa(bin.join(""));
+ return globalThis.btoa(bin.join(""));
}
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/google/type/expr.ts b/frontend/src/types/proto/google/type/expr.ts
index e41861829b..9c200183d1 100644
--- a/frontend/src/types/proto/google/type/expr.ts
+++ b/frontend/src/types/proto/google/type/expr.ts
@@ -128,26 +128,33 @@ export const Expr = {
fromJSON(object: any): Expr {
return {
- expression: isSet(object.expression) ? String(object.expression) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- location: isSet(object.location) ? String(object.location) : "",
+ expression: isSet(object.expression) ? globalThis.String(object.expression) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
};
},
toJSON(message: Expr): unknown {
const obj: any = {};
- message.expression !== undefined && (obj.expression = message.expression);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.location !== undefined && (obj.location = message.location);
+ if (message.expression !== "") {
+ obj.expression = message.expression;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.location !== "") {
+ obj.location = message.location;
+ }
return obj;
},
create(base?: DeepPartial<Expr>): Expr {
return Expr.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Expr>): Expr {
const message = createBaseExpr();
message.expression = object.expression ?? "";
@@ -161,7 +168,7 @@ export const Expr = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/activity.ts b/frontend/src/types/proto/store/activity.ts
index af8c9dff1b..a0a847c1cb 100644
--- a/frontend/src/types/proto/store/activity.ts
+++ b/frontend/src/types/proto/store/activity.ts
@@ -219,19 +219,20 @@ export const ActivityIssueCreatePayload = {
},
fromJSON(object: any): ActivityIssueCreatePayload {
- return { issueName: isSet(object.issueName) ? String(object.issueName) : "" };
+ return { issueName: isSet(object.issueName) ? globalThis.String(object.issueName) : "" };
},
toJSON(message: ActivityIssueCreatePayload): unknown {
const obj: any = {};
- message.issueName !== undefined && (obj.issueName = message.issueName);
+ if (message.issueName !== "") {
+ obj.issueName = message.issueName;
+ }
return obj;
},
create(base?: DeepPartial<ActivityIssueCreatePayload>): ActivityIssueCreatePayload {
return ActivityIssueCreatePayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ActivityIssueCreatePayload>): ActivityIssueCreatePayload {
const message = createBaseActivityIssueCreatePayload();
message.issueName = object.issueName ?? "";
@@ -322,29 +323,32 @@ export const ActivityIssueCommentCreatePayload = {
approvalEvent: isSet(object.approvalEvent)
? ActivityIssueCommentCreatePayload_ApprovalEvent.fromJSON(object.approvalEvent)
: undefined,
- issueName: isSet(object.issueName) ? String(object.issueName) : "",
+ issueName: isSet(object.issueName) ? globalThis.String(object.issueName) : "",
};
},
toJSON(message: ActivityIssueCommentCreatePayload): unknown {
const obj: any = {};
- message.externalApprovalEvent !== undefined && (obj.externalApprovalEvent = message.externalApprovalEvent
- ? ActivityIssueCommentCreatePayload_ExternalApprovalEvent.toJSON(message.externalApprovalEvent)
- : undefined);
- message.taskRollbackBy !== undefined && (obj.taskRollbackBy = message.taskRollbackBy
- ? ActivityIssueCommentCreatePayload_TaskRollbackBy.toJSON(message.taskRollbackBy)
- : undefined);
- message.approvalEvent !== undefined && (obj.approvalEvent = message.approvalEvent
- ? ActivityIssueCommentCreatePayload_ApprovalEvent.toJSON(message.approvalEvent)
- : undefined);
- message.issueName !== undefined && (obj.issueName = message.issueName);
+ if (message.externalApprovalEvent !== undefined) {
+ obj.externalApprovalEvent = ActivityIssueCommentCreatePayload_ExternalApprovalEvent.toJSON(
+ message.externalApprovalEvent,
+ );
+ }
+ if (message.taskRollbackBy !== undefined) {
+ obj.taskRollbackBy = ActivityIssueCommentCreatePayload_TaskRollbackBy.toJSON(message.taskRollbackBy);
+ }
+ if (message.approvalEvent !== undefined) {
+ obj.approvalEvent = ActivityIssueCommentCreatePayload_ApprovalEvent.toJSON(message.approvalEvent);
+ }
+ if (message.issueName !== "") {
+ obj.issueName = message.issueName;
+ }
return obj;
},
create(base?: DeepPartial<ActivityIssueCommentCreatePayload>): ActivityIssueCommentCreatePayload {
return ActivityIssueCommentCreatePayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ActivityIssueCommentCreatePayload>): ActivityIssueCommentCreatePayload {
const message = createBaseActivityIssueCommentCreatePayload();
message.externalApprovalEvent =
@@ -441,12 +445,18 @@ export const ActivityIssueCommentCreatePayload_TaskRollbackBy = {
toJSON(message: ActivityIssueCommentCreatePayload_TaskRollbackBy): unknown {
const obj: any = {};
- message.issueId !== undefined && (obj.issueId = (message.issueId || Long.ZERO).toString());
- message.taskId !== undefined && (obj.taskId = (message.taskId || Long.ZERO).toString());
- message.rollbackByIssueId !== undefined &&
- (obj.rollbackByIssueId = (message.rollbackByIssueId || Long.ZERO).toString());
- message.rollbackByTaskId !== undefined &&
- (obj.rollbackByTaskId = (message.rollbackByTaskId || Long.ZERO).toString());
+ if (!message.issueId.isZero()) {
+ obj.issueId = (message.issueId || Long.ZERO).toString();
+ }
+ if (!message.taskId.isZero()) {
+ obj.taskId = (message.taskId || Long.ZERO).toString();
+ }
+ if (!message.rollbackByIssueId.isZero()) {
+ obj.rollbackByIssueId = (message.rollbackByIssueId || Long.ZERO).toString();
+ }
+ if (!message.rollbackByTaskId.isZero()) {
+ obj.rollbackByTaskId = (message.rollbackByTaskId || Long.ZERO).toString();
+ }
return obj;
},
@@ -455,7 +465,6 @@ export const ActivityIssueCommentCreatePayload_TaskRollbackBy = {
): ActivityIssueCommentCreatePayload_TaskRollbackBy {
return ActivityIssueCommentCreatePayload_TaskRollbackBy.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<ActivityIssueCommentCreatePayload_TaskRollbackBy>,
): ActivityIssueCommentCreatePayload_TaskRollbackBy {
@@ -540,17 +549,21 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {
action: isSet(object.action)
? activityIssueCommentCreatePayload_ExternalApprovalEvent_ActionFromJSON(object.action)
: 0,
- stageName: isSet(object.stageName) ? String(object.stageName) : "",
+ stageName: isSet(object.stageName) ? globalThis.String(object.stageName) : "",
};
},
toJSON(message: ActivityIssueCommentCreatePayload_ExternalApprovalEvent): unknown {
const obj: any = {};
- message.type !== undefined &&
- (obj.type = activityIssueCommentCreatePayload_ExternalApprovalEvent_TypeToJSON(message.type));
- message.action !== undefined &&
- (obj.action = activityIssueCommentCreatePayload_ExternalApprovalEvent_ActionToJSON(message.action));
- message.stageName !== undefined && (obj.stageName = message.stageName);
+ if (message.type !== 0) {
+ obj.type = activityIssueCommentCreatePayload_ExternalApprovalEvent_TypeToJSON(message.type);
+ }
+ if (message.action !== 0) {
+ obj.action = activityIssueCommentCreatePayload_ExternalApprovalEvent_ActionToJSON(message.action);
+ }
+ if (message.stageName !== "") {
+ obj.stageName = message.stageName;
+ }
return obj;
},
@@ -559,7 +572,6 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {
): ActivityIssueCommentCreatePayload_ExternalApprovalEvent {
return ActivityIssueCommentCreatePayload_ExternalApprovalEvent.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<ActivityIssueCommentCreatePayload_ExternalApprovalEvent>,
): ActivityIssueCommentCreatePayload_ExternalApprovalEvent {
@@ -617,8 +629,9 @@ export const ActivityIssueCommentCreatePayload_ApprovalEvent = {
toJSON(message: ActivityIssueCommentCreatePayload_ApprovalEvent): unknown {
const obj: any = {};
- message.status !== undefined &&
- (obj.status = activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(message.status));
+ if (message.status !== 0) {
+ obj.status = activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(message.status);
+ }
return obj;
},
@@ -627,7 +640,6 @@ export const ActivityIssueCommentCreatePayload_ApprovalEvent = {
): ActivityIssueCommentCreatePayload_ApprovalEvent {
return ActivityIssueCommentCreatePayload_ApprovalEvent.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<ActivityIssueCommentCreatePayload_ApprovalEvent>,
): ActivityIssueCommentCreatePayload_ApprovalEvent {
@@ -678,15 +690,15 @@ export const ActivityIssueApprovalNotifyPayload = {
toJSON(message: ActivityIssueApprovalNotifyPayload): unknown {
const obj: any = {};
- message.approvalStep !== undefined &&
- (obj.approvalStep = message.approvalStep ? ApprovalStep.toJSON(message.approvalStep) : undefined);
+ if (message.approvalStep !== undefined) {
+ obj.approvalStep = ApprovalStep.toJSON(message.approvalStep);
+ }
return obj;
},
create(base?: DeepPartial<ActivityIssueApprovalNotifyPayload>): ActivityIssueApprovalNotifyPayload {
return ActivityIssueApprovalNotifyPayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ActivityIssueApprovalNotifyPayload>): ActivityIssueApprovalNotifyPayload {
const message = createBaseActivityIssueApprovalNotifyPayload();
message.approvalStep = (object.approvalStep !== undefined && object.approvalStep !== null)
@@ -699,7 +711,7 @@ export const ActivityIssueApprovalNotifyPayload = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/approval.ts b/frontend/src/types/proto/store/approval.ts
index d6cec8f598..38faaf7257 100644
--- a/frontend/src/types/proto/store/approval.ts
+++ b/frontend/src/types/proto/store/approval.ts
@@ -305,38 +305,37 @@ export const IssuePayloadApproval = {
fromJSON(object: any): IssuePayloadApproval {
return {
- approvalTemplates: Array.isArray(object?.approvalTemplates)
+ approvalTemplates: globalThis.Array.isArray(object?.approvalTemplates)
? object.approvalTemplates.map((e: any) => ApprovalTemplate.fromJSON(e))
: [],
- approvers: Array.isArray(object?.approvers)
+ approvers: globalThis.Array.isArray(object?.approvers)
? object.approvers.map((e: any) => IssuePayloadApproval_Approver.fromJSON(e))
: [],
- approvalFindingDone: isSet(object.approvalFindingDone) ? Boolean(object.approvalFindingDone) : false,
- approvalFindingError: isSet(object.approvalFindingError) ? String(object.approvalFindingError) : "",
+ approvalFindingDone: isSet(object.approvalFindingDone) ? globalThis.Boolean(object.approvalFindingDone) : false,
+ approvalFindingError: isSet(object.approvalFindingError) ? globalThis.String(object.approvalFindingError) : "",
};
},
toJSON(message: IssuePayloadApproval): unknown {
const obj: any = {};
- if (message.approvalTemplates) {
- obj.approvalTemplates = message.approvalTemplates.map((e) => e ? ApprovalTemplate.toJSON(e) : undefined);
- } else {
- obj.approvalTemplates = [];
- }
- if (message.approvers) {
- obj.approvers = message.approvers.map((e) => e ? IssuePayloadApproval_Approver.toJSON(e) : undefined);
- } else {
- obj.approvers = [];
- }
- message.approvalFindingDone !== undefined && (obj.approvalFindingDone = message.approvalFindingDone);
- message.approvalFindingError !== undefined && (obj.approvalFindingError = message.approvalFindingError);
+ if (message.approvalTemplates?.length) {
+ obj.approvalTemplates = message.approvalTemplates.map((e) => ApprovalTemplate.toJSON(e));
+ }
+ if (message.approvers?.length) {
+ obj.approvers = message.approvers.map((e) => IssuePayloadApproval_Approver.toJSON(e));
+ }
+ if (message.approvalFindingDone === true) {
+ obj.approvalFindingDone = message.approvalFindingDone;
+ }
+ if (message.approvalFindingError !== "") {
+ obj.approvalFindingError = message.approvalFindingError;
+ }
return obj;
},
create(base?: DeepPartial<IssuePayloadApproval>): IssuePayloadApproval {
return IssuePayloadApproval.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IssuePayloadApproval>): IssuePayloadApproval {
const message = createBaseIssuePayloadApproval();
message.approvalTemplates = object.approvalTemplates?.map((e) => ApprovalTemplate.fromPartial(e)) || [];
@@ -395,21 +394,24 @@ export const IssuePayloadApproval_Approver = {
fromJSON(object: any): IssuePayloadApproval_Approver {
return {
status: isSet(object.status) ? issuePayloadApproval_Approver_StatusFromJSON(object.status) : 0,
- principalId: isSet(object.principalId) ? Number(object.principalId) : 0,
+ principalId: isSet(object.principalId) ? globalThis.Number(object.principalId) : 0,
};
},
toJSON(message: IssuePayloadApproval_Approver): unknown {
const obj: any = {};
- message.status !== undefined && (obj.status = issuePayloadApproval_Approver_StatusToJSON(message.status));
- message.principalId !== undefined && (obj.principalId = Math.round(message.principalId));
+ if (message.status !== 0) {
+ obj.status = issuePayloadApproval_Approver_StatusToJSON(message.status);
+ }
+ if (message.principalId !== 0) {
+ obj.principalId = Math.round(message.principalId);
+ }
return obj;
},
create(base?: DeepPartial<IssuePayloadApproval_Approver>): IssuePayloadApproval_Approver {
return IssuePayloadApproval_Approver.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IssuePayloadApproval_Approver>): IssuePayloadApproval_Approver {
const message = createBaseIssuePayloadApproval_Approver();
message.status = object.status ?? 0;
@@ -486,25 +488,32 @@ export const ApprovalTemplate = {
fromJSON(object: any): ApprovalTemplate {
return {
flow: isSet(object.flow) ? ApprovalFlow.fromJSON(object.flow) : undefined,
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- creatorId: isSet(object.creatorId) ? Number(object.creatorId) : 0,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ creatorId: isSet(object.creatorId) ? globalThis.Number(object.creatorId) : 0,
};
},
toJSON(message: ApprovalTemplate): unknown {
const obj: any = {};
- message.flow !== undefined && (obj.flow = message.flow ? ApprovalFlow.toJSON(message.flow) : undefined);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.creatorId !== undefined && (obj.creatorId = Math.round(message.creatorId));
+ if (message.flow !== undefined) {
+ obj.flow = ApprovalFlow.toJSON(message.flow);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.creatorId !== 0) {
+ obj.creatorId = Math.round(message.creatorId);
+ }
return obj;
},
create(base?: DeepPartial<ApprovalTemplate>): ApprovalTemplate {
return ApprovalTemplate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalTemplate>): ApprovalTemplate {
const message = createBaseApprovalTemplate();
message.flow = (object.flow !== undefined && object.flow !== null)
@@ -553,15 +562,15 @@ export const ApprovalFlow = {
},
fromJSON(object: any): ApprovalFlow {
- return { steps: Array.isArray(object?.steps) ? object.steps.map((e: any) => ApprovalStep.fromJSON(e)) : [] };
+ return {
+ steps: globalThis.Array.isArray(object?.steps) ? object.steps.map((e: any) => ApprovalStep.fromJSON(e)) : [],
+ };
},
toJSON(message: ApprovalFlow): unknown {
const obj: any = {};
- if (message.steps) {
- obj.steps = message.steps.map((e) => e ? ApprovalStep.toJSON(e) : undefined);
- } else {
- obj.steps = [];
+ if (message.steps?.length) {
+ obj.steps = message.steps.map((e) => ApprovalStep.toJSON(e));
}
return obj;
},
@@ -569,7 +578,6 @@ export const ApprovalFlow = {
create(base?: DeepPartial<ApprovalFlow>): ApprovalFlow {
return ApprovalFlow.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalFlow>): ApprovalFlow {
const message = createBaseApprovalFlow();
message.steps = object.steps?.map((e) => ApprovalStep.fromPartial(e)) || [];
@@ -625,17 +633,17 @@ export const ApprovalStep = {
fromJSON(object: any): ApprovalStep {
return {
type: isSet(object.type) ? approvalStep_TypeFromJSON(object.type) : 0,
- nodes: Array.isArray(object?.nodes) ? object.nodes.map((e: any) => ApprovalNode.fromJSON(e)) : [],
+ nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => ApprovalNode.fromJSON(e)) : [],
};
},
toJSON(message: ApprovalStep): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = approvalStep_TypeToJSON(message.type));
- if (message.nodes) {
- obj.nodes = message.nodes.map((e) => e ? ApprovalNode.toJSON(e) : undefined);
- } else {
- obj.nodes = [];
+ if (message.type !== 0) {
+ obj.type = approvalStep_TypeToJSON(message.type);
+ }
+ if (message.nodes?.length) {
+ obj.nodes = message.nodes.map((e) => ApprovalNode.toJSON(e));
}
return obj;
},
@@ -643,7 +651,6 @@ export const ApprovalStep = {
create(base?: DeepPartial<ApprovalStep>): ApprovalStep {
return ApprovalStep.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalStep>): ApprovalStep {
const message = createBaseApprovalStep();
message.type = object.type ?? 0;
@@ -721,27 +728,31 @@ export const ApprovalNode = {
return {
type: isSet(object.type) ? approvalNode_TypeFromJSON(object.type) : 0,
groupValue: isSet(object.groupValue) ? approvalNode_GroupValueFromJSON(object.groupValue) : undefined,
- role: isSet(object.role) ? String(object.role) : undefined,
- externalNodeId: isSet(object.externalNodeId) ? String(object.externalNodeId) : undefined,
+ role: isSet(object.role) ? globalThis.String(object.role) : undefined,
+ externalNodeId: isSet(object.externalNodeId) ? globalThis.String(object.externalNodeId) : undefined,
};
},
toJSON(message: ApprovalNode): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = approvalNode_TypeToJSON(message.type));
- message.groupValue !== undefined &&
- (obj.groupValue = message.groupValue !== undefined
- ? approvalNode_GroupValueToJSON(message.groupValue)
- : undefined);
- message.role !== undefined && (obj.role = message.role);
- message.externalNodeId !== undefined && (obj.externalNodeId = message.externalNodeId);
+ if (message.type !== 0) {
+ obj.type = approvalNode_TypeToJSON(message.type);
+ }
+ if (message.groupValue !== undefined) {
+ obj.groupValue = approvalNode_GroupValueToJSON(message.groupValue);
+ }
+ if (message.role !== undefined) {
+ obj.role = message.role;
+ }
+ if (message.externalNodeId !== undefined) {
+ obj.externalNodeId = message.externalNodeId;
+ }
return obj;
},
create(base?: DeepPartial<ApprovalNode>): ApprovalNode {
return ApprovalNode.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalNode>): ApprovalNode {
const message = createBaseApprovalNode();
message.type = object.type ?? 0;
@@ -755,7 +766,7 @@ export const ApprovalNode = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/changelist.ts b/frontend/src/types/proto/store/changelist.ts
index 69503ef7e7..fdb9c20326 100644
--- a/frontend/src/types/proto/store/changelist.ts
+++ b/frontend/src/types/proto/store/changelist.ts
@@ -68,18 +68,20 @@ export const Changelist = {
fromJSON(object: any): Changelist {
return {
- description: isSet(object.description) ? String(object.description) : "",
- changes: Array.isArray(object?.changes) ? object.changes.map((e: any) => Changelist_Change.fromJSON(e)) : [],
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ changes: globalThis.Array.isArray(object?.changes)
+ ? object.changes.map((e: any) => Changelist_Change.fromJSON(e))
+ : [],
};
},
toJSON(message: Changelist): unknown {
const obj: any = {};
- message.description !== undefined && (obj.description = message.description);
- if (message.changes) {
- obj.changes = message.changes.map((e) => e ? Changelist_Change.toJSON(e) : undefined);
- } else {
- obj.changes = [];
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.changes?.length) {
+ obj.changes = message.changes.map((e) => Changelist_Change.toJSON(e));
}
return obj;
},
@@ -87,7 +89,6 @@ export const Changelist = {
create(base?: DeepPartial<Changelist>): Changelist {
return Changelist.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Changelist>): Changelist {
const message = createBaseChangelist();
message.description = object.description ?? "";
@@ -143,22 +144,25 @@ export const Changelist_Change = {
fromJSON(object: any): Changelist_Change {
return {
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- source: isSet(object.source) ? String(object.source) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
};
},
toJSON(message: Changelist_Change): unknown {
const obj: any = {};
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.source !== undefined && (obj.source = message.source);
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.source !== "") {
+ obj.source = message.source;
+ }
return obj;
},
create(base?: DeepPartial<Changelist_Change>): Changelist_Change {
return Changelist_Change.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Changelist_Change>): Changelist_Change {
const message = createBaseChangelist_Change();
message.sheet = object.sheet ?? "";
@@ -170,7 +174,7 @@ export const Changelist_Change = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/common.ts b/frontend/src/types/proto/store/common.ts
index f7d0ece56b..0eb3447741 100644
--- a/frontend/src/types/proto/store/common.ts
+++ b/frontend/src/types/proto/store/common.ts
@@ -276,22 +276,25 @@ export const PageToken = {
fromJSON(object: any): PageToken {
return {
- limit: isSet(object.limit) ? Number(object.limit) : 0,
- offset: isSet(object.offset) ? Number(object.offset) : 0,
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
+ offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
};
},
toJSON(message: PageToken): unknown {
const obj: any = {};
- message.limit !== undefined && (obj.limit = Math.round(message.limit));
- message.offset !== undefined && (obj.offset = Math.round(message.offset));
+ if (message.limit !== 0) {
+ obj.limit = Math.round(message.limit);
+ }
+ if (message.offset !== 0) {
+ obj.offset = Math.round(message.offset);
+ }
return obj;
},
create(base?: DeepPartial<PageToken>): PageToken {
return PageToken.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PageToken>): PageToken {
const message = createBasePageToken();
message.limit = object.limit ?? 0;
@@ -303,7 +306,7 @@ export const PageToken = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/data_source.ts b/frontend/src/types/proto/store/data_source.ts
index 9c73329e0c..2787c094b2 100644
--- a/frontend/src/types/proto/store/data_source.ts
+++ b/frontend/src/types/proto/store/data_source.ts
@@ -154,36 +154,57 @@ export const DataSourceOptions = {
fromJSON(object: any): DataSourceOptions {
return {
- srv: isSet(object.srv) ? Boolean(object.srv) : false,
- authenticationDatabase: isSet(object.authenticationDatabase) ? String(object.authenticationDatabase) : "",
- sid: isSet(object.sid) ? String(object.sid) : "",
- serviceName: isSet(object.serviceName) ? String(object.serviceName) : "",
- sshHost: isSet(object.sshHost) ? String(object.sshHost) : "",
- sshPort: isSet(object.sshPort) ? String(object.sshPort) : "",
- sshUser: isSet(object.sshUser) ? String(object.sshUser) : "",
- sshObfuscatedPassword: isSet(object.sshObfuscatedPassword) ? String(object.sshObfuscatedPassword) : "",
- sshObfuscatedPrivateKey: isSet(object.sshObfuscatedPrivateKey) ? String(object.sshObfuscatedPrivateKey) : "",
+ srv: isSet(object.srv) ? globalThis.Boolean(object.srv) : false,
+ authenticationDatabase: isSet(object.authenticationDatabase)
+ ? globalThis.String(object.authenticationDatabase)
+ : "",
+ sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
+ serviceName: isSet(object.serviceName) ? globalThis.String(object.serviceName) : "",
+ sshHost: isSet(object.sshHost) ? globalThis.String(object.sshHost) : "",
+ sshPort: isSet(object.sshPort) ? globalThis.String(object.sshPort) : "",
+ sshUser: isSet(object.sshUser) ? globalThis.String(object.sshUser) : "",
+ sshObfuscatedPassword: isSet(object.sshObfuscatedPassword) ? globalThis.String(object.sshObfuscatedPassword) : "",
+ sshObfuscatedPrivateKey: isSet(object.sshObfuscatedPrivateKey)
+ ? globalThis.String(object.sshObfuscatedPrivateKey)
+ : "",
};
},
toJSON(message: DataSourceOptions): unknown {
const obj: any = {};
- message.srv !== undefined && (obj.srv = message.srv);
- message.authenticationDatabase !== undefined && (obj.authenticationDatabase = message.authenticationDatabase);
- message.sid !== undefined && (obj.sid = message.sid);
- message.serviceName !== undefined && (obj.serviceName = message.serviceName);
- message.sshHost !== undefined && (obj.sshHost = message.sshHost);
- message.sshPort !== undefined && (obj.sshPort = message.sshPort);
- message.sshUser !== undefined && (obj.sshUser = message.sshUser);
- message.sshObfuscatedPassword !== undefined && (obj.sshObfuscatedPassword = message.sshObfuscatedPassword);
- message.sshObfuscatedPrivateKey !== undefined && (obj.sshObfuscatedPrivateKey = message.sshObfuscatedPrivateKey);
+ if (message.srv === true) {
+ obj.srv = message.srv;
+ }
+ if (message.authenticationDatabase !== "") {
+ obj.authenticationDatabase = message.authenticationDatabase;
+ }
+ if (message.sid !== "") {
+ obj.sid = message.sid;
+ }
+ if (message.serviceName !== "") {
+ obj.serviceName = message.serviceName;
+ }
+ if (message.sshHost !== "") {
+ obj.sshHost = message.sshHost;
+ }
+ if (message.sshPort !== "") {
+ obj.sshPort = message.sshPort;
+ }
+ if (message.sshUser !== "") {
+ obj.sshUser = message.sshUser;
+ }
+ if (message.sshObfuscatedPassword !== "") {
+ obj.sshObfuscatedPassword = message.sshObfuscatedPassword;
+ }
+ if (message.sshObfuscatedPrivateKey !== "") {
+ obj.sshObfuscatedPrivateKey = message.sshObfuscatedPrivateKey;
+ }
return obj;
},
create(base?: DeepPartial<DataSourceOptions>): DataSourceOptions {
return DataSourceOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DataSourceOptions>): DataSourceOptions {
const message = createBaseDataSourceOptions();
message.srv = object.srv ?? false;
@@ -202,7 +223,7 @@ export const DataSourceOptions = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/database.ts b/frontend/src/types/proto/store/database.ts
index ec071d2462..b1ebe07dcd 100644
--- a/frontend/src/types/proto/store/database.ts
+++ b/frontend/src/types/proto/store/database.ts
@@ -494,25 +494,29 @@ export const DatabaseMetadata = {
toJSON(message: DatabaseMetadata): unknown {
const obj: any = {};
- obj.labels = {};
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
+ }
+ if (message.lastSyncTime !== undefined) {
+ obj.lastSyncTime = message.lastSyncTime.toISOString();
}
- message.lastSyncTime !== undefined && (obj.lastSyncTime = message.lastSyncTime.toISOString());
return obj;
},
create(base?: DeepPartial<DatabaseMetadata>): DatabaseMetadata {
return DatabaseMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseMetadata>): DatabaseMetadata {
const message = createBaseDatabaseMetadata();
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -567,20 +571,26 @@ export const DatabaseMetadata_LabelsEntry = {
},
fromJSON(object: any): DatabaseMetadata_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: DatabaseMetadata_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<DatabaseMetadata_LabelsEntry>): DatabaseMetadata_LabelsEntry {
return DatabaseMetadata_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseMetadata_LabelsEntry>): DatabaseMetadata_LabelsEntry {
const message = createBaseDatabaseMetadata_LabelsEntry();
message.key = object.key ?? "";
@@ -686,42 +696,49 @@ export const DatabaseSchemaMetadata = {
fromJSON(object: any): DatabaseSchemaMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schemas: Array.isArray(object?.schemas) ? object.schemas.map((e: any) => SchemaMetadata.fromJSON(e)) : [],
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- extensions: Array.isArray(object?.extensions)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schemas: globalThis.Array.isArray(object?.schemas)
+ ? object.schemas.map((e: any) => SchemaMetadata.fromJSON(e))
+ : [],
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ extensions: globalThis.Array.isArray(object?.extensions)
? object.extensions.map((e: any) => ExtensionMetadata.fromJSON(e))
: [],
- datashare: isSet(object.datashare) ? Boolean(object.datashare) : false,
- serviceName: isSet(object.serviceName) ? String(object.serviceName) : "",
+ datashare: isSet(object.datashare) ? globalThis.Boolean(object.datashare) : false,
+ serviceName: isSet(object.serviceName) ? globalThis.String(object.serviceName) : "",
};
},
toJSON(message: DatabaseSchemaMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.schemas) {
- obj.schemas = message.schemas.map((e) => e ? SchemaMetadata.toJSON(e) : undefined);
- } else {
- obj.schemas = [];
- }
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- if (message.extensions) {
- obj.extensions = message.extensions.map((e) => e ? ExtensionMetadata.toJSON(e) : undefined);
- } else {
- obj.extensions = [];
- }
- message.datashare !== undefined && (obj.datashare = message.datashare);
- message.serviceName !== undefined && (obj.serviceName = message.serviceName);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schemas?.length) {
+ obj.schemas = message.schemas.map((e) => SchemaMetadata.toJSON(e));
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.extensions?.length) {
+ obj.extensions = message.extensions.map((e) => ExtensionMetadata.toJSON(e));
+ }
+ if (message.datashare === true) {
+ obj.datashare = message.datashare;
+ }
+ if (message.serviceName !== "") {
+ obj.serviceName = message.serviceName;
+ }
return obj;
},
create(base?: DeepPartial<DatabaseSchemaMetadata>): DatabaseSchemaMetadata {
return DatabaseSchemaMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseSchemaMetadata>): DatabaseSchemaMetadata {
const message = createBaseDatabaseSchemaMetadata();
message.name = object.name ?? "";
@@ -822,42 +839,38 @@ export const SchemaMetadata = {
fromJSON(object: any): SchemaMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tables: Array.isArray(object?.tables) ? object.tables.map((e: any) => TableMetadata.fromJSON(e)) : [],
- views: Array.isArray(object?.views) ? object.views.map((e: any) => ViewMetadata.fromJSON(e)) : [],
- functions: Array.isArray(object?.functions) ? object.functions.map((e: any) => FunctionMetadata.fromJSON(e)) : [],
- streams: Array.isArray(object?.streams) ? object.streams.map((e: any) => StreamMetadata.fromJSON(e)) : [],
- tasks: Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskMetadata.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tables: globalThis.Array.isArray(object?.tables) ? object.tables.map((e: any) => TableMetadata.fromJSON(e)) : [],
+ views: globalThis.Array.isArray(object?.views) ? object.views.map((e: any) => ViewMetadata.fromJSON(e)) : [],
+ functions: globalThis.Array.isArray(object?.functions)
+ ? object.functions.map((e: any) => FunctionMetadata.fromJSON(e))
+ : [],
+ streams: globalThis.Array.isArray(object?.streams)
+ ? object.streams.map((e: any) => StreamMetadata.fromJSON(e))
+ : [],
+ tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskMetadata.fromJSON(e)) : [],
};
},
toJSON(message: SchemaMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.tables) {
- obj.tables = message.tables.map((e) => e ? TableMetadata.toJSON(e) : undefined);
- } else {
- obj.tables = [];
- }
- if (message.views) {
- obj.views = message.views.map((e) => e ? ViewMetadata.toJSON(e) : undefined);
- } else {
- obj.views = [];
- }
- if (message.functions) {
- obj.functions = message.functions.map((e) => e ? FunctionMetadata.toJSON(e) : undefined);
- } else {
- obj.functions = [];
- }
- if (message.streams) {
- obj.streams = message.streams.map((e) => e ? StreamMetadata.toJSON(e) : undefined);
- } else {
- obj.streams = [];
- }
- if (message.tasks) {
- obj.tasks = message.tasks.map((e) => e ? TaskMetadata.toJSON(e) : undefined);
- } else {
- obj.tasks = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tables?.length) {
+ obj.tables = message.tables.map((e) => TableMetadata.toJSON(e));
+ }
+ if (message.views?.length) {
+ obj.views = message.views.map((e) => ViewMetadata.toJSON(e));
+ }
+ if (message.functions?.length) {
+ obj.functions = message.functions.map((e) => FunctionMetadata.toJSON(e));
+ }
+ if (message.streams?.length) {
+ obj.streams = message.streams.map((e) => StreamMetadata.toJSON(e));
+ }
+ if (message.tasks?.length) {
+ obj.tasks = message.tasks.map((e) => TaskMetadata.toJSON(e));
}
return obj;
},
@@ -865,7 +878,6 @@ export const SchemaMetadata = {
create(base?: DeepPartial<SchemaMetadata>): SchemaMetadata {
return SchemaMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaMetadata>): SchemaMetadata {
const message = createBaseSchemaMetadata();
message.name = object.name ?? "";
@@ -1016,42 +1028,59 @@ export const TaskMetadata = {
fromJSON(object: any): TaskMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- id: isSet(object.id) ? String(object.id) : "",
- owner: isSet(object.owner) ? String(object.owner) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- warehouse: isSet(object.warehouse) ? String(object.warehouse) : "",
- schedule: isSet(object.schedule) ? String(object.schedule) : "",
- predecessors: Array.isArray(object?.predecessors) ? object.predecessors.map((e: any) => String(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ warehouse: isSet(object.warehouse) ? globalThis.String(object.warehouse) : "",
+ schedule: isSet(object.schedule) ? globalThis.String(object.schedule) : "",
+ predecessors: globalThis.Array.isArray(object?.predecessors)
+ ? object.predecessors.map((e: any) => globalThis.String(e))
+ : [],
state: isSet(object.state) ? taskMetadata_StateFromJSON(object.state) : 0,
- condition: isSet(object.condition) ? String(object.condition) : "",
- definition: isSet(object.definition) ? String(object.definition) : "",
+ condition: isSet(object.condition) ? globalThis.String(object.condition) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
};
},
toJSON(message: TaskMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.id !== undefined && (obj.id = message.id);
- message.owner !== undefined && (obj.owner = message.owner);
- message.comment !== undefined && (obj.comment = message.comment);
- message.warehouse !== undefined && (obj.warehouse = message.warehouse);
- message.schedule !== undefined && (obj.schedule = message.schedule);
- if (message.predecessors) {
- obj.predecessors = message.predecessors.map((e) => e);
- } else {
- obj.predecessors = [];
- }
- message.state !== undefined && (obj.state = taskMetadata_StateToJSON(message.state));
- message.condition !== undefined && (obj.condition = message.condition);
- message.definition !== undefined && (obj.definition = message.definition);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.owner !== "") {
+ obj.owner = message.owner;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.warehouse !== "") {
+ obj.warehouse = message.warehouse;
+ }
+ if (message.schedule !== "") {
+ obj.schedule = message.schedule;
+ }
+ if (message.predecessors?.length) {
+ obj.predecessors = message.predecessors;
+ }
+ if (message.state !== 0) {
+ obj.state = taskMetadata_StateToJSON(message.state);
+ }
+ if (message.condition !== "") {
+ obj.condition = message.condition;
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
return obj;
},
create(base?: DeepPartial<TaskMetadata>): TaskMetadata {
return TaskMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TaskMetadata>): TaskMetadata {
const message = createBaseTaskMetadata();
message.name = object.name ?? "";
@@ -1175,34 +1204,49 @@ export const StreamMetadata = {
fromJSON(object: any): StreamMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tableName: isSet(object.tableName) ? String(object.tableName) : "",
- owner: isSet(object.owner) ? String(object.owner) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tableName: isSet(object.tableName) ? globalThis.String(object.tableName) : "",
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
type: isSet(object.type) ? streamMetadata_TypeFromJSON(object.type) : 0,
- stale: isSet(object.stale) ? Boolean(object.stale) : false,
+ stale: isSet(object.stale) ? globalThis.Boolean(object.stale) : false,
mode: isSet(object.mode) ? streamMetadata_ModeFromJSON(object.mode) : 0,
- definition: isSet(object.definition) ? String(object.definition) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
};
},
toJSON(message: StreamMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.tableName !== undefined && (obj.tableName = message.tableName);
- message.owner !== undefined && (obj.owner = message.owner);
- message.comment !== undefined && (obj.comment = message.comment);
- message.type !== undefined && (obj.type = streamMetadata_TypeToJSON(message.type));
- message.stale !== undefined && (obj.stale = message.stale);
- message.mode !== undefined && (obj.mode = streamMetadata_ModeToJSON(message.mode));
- message.definition !== undefined && (obj.definition = message.definition);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tableName !== "") {
+ obj.tableName = message.tableName;
+ }
+ if (message.owner !== "") {
+ obj.owner = message.owner;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.type !== 0) {
+ obj.type = streamMetadata_TypeToJSON(message.type);
+ }
+ if (message.stale === true) {
+ obj.stale = message.stale;
+ }
+ if (message.mode !== 0) {
+ obj.mode = streamMetadata_ModeToJSON(message.mode);
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
return obj;
},
create(base?: DeepPartial<StreamMetadata>): StreamMetadata {
return StreamMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<StreamMetadata>): StreamMetadata {
const message = createBaseStreamMetadata();
message.name = object.name ?? "";
@@ -1399,20 +1443,24 @@ export const TableMetadata = {
fromJSON(object: any): TableMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- columns: Array.isArray(object?.columns) ? object.columns.map((e: any) => ColumnMetadata.fromJSON(e)) : [],
- indexes: Array.isArray(object?.indexes) ? object.indexes.map((e: any) => IndexMetadata.fromJSON(e)) : [],
- engine: isSet(object.engine) ? String(object.engine) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ columns: globalThis.Array.isArray(object?.columns)
+ ? object.columns.map((e: any) => ColumnMetadata.fromJSON(e))
+ : [],
+ indexes: globalThis.Array.isArray(object?.indexes)
+ ? object.indexes.map((e: any) => IndexMetadata.fromJSON(e))
+ : [],
+ engine: isSet(object.engine) ? globalThis.String(object.engine) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
rowCount: isSet(object.rowCount) ? Long.fromValue(object.rowCount) : Long.ZERO,
dataSize: isSet(object.dataSize) ? Long.fromValue(object.dataSize) : Long.ZERO,
indexSize: isSet(object.indexSize) ? Long.fromValue(object.indexSize) : Long.ZERO,
dataFree: isSet(object.dataFree) ? Long.fromValue(object.dataFree) : Long.ZERO,
- createOptions: isSet(object.createOptions) ? String(object.createOptions) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- classification: isSet(object.classification) ? String(object.classification) : "",
- userComment: isSet(object.userComment) ? String(object.userComment) : "",
- foreignKeys: Array.isArray(object?.foreignKeys)
+ createOptions: isSet(object.createOptions) ? globalThis.String(object.createOptions) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ classification: isSet(object.classification) ? globalThis.String(object.classification) : "",
+ userComment: isSet(object.userComment) ? globalThis.String(object.userComment) : "",
+ foreignKeys: globalThis.Array.isArray(object?.foreignKeys)
? object.foreignKeys.map((e: any) => ForeignKeyMetadata.fromJSON(e))
: [],
};
@@ -1420,31 +1468,47 @@ export const TableMetadata = {
toJSON(message: TableMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.columns) {
- obj.columns = message.columns.map((e) => e ? ColumnMetadata.toJSON(e) : undefined);
- } else {
- obj.columns = [];
- }
- if (message.indexes) {
- obj.indexes = message.indexes.map((e) => e ? IndexMetadata.toJSON(e) : undefined);
- } else {
- obj.indexes = [];
- }
- message.engine !== undefined && (obj.engine = message.engine);
- message.collation !== undefined && (obj.collation = message.collation);
- message.rowCount !== undefined && (obj.rowCount = (message.rowCount || Long.ZERO).toString());
- message.dataSize !== undefined && (obj.dataSize = (message.dataSize || Long.ZERO).toString());
- message.indexSize !== undefined && (obj.indexSize = (message.indexSize || Long.ZERO).toString());
- message.dataFree !== undefined && (obj.dataFree = (message.dataFree || Long.ZERO).toString());
- message.createOptions !== undefined && (obj.createOptions = message.createOptions);
- message.comment !== undefined && (obj.comment = message.comment);
- message.classification !== undefined && (obj.classification = message.classification);
- message.userComment !== undefined && (obj.userComment = message.userComment);
- if (message.foreignKeys) {
- obj.foreignKeys = message.foreignKeys.map((e) => e ? ForeignKeyMetadata.toJSON(e) : undefined);
- } else {
- obj.foreignKeys = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.columns?.length) {
+ obj.columns = message.columns.map((e) => ColumnMetadata.toJSON(e));
+ }
+ if (message.indexes?.length) {
+ obj.indexes = message.indexes.map((e) => IndexMetadata.toJSON(e));
+ }
+ if (message.engine !== "") {
+ obj.engine = message.engine;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (!message.rowCount.isZero()) {
+ obj.rowCount = (message.rowCount || Long.ZERO).toString();
+ }
+ if (!message.dataSize.isZero()) {
+ obj.dataSize = (message.dataSize || Long.ZERO).toString();
+ }
+ if (!message.indexSize.isZero()) {
+ obj.indexSize = (message.indexSize || Long.ZERO).toString();
+ }
+ if (!message.dataFree.isZero()) {
+ obj.dataFree = (message.dataFree || Long.ZERO).toString();
+ }
+ if (message.createOptions !== "") {
+ obj.createOptions = message.createOptions;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.classification !== "") {
+ obj.classification = message.classification;
+ }
+ if (message.userComment !== "") {
+ obj.userComment = message.userComment;
+ }
+ if (message.foreignKeys?.length) {
+ obj.foreignKeys = message.foreignKeys.map((e) => ForeignKeyMetadata.toJSON(e));
}
return obj;
},
@@ -1452,7 +1516,6 @@ export const TableMetadata = {
create(base?: DeepPartial<TableMetadata>): TableMetadata {
return TableMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TableMetadata>): TableMetadata {
const message = createBaseTableMetadata();
message.name = object.name ?? "";
@@ -1641,42 +1704,65 @@ export const ColumnMetadata = {
fromJSON(object: any): ColumnMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- position: isSet(object.position) ? Number(object.position) : 0,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ position: isSet(object.position) ? globalThis.Number(object.position) : 0,
default: isSet(object.default) ? String(object.default) : undefined,
- defaultNull: isSet(object.defaultNull) ? Boolean(object.defaultNull) : undefined,
- defaultExpression: isSet(object.defaultExpression) ? String(object.defaultExpression) : undefined,
- nullable: isSet(object.nullable) ? Boolean(object.nullable) : false,
- type: isSet(object.type) ? String(object.type) : "",
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- classification: isSet(object.classification) ? String(object.classification) : "",
- userComment: isSet(object.userComment) ? String(object.userComment) : "",
+ defaultNull: isSet(object.defaultNull) ? globalThis.Boolean(object.defaultNull) : undefined,
+ defaultExpression: isSet(object.defaultExpression) ? globalThis.String(object.defaultExpression) : undefined,
+ nullable: isSet(object.nullable) ? globalThis.Boolean(object.nullable) : false,
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ classification: isSet(object.classification) ? globalThis.String(object.classification) : "",
+ userComment: isSet(object.userComment) ? globalThis.String(object.userComment) : "",
};
},
toJSON(message: ColumnMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.position !== undefined && (obj.position = Math.round(message.position));
- message.default !== undefined && (obj.default = message.default);
- message.defaultNull !== undefined && (obj.defaultNull = message.defaultNull);
- message.defaultExpression !== undefined && (obj.defaultExpression = message.defaultExpression);
- message.nullable !== undefined && (obj.nullable = message.nullable);
- message.type !== undefined && (obj.type = message.type);
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- message.comment !== undefined && (obj.comment = message.comment);
- message.classification !== undefined && (obj.classification = message.classification);
- message.userComment !== undefined && (obj.userComment = message.userComment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.position !== 0) {
+ obj.position = Math.round(message.position);
+ }
+ if (message.default !== undefined) {
+ obj.default = message.default;
+ }
+ if (message.defaultNull !== undefined) {
+ obj.defaultNull = message.defaultNull;
+ }
+ if (message.defaultExpression !== undefined) {
+ obj.defaultExpression = message.defaultExpression;
+ }
+ if (message.nullable === true) {
+ obj.nullable = message.nullable;
+ }
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.classification !== "") {
+ obj.classification = message.classification;
+ }
+ if (message.userComment !== "") {
+ obj.userComment = message.userComment;
+ }
return obj;
},
create(base?: DeepPartial<ColumnMetadata>): ColumnMetadata {
return ColumnMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ColumnMetadata>): ColumnMetadata {
const message = createBaseColumnMetadata();
message.name = object.name ?? "";
@@ -1762,10 +1848,10 @@ export const ViewMetadata = {
fromJSON(object: any): ViewMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- definition: isSet(object.definition) ? String(object.definition) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- dependentColumns: Array.isArray(object?.dependentColumns)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ dependentColumns: globalThis.Array.isArray(object?.dependentColumns)
? object.dependentColumns.map((e: any) => DependentColumn.fromJSON(e))
: [],
};
@@ -1773,13 +1859,17 @@ export const ViewMetadata = {
toJSON(message: ViewMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.definition !== undefined && (obj.definition = message.definition);
- message.comment !== undefined && (obj.comment = message.comment);
- if (message.dependentColumns) {
- obj.dependentColumns = message.dependentColumns.map((e) => e ? DependentColumn.toJSON(e) : undefined);
- } else {
- obj.dependentColumns = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.dependentColumns?.length) {
+ obj.dependentColumns = message.dependentColumns.map((e) => DependentColumn.toJSON(e));
}
return obj;
},
@@ -1787,7 +1877,6 @@ export const ViewMetadata = {
create(base?: DeepPartial<ViewMetadata>): ViewMetadata {
return ViewMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ViewMetadata>): ViewMetadata {
const message = createBaseViewMetadata();
message.name = object.name ?? "";
@@ -1855,24 +1944,29 @@ export const DependentColumn = {
fromJSON(object: any): DependentColumn {
return {
- schema: isSet(object.schema) ? String(object.schema) : "",
- table: isSet(object.table) ? String(object.table) : "",
- column: isSet(object.column) ? String(object.column) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ column: isSet(object.column) ? globalThis.String(object.column) : "",
};
},
toJSON(message: DependentColumn): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
- message.table !== undefined && (obj.table = message.table);
- message.column !== undefined && (obj.column = message.column);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
return obj;
},
create(base?: DeepPartial<DependentColumn>): DependentColumn {
return DependentColumn.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DependentColumn>): DependentColumn {
const message = createBaseDependentColumn();
message.schema = object.schema ?? "";
@@ -1929,22 +2023,25 @@ export const FunctionMetadata = {
fromJSON(object: any): FunctionMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- definition: isSet(object.definition) ? String(object.definition) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
};
},
toJSON(message: FunctionMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.definition !== undefined && (obj.definition = message.definition);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
return obj;
},
create(base?: DeepPartial<FunctionMetadata>): FunctionMetadata {
return FunctionMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FunctionMetadata>): FunctionMetadata {
const message = createBaseFunctionMetadata();
message.name = object.name ?? "";
@@ -2050,36 +2147,47 @@ export const IndexMetadata = {
fromJSON(object: any): IndexMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => String(e)) : [],
- type: isSet(object.type) ? String(object.type) : "",
- unique: isSet(object.unique) ? Boolean(object.unique) : false,
- primary: isSet(object.primary) ? Boolean(object.primary) : false,
- visible: isSet(object.visible) ? Boolean(object.visible) : false,
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ expressions: globalThis.Array.isArray(object?.expressions)
+ ? object.expressions.map((e: any) => globalThis.String(e))
+ : [],
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
+ unique: isSet(object.unique) ? globalThis.Boolean(object.unique) : false,
+ primary: isSet(object.primary) ? globalThis.Boolean(object.primary) : false,
+ visible: isSet(object.visible) ? globalThis.Boolean(object.visible) : false,
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: IndexMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.expressions) {
- obj.expressions = message.expressions.map((e) => e);
- } else {
- obj.expressions = [];
- }
- message.type !== undefined && (obj.type = message.type);
- message.unique !== undefined && (obj.unique = message.unique);
- message.primary !== undefined && (obj.primary = message.primary);
- message.visible !== undefined && (obj.visible = message.visible);
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.expressions?.length) {
+ obj.expressions = message.expressions;
+ }
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.unique === true) {
+ obj.unique = message.unique;
+ }
+ if (message.primary === true) {
+ obj.primary = message.primary;
+ }
+ if (message.visible === true) {
+ obj.visible = message.visible;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<IndexMetadata>): IndexMetadata {
return IndexMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IndexMetadata>): IndexMetadata {
const message = createBaseIndexMetadata();
message.name = object.name ?? "";
@@ -2160,26 +2268,33 @@ export const ExtensionMetadata = {
fromJSON(object: any): ExtensionMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schema: isSet(object.schema) ? String(object.schema) : "",
- version: isSet(object.version) ? String(object.version) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: ExtensionMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.schema !== undefined && (obj.schema = message.schema);
- message.version !== undefined && (obj.version = message.version);
- message.description !== undefined && (obj.description = message.description);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
create(base?: DeepPartial<ExtensionMetadata>): ExtensionMetadata {
return ExtensionMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExtensionMetadata>): ExtensionMetadata {
const message = createBaseExtensionMetadata();
message.name = object.name ?? "";
@@ -2306,44 +2421,51 @@ export const ForeignKeyMetadata = {
fromJSON(object: any): ForeignKeyMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- columns: Array.isArray(object?.columns) ? object.columns.map((e: any) => String(e)) : [],
- referencedSchema: isSet(object.referencedSchema) ? String(object.referencedSchema) : "",
- referencedTable: isSet(object.referencedTable) ? String(object.referencedTable) : "",
- referencedColumns: Array.isArray(object?.referencedColumns)
- ? object.referencedColumns.map((e: any) => String(e))
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ columns: globalThis.Array.isArray(object?.columns) ? object.columns.map((e: any) => globalThis.String(e)) : [],
+ referencedSchema: isSet(object.referencedSchema) ? globalThis.String(object.referencedSchema) : "",
+ referencedTable: isSet(object.referencedTable) ? globalThis.String(object.referencedTable) : "",
+ referencedColumns: globalThis.Array.isArray(object?.referencedColumns)
+ ? object.referencedColumns.map((e: any) => globalThis.String(e))
: [],
- onDelete: isSet(object.onDelete) ? String(object.onDelete) : "",
- onUpdate: isSet(object.onUpdate) ? String(object.onUpdate) : "",
- matchType: isSet(object.matchType) ? String(object.matchType) : "",
+ onDelete: isSet(object.onDelete) ? globalThis.String(object.onDelete) : "",
+ onUpdate: isSet(object.onUpdate) ? globalThis.String(object.onUpdate) : "",
+ matchType: isSet(object.matchType) ? globalThis.String(object.matchType) : "",
};
},
toJSON(message: ForeignKeyMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.columns) {
- obj.columns = message.columns.map((e) => e);
- } else {
- obj.columns = [];
- }
- message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);
- message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);
- if (message.referencedColumns) {
- obj.referencedColumns = message.referencedColumns.map((e) => e);
- } else {
- obj.referencedColumns = [];
- }
- message.onDelete !== undefined && (obj.onDelete = message.onDelete);
- message.onUpdate !== undefined && (obj.onUpdate = message.onUpdate);
- message.matchType !== undefined && (obj.matchType = message.matchType);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.columns?.length) {
+ obj.columns = message.columns;
+ }
+ if (message.referencedSchema !== "") {
+ obj.referencedSchema = message.referencedSchema;
+ }
+ if (message.referencedTable !== "") {
+ obj.referencedTable = message.referencedTable;
+ }
+ if (message.referencedColumns?.length) {
+ obj.referencedColumns = message.referencedColumns;
+ }
+ if (message.onDelete !== "") {
+ obj.onDelete = message.onDelete;
+ }
+ if (message.onUpdate !== "") {
+ obj.onUpdate = message.onUpdate;
+ }
+ if (message.matchType !== "") {
+ obj.matchType = message.matchType;
+ }
return obj;
},
create(base?: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {
return ForeignKeyMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {
const message = createBaseForeignKeyMetadata();
message.name = object.name ?? "";
@@ -2405,22 +2527,25 @@ export const InstanceRoleMetadata = {
fromJSON(object: any): InstanceRoleMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- grant: isSet(object.grant) ? String(object.grant) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ grant: isSet(object.grant) ? globalThis.String(object.grant) : "",
};
},
toJSON(message: InstanceRoleMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.grant !== undefined && (obj.grant = message.grant);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.grant !== "") {
+ obj.grant = message.grant;
+ }
return obj;
},
create(base?: DeepPartial<InstanceRoleMetadata>): InstanceRoleMetadata {
return InstanceRoleMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceRoleMetadata>): InstanceRoleMetadata {
const message = createBaseInstanceRoleMetadata();
message.name = object.name ?? "";
@@ -2465,15 +2590,15 @@ export const Secrets = {
},
fromJSON(object: any): Secrets {
- return { items: Array.isArray(object?.items) ? object.items.map((e: any) => SecretItem.fromJSON(e)) : [] };
+ return {
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e: any) => SecretItem.fromJSON(e)) : [],
+ };
},
toJSON(message: Secrets): unknown {
const obj: any = {};
- if (message.items) {
- obj.items = message.items.map((e) => e ? SecretItem.toJSON(e) : undefined);
- } else {
- obj.items = [];
+ if (message.items?.length) {
+ obj.items = message.items.map((e) => SecretItem.toJSON(e));
}
return obj;
},
@@ -2481,7 +2606,6 @@ export const Secrets = {
create(base?: DeepPartial<Secrets>): Secrets {
return Secrets.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Secrets>): Secrets {
const message = createBaseSecrets();
message.items = object.items?.map((e) => SecretItem.fromPartial(e)) || [];
@@ -2546,24 +2670,29 @@ export const SecretItem = {
fromJSON(object: any): SecretItem {
return {
- name: isSet(object.name) ? String(object.name) : "",
- value: isSet(object.value) ? String(object.value) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: SecretItem): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.value !== undefined && (obj.value = message.value);
- message.description !== undefined && (obj.description = message.description);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
create(base?: DeepPartial<SecretItem>): SecretItem {
return SecretItem.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SecretItem>): SecretItem {
const message = createBaseSecretItem();
message.name = object.name ?? "";
@@ -2620,8 +2749,8 @@ export const DatabaseConfig = {
fromJSON(object: any): DatabaseConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schemaConfigs: Array.isArray(object?.schemaConfigs)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schemaConfigs: globalThis.Array.isArray(object?.schemaConfigs)
? object.schemaConfigs.map((e: any) => SchemaConfig.fromJSON(e))
: [],
};
@@ -2629,11 +2758,11 @@ export const DatabaseConfig = {
toJSON(message: DatabaseConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.schemaConfigs) {
- obj.schemaConfigs = message.schemaConfigs.map((e) => e ? SchemaConfig.toJSON(e) : undefined);
- } else {
- obj.schemaConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schemaConfigs?.length) {
+ obj.schemaConfigs = message.schemaConfigs.map((e) => SchemaConfig.toJSON(e));
}
return obj;
},
@@ -2641,7 +2770,6 @@ export const DatabaseConfig = {
create(base?: DeepPartial<DatabaseConfig>): DatabaseConfig {
return DatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseConfig>): DatabaseConfig {
const message = createBaseDatabaseConfig();
message.name = object.name ?? "";
@@ -2697,8 +2825,8 @@ export const SchemaConfig = {
fromJSON(object: any): SchemaConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tableConfigs: Array.isArray(object?.tableConfigs)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tableConfigs: globalThis.Array.isArray(object?.tableConfigs)
? object.tableConfigs.map((e: any) => TableConfig.fromJSON(e))
: [],
};
@@ -2706,11 +2834,11 @@ export const SchemaConfig = {
toJSON(message: SchemaConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.tableConfigs) {
- obj.tableConfigs = message.tableConfigs.map((e) => e ? TableConfig.toJSON(e) : undefined);
- } else {
- obj.tableConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tableConfigs?.length) {
+ obj.tableConfigs = message.tableConfigs.map((e) => TableConfig.toJSON(e));
}
return obj;
},
@@ -2718,7 +2846,6 @@ export const SchemaConfig = {
create(base?: DeepPartial<SchemaConfig>): SchemaConfig {
return SchemaConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaConfig>): SchemaConfig {
const message = createBaseSchemaConfig();
message.name = object.name ?? "";
@@ -2774,8 +2901,8 @@ export const TableConfig = {
fromJSON(object: any): TableConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- columnConfigs: Array.isArray(object?.columnConfigs)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ columnConfigs: globalThis.Array.isArray(object?.columnConfigs)
? object.columnConfigs.map((e: any) => ColumnConfig.fromJSON(e))
: [],
};
@@ -2783,11 +2910,11 @@ export const TableConfig = {
toJSON(message: TableConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.columnConfigs) {
- obj.columnConfigs = message.columnConfigs.map((e) => e ? ColumnConfig.toJSON(e) : undefined);
- } else {
- obj.columnConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.columnConfigs?.length) {
+ obj.columnConfigs = message.columnConfigs.map((e) => ColumnConfig.toJSON(e));
}
return obj;
},
@@ -2795,7 +2922,6 @@ export const TableConfig = {
create(base?: DeepPartial<TableConfig>): TableConfig {
return TableConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TableConfig>): TableConfig {
const message = createBaseTableConfig();
message.name = object.name ?? "";
@@ -2864,8 +2990,8 @@ export const ColumnConfig = {
fromJSON(object: any): ColumnConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- semanticTypeId: isSet(object.semanticTypeId) ? String(object.semanticTypeId) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ semanticTypeId: isSet(object.semanticTypeId) ? globalThis.String(object.semanticTypeId) : "",
labels: isObject(object.labels)
? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -2877,13 +3003,20 @@ export const ColumnConfig = {
toJSON(message: ColumnConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.semanticTypeId !== undefined && (obj.semanticTypeId = message.semanticTypeId);
- obj.labels = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.semanticTypeId !== "") {
+ obj.semanticTypeId = message.semanticTypeId;
+ }
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
}
return obj;
},
@@ -2891,14 +3024,13 @@ export const ColumnConfig = {
create(base?: DeepPartial<ColumnConfig>): ColumnConfig {
return ColumnConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ColumnConfig>): ColumnConfig {
const message = createBaseColumnConfig();
message.name = object.name ?? "";
message.semanticTypeId = object.semanticTypeId ?? "";
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -2952,20 +3084,26 @@ export const ColumnConfig_LabelsEntry = {
},
fromJSON(object: any): ColumnConfig_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: ColumnConfig_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<ColumnConfig_LabelsEntry>): ColumnConfig_LabelsEntry {
return ColumnConfig_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ColumnConfig_LabelsEntry>): ColumnConfig_LabelsEntry {
const message = createBaseColumnConfig_LabelsEntry();
message.key = object.key ?? "";
@@ -2977,7 +3115,7 @@ export const ColumnConfig_LabelsEntry = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -2991,14 +3129,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/store/idp.ts b/frontend/src/types/proto/store/idp.ts
index d93507855d..d3d6582699 100644
--- a/frontend/src/types/proto/store/idp.ts
+++ b/frontend/src/types/proto/store/idp.ts
@@ -261,19 +261,21 @@ export const IdentityProviderConfig = {
toJSON(message: IdentityProviderConfig): unknown {
const obj: any = {};
- message.oauth2Config !== undefined &&
- (obj.oauth2Config = message.oauth2Config ? OAuth2IdentityProviderConfig.toJSON(message.oauth2Config) : undefined);
- message.oidcConfig !== undefined &&
- (obj.oidcConfig = message.oidcConfig ? OIDCIdentityProviderConfig.toJSON(message.oidcConfig) : undefined);
- message.ldapConfig !== undefined &&
- (obj.ldapConfig = message.ldapConfig ? LDAPIdentityProviderConfig.toJSON(message.ldapConfig) : undefined);
+ if (message.oauth2Config !== undefined) {
+ obj.oauth2Config = OAuth2IdentityProviderConfig.toJSON(message.oauth2Config);
+ }
+ if (message.oidcConfig !== undefined) {
+ obj.oidcConfig = OIDCIdentityProviderConfig.toJSON(message.oidcConfig);
+ }
+ if (message.ldapConfig !== undefined) {
+ obj.ldapConfig = LDAPIdentityProviderConfig.toJSON(message.ldapConfig);
+ }
return obj;
},
create(base?: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {
return IdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {
const message = createBaseIdentityProviderConfig();
message.oauth2Config = (object.oauth2Config !== undefined && object.oauth2Config !== null)
@@ -416,41 +418,53 @@ export const OAuth2IdentityProviderConfig = {
fromJSON(object: any): OAuth2IdentityProviderConfig {
return {
- authUrl: isSet(object.authUrl) ? String(object.authUrl) : "",
- tokenUrl: isSet(object.tokenUrl) ? String(object.tokenUrl) : "",
- userInfoUrl: isSet(object.userInfoUrl) ? String(object.userInfoUrl) : "",
- clientId: isSet(object.clientId) ? String(object.clientId) : "",
- clientSecret: isSet(object.clientSecret) ? String(object.clientSecret) : "",
- scopes: Array.isArray(object?.scopes) ? object.scopes.map((e: any) => String(e)) : [],
+ authUrl: isSet(object.authUrl) ? globalThis.String(object.authUrl) : "",
+ tokenUrl: isSet(object.tokenUrl) ? globalThis.String(object.tokenUrl) : "",
+ userInfoUrl: isSet(object.userInfoUrl) ? globalThis.String(object.userInfoUrl) : "",
+ clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
+ clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
+ scopes: globalThis.Array.isArray(object?.scopes) ? object.scopes.map((e: any) => globalThis.String(e)) : [],
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
- skipTlsVerify: isSet(object.skipTlsVerify) ? Boolean(object.skipTlsVerify) : false,
+ skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
authStyle: isSet(object.authStyle) ? oAuth2AuthStyleFromJSON(object.authStyle) : 0,
};
},
toJSON(message: OAuth2IdentityProviderConfig): unknown {
const obj: any = {};
- message.authUrl !== undefined && (obj.authUrl = message.authUrl);
- message.tokenUrl !== undefined && (obj.tokenUrl = message.tokenUrl);
- message.userInfoUrl !== undefined && (obj.userInfoUrl = message.userInfoUrl);
- message.clientId !== undefined && (obj.clientId = message.clientId);
- message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);
- if (message.scopes) {
- obj.scopes = message.scopes.map((e) => e);
- } else {
- obj.scopes = [];
- }
- message.fieldMapping !== undefined &&
- (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);
- message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);
- message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));
+ if (message.authUrl !== "") {
+ obj.authUrl = message.authUrl;
+ }
+ if (message.tokenUrl !== "") {
+ obj.tokenUrl = message.tokenUrl;
+ }
+ if (message.userInfoUrl !== "") {
+ obj.userInfoUrl = message.userInfoUrl;
+ }
+ if (message.clientId !== "") {
+ obj.clientId = message.clientId;
+ }
+ if (message.clientSecret !== "") {
+ obj.clientSecret = message.clientSecret;
+ }
+ if (message.scopes?.length) {
+ obj.scopes = message.scopes;
+ }
+ if (message.fieldMapping !== undefined) {
+ obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
+ }
+ if (message.skipTlsVerify === true) {
+ obj.skipTlsVerify = message.skipTlsVerify;
+ }
+ if (message.authStyle !== 0) {
+ obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);
+ }
return obj;
},
create(base?: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {
return OAuth2IdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {
const message = createBaseOAuth2IdentityProviderConfig();
message.authUrl = object.authUrl ?? "";
@@ -555,31 +569,41 @@ export const OIDCIdentityProviderConfig = {
fromJSON(object: any): OIDCIdentityProviderConfig {
return {
- issuer: isSet(object.issuer) ? String(object.issuer) : "",
- clientId: isSet(object.clientId) ? String(object.clientId) : "",
- clientSecret: isSet(object.clientSecret) ? String(object.clientSecret) : "",
+ issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
+ clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
+ clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
- skipTlsVerify: isSet(object.skipTlsVerify) ? Boolean(object.skipTlsVerify) : false,
+ skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
authStyle: isSet(object.authStyle) ? oAuth2AuthStyleFromJSON(object.authStyle) : 0,
};
},
toJSON(message: OIDCIdentityProviderConfig): unknown {
const obj: any = {};
- message.issuer !== undefined && (obj.issuer = message.issuer);
- message.clientId !== undefined && (obj.clientId = message.clientId);
- message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);
- message.fieldMapping !== undefined &&
- (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);
- message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);
- message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));
+ if (message.issuer !== "") {
+ obj.issuer = message.issuer;
+ }
+ if (message.clientId !== "") {
+ obj.clientId = message.clientId;
+ }
+ if (message.clientSecret !== "") {
+ obj.clientSecret = message.clientSecret;
+ }
+ if (message.fieldMapping !== undefined) {
+ obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
+ }
+ if (message.skipTlsVerify === true) {
+ obj.skipTlsVerify = message.skipTlsVerify;
+ }
+ if (message.authStyle !== 0) {
+ obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);
+ }
return obj;
},
create(base?: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {
return OIDCIdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {
const message = createBaseOIDCIdentityProviderConfig();
message.issuer = object.issuer ?? "";
@@ -721,37 +745,53 @@ export const LDAPIdentityProviderConfig = {
fromJSON(object: any): LDAPIdentityProviderConfig {
return {
- host: isSet(object.host) ? String(object.host) : "",
- port: isSet(object.port) ? Number(object.port) : 0,
- skipTlsVerify: isSet(object.skipTlsVerify) ? Boolean(object.skipTlsVerify) : false,
- bindDn: isSet(object.bindDn) ? String(object.bindDn) : "",
- bindPassword: isSet(object.bindPassword) ? String(object.bindPassword) : "",
- baseDn: isSet(object.baseDn) ? String(object.baseDn) : "",
- userFilter: isSet(object.userFilter) ? String(object.userFilter) : "",
- securityProtocol: isSet(object.securityProtocol) ? String(object.securityProtocol) : "",
+ host: isSet(object.host) ? globalThis.String(object.host) : "",
+ port: isSet(object.port) ? globalThis.Number(object.port) : 0,
+ skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
+ bindDn: isSet(object.bindDn) ? globalThis.String(object.bindDn) : "",
+ bindPassword: isSet(object.bindPassword) ? globalThis.String(object.bindPassword) : "",
+ baseDn: isSet(object.baseDn) ? globalThis.String(object.baseDn) : "",
+ userFilter: isSet(object.userFilter) ? globalThis.String(object.userFilter) : "",
+ securityProtocol: isSet(object.securityProtocol) ? globalThis.String(object.securityProtocol) : "",
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
};
},
toJSON(message: LDAPIdentityProviderConfig): unknown {
const obj: any = {};
- message.host !== undefined && (obj.host = message.host);
- message.port !== undefined && (obj.port = Math.round(message.port));
- message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);
- message.bindDn !== undefined && (obj.bindDn = message.bindDn);
- message.bindPassword !== undefined && (obj.bindPassword = message.bindPassword);
- message.baseDn !== undefined && (obj.baseDn = message.baseDn);
- message.userFilter !== undefined && (obj.userFilter = message.userFilter);
- message.securityProtocol !== undefined && (obj.securityProtocol = message.securityProtocol);
- message.fieldMapping !== undefined &&
- (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);
+ if (message.host !== "") {
+ obj.host = message.host;
+ }
+ if (message.port !== 0) {
+ obj.port = Math.round(message.port);
+ }
+ if (message.skipTlsVerify === true) {
+ obj.skipTlsVerify = message.skipTlsVerify;
+ }
+ if (message.bindDn !== "") {
+ obj.bindDn = message.bindDn;
+ }
+ if (message.bindPassword !== "") {
+ obj.bindPassword = message.bindPassword;
+ }
+ if (message.baseDn !== "") {
+ obj.baseDn = message.baseDn;
+ }
+ if (message.userFilter !== "") {
+ obj.userFilter = message.userFilter;
+ }
+ if (message.securityProtocol !== "") {
+ obj.securityProtocol = message.securityProtocol;
+ }
+ if (message.fieldMapping !== undefined) {
+ obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
+ }
return obj;
},
create(base?: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {
return LDAPIdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {
const message = createBaseLDAPIdentityProviderConfig();
message.host = object.host ?? "";
@@ -836,26 +876,33 @@ export const FieldMapping = {
fromJSON(object: any): FieldMapping {
return {
- identifier: isSet(object.identifier) ? String(object.identifier) : "",
- displayName: isSet(object.displayName) ? String(object.displayName) : "",
- email: isSet(object.email) ? String(object.email) : "",
- phone: isSet(object.phone) ? String(object.phone) : "",
+ identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "",
+ displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "",
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
+ phone: isSet(object.phone) ? globalThis.String(object.phone) : "",
};
},
toJSON(message: FieldMapping): unknown {
const obj: any = {};
- message.identifier !== undefined && (obj.identifier = message.identifier);
- message.displayName !== undefined && (obj.displayName = message.displayName);
- message.email !== undefined && (obj.email = message.email);
- message.phone !== undefined && (obj.phone = message.phone);
+ if (message.identifier !== "") {
+ obj.identifier = message.identifier;
+ }
+ if (message.displayName !== "") {
+ obj.displayName = message.displayName;
+ }
+ if (message.email !== "") {
+ obj.email = message.email;
+ }
+ if (message.phone !== "") {
+ obj.phone = message.phone;
+ }
return obj;
},
create(base?: DeepPartial<FieldMapping>): FieldMapping {
return FieldMapping.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FieldMapping>): FieldMapping {
const message = createBaseFieldMapping();
message.identifier = object.identifier ?? "";
@@ -933,26 +980,33 @@ export const IdentityProviderUserInfo = {
fromJSON(object: any): IdentityProviderUserInfo {
return {
- identifier: isSet(object.identifier) ? String(object.identifier) : "",
- displayName: isSet(object.displayName) ? String(object.displayName) : "",
- email: isSet(object.email) ? String(object.email) : "",
- phone: isSet(object.phone) ? String(object.phone) : "",
+ identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "",
+ displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "",
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
+ phone: isSet(object.phone) ? globalThis.String(object.phone) : "",
};
},
toJSON(message: IdentityProviderUserInfo): unknown {
const obj: any = {};
- message.identifier !== undefined && (obj.identifier = message.identifier);
- message.displayName !== undefined && (obj.displayName = message.displayName);
- message.email !== undefined && (obj.email = message.email);
- message.phone !== undefined && (obj.phone = message.phone);
+ if (message.identifier !== "") {
+ obj.identifier = message.identifier;
+ }
+ if (message.displayName !== "") {
+ obj.displayName = message.displayName;
+ }
+ if (message.email !== "") {
+ obj.email = message.email;
+ }
+ if (message.phone !== "") {
+ obj.phone = message.phone;
+ }
return obj;
},
create(base?: DeepPartial<IdentityProviderUserInfo>): IdentityProviderUserInfo {
return IdentityProviderUserInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IdentityProviderUserInfo>): IdentityProviderUserInfo {
const message = createBaseIdentityProviderUserInfo();
message.identifier = object.identifier ?? "";
@@ -966,7 +1020,7 @@ export const IdentityProviderUserInfo = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/instance.ts b/frontend/src/types/proto/store/instance.ts
index fc93f1cc01..b9e6a84f78 100644
--- a/frontend/src/types/proto/store/instance.ts
+++ b/frontend/src/types/proto/store/instance.ts
@@ -74,23 +74,25 @@ export const InstanceOptions = {
fromJSON(object: any): InstanceOptions {
return {
- schemaTenantMode: isSet(object.schemaTenantMode) ? Boolean(object.schemaTenantMode) : false,
+ schemaTenantMode: isSet(object.schemaTenantMode) ? globalThis.Boolean(object.schemaTenantMode) : false,
syncInterval: isSet(object.syncInterval) ? Duration.fromJSON(object.syncInterval) : undefined,
};
},
toJSON(message: InstanceOptions): unknown {
const obj: any = {};
- message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);
- message.syncInterval !== undefined &&
- (obj.syncInterval = message.syncInterval ? Duration.toJSON(message.syncInterval) : undefined);
+ if (message.schemaTenantMode === true) {
+ obj.schemaTenantMode = message.schemaTenantMode;
+ }
+ if (message.syncInterval !== undefined) {
+ obj.syncInterval = Duration.toJSON(message.syncInterval);
+ }
return obj;
},
create(base?: DeepPartial<InstanceOptions>): InstanceOptions {
return InstanceOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {
const message = createBaseInstanceOptions();
message.schemaTenantMode = object.schemaTenantMode ?? false;
@@ -148,23 +150,27 @@ export const InstanceMetadata = {
fromJSON(object: any): InstanceMetadata {
return {
- mysqlLowerCaseTableNames: isSet(object.mysqlLowerCaseTableNames) ? Number(object.mysqlLowerCaseTableNames) : 0,
+ mysqlLowerCaseTableNames: isSet(object.mysqlLowerCaseTableNames)
+ ? globalThis.Number(object.mysqlLowerCaseTableNames)
+ : 0,
lastSyncTime: isSet(object.lastSyncTime) ? fromJsonTimestamp(object.lastSyncTime) : undefined,
};
},
toJSON(message: InstanceMetadata): unknown {
const obj: any = {};
- message.mysqlLowerCaseTableNames !== undefined &&
- (obj.mysqlLowerCaseTableNames = Math.round(message.mysqlLowerCaseTableNames));
- message.lastSyncTime !== undefined && (obj.lastSyncTime = message.lastSyncTime.toISOString());
+ if (message.mysqlLowerCaseTableNames !== 0) {
+ obj.mysqlLowerCaseTableNames = Math.round(message.mysqlLowerCaseTableNames);
+ }
+ if (message.lastSyncTime !== undefined) {
+ obj.lastSyncTime = message.lastSyncTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<InstanceMetadata>): InstanceMetadata {
return InstanceMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceMetadata>): InstanceMetadata {
const message = createBaseInstanceMetadata();
message.mysqlLowerCaseTableNames = object.mysqlLowerCaseTableNames ?? 0;
@@ -176,7 +182,7 @@ export const InstanceMetadata = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -190,14 +196,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/store/instance_change_history.ts b/frontend/src/types/proto/store/instance_change_history.ts
index a5cc840925..36fd19c59a 100644
--- a/frontend/src/types/proto/store/instance_change_history.ts
+++ b/frontend/src/types/proto/store/instance_change_history.ts
@@ -82,17 +82,18 @@ export const InstanceChangeHistoryPayload = {
toJSON(message: InstanceChangeHistoryPayload): unknown {
const obj: any = {};
- message.pushEvent !== undefined &&
- (obj.pushEvent = message.pushEvent ? PushEvent.toJSON(message.pushEvent) : undefined);
- message.changedResources !== undefined &&
- (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);
+ if (message.pushEvent !== undefined) {
+ obj.pushEvent = PushEvent.toJSON(message.pushEvent);
+ }
+ if (message.changedResources !== undefined) {
+ obj.changedResources = ChangedResources.toJSON(message.changedResources);
+ }
return obj;
},
create(base?: DeepPartial<InstanceChangeHistoryPayload>): InstanceChangeHistoryPayload {
return InstanceChangeHistoryPayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceChangeHistoryPayload>): InstanceChangeHistoryPayload {
const message = createBaseInstanceChangeHistoryPayload();
message.pushEvent = (object.pushEvent !== undefined && object.pushEvent !== null)
@@ -142,7 +143,7 @@ export const ChangedResources = {
fromJSON(object: any): ChangedResources {
return {
- databases: Array.isArray(object?.databases)
+ databases: globalThis.Array.isArray(object?.databases)
? object.databases.map((e: any) => ChangedResourceDatabase.fromJSON(e))
: [],
};
@@ -150,10 +151,8 @@ export const ChangedResources = {
toJSON(message: ChangedResources): unknown {
const obj: any = {};
- if (message.databases) {
- obj.databases = message.databases.map((e) => e ? ChangedResourceDatabase.toJSON(e) : undefined);
- } else {
- obj.databases = [];
+ if (message.databases?.length) {
+ obj.databases = message.databases.map((e) => ChangedResourceDatabase.toJSON(e));
}
return obj;
},
@@ -161,7 +160,6 @@ export const ChangedResources = {
create(base?: DeepPartial<ChangedResources>): ChangedResources {
return ChangedResources.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResources>): ChangedResources {
const message = createBaseChangedResources();
message.databases = object.databases?.map((e) => ChangedResourceDatabase.fromPartial(e)) || [];
@@ -216,18 +214,20 @@ export const ChangedResourceDatabase = {
fromJSON(object: any): ChangedResourceDatabase {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schemas: Array.isArray(object?.schemas) ? object.schemas.map((e: any) => ChangedResourceSchema.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schemas: globalThis.Array.isArray(object?.schemas)
+ ? object.schemas.map((e: any) => ChangedResourceSchema.fromJSON(e))
+ : [],
};
},
toJSON(message: ChangedResourceDatabase): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.schemas) {
- obj.schemas = message.schemas.map((e) => e ? ChangedResourceSchema.toJSON(e) : undefined);
- } else {
- obj.schemas = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schemas?.length) {
+ obj.schemas = message.schemas.map((e) => ChangedResourceSchema.toJSON(e));
}
return obj;
},
@@ -235,7 +235,6 @@ export const ChangedResourceDatabase = {
create(base?: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {
return ChangedResourceDatabase.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {
const message = createBaseChangedResourceDatabase();
message.name = object.name ?? "";
@@ -291,18 +290,20 @@ export const ChangedResourceSchema = {
fromJSON(object: any): ChangedResourceSchema {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tables: Array.isArray(object?.tables) ? object.tables.map((e: any) => ChangedResourceTable.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tables: globalThis.Array.isArray(object?.tables)
+ ? object.tables.map((e: any) => ChangedResourceTable.fromJSON(e))
+ : [],
};
},
toJSON(message: ChangedResourceSchema): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.tables) {
- obj.tables = message.tables.map((e) => e ? ChangedResourceTable.toJSON(e) : undefined);
- } else {
- obj.tables = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tables?.length) {
+ obj.tables = message.tables.map((e) => ChangedResourceTable.toJSON(e));
}
return obj;
},
@@ -310,7 +311,6 @@ export const ChangedResourceSchema = {
create(base?: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {
return ChangedResourceSchema.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {
const message = createBaseChangedResourceSchema();
message.name = object.name ?? "";
@@ -355,19 +355,20 @@ export const ChangedResourceTable = {
},
fromJSON(object: any): ChangedResourceTable {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: ChangedResourceTable): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<ChangedResourceTable>): ChangedResourceTable {
return ChangedResourceTable.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResourceTable>): ChangedResourceTable {
const message = createBaseChangedResourceTable();
message.name = object.name ?? "";
@@ -378,7 +379,7 @@ export const ChangedResourceTable = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/issue.ts b/frontend/src/types/proto/store/issue.ts
index 963e7c70b1..ee61fabf6f 100644
--- a/frontend/src/types/proto/store/issue.ts
+++ b/frontend/src/types/proto/store/issue.ts
@@ -81,17 +81,18 @@ export const IssuePayload = {
toJSON(message: IssuePayload): unknown {
const obj: any = {};
- message.approval !== undefined &&
- (obj.approval = message.approval ? IssuePayloadApproval.toJSON(message.approval) : undefined);
- message.grantRequest !== undefined &&
- (obj.grantRequest = message.grantRequest ? GrantRequest.toJSON(message.grantRequest) : undefined);
+ if (message.approval !== undefined) {
+ obj.approval = IssuePayloadApproval.toJSON(message.approval);
+ }
+ if (message.grantRequest !== undefined) {
+ obj.grantRequest = GrantRequest.toJSON(message.grantRequest);
+ }
return obj;
},
create(base?: DeepPartial<IssuePayload>): IssuePayload {
return IssuePayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IssuePayload>): IssuePayload {
const message = createBaseIssuePayload();
message.approval = (object.approval !== undefined && object.approval !== null)
@@ -171,8 +172,8 @@ export const GrantRequest = {
fromJSON(object: any): GrantRequest {
return {
- role: isSet(object.role) ? String(object.role) : "",
- user: isSet(object.user) ? String(object.user) : "",
+ role: isSet(object.role) ? globalThis.String(object.role) : "",
+ user: isSet(object.user) ? globalThis.String(object.user) : "",
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
expiration: isSet(object.expiration) ? Duration.fromJSON(object.expiration) : undefined,
};
@@ -180,18 +181,24 @@ export const GrantRequest = {
toJSON(message: GrantRequest): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role);
- message.user !== undefined && (obj.user = message.user);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
- message.expiration !== undefined &&
- (obj.expiration = message.expiration ? Duration.toJSON(message.expiration) : undefined);
+ if (message.role !== "") {
+ obj.role = message.role;
+ }
+ if (message.user !== "") {
+ obj.user = message.user;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
+ if (message.expiration !== undefined) {
+ obj.expiration = Duration.toJSON(message.expiration);
+ }
return obj;
},
create(base?: DeepPartial<GrantRequest>): GrantRequest {
return GrantRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GrantRequest>): GrantRequest {
const message = createBaseGrantRequest();
message.role = object.role ?? "";
@@ -209,7 +216,7 @@ export const GrantRequest = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.ts
index 638a640f0f..1f2d6529be 100644
--- a/frontend/src/types/proto/store/plan.ts
+++ b/frontend/src/types/proto/store/plan.ts
@@ -240,15 +240,15 @@ export const PlanConfig = {
},
fromJSON(object: any): PlanConfig {
- return { steps: Array.isArray(object?.steps) ? object.steps.map((e: any) => PlanConfig_Step.fromJSON(e)) : [] };
+ return {
+ steps: globalThis.Array.isArray(object?.steps) ? object.steps.map((e: any) => PlanConfig_Step.fromJSON(e)) : [],
+ };
},
toJSON(message: PlanConfig): unknown {
const obj: any = {};
- if (message.steps) {
- obj.steps = message.steps.map((e) => e ? PlanConfig_Step.toJSON(e) : undefined);
- } else {
- obj.steps = [];
+ if (message.steps?.length) {
+ obj.steps = message.steps.map((e) => PlanConfig_Step.toJSON(e));
}
return obj;
},
@@ -256,7 +256,6 @@ export const PlanConfig = {
create(base?: DeepPartial<PlanConfig>): PlanConfig {
return PlanConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanConfig>): PlanConfig {
const message = createBasePlanConfig();
message.steps = object.steps?.map((e) => PlanConfig_Step.fromPartial(e)) || [];
@@ -300,15 +299,15 @@ export const PlanConfig_Step = {
},
fromJSON(object: any): PlanConfig_Step {
- return { specs: Array.isArray(object?.specs) ? object.specs.map((e: any) => PlanConfig_Spec.fromJSON(e)) : [] };
+ return {
+ specs: globalThis.Array.isArray(object?.specs) ? object.specs.map((e: any) => PlanConfig_Spec.fromJSON(e)) : [],
+ };
},
toJSON(message: PlanConfig_Step): unknown {
const obj: any = {};
- if (message.specs) {
- obj.specs = message.specs.map((e) => e ? PlanConfig_Spec.toJSON(e) : undefined);
- } else {
- obj.specs = [];
+ if (message.specs?.length) {
+ obj.specs = message.specs.map((e) => PlanConfig_Spec.toJSON(e));
}
return obj;
},
@@ -316,7 +315,6 @@ export const PlanConfig_Step = {
create(base?: DeepPartial<PlanConfig_Step>): PlanConfig_Step {
return PlanConfig_Step.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanConfig_Step>): PlanConfig_Step {
const message = createBasePlanConfig_Step();
message.specs = object.specs?.map((e) => PlanConfig_Spec.fromPartial(e)) || [];
@@ -410,7 +408,7 @@ export const PlanConfig_Spec = {
earliestAllowedTime: isSet(object.earliestAllowedTime)
? fromJsonTimestamp(object.earliestAllowedTime)
: undefined,
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
createDatabaseConfig: isSet(object.createDatabaseConfig)
? PlanConfig_CreateDatabaseConfig.fromJSON(object.createDatabaseConfig)
: undefined,
@@ -425,24 +423,27 @@ export const PlanConfig_Spec = {
toJSON(message: PlanConfig_Spec): unknown {
const obj: any = {};
- message.earliestAllowedTime !== undefined && (obj.earliestAllowedTime = message.earliestAllowedTime.toISOString());
- message.id !== undefined && (obj.id = message.id);
- message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig
- ? PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)
- : undefined);
- message.changeDatabaseConfig !== undefined && (obj.changeDatabaseConfig = message.changeDatabaseConfig
- ? PlanConfig_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig)
- : undefined);
- message.restoreDatabaseConfig !== undefined && (obj.restoreDatabaseConfig = message.restoreDatabaseConfig
- ? PlanConfig_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig)
- : undefined);
+ if (message.earliestAllowedTime !== undefined) {
+ obj.earliestAllowedTime = message.earliestAllowedTime.toISOString();
+ }
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.createDatabaseConfig !== undefined) {
+ obj.createDatabaseConfig = PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);
+ }
+ if (message.changeDatabaseConfig !== undefined) {
+ obj.changeDatabaseConfig = PlanConfig_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig);
+ }
+ if (message.restoreDatabaseConfig !== undefined) {
+ obj.restoreDatabaseConfig = PlanConfig_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig);
+ }
return obj;
},
create(base?: DeepPartial<PlanConfig_Spec>): PlanConfig_Spec {
return PlanConfig_Spec.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanConfig_Spec>): PlanConfig_Spec {
const message = createBasePlanConfig_Spec();
message.earliestAllowedTime = object.earliestAllowedTime ?? undefined;
@@ -602,15 +603,15 @@ export const PlanConfig_CreateDatabaseConfig = {
fromJSON(object: any): PlanConfig_CreateDatabaseConfig {
return {
- target: isSet(object.target) ? String(object.target) : "",
- database: isSet(object.database) ? String(object.database) : "",
- table: isSet(object.table) ? String(object.table) : "",
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- cluster: isSet(object.cluster) ? String(object.cluster) : "",
- owner: isSet(object.owner) ? String(object.owner) : "",
- backup: isSet(object.backup) ? String(object.backup) : "",
- environment: isSet(object.environment) ? String(object.environment) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ cluster: isSet(object.cluster) ? globalThis.String(object.cluster) : "",
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
+ backup: isSet(object.backup) ? globalThis.String(object.backup) : "",
+ environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
labels: isObject(object.labels)
? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -622,20 +623,41 @@ export const PlanConfig_CreateDatabaseConfig = {
toJSON(message: PlanConfig_CreateDatabaseConfig): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.database !== undefined && (obj.database = message.database);
- message.table !== undefined && (obj.table = message.table);
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- message.cluster !== undefined && (obj.cluster = message.cluster);
- message.owner !== undefined && (obj.owner = message.owner);
- message.backup !== undefined && (obj.backup = message.backup);
- message.environment !== undefined && (obj.environment = message.environment);
- obj.labels = {};
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.cluster !== "") {
+ obj.cluster = message.cluster;
+ }
+ if (message.owner !== "") {
+ obj.owner = message.owner;
+ }
+ if (message.backup !== "") {
+ obj.backup = message.backup;
+ }
+ if (message.environment !== "") {
+ obj.environment = message.environment;
+ }
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
}
return obj;
},
@@ -643,7 +665,6 @@ export const PlanConfig_CreateDatabaseConfig = {
create(base?: DeepPartial<PlanConfig_CreateDatabaseConfig>): PlanConfig_CreateDatabaseConfig {
return PlanConfig_CreateDatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanConfig_CreateDatabaseConfig>): PlanConfig_CreateDatabaseConfig {
const message = createBasePlanConfig_CreateDatabaseConfig();
message.target = object.target ?? "";
@@ -657,7 +678,7 @@ export const PlanConfig_CreateDatabaseConfig = {
message.environment = object.environment ?? "";
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -711,20 +732,26 @@ export const PlanConfig_CreateDatabaseConfig_LabelsEntry = {
},
fromJSON(object: any): PlanConfig_CreateDatabaseConfig_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: PlanConfig_CreateDatabaseConfig_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<PlanConfig_CreateDatabaseConfig_LabelsEntry>): PlanConfig_CreateDatabaseConfig_LabelsEntry {
return PlanConfig_CreateDatabaseConfig_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<PlanConfig_CreateDatabaseConfig_LabelsEntry>,
): PlanConfig_CreateDatabaseConfig_LabelsEntry {
@@ -844,11 +871,11 @@ export const PlanConfig_ChangeDatabaseConfig = {
fromJSON(object: any): PlanConfig_ChangeDatabaseConfig {
return {
- target: isSet(object.target) ? String(object.target) : "",
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
type: isSet(object.type) ? planConfig_ChangeDatabaseConfig_TypeFromJSON(object.type) : 0,
- schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
- rollbackEnabled: isSet(object.rollbackEnabled) ? Boolean(object.rollbackEnabled) : false,
+ schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "",
+ rollbackEnabled: isSet(object.rollbackEnabled) ? globalThis.Boolean(object.rollbackEnabled) : false,
rollbackDetail: isSet(object.rollbackDetail)
? PlanConfig_ChangeDatabaseConfig_RollbackDetail.fromJSON(object.rollbackDetail)
: undefined,
@@ -863,19 +890,32 @@ export const PlanConfig_ChangeDatabaseConfig = {
toJSON(message: PlanConfig_ChangeDatabaseConfig): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.type !== undefined && (obj.type = planConfig_ChangeDatabaseConfig_TypeToJSON(message.type));
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
- message.rollbackEnabled !== undefined && (obj.rollbackEnabled = message.rollbackEnabled);
- message.rollbackDetail !== undefined && (obj.rollbackDetail = message.rollbackDetail
- ? PlanConfig_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail)
- : undefined);
- obj.ghostFlags = {};
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.type !== 0) {
+ obj.type = planConfig_ChangeDatabaseConfig_TypeToJSON(message.type);
+ }
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
+ if (message.rollbackEnabled === true) {
+ obj.rollbackEnabled = message.rollbackEnabled;
+ }
+ if (message.rollbackDetail !== undefined) {
+ obj.rollbackDetail = PlanConfig_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail);
+ }
if (message.ghostFlags) {
- Object.entries(message.ghostFlags).forEach(([k, v]) => {
- obj.ghostFlags[k] = v;
- });
+ const entries = Object.entries(message.ghostFlags);
+ if (entries.length > 0) {
+ obj.ghostFlags = {};
+ entries.forEach(([k, v]) => {
+ obj.ghostFlags[k] = v;
+ });
+ }
}
return obj;
},
@@ -883,7 +923,6 @@ export const PlanConfig_ChangeDatabaseConfig = {
create(base?: DeepPartial<PlanConfig_ChangeDatabaseConfig>): PlanConfig_ChangeDatabaseConfig {
return PlanConfig_ChangeDatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanConfig_ChangeDatabaseConfig>): PlanConfig_ChangeDatabaseConfig {
const message = createBasePlanConfig_ChangeDatabaseConfig();
message.target = object.target ?? "";
@@ -897,7 +936,7 @@ export const PlanConfig_ChangeDatabaseConfig = {
message.ghostFlags = Object.entries(object.ghostFlags ?? {}).reduce<{ [key: string]: string }>(
(acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
},
@@ -957,15 +996,19 @@ export const PlanConfig_ChangeDatabaseConfig_RollbackDetail = {
fromJSON(object: any): PlanConfig_ChangeDatabaseConfig_RollbackDetail {
return {
- rollbackFromTask: isSet(object.rollbackFromTask) ? String(object.rollbackFromTask) : "",
- rollbackFromIssue: isSet(object.rollbackFromIssue) ? String(object.rollbackFromIssue) : "",
+ rollbackFromTask: isSet(object.rollbackFromTask) ? globalThis.String(object.rollbackFromTask) : "",
+ rollbackFromIssue: isSet(object.rollbackFromIssue) ? globalThis.String(object.rollbackFromIssue) : "",
};
},
toJSON(message: PlanConfig_ChangeDatabaseConfig_RollbackDetail): unknown {
const obj: any = {};
- message.rollbackFromTask !== undefined && (obj.rollbackFromTask = message.rollbackFromTask);
- message.rollbackFromIssue !== undefined && (obj.rollbackFromIssue = message.rollbackFromIssue);
+ if (message.rollbackFromTask !== "") {
+ obj.rollbackFromTask = message.rollbackFromTask;
+ }
+ if (message.rollbackFromIssue !== "") {
+ obj.rollbackFromIssue = message.rollbackFromIssue;
+ }
return obj;
},
@@ -974,7 +1017,6 @@ export const PlanConfig_ChangeDatabaseConfig_RollbackDetail = {
): PlanConfig_ChangeDatabaseConfig_RollbackDetail {
return PlanConfig_ChangeDatabaseConfig_RollbackDetail.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<PlanConfig_ChangeDatabaseConfig_RollbackDetail>,
): PlanConfig_ChangeDatabaseConfig_RollbackDetail {
@@ -1034,13 +1076,20 @@ export const PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry = {
},
fromJSON(object: any): PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
@@ -1049,7 +1098,6 @@ export const PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry = {
): PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry {
return PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry>,
): PlanConfig_ChangeDatabaseConfig_GhostFlagsEntry {
@@ -1127,30 +1175,35 @@ export const PlanConfig_RestoreDatabaseConfig = {
fromJSON(object: any): PlanConfig_RestoreDatabaseConfig {
return {
- target: isSet(object.target) ? String(object.target) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
createDatabaseConfig: isSet(object.createDatabaseConfig)
? PlanConfig_CreateDatabaseConfig.fromJSON(object.createDatabaseConfig)
: undefined,
- backup: isSet(object.backup) ? String(object.backup) : undefined,
+ backup: isSet(object.backup) ? globalThis.String(object.backup) : undefined,
pointInTime: isSet(object.pointInTime) ? fromJsonTimestamp(object.pointInTime) : undefined,
};
},
toJSON(message: PlanConfig_RestoreDatabaseConfig): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig
- ? PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)
- : undefined);
- message.backup !== undefined && (obj.backup = message.backup);
- message.pointInTime !== undefined && (obj.pointInTime = message.pointInTime.toISOString());
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.createDatabaseConfig !== undefined) {
+ obj.createDatabaseConfig = PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);
+ }
+ if (message.backup !== undefined) {
+ obj.backup = message.backup;
+ }
+ if (message.pointInTime !== undefined) {
+ obj.pointInTime = message.pointInTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<PlanConfig_RestoreDatabaseConfig>): PlanConfig_RestoreDatabaseConfig {
return PlanConfig_RestoreDatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanConfig_RestoreDatabaseConfig>): PlanConfig_RestoreDatabaseConfig {
const message = createBasePlanConfig_RestoreDatabaseConfig();
message.target = object.target ?? "";
@@ -1166,7 +1219,7 @@ export const PlanConfig_RestoreDatabaseConfig = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -1180,14 +1233,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index 31f0e92cb0..5fc7187962 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -237,12 +237,12 @@ export const PlanCheckRunConfig = {
fromJSON(object: any): PlanCheckRunConfig {
return {
- sheetUid: isSet(object.sheetUid) ? Number(object.sheetUid) : 0,
+ sheetUid: isSet(object.sheetUid) ? globalThis.Number(object.sheetUid) : 0,
changeDatabaseType: isSet(object.changeDatabaseType)
? planCheckRunConfig_ChangeDatabaseTypeFromJSON(object.changeDatabaseType)
: 0,
- instanceUid: isSet(object.instanceUid) ? Number(object.instanceUid) : 0,
- databaseName: isSet(object.databaseName) ? String(object.databaseName) : "",
+ instanceUid: isSet(object.instanceUid) ? globalThis.Number(object.instanceUid) : 0,
+ databaseName: isSet(object.databaseName) ? globalThis.String(object.databaseName) : "",
databaseGroupUid: isSet(object.databaseGroupUid) ? Long.fromValue(object.databaseGroupUid) : undefined,
ghostFlags: isObject(object.ghostFlags)
? Object.entries(object.ghostFlags).reduce<{ [key: string]: string }>((acc, [key, value]) => {
@@ -255,18 +255,29 @@ export const PlanCheckRunConfig = {
toJSON(message: PlanCheckRunConfig): unknown {
const obj: any = {};
- message.sheetUid !== undefined && (obj.sheetUid = Math.round(message.sheetUid));
- message.changeDatabaseType !== undefined &&
- (obj.changeDatabaseType = planCheckRunConfig_ChangeDatabaseTypeToJSON(message.changeDatabaseType));
- message.instanceUid !== undefined && (obj.instanceUid = Math.round(message.instanceUid));
- message.databaseName !== undefined && (obj.databaseName = message.databaseName);
- message.databaseGroupUid !== undefined &&
- (obj.databaseGroupUid = (message.databaseGroupUid || undefined).toString());
- obj.ghostFlags = {};
+ if (message.sheetUid !== 0) {
+ obj.sheetUid = Math.round(message.sheetUid);
+ }
+ if (message.changeDatabaseType !== 0) {
+ obj.changeDatabaseType = planCheckRunConfig_ChangeDatabaseTypeToJSON(message.changeDatabaseType);
+ }
+ if (message.instanceUid !== 0) {
+ obj.instanceUid = Math.round(message.instanceUid);
+ }
+ if (message.databaseName !== "") {
+ obj.databaseName = message.databaseName;
+ }
+ if (message.databaseGroupUid !== undefined) {
+ obj.databaseGroupUid = (message.databaseGroupUid || Long.ZERO).toString();
+ }
if (message.ghostFlags) {
- Object.entries(message.ghostFlags).forEach(([k, v]) => {
- obj.ghostFlags[k] = v;
- });
+ const entries = Object.entries(message.ghostFlags);
+ if (entries.length > 0) {
+ obj.ghostFlags = {};
+ entries.forEach(([k, v]) => {
+ obj.ghostFlags[k] = v;
+ });
+ }
}
return obj;
},
@@ -274,7 +285,6 @@ export const PlanCheckRunConfig = {
create(base?: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {
return PlanCheckRunConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {
const message = createBasePlanCheckRunConfig();
message.sheetUid = object.sheetUid ?? 0;
@@ -287,7 +297,7 @@ export const PlanCheckRunConfig = {
message.ghostFlags = Object.entries(object.ghostFlags ?? {}).reduce<{ [key: string]: string }>(
(acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
},
@@ -343,20 +353,26 @@ export const PlanCheckRunConfig_GhostFlagsEntry = {
},
fromJSON(object: any): PlanCheckRunConfig_GhostFlagsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: PlanCheckRunConfig_GhostFlagsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunConfig_GhostFlagsEntry>): PlanCheckRunConfig_GhostFlagsEntry {
return PlanCheckRunConfig_GhostFlagsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunConfig_GhostFlagsEntry>): PlanCheckRunConfig_GhostFlagsEntry {
const message = createBasePlanCheckRunConfig_GhostFlagsEntry();
message.key = object.key ?? "";
@@ -412,28 +428,27 @@ export const PlanCheckRunResult = {
fromJSON(object: any): PlanCheckRunResult {
return {
- results: Array.isArray(object?.results)
+ results: globalThis.Array.isArray(object?.results)
? object.results.map((e: any) => PlanCheckRunResult_Result.fromJSON(e))
: [],
- error: isSet(object.error) ? String(object.error) : "",
+ error: isSet(object.error) ? globalThis.String(object.error) : "",
};
},
toJSON(message: PlanCheckRunResult): unknown {
const obj: any = {};
- if (message.results) {
- obj.results = message.results.map((e) => e ? PlanCheckRunResult_Result.toJSON(e) : undefined);
- } else {
- obj.results = [];
+ if (message.results?.length) {
+ obj.results = message.results.map((e) => PlanCheckRunResult_Result.toJSON(e));
+ }
+ if (message.error !== "") {
+ obj.error = message.error;
}
- message.error !== undefined && (obj.error = message.error);
return obj;
},
create(base?: DeepPartial<PlanCheckRunResult>): PlanCheckRunResult {
return PlanCheckRunResult.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunResult>): PlanCheckRunResult {
const message = createBasePlanCheckRunResult();
message.results = object.results?.map((e) => PlanCheckRunResult_Result.fromPartial(e)) || [];
@@ -530,9 +545,9 @@ export const PlanCheckRunResult_Result = {
fromJSON(object: any): PlanCheckRunResult_Result {
return {
status: isSet(object.status) ? planCheckRunResult_Result_StatusFromJSON(object.status) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- content: isSet(object.content) ? String(object.content) : "",
- code: isSet(object.code) ? Number(object.code) : 0,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
sqlSummaryReport: isSet(object.sqlSummaryReport)
? PlanCheckRunResult_Result_SqlSummaryReport.fromJSON(object.sqlSummaryReport)
: undefined,
@@ -544,23 +559,30 @@ export const PlanCheckRunResult_Result = {
toJSON(message: PlanCheckRunResult_Result): unknown {
const obj: any = {};
- message.status !== undefined && (obj.status = planCheckRunResult_Result_StatusToJSON(message.status));
- message.title !== undefined && (obj.title = message.title);
- message.content !== undefined && (obj.content = message.content);
- message.code !== undefined && (obj.code = Math.round(message.code));
- message.sqlSummaryReport !== undefined && (obj.sqlSummaryReport = message.sqlSummaryReport
- ? PlanCheckRunResult_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport)
- : undefined);
- message.sqlReviewReport !== undefined && (obj.sqlReviewReport = message.sqlReviewReport
- ? PlanCheckRunResult_Result_SqlReviewReport.toJSON(message.sqlReviewReport)
- : undefined);
+ if (message.status !== 0) {
+ obj.status = planCheckRunResult_Result_StatusToJSON(message.status);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.content !== "") {
+ obj.content = message.content;
+ }
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
+ if (message.sqlSummaryReport !== undefined) {
+ obj.sqlSummaryReport = PlanCheckRunResult_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport);
+ }
+ if (message.sqlReviewReport !== undefined) {
+ obj.sqlReviewReport = PlanCheckRunResult_Result_SqlReviewReport.toJSON(message.sqlReviewReport);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunResult_Result>): PlanCheckRunResult_Result {
return PlanCheckRunResult_Result.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunResult_Result>): PlanCheckRunResult_Result {
const message = createBasePlanCheckRunResult_Result();
message.status = object.status ?? 0;
@@ -644,31 +666,35 @@ export const PlanCheckRunResult_Result_SqlSummaryReport = {
fromJSON(object: any): PlanCheckRunResult_Result_SqlSummaryReport {
return {
- code: isSet(object.code) ? Number(object.code) : 0,
- statementTypes: Array.isArray(object?.statementTypes) ? object.statementTypes.map((e: any) => String(e)) : [],
- affectedRows: isSet(object.affectedRows) ? Number(object.affectedRows) : 0,
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
+ statementTypes: globalThis.Array.isArray(object?.statementTypes)
+ ? object.statementTypes.map((e: any) => globalThis.String(e))
+ : [],
+ affectedRows: isSet(object.affectedRows) ? globalThis.Number(object.affectedRows) : 0,
changedResources: isSet(object.changedResources) ? ChangedResources.fromJSON(object.changedResources) : undefined,
};
},
toJSON(message: PlanCheckRunResult_Result_SqlSummaryReport): unknown {
const obj: any = {};
- message.code !== undefined && (obj.code = Math.round(message.code));
- if (message.statementTypes) {
- obj.statementTypes = message.statementTypes.map((e) => e);
- } else {
- obj.statementTypes = [];
- }
- message.affectedRows !== undefined && (obj.affectedRows = Math.round(message.affectedRows));
- message.changedResources !== undefined &&
- (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
+ if (message.statementTypes?.length) {
+ obj.statementTypes = message.statementTypes;
+ }
+ if (message.affectedRows !== 0) {
+ obj.affectedRows = Math.round(message.affectedRows);
+ }
+ if (message.changedResources !== undefined) {
+ obj.changedResources = ChangedResources.toJSON(message.changedResources);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunResult_Result_SqlSummaryReport>): PlanCheckRunResult_Result_SqlSummaryReport {
return PlanCheckRunResult_Result_SqlSummaryReport.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<PlanCheckRunResult_Result_SqlSummaryReport>,
): PlanCheckRunResult_Result_SqlSummaryReport {
@@ -750,26 +776,33 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
fromJSON(object: any): PlanCheckRunResult_Result_SqlReviewReport {
return {
- line: isSet(object.line) ? Number(object.line) : 0,
- column: isSet(object.column) ? Number(object.column) : 0,
- detail: isSet(object.detail) ? String(object.detail) : "",
- code: isSet(object.code) ? Number(object.code) : 0,
+ line: isSet(object.line) ? globalThis.Number(object.line) : 0,
+ column: isSet(object.column) ? globalThis.Number(object.column) : 0,
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
};
},
toJSON(message: PlanCheckRunResult_Result_SqlReviewReport): unknown {
const obj: any = {};
- message.line !== undefined && (obj.line = Math.round(message.line));
- message.column !== undefined && (obj.column = Math.round(message.column));
- message.detail !== undefined && (obj.detail = message.detail);
- message.code !== undefined && (obj.code = Math.round(message.code));
+ if (message.line !== 0) {
+ obj.line = Math.round(message.line);
+ }
+ if (message.column !== 0) {
+ obj.column = Math.round(message.column);
+ }
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunResult_Result_SqlReviewReport>): PlanCheckRunResult_Result_SqlReviewReport {
return PlanCheckRunResult_Result_SqlReviewReport.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<PlanCheckRunResult_Result_SqlReviewReport>,
): PlanCheckRunResult_Result_SqlReviewReport {
@@ -785,7 +818,7 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/policy.ts b/frontend/src/types/proto/store/policy.ts
index 9a73497cdc..f2ea6fdc33 100644
--- a/frontend/src/types/proto/store/policy.ts
+++ b/frontend/src/types/proto/store/policy.ts
@@ -257,30 +257,32 @@ export const RolloutPolicy = {
fromJSON(object: any): RolloutPolicy {
return {
- automatic: isSet(object.automatic) ? Boolean(object.automatic) : false,
- workspaceRoles: Array.isArray(object?.workspaceRoles) ? object.workspaceRoles.map((e: any) => String(e)) : [],
- projectRoles: Array.isArray(object?.projectRoles) ? object.projectRoles.map((e: any) => String(e)) : [],
- issueRoles: Array.isArray(object?.issueRoles) ? object.issueRoles.map((e: any) => String(e)) : [],
+ automatic: isSet(object.automatic) ? globalThis.Boolean(object.automatic) : false,
+ workspaceRoles: globalThis.Array.isArray(object?.workspaceRoles)
+ ? object.workspaceRoles.map((e: any) => globalThis.String(e))
+ : [],
+ projectRoles: globalThis.Array.isArray(object?.projectRoles)
+ ? object.projectRoles.map((e: any) => globalThis.String(e))
+ : [],
+ issueRoles: globalThis.Array.isArray(object?.issueRoles)
+ ? object.issueRoles.map((e: any) => globalThis.String(e))
+ : [],
};
},
toJSON(message: RolloutPolicy): unknown {
const obj: any = {};
- message.automatic !== undefined && (obj.automatic = message.automatic);
- if (message.workspaceRoles) {
- obj.workspaceRoles = message.workspaceRoles.map((e) => e);
- } else {
- obj.workspaceRoles = [];
- }
- if (message.projectRoles) {
- obj.projectRoles = message.projectRoles.map((e) => e);
- } else {
- obj.projectRoles = [];
- }
- if (message.issueRoles) {
- obj.issueRoles = message.issueRoles.map((e) => e);
- } else {
- obj.issueRoles = [];
+ if (message.automatic === true) {
+ obj.automatic = message.automatic;
+ }
+ if (message.workspaceRoles?.length) {
+ obj.workspaceRoles = message.workspaceRoles;
+ }
+ if (message.projectRoles?.length) {
+ obj.projectRoles = message.projectRoles;
+ }
+ if (message.issueRoles?.length) {
+ obj.issueRoles = message.issueRoles;
}
return obj;
},
@@ -288,7 +290,6 @@ export const RolloutPolicy = {
create(base?: DeepPartial<RolloutPolicy>): RolloutPolicy {
return RolloutPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RolloutPolicy>): RolloutPolicy {
const message = createBaseRolloutPolicy();
message.automatic = object.automatic ?? false;
@@ -335,15 +336,15 @@ export const IamPolicy = {
},
fromJSON(object: any): IamPolicy {
- return { bindings: Array.isArray(object?.bindings) ? object.bindings.map((e: any) => Binding.fromJSON(e)) : [] };
+ return {
+ bindings: globalThis.Array.isArray(object?.bindings) ? object.bindings.map((e: any) => Binding.fromJSON(e)) : [],
+ };
},
toJSON(message: IamPolicy): unknown {
const obj: any = {};
- if (message.bindings) {
- obj.bindings = message.bindings.map((e) => e ? Binding.toJSON(e) : undefined);
- } else {
- obj.bindings = [];
+ if (message.bindings?.length) {
+ obj.bindings = message.bindings.map((e) => Binding.toJSON(e));
}
return obj;
},
@@ -351,7 +352,6 @@ export const IamPolicy = {
create(base?: DeepPartial<IamPolicy>): IamPolicy {
return IamPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IamPolicy>): IamPolicy {
const message = createBaseIamPolicy();
message.bindings = object.bindings?.map((e) => Binding.fromPartial(e)) || [];
@@ -416,28 +416,29 @@ export const Binding = {
fromJSON(object: any): Binding {
return {
- role: isSet(object.role) ? String(object.role) : "",
- members: Array.isArray(object?.members) ? object.members.map((e: any) => String(e)) : [],
+ role: isSet(object.role) ? globalThis.String(object.role) : "",
+ members: globalThis.Array.isArray(object?.members) ? object.members.map((e: any) => globalThis.String(e)) : [],
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
};
},
toJSON(message: Binding): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role);
- if (message.members) {
- obj.members = message.members.map((e) => e);
- } else {
- obj.members = [];
+ if (message.role !== "") {
+ obj.role = message.role;
+ }
+ if (message.members?.length) {
+ obj.members = message.members;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
}
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
return obj;
},
create(base?: DeepPartial<Binding>): Binding {
return Binding.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Binding>): Binding {
const message = createBaseBinding();
message.role = object.role ?? "";
@@ -485,15 +486,15 @@ export const MaskingPolicy = {
},
fromJSON(object: any): MaskingPolicy {
- return { maskData: Array.isArray(object?.maskData) ? object.maskData.map((e: any) => MaskData.fromJSON(e)) : [] };
+ return {
+ maskData: globalThis.Array.isArray(object?.maskData) ? object.maskData.map((e: any) => MaskData.fromJSON(e)) : [],
+ };
},
toJSON(message: MaskingPolicy): unknown {
const obj: any = {};
- if (message.maskData) {
- obj.maskData = message.maskData.map((e) => e ? MaskData.toJSON(e) : undefined);
- } else {
- obj.maskData = [];
+ if (message.maskData?.length) {
+ obj.maskData = message.maskData.map((e) => MaskData.toJSON(e));
}
return obj;
},
@@ -501,7 +502,6 @@ export const MaskingPolicy = {
create(base?: DeepPartial<MaskingPolicy>): MaskingPolicy {
return MaskingPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingPolicy>): MaskingPolicy {
const message = createBaseMaskingPolicy();
message.maskData = object.maskData?.map((e) => MaskData.fromPartial(e)) || [];
@@ -603,33 +603,45 @@ export const MaskData = {
fromJSON(object: any): MaskData {
return {
- schema: isSet(object.schema) ? String(object.schema) : "",
- table: isSet(object.table) ? String(object.table) : "",
- column: isSet(object.column) ? String(object.column) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ column: isSet(object.column) ? globalThis.String(object.column) : "",
maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
- fullMaskingAlgorithmId: isSet(object.fullMaskingAlgorithmId) ? String(object.fullMaskingAlgorithmId) : "",
+ fullMaskingAlgorithmId: isSet(object.fullMaskingAlgorithmId)
+ ? globalThis.String(object.fullMaskingAlgorithmId)
+ : "",
partialMaskingAlgorithmId: isSet(object.partialMaskingAlgorithmId)
- ? String(object.partialMaskingAlgorithmId)
+ ? globalThis.String(object.partialMaskingAlgorithmId)
: "",
};
},
toJSON(message: MaskData): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
- message.table !== undefined && (obj.table = message.table);
- message.column !== undefined && (obj.column = message.column);
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
- message.fullMaskingAlgorithmId !== undefined && (obj.fullMaskingAlgorithmId = message.fullMaskingAlgorithmId);
- message.partialMaskingAlgorithmId !== undefined &&
- (obj.partialMaskingAlgorithmId = message.partialMaskingAlgorithmId);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
+ if (message.fullMaskingAlgorithmId !== "") {
+ obj.fullMaskingAlgorithmId = message.fullMaskingAlgorithmId;
+ }
+ if (message.partialMaskingAlgorithmId !== "") {
+ obj.partialMaskingAlgorithmId = message.partialMaskingAlgorithmId;
+ }
return obj;
},
create(base?: DeepPartial<MaskData>): MaskData {
return MaskData.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskData>): MaskData {
const message = createBaseMaskData();
message.schema = object.schema ?? "";
@@ -679,7 +691,7 @@ export const MaskingExceptionPolicy = {
fromJSON(object: any): MaskingExceptionPolicy {
return {
- maskingExceptions: Array.isArray(object?.maskingExceptions)
+ maskingExceptions: globalThis.Array.isArray(object?.maskingExceptions)
? object.maskingExceptions.map((e: any) => MaskingExceptionPolicy_MaskingException.fromJSON(e))
: [],
};
@@ -687,12 +699,8 @@ export const MaskingExceptionPolicy = {
toJSON(message: MaskingExceptionPolicy): unknown {
const obj: any = {};
- if (message.maskingExceptions) {
- obj.maskingExceptions = message.maskingExceptions.map((e) =>
- e ? MaskingExceptionPolicy_MaskingException.toJSON(e) : undefined
- );
- } else {
- obj.maskingExceptions = [];
+ if (message.maskingExceptions?.length) {
+ obj.maskingExceptions = message.maskingExceptions.map((e) => MaskingExceptionPolicy_MaskingException.toJSON(e));
}
return obj;
},
@@ -700,7 +708,6 @@ export const MaskingExceptionPolicy = {
create(base?: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {
return MaskingExceptionPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {
const message = createBaseMaskingExceptionPolicy();
message.maskingExceptions =
@@ -778,24 +785,31 @@ export const MaskingExceptionPolicy_MaskingException = {
return {
action: isSet(object.action) ? maskingExceptionPolicy_MaskingException_ActionFromJSON(object.action) : 0,
maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
- member: isSet(object.member) ? String(object.member) : "",
+ member: isSet(object.member) ? globalThis.String(object.member) : "",
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
};
},
toJSON(message: MaskingExceptionPolicy_MaskingException): unknown {
const obj: any = {};
- message.action !== undefined && (obj.action = maskingExceptionPolicy_MaskingException_ActionToJSON(message.action));
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
- message.member !== undefined && (obj.member = message.member);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
+ if (message.action !== 0) {
+ obj.action = maskingExceptionPolicy_MaskingException_ActionToJSON(message.action);
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
+ if (message.member !== "") {
+ obj.member = message.member;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
return obj;
},
create(base?: DeepPartial<MaskingExceptionPolicy_MaskingException>): MaskingExceptionPolicy_MaskingException {
return MaskingExceptionPolicy_MaskingException.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingExceptionPolicy_MaskingException>): MaskingExceptionPolicy_MaskingException {
const message = createBaseMaskingExceptionPolicy_MaskingException();
message.action = object.action ?? 0;
@@ -845,7 +859,7 @@ export const MaskingRulePolicy = {
fromJSON(object: any): MaskingRulePolicy {
return {
- rules: Array.isArray(object?.rules)
+ rules: globalThis.Array.isArray(object?.rules)
? object.rules.map((e: any) => MaskingRulePolicy_MaskingRule.fromJSON(e))
: [],
};
@@ -853,10 +867,8 @@ export const MaskingRulePolicy = {
toJSON(message: MaskingRulePolicy): unknown {
const obj: any = {};
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? MaskingRulePolicy_MaskingRule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => MaskingRulePolicy_MaskingRule.toJSON(e));
}
return obj;
},
@@ -864,7 +876,6 @@ export const MaskingRulePolicy = {
create(base?: DeepPartial<MaskingRulePolicy>): MaskingRulePolicy {
return MaskingRulePolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingRulePolicy>): MaskingRulePolicy {
const message = createBaseMaskingRulePolicy();
message.rules = object.rules?.map((e) => MaskingRulePolicy_MaskingRule.fromPartial(e)) || [];
@@ -929,7 +940,7 @@ export const MaskingRulePolicy_MaskingRule = {
fromJSON(object: any): MaskingRulePolicy_MaskingRule {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
};
@@ -937,16 +948,21 @@ export const MaskingRulePolicy_MaskingRule = {
toJSON(message: MaskingRulePolicy_MaskingRule): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
return obj;
},
create(base?: DeepPartial<MaskingRulePolicy_MaskingRule>): MaskingRulePolicy_MaskingRule {
return MaskingRulePolicy_MaskingRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingRulePolicy_MaskingRule>): MaskingRulePolicy_MaskingRule {
const message = createBaseMaskingRulePolicy_MaskingRule();
message.id = object.id ?? "";
@@ -1005,18 +1021,20 @@ export const SQLReviewPolicy = {
fromJSON(object: any): SQLReviewPolicy {
return {
- name: isSet(object.name) ? String(object.name) : "",
- ruleList: Array.isArray(object?.ruleList) ? object.ruleList.map((e: any) => SQLReviewRule.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ ruleList: globalThis.Array.isArray(object?.ruleList)
+ ? object.ruleList.map((e: any) => SQLReviewRule.fromJSON(e))
+ : [],
};
},
toJSON(message: SQLReviewPolicy): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.ruleList) {
- obj.ruleList = message.ruleList.map((e) => e ? SQLReviewRule.toJSON(e) : undefined);
- } else {
- obj.ruleList = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.ruleList?.length) {
+ obj.ruleList = message.ruleList.map((e) => SQLReviewRule.toJSON(e));
}
return obj;
},
@@ -1024,7 +1042,6 @@ export const SQLReviewPolicy = {
create(base?: DeepPartial<SQLReviewPolicy>): SQLReviewPolicy {
return SQLReviewPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SQLReviewPolicy>): SQLReviewPolicy {
const message = createBaseSQLReviewPolicy();
message.name = object.name ?? "";
@@ -1110,28 +1127,37 @@ export const SQLReviewRule = {
fromJSON(object: any): SQLReviewRule {
return {
- type: isSet(object.type) ? String(object.type) : "",
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
level: isSet(object.level) ? sQLReviewRuleLevelFromJSON(object.level) : 0,
- payload: isSet(object.payload) ? String(object.payload) : "",
+ payload: isSet(object.payload) ? globalThis.String(object.payload) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- comment: isSet(object.comment) ? String(object.comment) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: SQLReviewRule): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = message.type);
- message.level !== undefined && (obj.level = sQLReviewRuleLevelToJSON(message.level));
- message.payload !== undefined && (obj.payload = message.payload);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.level !== 0) {
+ obj.level = sQLReviewRuleLevelToJSON(message.level);
+ }
+ if (message.payload !== "") {
+ obj.payload = message.payload;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<SQLReviewRule>): SQLReviewRule {
return SQLReviewRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SQLReviewRule>): SQLReviewRule {
const message = createBaseSQLReviewRule();
message.type = object.type ?? "";
@@ -1146,7 +1172,7 @@ export const SQLReviewRule = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/project.ts b/frontend/src/types/proto/store/project.ts
index 6306a90700..c05a60bb43 100644
--- a/frontend/src/types/proto/store/project.ts
+++ b/frontend/src/types/proto/store/project.ts
@@ -98,7 +98,7 @@ export const Project = {
fromJSON(object: any): Project {
return {
- protectionRules: Array.isArray(object?.protectionRules)
+ protectionRules: globalThis.Array.isArray(object?.protectionRules)
? object.protectionRules.map((e: any) => ProtectionRule.fromJSON(e))
: [],
};
@@ -106,10 +106,8 @@ export const Project = {
toJSON(message: Project): unknown {
const obj: any = {};
- if (message.protectionRules) {
- obj.protectionRules = message.protectionRules.map((e) => e ? ProtectionRule.toJSON(e) : undefined);
- } else {
- obj.protectionRules = [];
+ if (message.protectionRules?.length) {
+ obj.protectionRules = message.protectionRules.map((e) => ProtectionRule.toJSON(e));
}
return obj;
},
@@ -117,7 +115,6 @@ export const Project = {
create(base?: DeepPartial<Project>): Project {
return Project.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Project>): Project {
const message = createBaseProject();
message.protectionRules = object.protectionRules?.map((e) => ProtectionRule.fromPartial(e)) || [];
@@ -192,24 +189,28 @@ export const ProtectionRule = {
fromJSON(object: any): ProtectionRule {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
target: isSet(object.target) ? protectionRule_TargetFromJSON(object.target) : 0,
- nameFilter: isSet(object.nameFilter) ? String(object.nameFilter) : "",
- createAllowedRoles: Array.isArray(object?.createAllowedRoles)
- ? object.createAllowedRoles.map((e: any) => String(e))
+ nameFilter: isSet(object.nameFilter) ? globalThis.String(object.nameFilter) : "",
+ createAllowedRoles: globalThis.Array.isArray(object?.createAllowedRoles)
+ ? object.createAllowedRoles.map((e: any) => globalThis.String(e))
: [],
};
},
toJSON(message: ProtectionRule): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.target !== undefined && (obj.target = protectionRule_TargetToJSON(message.target));
- message.nameFilter !== undefined && (obj.nameFilter = message.nameFilter);
- if (message.createAllowedRoles) {
- obj.createAllowedRoles = message.createAllowedRoles.map((e) => e);
- } else {
- obj.createAllowedRoles = [];
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.target !== 0) {
+ obj.target = protectionRule_TargetToJSON(message.target);
+ }
+ if (message.nameFilter !== "") {
+ obj.nameFilter = message.nameFilter;
+ }
+ if (message.createAllowedRoles?.length) {
+ obj.createAllowedRoles = message.createAllowedRoles;
}
return obj;
},
@@ -217,7 +218,6 @@ export const ProtectionRule = {
create(base?: DeepPartial<ProtectionRule>): ProtectionRule {
return ProtectionRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ProtectionRule>): ProtectionRule {
const message = createBaseProtectionRule();
message.id = object.id ?? "";
@@ -231,7 +231,7 @@ export const ProtectionRule = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.ts
index c441c4986d..682e527261 100644
--- a/frontend/src/types/proto/store/setting.ts
+++ b/frontend/src/types/proto/store/setting.ts
@@ -497,11 +497,13 @@ export const WorkspaceProfileSetting = {
fromJSON(object: any): WorkspaceProfileSetting {
return {
- externalUrl: isSet(object.externalUrl) ? String(object.externalUrl) : "",
- disallowSignup: isSet(object.disallowSignup) ? Boolean(object.disallowSignup) : false,
- require2fa: isSet(object.require2fa) ? Boolean(object.require2fa) : false,
- outboundIpList: Array.isArray(object?.outboundIpList) ? object.outboundIpList.map((e: any) => String(e)) : [],
- gitopsWebhookUrl: isSet(object.gitopsWebhookUrl) ? String(object.gitopsWebhookUrl) : "",
+ externalUrl: isSet(object.externalUrl) ? globalThis.String(object.externalUrl) : "",
+ disallowSignup: isSet(object.disallowSignup) ? globalThis.Boolean(object.disallowSignup) : false,
+ require2fa: isSet(object.require2fa) ? globalThis.Boolean(object.require2fa) : false,
+ outboundIpList: globalThis.Array.isArray(object?.outboundIpList)
+ ? object.outboundIpList.map((e: any) => globalThis.String(e))
+ : [],
+ gitopsWebhookUrl: isSet(object.gitopsWebhookUrl) ? globalThis.String(object.gitopsWebhookUrl) : "",
tokenDuration: isSet(object.tokenDuration) ? Duration.fromJSON(object.tokenDuration) : undefined,
announcement: isSet(object.announcement) ? Announcement.fromJSON(object.announcement) : undefined,
};
@@ -509,26 +511,33 @@ export const WorkspaceProfileSetting = {
toJSON(message: WorkspaceProfileSetting): unknown {
const obj: any = {};
- message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);
- message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);
- message.require2fa !== undefined && (obj.require2fa = message.require2fa);
- if (message.outboundIpList) {
- obj.outboundIpList = message.outboundIpList.map((e) => e);
- } else {
- obj.outboundIpList = [];
- }
- message.gitopsWebhookUrl !== undefined && (obj.gitopsWebhookUrl = message.gitopsWebhookUrl);
- message.tokenDuration !== undefined &&
- (obj.tokenDuration = message.tokenDuration ? Duration.toJSON(message.tokenDuration) : undefined);
- message.announcement !== undefined &&
- (obj.announcement = message.announcement ? Announcement.toJSON(message.announcement) : undefined);
+ if (message.externalUrl !== "") {
+ obj.externalUrl = message.externalUrl;
+ }
+ if (message.disallowSignup === true) {
+ obj.disallowSignup = message.disallowSignup;
+ }
+ if (message.require2fa === true) {
+ obj.require2fa = message.require2fa;
+ }
+ if (message.outboundIpList?.length) {
+ obj.outboundIpList = message.outboundIpList;
+ }
+ if (message.gitopsWebhookUrl !== "") {
+ obj.gitopsWebhookUrl = message.gitopsWebhookUrl;
+ }
+ if (message.tokenDuration !== undefined) {
+ obj.tokenDuration = Duration.toJSON(message.tokenDuration);
+ }
+ if (message.announcement !== undefined) {
+ obj.announcement = Announcement.toJSON(message.announcement);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
return WorkspaceProfileSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
const message = createBaseWorkspaceProfileSetting();
message.externalUrl = object.externalUrl ?? "";
@@ -604,23 +613,28 @@ export const Announcement = {
fromJSON(object: any): Announcement {
return {
level: isSet(object.level) ? announcement_AlertLevelFromJSON(object.level) : 0,
- text: isSet(object.text) ? String(object.text) : "",
- link: isSet(object.link) ? String(object.link) : "",
+ text: isSet(object.text) ? globalThis.String(object.text) : "",
+ link: isSet(object.link) ? globalThis.String(object.link) : "",
};
},
toJSON(message: Announcement): unknown {
const obj: any = {};
- message.level !== undefined && (obj.level = announcement_AlertLevelToJSON(message.level));
- message.text !== undefined && (obj.text = message.text);
- message.link !== undefined && (obj.link = message.link);
+ if (message.level !== 0) {
+ obj.level = announcement_AlertLevelToJSON(message.level);
+ }
+ if (message.text !== "") {
+ obj.text = message.text;
+ }
+ if (message.link !== "") {
+ obj.link = message.link;
+ }
return obj;
},
create(base?: DeepPartial<Announcement>): Announcement {
return Announcement.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Announcement>): Announcement {
const message = createBaseAnnouncement();
message.level = object.level ?? 0;
@@ -676,20 +690,26 @@ export const AgentPluginSetting = {
},
fromJSON(object: any): AgentPluginSetting {
- return { url: isSet(object.url) ? String(object.url) : "", token: isSet(object.token) ? String(object.token) : "" };
+ return {
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ token: isSet(object.token) ? globalThis.String(object.token) : "",
+ };
},
toJSON(message: AgentPluginSetting): unknown {
const obj: any = {};
- message.url !== undefined && (obj.url = message.url);
- message.token !== undefined && (obj.token = message.token);
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.token !== "") {
+ obj.token = message.token;
+ }
return obj;
},
create(base?: DeepPartial<AgentPluginSetting>): AgentPluginSetting {
return AgentPluginSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AgentPluginSetting>): AgentPluginSetting {
const message = createBaseAgentPluginSetting();
message.url = object.url ?? "";
@@ -735,7 +755,7 @@ export const WorkspaceApprovalSetting = {
fromJSON(object: any): WorkspaceApprovalSetting {
return {
- rules: Array.isArray(object?.rules)
+ rules: globalThis.Array.isArray(object?.rules)
? object.rules.map((e: any) => WorkspaceApprovalSetting_Rule.fromJSON(e))
: [],
};
@@ -743,10 +763,8 @@ export const WorkspaceApprovalSetting = {
toJSON(message: WorkspaceApprovalSetting): unknown {
const obj: any = {};
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? WorkspaceApprovalSetting_Rule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => WorkspaceApprovalSetting_Rule.toJSON(e));
}
return obj;
},
@@ -754,7 +772,6 @@ export const WorkspaceApprovalSetting = {
create(base?: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {
return WorkspaceApprovalSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {
const message = createBaseWorkspaceApprovalSetting();
message.rules = object.rules?.map((e) => WorkspaceApprovalSetting_Rule.fromPartial(e)) || [];
@@ -827,18 +844,21 @@ export const WorkspaceApprovalSetting_Rule = {
toJSON(message: WorkspaceApprovalSetting_Rule): unknown {
const obj: any = {};
- message.expression !== undefined &&
- (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);
- message.template !== undefined &&
- (obj.template = message.template ? ApprovalTemplate.toJSON(message.template) : undefined);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
+ if (message.expression !== undefined) {
+ obj.expression = ParsedExpr.toJSON(message.expression);
+ }
+ if (message.template !== undefined) {
+ obj.template = ApprovalTemplate.toJSON(message.template);
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {
return WorkspaceApprovalSetting_Rule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {
const message = createBaseWorkspaceApprovalSetting_Rule();
message.expression = (object.expression !== undefined && object.expression !== null)
@@ -891,16 +911,16 @@ export const ExternalApprovalSetting = {
fromJSON(object: any): ExternalApprovalSetting {
return {
- nodes: Array.isArray(object?.nodes) ? object.nodes.map((e: any) => ExternalApprovalSetting_Node.fromJSON(e)) : [],
+ nodes: globalThis.Array.isArray(object?.nodes)
+ ? object.nodes.map((e: any) => ExternalApprovalSetting_Node.fromJSON(e))
+ : [],
};
},
toJSON(message: ExternalApprovalSetting): unknown {
const obj: any = {};
- if (message.nodes) {
- obj.nodes = message.nodes.map((e) => e ? ExternalApprovalSetting_Node.toJSON(e) : undefined);
- } else {
- obj.nodes = [];
+ if (message.nodes?.length) {
+ obj.nodes = message.nodes.map((e) => ExternalApprovalSetting_Node.toJSON(e));
}
return obj;
},
@@ -908,7 +928,6 @@ export const ExternalApprovalSetting = {
create(base?: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {
return ExternalApprovalSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {
const message = createBaseExternalApprovalSetting();
message.nodes = object.nodes?.map((e) => ExternalApprovalSetting_Node.fromPartial(e)) || [];
@@ -973,24 +992,29 @@ export const ExternalApprovalSetting_Node = {
fromJSON(object: any): ExternalApprovalSetting_Node {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- endpoint: isSet(object.endpoint) ? String(object.endpoint) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : "",
};
},
toJSON(message: ExternalApprovalSetting_Node): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.endpoint !== undefined && (obj.endpoint = message.endpoint);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.endpoint !== "") {
+ obj.endpoint = message.endpoint;
+ }
return obj;
},
create(base?: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {
return ExternalApprovalSetting_Node.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {
const message = createBaseExternalApprovalSetting_Node();
message.id = object.id ?? "";
@@ -1138,41 +1162,59 @@ export const SMTPMailDeliverySetting = {
fromJSON(object: any): SMTPMailDeliverySetting {
return {
- server: isSet(object.server) ? String(object.server) : "",
- port: isSet(object.port) ? Number(object.port) : 0,
+ server: isSet(object.server) ? globalThis.String(object.server) : "",
+ port: isSet(object.port) ? globalThis.Number(object.port) : 0,
encryption: isSet(object.encryption) ? sMTPMailDeliverySetting_EncryptionFromJSON(object.encryption) : 0,
- ca: isSet(object.ca) ? String(object.ca) : "",
- key: isSet(object.key) ? String(object.key) : "",
- cert: isSet(object.cert) ? String(object.cert) : "",
+ ca: isSet(object.ca) ? globalThis.String(object.ca) : "",
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ cert: isSet(object.cert) ? globalThis.String(object.cert) : "",
authentication: isSet(object.authentication)
? sMTPMailDeliverySetting_AuthenticationFromJSON(object.authentication)
: 0,
- username: isSet(object.username) ? String(object.username) : "",
- password: isSet(object.password) ? String(object.password) : "",
- from: isSet(object.from) ? String(object.from) : "",
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
+ password: isSet(object.password) ? globalThis.String(object.password) : "",
+ from: isSet(object.from) ? globalThis.String(object.from) : "",
};
},
toJSON(message: SMTPMailDeliverySetting): unknown {
const obj: any = {};
- message.server !== undefined && (obj.server = message.server);
- message.port !== undefined && (obj.port = Math.round(message.port));
- message.encryption !== undefined && (obj.encryption = sMTPMailDeliverySetting_EncryptionToJSON(message.encryption));
- message.ca !== undefined && (obj.ca = message.ca);
- message.key !== undefined && (obj.key = message.key);
- message.cert !== undefined && (obj.cert = message.cert);
- message.authentication !== undefined &&
- (obj.authentication = sMTPMailDeliverySetting_AuthenticationToJSON(message.authentication));
- message.username !== undefined && (obj.username = message.username);
- message.password !== undefined && (obj.password = message.password);
- message.from !== undefined && (obj.from = message.from);
+ if (message.server !== "") {
+ obj.server = message.server;
+ }
+ if (message.port !== 0) {
+ obj.port = Math.round(message.port);
+ }
+ if (message.encryption !== 0) {
+ obj.encryption = sMTPMailDeliverySetting_EncryptionToJSON(message.encryption);
+ }
+ if (message.ca !== "") {
+ obj.ca = message.ca;
+ }
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.cert !== "") {
+ obj.cert = message.cert;
+ }
+ if (message.authentication !== 0) {
+ obj.authentication = sMTPMailDeliverySetting_AuthenticationToJSON(message.authentication);
+ }
+ if (message.username !== "") {
+ obj.username = message.username;
+ }
+ if (message.password !== "") {
+ obj.password = message.password;
+ }
+ if (message.from !== "") {
+ obj.from = message.from;
+ }
return obj;
},
create(base?: DeepPartial<SMTPMailDeliverySetting>): SMTPMailDeliverySetting {
return SMTPMailDeliverySetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SMTPMailDeliverySetting>): SMTPMailDeliverySetting {
const message = createBaseSMTPMailDeliverySetting();
message.server = object.server ?? "";
@@ -1246,13 +1288,13 @@ export const SchemaTemplateSetting = {
fromJSON(object: any): SchemaTemplateSetting {
return {
- fieldTemplates: Array.isArray(object?.fieldTemplates)
+ fieldTemplates: globalThis.Array.isArray(object?.fieldTemplates)
? object.fieldTemplates.map((e: any) => SchemaTemplateSetting_FieldTemplate.fromJSON(e))
: [],
- columnTypes: Array.isArray(object?.columnTypes)
+ columnTypes: globalThis.Array.isArray(object?.columnTypes)
? object.columnTypes.map((e: any) => SchemaTemplateSetting_ColumnType.fromJSON(e))
: [],
- tableTemplates: Array.isArray(object?.tableTemplates)
+ tableTemplates: globalThis.Array.isArray(object?.tableTemplates)
? object.tableTemplates.map((e: any) => SchemaTemplateSetting_TableTemplate.fromJSON(e))
: [],
};
@@ -1260,24 +1302,14 @@ export const SchemaTemplateSetting = {
toJSON(message: SchemaTemplateSetting): unknown {
const obj: any = {};
- if (message.fieldTemplates) {
- obj.fieldTemplates = message.fieldTemplates.map((e) =>
- e ? SchemaTemplateSetting_FieldTemplate.toJSON(e) : undefined
- );
- } else {
- obj.fieldTemplates = [];
- }
- if (message.columnTypes) {
- obj.columnTypes = message.columnTypes.map((e) => e ? SchemaTemplateSetting_ColumnType.toJSON(e) : undefined);
- } else {
- obj.columnTypes = [];
- }
- if (message.tableTemplates) {
- obj.tableTemplates = message.tableTemplates.map((e) =>
- e ? SchemaTemplateSetting_TableTemplate.toJSON(e) : undefined
- );
- } else {
- obj.tableTemplates = [];
+ if (message.fieldTemplates?.length) {
+ obj.fieldTemplates = message.fieldTemplates.map((e) => SchemaTemplateSetting_FieldTemplate.toJSON(e));
+ }
+ if (message.columnTypes?.length) {
+ obj.columnTypes = message.columnTypes.map((e) => SchemaTemplateSetting_ColumnType.toJSON(e));
+ }
+ if (message.tableTemplates?.length) {
+ obj.tableTemplates = message.tableTemplates.map((e) => SchemaTemplateSetting_TableTemplate.toJSON(e));
}
return obj;
},
@@ -1285,7 +1317,6 @@ export const SchemaTemplateSetting = {
create(base?: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {
return SchemaTemplateSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {
const message = createBaseSchemaTemplateSetting();
message.fieldTemplates = object.fieldTemplates?.map((e) => SchemaTemplateSetting_FieldTemplate.fromPartial(e)) ||
@@ -1374,9 +1405,9 @@ export const SchemaTemplateSetting_FieldTemplate = {
fromJSON(object: any): SchemaTemplateSetting_FieldTemplate {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- category: isSet(object.category) ? String(object.category) : "",
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
column: isSet(object.column) ? ColumnMetadata.fromJSON(object.column) : undefined,
config: isSet(object.config) ? ColumnConfig.fromJSON(object.config) : undefined,
};
@@ -1384,18 +1415,27 @@ export const SchemaTemplateSetting_FieldTemplate = {
toJSON(message: SchemaTemplateSetting_FieldTemplate): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.category !== undefined && (obj.category = message.category);
- message.column !== undefined && (obj.column = message.column ? ColumnMetadata.toJSON(message.column) : undefined);
- message.config !== undefined && (obj.config = message.config ? ColumnConfig.toJSON(message.config) : undefined);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.category !== "") {
+ obj.category = message.category;
+ }
+ if (message.column !== undefined) {
+ obj.column = ColumnMetadata.toJSON(message.column);
+ }
+ if (message.config !== undefined) {
+ obj.config = ColumnConfig.toJSON(message.config);
+ }
return obj;
},
create(base?: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {
return SchemaTemplateSetting_FieldTemplate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {
const message = createBaseSchemaTemplateSetting_FieldTemplate();
message.id = object.id ?? "";
@@ -1469,19 +1509,21 @@ export const SchemaTemplateSetting_ColumnType = {
fromJSON(object: any): SchemaTemplateSetting_ColumnType {
return {
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
- types: Array.isArray(object?.types) ? object.types.map((e: any) => String(e)) : [],
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
+ types: globalThis.Array.isArray(object?.types) ? object.types.map((e: any) => globalThis.String(e)) : [],
};
},
toJSON(message: SchemaTemplateSetting_ColumnType): unknown {
const obj: any = {};
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.enabled !== undefined && (obj.enabled = message.enabled);
- if (message.types) {
- obj.types = message.types.map((e) => e);
- } else {
- obj.types = [];
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.enabled === true) {
+ obj.enabled = message.enabled;
+ }
+ if (message.types?.length) {
+ obj.types = message.types;
}
return obj;
},
@@ -1489,7 +1531,6 @@ export const SchemaTemplateSetting_ColumnType = {
create(base?: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {
return SchemaTemplateSetting_ColumnType.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {
const message = createBaseSchemaTemplateSetting_ColumnType();
message.engine = object.engine ?? 0;
@@ -1576,9 +1617,9 @@ export const SchemaTemplateSetting_TableTemplate = {
fromJSON(object: any): SchemaTemplateSetting_TableTemplate {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- category: isSet(object.category) ? String(object.category) : "",
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
table: isSet(object.table) ? TableMetadata.fromJSON(object.table) : undefined,
config: isSet(object.config) ? TableConfig.fromJSON(object.config) : undefined,
};
@@ -1586,18 +1627,27 @@ export const SchemaTemplateSetting_TableTemplate = {
toJSON(message: SchemaTemplateSetting_TableTemplate): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.category !== undefined && (obj.category = message.category);
- message.table !== undefined && (obj.table = message.table ? TableMetadata.toJSON(message.table) : undefined);
- message.config !== undefined && (obj.config = message.config ? TableConfig.toJSON(message.config) : undefined);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.category !== "") {
+ obj.category = message.category;
+ }
+ if (message.table !== undefined) {
+ obj.table = TableMetadata.toJSON(message.table);
+ }
+ if (message.config !== undefined) {
+ obj.config = TableConfig.toJSON(message.config);
+ }
return obj;
},
create(base?: DeepPartial<SchemaTemplateSetting_TableTemplate>): SchemaTemplateSetting_TableTemplate {
return SchemaTemplateSetting_TableTemplate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting_TableTemplate>): SchemaTemplateSetting_TableTemplate {
const message = createBaseSchemaTemplateSetting_TableTemplate();
message.id = object.id ?? "";
@@ -1650,7 +1700,7 @@ export const DataClassificationSetting = {
fromJSON(object: any): DataClassificationSetting {
return {
- configs: Array.isArray(object?.configs)
+ configs: globalThis.Array.isArray(object?.configs)
? object.configs.map((e: any) => DataClassificationSetting_DataClassificationConfig.fromJSON(e))
: [],
};
@@ -1658,12 +1708,8 @@ export const DataClassificationSetting = {
toJSON(message: DataClassificationSetting): unknown {
const obj: any = {};
- if (message.configs) {
- obj.configs = message.configs.map((e) =>
- e ? DataClassificationSetting_DataClassificationConfig.toJSON(e) : undefined
- );
- } else {
- obj.configs = [];
+ if (message.configs?.length) {
+ obj.configs = message.configs.map((e) => DataClassificationSetting_DataClassificationConfig.toJSON(e));
}
return obj;
},
@@ -1671,7 +1717,6 @@ export const DataClassificationSetting = {
create(base?: DeepPartial<DataClassificationSetting>): DataClassificationSetting {
return DataClassificationSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DataClassificationSetting>): DataClassificationSetting {
const message = createBaseDataClassificationSetting();
message.configs = object.configs?.map((e) => DataClassificationSetting_DataClassificationConfig.fromPartial(e)) ||
@@ -1759,9 +1804,9 @@ export const DataClassificationSetting_DataClassificationConfig = {
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- levels: Array.isArray(object?.levels)
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ levels: globalThis.Array.isArray(object?.levels)
? object.levels.map((e: any) => DataClassificationSetting_DataClassificationConfig_Level.fromJSON(e))
: [],
classification: isObject(object.classification)
@@ -1777,20 +1822,23 @@ export const DataClassificationSetting_DataClassificationConfig = {
toJSON(message: DataClassificationSetting_DataClassificationConfig): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- if (message.levels) {
- obj.levels = message.levels.map((e) =>
- e ? DataClassificationSetting_DataClassificationConfig_Level.toJSON(e) : undefined
- );
- } else {
- obj.levels = [];
- }
- obj.classification = {};
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.levels?.length) {
+ obj.levels = message.levels.map((e) => DataClassificationSetting_DataClassificationConfig_Level.toJSON(e));
+ }
if (message.classification) {
- Object.entries(message.classification).forEach(([k, v]) => {
- obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);
- });
+ const entries = Object.entries(message.classification);
+ if (entries.length > 0) {
+ obj.classification = {};
+ entries.forEach(([k, v]) => {
+ obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);
+ });
+ }
}
return obj;
},
@@ -1800,7 +1848,6 @@ export const DataClassificationSetting_DataClassificationConfig = {
): DataClassificationSetting_DataClassificationConfig {
return DataClassificationSetting_DataClassificationConfig.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig>,
): DataClassificationSetting_DataClassificationConfig {
@@ -1881,17 +1928,23 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig_Level {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: DataClassificationSetting_DataClassificationConfig_Level): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
@@ -1900,7 +1953,6 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
): DataClassificationSetting_DataClassificationConfig_Level {
return DataClassificationSetting_DataClassificationConfig_Level.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_Level>,
): DataClassificationSetting_DataClassificationConfig_Level {
@@ -1985,19 +2037,27 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig_DataClassification {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- levelId: isSet(object.levelId) ? String(object.levelId) : undefined,
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ levelId: isSet(object.levelId) ? globalThis.String(object.levelId) : undefined,
};
},
toJSON(message: DataClassificationSetting_DataClassificationConfig_DataClassification): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.levelId !== undefined && (obj.levelId = message.levelId);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.levelId !== undefined) {
+ obj.levelId = message.levelId;
+ }
return obj;
},
@@ -2006,7 +2066,6 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
): DataClassificationSetting_DataClassificationConfig_DataClassification {
return DataClassificationSetting_DataClassificationConfig_DataClassification.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_DataClassification>,
): DataClassificationSetting_DataClassificationConfig_DataClassification {
@@ -2078,7 +2137,7 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
return {
- key: isSet(object.key) ? String(object.key) : "",
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
value: isSet(object.value)
? DataClassificationSetting_DataClassificationConfig_DataClassification.fromJSON(object.value)
: undefined,
@@ -2087,10 +2146,12 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
toJSON(message: DataClassificationSetting_DataClassificationConfig_ClassificationEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value
- ? DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value)
- : undefined);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== undefined) {
+ obj.value = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value);
+ }
return obj;
},
@@ -2099,7 +2160,6 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
return DataClassificationSetting_DataClassificationConfig_ClassificationEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_ClassificationEntry>,
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
@@ -2149,7 +2209,7 @@ export const SemanticTypeSetting = {
fromJSON(object: any): SemanticTypeSetting {
return {
- types: Array.isArray(object?.types)
+ types: globalThis.Array.isArray(object?.types)
? object.types.map((e: any) => SemanticTypeSetting_SemanticType.fromJSON(e))
: [],
};
@@ -2157,10 +2217,8 @@ export const SemanticTypeSetting = {
toJSON(message: SemanticTypeSetting): unknown {
const obj: any = {};
- if (message.types) {
- obj.types = message.types.map((e) => e ? SemanticTypeSetting_SemanticType.toJSON(e) : undefined);
- } else {
- obj.types = [];
+ if (message.types?.length) {
+ obj.types = message.types.map((e) => SemanticTypeSetting_SemanticType.toJSON(e));
}
return obj;
},
@@ -2168,7 +2226,6 @@ export const SemanticTypeSetting = {
create(base?: DeepPartial<SemanticTypeSetting>): SemanticTypeSetting {
return SemanticTypeSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticTypeSetting>): SemanticTypeSetting {
const message = createBaseSemanticTypeSetting();
message.types = object.types?.map((e) => SemanticTypeSetting_SemanticType.fromPartial(e)) || [];
@@ -2253,28 +2310,39 @@ export const SemanticTypeSetting_SemanticType = {
fromJSON(object: any): SemanticTypeSetting_SemanticType {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- partialMaskAlgorithmId: isSet(object.partialMaskAlgorithmId) ? String(object.partialMaskAlgorithmId) : "",
- fullMaskAlgorithmId: isSet(object.fullMaskAlgorithmId) ? String(object.fullMaskAlgorithmId) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ partialMaskAlgorithmId: isSet(object.partialMaskAlgorithmId)
+ ? globalThis.String(object.partialMaskAlgorithmId)
+ : "",
+ fullMaskAlgorithmId: isSet(object.fullMaskAlgorithmId) ? globalThis.String(object.fullMaskAlgorithmId) : "",
};
},
toJSON(message: SemanticTypeSetting_SemanticType): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.partialMaskAlgorithmId !== undefined && (obj.partialMaskAlgorithmId = message.partialMaskAlgorithmId);
- message.fullMaskAlgorithmId !== undefined && (obj.fullMaskAlgorithmId = message.fullMaskAlgorithmId);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.partialMaskAlgorithmId !== "") {
+ obj.partialMaskAlgorithmId = message.partialMaskAlgorithmId;
+ }
+ if (message.fullMaskAlgorithmId !== "") {
+ obj.fullMaskAlgorithmId = message.fullMaskAlgorithmId;
+ }
return obj;
},
create(base?: DeepPartial<SemanticTypeSetting_SemanticType>): SemanticTypeSetting_SemanticType {
return SemanticTypeSetting_SemanticType.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticTypeSetting_SemanticType>): SemanticTypeSetting_SemanticType {
const message = createBaseSemanticTypeSetting_SemanticType();
message.id = object.id ?? "";
@@ -2323,7 +2391,7 @@ export const MaskingAlgorithmSetting = {
fromJSON(object: any): MaskingAlgorithmSetting {
return {
- algorithms: Array.isArray(object?.algorithms)
+ algorithms: globalThis.Array.isArray(object?.algorithms)
? object.algorithms.map((e: any) => MaskingAlgorithmSetting_Algorithm.fromJSON(e))
: [],
};
@@ -2331,10 +2399,8 @@ export const MaskingAlgorithmSetting = {
toJSON(message: MaskingAlgorithmSetting): unknown {
const obj: any = {};
- if (message.algorithms) {
- obj.algorithms = message.algorithms.map((e) => e ? MaskingAlgorithmSetting_Algorithm.toJSON(e) : undefined);
- } else {
- obj.algorithms = [];
+ if (message.algorithms?.length) {
+ obj.algorithms = message.algorithms.map((e) => MaskingAlgorithmSetting_Algorithm.toJSON(e));
}
return obj;
},
@@ -2342,7 +2408,6 @@ export const MaskingAlgorithmSetting = {
create(base?: DeepPartial<MaskingAlgorithmSetting>): MaskingAlgorithmSetting {
return MaskingAlgorithmSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingAlgorithmSetting>): MaskingAlgorithmSetting {
const message = createBaseMaskingAlgorithmSetting();
message.algorithms = object.algorithms?.map((e) => MaskingAlgorithmSetting_Algorithm.fromPartial(e)) || [];
@@ -2455,10 +2520,10 @@ export const MaskingAlgorithmSetting_Algorithm = {
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- category: isSet(object.category) ? String(object.category) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
fullMask: isSet(object.fullMask)
? MaskingAlgorithmSetting_Algorithm_FullMask.fromJSON(object.fullMask)
: undefined,
@@ -2471,26 +2536,33 @@ export const MaskingAlgorithmSetting_Algorithm = {
toJSON(message: MaskingAlgorithmSetting_Algorithm): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.category !== undefined && (obj.category = message.category);
- message.fullMask !== undefined &&
- (obj.fullMask = message.fullMask
- ? MaskingAlgorithmSetting_Algorithm_FullMask.toJSON(message.fullMask)
- : undefined);
- message.rangeMask !== undefined && (obj.rangeMask = message.rangeMask
- ? MaskingAlgorithmSetting_Algorithm_RangeMask.toJSON(message.rangeMask)
- : undefined);
- message.md5Mask !== undefined &&
- (obj.md5Mask = message.md5Mask ? MaskingAlgorithmSetting_Algorithm_MD5Mask.toJSON(message.md5Mask) : undefined);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.category !== "") {
+ obj.category = message.category;
+ }
+ if (message.fullMask !== undefined) {
+ obj.fullMask = MaskingAlgorithmSetting_Algorithm_FullMask.toJSON(message.fullMask);
+ }
+ if (message.rangeMask !== undefined) {
+ obj.rangeMask = MaskingAlgorithmSetting_Algorithm_RangeMask.toJSON(message.rangeMask);
+ }
+ if (message.md5Mask !== undefined) {
+ obj.md5Mask = MaskingAlgorithmSetting_Algorithm_MD5Mask.toJSON(message.md5Mask);
+ }
return obj;
},
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm>): MaskingAlgorithmSetting_Algorithm {
return MaskingAlgorithmSetting_Algorithm.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingAlgorithmSetting_Algorithm>): MaskingAlgorithmSetting_Algorithm {
const message = createBaseMaskingAlgorithmSetting_Algorithm();
message.id = object.id ?? "";
@@ -2546,19 +2618,20 @@ export const MaskingAlgorithmSetting_Algorithm_FullMask = {
},
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_FullMask {
- return { substitution: isSet(object.substitution) ? String(object.substitution) : "" };
+ return { substitution: isSet(object.substitution) ? globalThis.String(object.substitution) : "" };
},
toJSON(message: MaskingAlgorithmSetting_Algorithm_FullMask): unknown {
const obj: any = {};
- message.substitution !== undefined && (obj.substitution = message.substitution);
+ if (message.substitution !== "") {
+ obj.substitution = message.substitution;
+ }
return obj;
},
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm_FullMask>): MaskingAlgorithmSetting_Algorithm_FullMask {
return MaskingAlgorithmSetting_Algorithm_FullMask.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_FullMask>,
): MaskingAlgorithmSetting_Algorithm_FullMask {
@@ -2605,7 +2678,7 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask = {
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_RangeMask {
return {
- slices: Array.isArray(object?.slices)
+ slices: globalThis.Array.isArray(object?.slices)
? object.slices.map((e: any) => MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.fromJSON(e))
: [],
};
@@ -2613,12 +2686,8 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask = {
toJSON(message: MaskingAlgorithmSetting_Algorithm_RangeMask): unknown {
const obj: any = {};
- if (message.slices) {
- obj.slices = message.slices.map((e) =>
- e ? MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.toJSON(e) : undefined
- );
- } else {
- obj.slices = [];
+ if (message.slices?.length) {
+ obj.slices = message.slices.map((e) => MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.toJSON(e));
}
return obj;
},
@@ -2626,7 +2695,6 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask = {
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm_RangeMask>): MaskingAlgorithmSetting_Algorithm_RangeMask {
return MaskingAlgorithmSetting_Algorithm_RangeMask.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_RangeMask>,
): MaskingAlgorithmSetting_Algorithm_RangeMask {
@@ -2696,17 +2764,23 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask_Slice = {
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_RangeMask_Slice {
return {
- start: isSet(object.start) ? Number(object.start) : 0,
- end: isSet(object.end) ? Number(object.end) : 0,
- substitution: isSet(object.substitution) ? String(object.substitution) : "",
+ start: isSet(object.start) ? globalThis.Number(object.start) : 0,
+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,
+ substitution: isSet(object.substitution) ? globalThis.String(object.substitution) : "",
};
},
toJSON(message: MaskingAlgorithmSetting_Algorithm_RangeMask_Slice): unknown {
const obj: any = {};
- message.start !== undefined && (obj.start = Math.round(message.start));
- message.end !== undefined && (obj.end = Math.round(message.end));
- message.substitution !== undefined && (obj.substitution = message.substitution);
+ if (message.start !== 0) {
+ obj.start = Math.round(message.start);
+ }
+ if (message.end !== 0) {
+ obj.end = Math.round(message.end);
+ }
+ if (message.substitution !== "") {
+ obj.substitution = message.substitution;
+ }
return obj;
},
@@ -2715,7 +2789,6 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask_Slice = {
): MaskingAlgorithmSetting_Algorithm_RangeMask_Slice {
return MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_RangeMask_Slice>,
): MaskingAlgorithmSetting_Algorithm_RangeMask_Slice {
@@ -2763,19 +2836,20 @@ export const MaskingAlgorithmSetting_Algorithm_MD5Mask = {
},
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_MD5Mask {
- return { salt: isSet(object.salt) ? String(object.salt) : "" };
+ return { salt: isSet(object.salt) ? globalThis.String(object.salt) : "" };
},
toJSON(message: MaskingAlgorithmSetting_Algorithm_MD5Mask): unknown {
const obj: any = {};
- message.salt !== undefined && (obj.salt = message.salt);
+ if (message.salt !== "") {
+ obj.salt = message.salt;
+ }
return obj;
},
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm_MD5Mask>): MaskingAlgorithmSetting_Algorithm_MD5Mask {
return MaskingAlgorithmSetting_Algorithm_MD5Mask.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_MD5Mask>,
): MaskingAlgorithmSetting_Algorithm_MD5Mask {
@@ -2788,7 +2862,7 @@ export const MaskingAlgorithmSetting_Algorithm_MD5Mask = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/sheet.ts b/frontend/src/types/proto/store/sheet.ts
index eac5be8e44..7ab35da876 100644
--- a/frontend/src/types/proto/store/sheet.ts
+++ b/frontend/src/types/proto/store/sheet.ts
@@ -221,23 +221,27 @@ export const SheetPayload = {
toJSON(message: SheetPayload): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = sheetPayload_TypeToJSON(message.type));
- message.vcsPayload !== undefined &&
- (obj.vcsPayload = message.vcsPayload ? SheetPayload_VCSPayload.toJSON(message.vcsPayload) : undefined);
- message.schemaDesign !== undefined &&
- (obj.schemaDesign = message.schemaDesign ? SheetPayload_SchemaDesign.toJSON(message.schemaDesign) : undefined);
- message.databaseConfig !== undefined &&
- (obj.databaseConfig = message.databaseConfig ? DatabaseConfig.toJSON(message.databaseConfig) : undefined);
- message.baselineDatabaseConfig !== undefined && (obj.baselineDatabaseConfig = message.baselineDatabaseConfig
- ? DatabaseConfig.toJSON(message.baselineDatabaseConfig)
- : undefined);
+ if (message.type !== 0) {
+ obj.type = sheetPayload_TypeToJSON(message.type);
+ }
+ if (message.vcsPayload !== undefined) {
+ obj.vcsPayload = SheetPayload_VCSPayload.toJSON(message.vcsPayload);
+ }
+ if (message.schemaDesign !== undefined) {
+ obj.schemaDesign = SheetPayload_SchemaDesign.toJSON(message.schemaDesign);
+ }
+ if (message.databaseConfig !== undefined) {
+ obj.databaseConfig = DatabaseConfig.toJSON(message.databaseConfig);
+ }
+ if (message.baselineDatabaseConfig !== undefined) {
+ obj.baselineDatabaseConfig = DatabaseConfig.toJSON(message.baselineDatabaseConfig);
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload>): SheetPayload {
return SheetPayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload>): SheetPayload {
const message = createBaseSheetPayload();
message.type = object.type ?? 0;
@@ -363,11 +367,11 @@ export const SheetPayload_VCSPayload = {
fromJSON(object: any): SheetPayload_VCSPayload {
return {
- fileName: isSet(object.fileName) ? String(object.fileName) : "",
- filePath: isSet(object.filePath) ? String(object.filePath) : "",
+ fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : "",
+ filePath: isSet(object.filePath) ? globalThis.String(object.filePath) : "",
size: isSet(object.size) ? Long.fromValue(object.size) : Long.ZERO,
- author: isSet(object.author) ? String(object.author) : "",
- lastCommitId: isSet(object.lastCommitId) ? String(object.lastCommitId) : "",
+ author: isSet(object.author) ? globalThis.String(object.author) : "",
+ lastCommitId: isSet(object.lastCommitId) ? globalThis.String(object.lastCommitId) : "",
lastSyncTs: isSet(object.lastSyncTs) ? Long.fromValue(object.lastSyncTs) : Long.ZERO,
pushEvent: isSet(object.pushEvent) ? PushEvent.fromJSON(object.pushEvent) : undefined,
};
@@ -375,21 +379,33 @@ export const SheetPayload_VCSPayload = {
toJSON(message: SheetPayload_VCSPayload): unknown {
const obj: any = {};
- message.fileName !== undefined && (obj.fileName = message.fileName);
- message.filePath !== undefined && (obj.filePath = message.filePath);
- message.size !== undefined && (obj.size = (message.size || Long.ZERO).toString());
- message.author !== undefined && (obj.author = message.author);
- message.lastCommitId !== undefined && (obj.lastCommitId = message.lastCommitId);
- message.lastSyncTs !== undefined && (obj.lastSyncTs = (message.lastSyncTs || Long.ZERO).toString());
- message.pushEvent !== undefined &&
- (obj.pushEvent = message.pushEvent ? PushEvent.toJSON(message.pushEvent) : undefined);
+ if (message.fileName !== "") {
+ obj.fileName = message.fileName;
+ }
+ if (message.filePath !== "") {
+ obj.filePath = message.filePath;
+ }
+ if (!message.size.isZero()) {
+ obj.size = (message.size || Long.ZERO).toString();
+ }
+ if (message.author !== "") {
+ obj.author = message.author;
+ }
+ if (message.lastCommitId !== "") {
+ obj.lastCommitId = message.lastCommitId;
+ }
+ if (!message.lastSyncTs.isZero()) {
+ obj.lastSyncTs = (message.lastSyncTs || Long.ZERO).toString();
+ }
+ if (message.pushEvent !== undefined) {
+ obj.pushEvent = PushEvent.toJSON(message.pushEvent);
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload_VCSPayload>): SheetPayload_VCSPayload {
return SheetPayload_VCSPayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload_VCSPayload>): SheetPayload_VCSPayload {
const message = createBaseSheetPayload_VCSPayload();
message.fileName = object.fileName ?? "";
@@ -503,9 +519,13 @@ export const SheetPayload_SchemaDesign = {
return {
type: isSet(object.type) ? sheetPayload_SchemaDesign_TypeFromJSON(object.type) : 0,
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- baselineSheetId: isSet(object.baselineSheetId) ? String(object.baselineSheetId) : "",
- baselineSchemaDesignId: isSet(object.baselineSchemaDesignId) ? String(object.baselineSchemaDesignId) : "",
- baselineChangeHistoryId: isSet(object.baselineChangeHistoryId) ? String(object.baselineChangeHistoryId) : "",
+ baselineSheetId: isSet(object.baselineSheetId) ? globalThis.String(object.baselineSheetId) : "",
+ baselineSchemaDesignId: isSet(object.baselineSchemaDesignId)
+ ? globalThis.String(object.baselineSchemaDesignId)
+ : "",
+ baselineChangeHistoryId: isSet(object.baselineChangeHistoryId)
+ ? globalThis.String(object.baselineChangeHistoryId)
+ : "",
protection: isSet(object.protection)
? SheetPayload_SchemaDesign_Protection.fromJSON(object.protection)
: undefined,
@@ -514,22 +534,30 @@ export const SheetPayload_SchemaDesign = {
toJSON(message: SheetPayload_SchemaDesign): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = sheetPayload_SchemaDesign_TypeToJSON(message.type));
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.baselineSheetId !== undefined && (obj.baselineSheetId = message.baselineSheetId);
- message.baselineSchemaDesignId !== undefined && (obj.baselineSchemaDesignId = message.baselineSchemaDesignId);
- message.baselineChangeHistoryId !== undefined && (obj.baselineChangeHistoryId = message.baselineChangeHistoryId);
- message.protection !== undefined &&
- (obj.protection = message.protection
- ? SheetPayload_SchemaDesign_Protection.toJSON(message.protection)
- : undefined);
+ if (message.type !== 0) {
+ obj.type = sheetPayload_SchemaDesign_TypeToJSON(message.type);
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.baselineSheetId !== "") {
+ obj.baselineSheetId = message.baselineSheetId;
+ }
+ if (message.baselineSchemaDesignId !== "") {
+ obj.baselineSchemaDesignId = message.baselineSchemaDesignId;
+ }
+ if (message.baselineChangeHistoryId !== "") {
+ obj.baselineChangeHistoryId = message.baselineChangeHistoryId;
+ }
+ if (message.protection !== undefined) {
+ obj.protection = SheetPayload_SchemaDesign_Protection.toJSON(message.protection);
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload_SchemaDesign>): SheetPayload_SchemaDesign {
return SheetPayload_SchemaDesign.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload_SchemaDesign>): SheetPayload_SchemaDesign {
const message = createBaseSheetPayload_SchemaDesign();
message.type = object.type ?? 0;
@@ -580,19 +608,20 @@ export const SheetPayload_SchemaDesign_Protection = {
},
fromJSON(object: any): SheetPayload_SchemaDesign_Protection {
- return { allowForcePushes: isSet(object.allowForcePushes) ? Boolean(object.allowForcePushes) : false };
+ return { allowForcePushes: isSet(object.allowForcePushes) ? globalThis.Boolean(object.allowForcePushes) : false };
},
toJSON(message: SheetPayload_SchemaDesign_Protection): unknown {
const obj: any = {};
- message.allowForcePushes !== undefined && (obj.allowForcePushes = message.allowForcePushes);
+ if (message.allowForcePushes === true) {
+ obj.allowForcePushes = message.allowForcePushes;
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload_SchemaDesign_Protection>): SheetPayload_SchemaDesign_Protection {
return SheetPayload_SchemaDesign_Protection.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload_SchemaDesign_Protection>): SheetPayload_SchemaDesign_Protection {
const message = createBaseSheetPayload_SchemaDesign_Protection();
message.allowForcePushes = object.allowForcePushes ?? false;
@@ -603,7 +632,7 @@ export const SheetPayload_SchemaDesign_Protection = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/slow_query.ts b/frontend/src/types/proto/store/slow_query.ts
index d9cb957d2e..08132e71e7 100644
--- a/frontend/src/types/proto/store/slow_query.ts
+++ b/frontend/src/types/proto/store/slow_query.ts
@@ -101,16 +101,16 @@ export const SlowQueryStatistics = {
fromJSON(object: any): SlowQueryStatistics {
return {
- items: Array.isArray(object?.items) ? object.items.map((e: any) => SlowQueryStatisticsItem.fromJSON(e)) : [],
+ items: globalThis.Array.isArray(object?.items)
+ ? object.items.map((e: any) => SlowQueryStatisticsItem.fromJSON(e))
+ : [],
};
},
toJSON(message: SlowQueryStatistics): unknown {
const obj: any = {};
- if (message.items) {
- obj.items = message.items.map((e) => e ? SlowQueryStatisticsItem.toJSON(e) : undefined);
- } else {
- obj.items = [];
+ if (message.items?.length) {
+ obj.items = message.items.map((e) => SlowQueryStatisticsItem.toJSON(e));
}
return obj;
},
@@ -118,7 +118,6 @@ export const SlowQueryStatistics = {
create(base?: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {
return SlowQueryStatistics.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {
const message = createBaseSlowQueryStatistics();
message.items = object.items?.map((e) => SlowQueryStatisticsItem.fromPartial(e)) || [];
@@ -264,36 +263,52 @@ export const SlowQueryStatisticsItem = {
fromJSON(object: any): SlowQueryStatisticsItem {
return {
- sqlFingerprint: isSet(object.sqlFingerprint) ? String(object.sqlFingerprint) : "",
- count: isSet(object.count) ? Number(object.count) : 0,
+ sqlFingerprint: isSet(object.sqlFingerprint) ? globalThis.String(object.sqlFingerprint) : "",
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
latestLogTime: isSet(object.latestLogTime) ? fromJsonTimestamp(object.latestLogTime) : undefined,
totalQueryTime: isSet(object.totalQueryTime) ? Duration.fromJSON(object.totalQueryTime) : undefined,
maximumQueryTime: isSet(object.maximumQueryTime) ? Duration.fromJSON(object.maximumQueryTime) : undefined,
- totalRowsSent: isSet(object.totalRowsSent) ? Number(object.totalRowsSent) : 0,
- maximumRowsSent: isSet(object.maximumRowsSent) ? Number(object.maximumRowsSent) : 0,
- totalRowsExamined: isSet(object.totalRowsExamined) ? Number(object.totalRowsExamined) : 0,
- maximumRowsExamined: isSet(object.maximumRowsExamined) ? Number(object.maximumRowsExamined) : 0,
- samples: Array.isArray(object?.samples) ? object.samples.map((e: any) => SlowQueryDetails.fromJSON(e)) : [],
+ totalRowsSent: isSet(object.totalRowsSent) ? globalThis.Number(object.totalRowsSent) : 0,
+ maximumRowsSent: isSet(object.maximumRowsSent) ? globalThis.Number(object.maximumRowsSent) : 0,
+ totalRowsExamined: isSet(object.totalRowsExamined) ? globalThis.Number(object.totalRowsExamined) : 0,
+ maximumRowsExamined: isSet(object.maximumRowsExamined) ? globalThis.Number(object.maximumRowsExamined) : 0,
+ samples: globalThis.Array.isArray(object?.samples)
+ ? object.samples.map((e: any) => SlowQueryDetails.fromJSON(e))
+ : [],
};
},
toJSON(message: SlowQueryStatisticsItem): unknown {
const obj: any = {};
- message.sqlFingerprint !== undefined && (obj.sqlFingerprint = message.sqlFingerprint);
- message.count !== undefined && (obj.count = Math.round(message.count));
- message.latestLogTime !== undefined && (obj.latestLogTime = message.latestLogTime.toISOString());
- message.totalQueryTime !== undefined &&
- (obj.totalQueryTime = message.totalQueryTime ? Duration.toJSON(message.totalQueryTime) : undefined);
- message.maximumQueryTime !== undefined &&
- (obj.maximumQueryTime = message.maximumQueryTime ? Duration.toJSON(message.maximumQueryTime) : undefined);
- message.totalRowsSent !== undefined && (obj.totalRowsSent = Math.round(message.totalRowsSent));
- message.maximumRowsSent !== undefined && (obj.maximumRowsSent = Math.round(message.maximumRowsSent));
- message.totalRowsExamined !== undefined && (obj.totalRowsExamined = Math.round(message.totalRowsExamined));
- message.maximumRowsExamined !== undefined && (obj.maximumRowsExamined = Math.round(message.maximumRowsExamined));
- if (message.samples) {
- obj.samples = message.samples.map((e) => e ? SlowQueryDetails.toJSON(e) : undefined);
- } else {
- obj.samples = [];
+ if (message.sqlFingerprint !== "") {
+ obj.sqlFingerprint = message.sqlFingerprint;
+ }
+ if (message.count !== 0) {
+ obj.count = Math.round(message.count);
+ }
+ if (message.latestLogTime !== undefined) {
+ obj.latestLogTime = message.latestLogTime.toISOString();
+ }
+ if (message.totalQueryTime !== undefined) {
+ obj.totalQueryTime = Duration.toJSON(message.totalQueryTime);
+ }
+ if (message.maximumQueryTime !== undefined) {
+ obj.maximumQueryTime = Duration.toJSON(message.maximumQueryTime);
+ }
+ if (message.totalRowsSent !== 0) {
+ obj.totalRowsSent = Math.round(message.totalRowsSent);
+ }
+ if (message.maximumRowsSent !== 0) {
+ obj.maximumRowsSent = Math.round(message.maximumRowsSent);
+ }
+ if (message.totalRowsExamined !== 0) {
+ obj.totalRowsExamined = Math.round(message.totalRowsExamined);
+ }
+ if (message.maximumRowsExamined !== 0) {
+ obj.maximumRowsExamined = Math.round(message.maximumRowsExamined);
+ }
+ if (message.samples?.length) {
+ obj.samples = message.samples.map((e) => SlowQueryDetails.toJSON(e));
}
return obj;
},
@@ -301,7 +316,6 @@ export const SlowQueryStatisticsItem = {
create(base?: DeepPartial<SlowQueryStatisticsItem>): SlowQueryStatisticsItem {
return SlowQueryStatisticsItem.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryStatisticsItem>): SlowQueryStatisticsItem {
const message = createBaseSlowQueryStatisticsItem();
message.sqlFingerprint = object.sqlFingerprint ?? "";
@@ -412,28 +426,38 @@ export const SlowQueryDetails = {
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,
queryTime: isSet(object.queryTime) ? Duration.fromJSON(object.queryTime) : undefined,
lockTime: isSet(object.lockTime) ? Duration.fromJSON(object.lockTime) : undefined,
- rowsSent: isSet(object.rowsSent) ? Number(object.rowsSent) : 0,
- rowsExamined: isSet(object.rowsExamined) ? Number(object.rowsExamined) : 0,
- sqlText: isSet(object.sqlText) ? String(object.sqlText) : "",
+ rowsSent: isSet(object.rowsSent) ? globalThis.Number(object.rowsSent) : 0,
+ rowsExamined: isSet(object.rowsExamined) ? globalThis.Number(object.rowsExamined) : 0,
+ sqlText: isSet(object.sqlText) ? globalThis.String(object.sqlText) : "",
};
},
toJSON(message: SlowQueryDetails): unknown {
const obj: any = {};
- message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());
- message.queryTime !== undefined &&
- (obj.queryTime = message.queryTime ? Duration.toJSON(message.queryTime) : undefined);
- message.lockTime !== undefined && (obj.lockTime = message.lockTime ? Duration.toJSON(message.lockTime) : undefined);
- message.rowsSent !== undefined && (obj.rowsSent = Math.round(message.rowsSent));
- message.rowsExamined !== undefined && (obj.rowsExamined = Math.round(message.rowsExamined));
- message.sqlText !== undefined && (obj.sqlText = message.sqlText);
+ if (message.startTime !== undefined) {
+ obj.startTime = message.startTime.toISOString();
+ }
+ if (message.queryTime !== undefined) {
+ obj.queryTime = Duration.toJSON(message.queryTime);
+ }
+ if (message.lockTime !== undefined) {
+ obj.lockTime = Duration.toJSON(message.lockTime);
+ }
+ if (message.rowsSent !== 0) {
+ obj.rowsSent = Math.round(message.rowsSent);
+ }
+ if (message.rowsExamined !== 0) {
+ obj.rowsExamined = Math.round(message.rowsExamined);
+ }
+ if (message.sqlText !== "") {
+ obj.sqlText = message.sqlText;
+ }
return obj;
},
create(base?: DeepPartial<SlowQueryDetails>): SlowQueryDetails {
return SlowQueryDetails.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryDetails>): SlowQueryDetails {
const message = createBaseSlowQueryDetails();
message.startTime = object.startTime ?? undefined;
@@ -453,7 +477,7 @@ export const SlowQueryDetails = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -467,14 +491,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/store/task_run.ts b/frontend/src/types/proto/store/task_run.ts
index cd2a61c6d4..5ec53f8dd7 100644
--- a/frontend/src/types/proto/store/task_run.ts
+++ b/frontend/src/types/proto/store/task_run.ts
@@ -68,24 +68,29 @@ export const TaskRunResult = {
fromJSON(object: any): TaskRunResult {
return {
- detail: isSet(object.detail) ? String(object.detail) : "",
- changeHistory: isSet(object.changeHistory) ? String(object.changeHistory) : "",
- version: isSet(object.version) ? String(object.version) : "",
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
+ changeHistory: isSet(object.changeHistory) ? globalThis.String(object.changeHistory) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
};
},
toJSON(message: TaskRunResult): unknown {
const obj: any = {};
- message.detail !== undefined && (obj.detail = message.detail);
- message.changeHistory !== undefined && (obj.changeHistory = message.changeHistory);
- message.version !== undefined && (obj.version = message.version);
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
+ if (message.changeHistory !== "") {
+ obj.changeHistory = message.changeHistory;
+ }
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
return obj;
},
create(base?: DeepPartial<TaskRunResult>): TaskRunResult {
return TaskRunResult.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TaskRunResult>): TaskRunResult {
const message = createBaseTaskRunResult();
message.detail = object.detail ?? "";
@@ -98,7 +103,7 @@ export const TaskRunResult = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/user.ts b/frontend/src/types/proto/store/user.ts
index cd71a14e54..90dc8faddf 100644
--- a/frontend/src/types/proto/store/user.ts
+++ b/frontend/src/types/proto/store/user.ts
@@ -83,28 +83,30 @@ export const MFAConfig = {
fromJSON(object: any): MFAConfig {
return {
- otpSecret: isSet(object.otpSecret) ? String(object.otpSecret) : "",
- tempOtpSecret: isSet(object.tempOtpSecret) ? String(object.tempOtpSecret) : "",
- recoveryCodes: Array.isArray(object?.recoveryCodes) ? object.recoveryCodes.map((e: any) => String(e)) : [],
- tempRecoveryCodes: Array.isArray(object?.tempRecoveryCodes)
- ? object.tempRecoveryCodes.map((e: any) => String(e))
+ otpSecret: isSet(object.otpSecret) ? globalThis.String(object.otpSecret) : "",
+ tempOtpSecret: isSet(object.tempOtpSecret) ? globalThis.String(object.tempOtpSecret) : "",
+ recoveryCodes: globalThis.Array.isArray(object?.recoveryCodes)
+ ? object.recoveryCodes.map((e: any) => globalThis.String(e))
+ : [],
+ tempRecoveryCodes: globalThis.Array.isArray(object?.tempRecoveryCodes)
+ ? object.tempRecoveryCodes.map((e: any) => globalThis.String(e))
: [],
};
},
toJSON(message: MFAConfig): unknown {
const obj: any = {};
- message.otpSecret !== undefined && (obj.otpSecret = message.otpSecret);
- message.tempOtpSecret !== undefined && (obj.tempOtpSecret = message.tempOtpSecret);
- if (message.recoveryCodes) {
- obj.recoveryCodes = message.recoveryCodes.map((e) => e);
- } else {
- obj.recoveryCodes = [];
+ if (message.otpSecret !== "") {
+ obj.otpSecret = message.otpSecret;
+ }
+ if (message.tempOtpSecret !== "") {
+ obj.tempOtpSecret = message.tempOtpSecret;
+ }
+ if (message.recoveryCodes?.length) {
+ obj.recoveryCodes = message.recoveryCodes;
}
- if (message.tempRecoveryCodes) {
- obj.tempRecoveryCodes = message.tempRecoveryCodes.map((e) => e);
- } else {
- obj.tempRecoveryCodes = [];
+ if (message.tempRecoveryCodes?.length) {
+ obj.tempRecoveryCodes = message.tempRecoveryCodes;
}
return obj;
},
@@ -112,7 +114,6 @@ export const MFAConfig = {
create(base?: DeepPartial<MFAConfig>): MFAConfig {
return MFAConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MFAConfig>): MFAConfig {
const message = createBaseMFAConfig();
message.otpSecret = object.otpSecret ?? "";
@@ -126,7 +127,7 @@ export const MFAConfig = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/store/vcs.ts b/frontend/src/types/proto/store/vcs.ts
index 3a16a1a58f..8d0d00f06a 100644
--- a/frontend/src/types/proto/store/vcs.ts
+++ b/frontend/src/types/proto/store/vcs.ts
@@ -192,44 +192,60 @@ export const PushEvent = {
fromJSON(object: any): PushEvent {
return {
vcsType: isSet(object.vcsType) ? vcsTypeFromJSON(object.vcsType) : 0,
- baseDir: isSet(object.baseDir) ? String(object.baseDir) : "",
- ref: isSet(object.ref) ? String(object.ref) : "",
- before: isSet(object.before) ? String(object.before) : "",
- after: isSet(object.after) ? String(object.after) : "",
- repositoryId: isSet(object.repositoryId) ? String(object.repositoryId) : "",
- repositoryUrl: isSet(object.repositoryUrl) ? String(object.repositoryUrl) : "",
- repositoryFullPath: isSet(object.repositoryFullPath) ? String(object.repositoryFullPath) : "",
- authorName: isSet(object.authorName) ? String(object.authorName) : "",
- commits: Array.isArray(object?.commits) ? object.commits.map((e: any) => Commit.fromJSON(e)) : [],
+ baseDir: isSet(object.baseDir) ? globalThis.String(object.baseDir) : "",
+ ref: isSet(object.ref) ? globalThis.String(object.ref) : "",
+ before: isSet(object.before) ? globalThis.String(object.before) : "",
+ after: isSet(object.after) ? globalThis.String(object.after) : "",
+ repositoryId: isSet(object.repositoryId) ? globalThis.String(object.repositoryId) : "",
+ repositoryUrl: isSet(object.repositoryUrl) ? globalThis.String(object.repositoryUrl) : "",
+ repositoryFullPath: isSet(object.repositoryFullPath) ? globalThis.String(object.repositoryFullPath) : "",
+ authorName: isSet(object.authorName) ? globalThis.String(object.authorName) : "",
+ commits: globalThis.Array.isArray(object?.commits) ? object.commits.map((e: any) => Commit.fromJSON(e)) : [],
fileCommit: isSet(object.fileCommit) ? FileCommit.fromJSON(object.fileCommit) : undefined,
};
},
toJSON(message: PushEvent): unknown {
const obj: any = {};
- message.vcsType !== undefined && (obj.vcsType = vcsTypeToJSON(message.vcsType));
- message.baseDir !== undefined && (obj.baseDir = message.baseDir);
- message.ref !== undefined && (obj.ref = message.ref);
- message.before !== undefined && (obj.before = message.before);
- message.after !== undefined && (obj.after = message.after);
- message.repositoryId !== undefined && (obj.repositoryId = message.repositoryId);
- message.repositoryUrl !== undefined && (obj.repositoryUrl = message.repositoryUrl);
- message.repositoryFullPath !== undefined && (obj.repositoryFullPath = message.repositoryFullPath);
- message.authorName !== undefined && (obj.authorName = message.authorName);
- if (message.commits) {
- obj.commits = message.commits.map((e) => e ? Commit.toJSON(e) : undefined);
- } else {
- obj.commits = [];
- }
- message.fileCommit !== undefined &&
- (obj.fileCommit = message.fileCommit ? FileCommit.toJSON(message.fileCommit) : undefined);
+ if (message.vcsType !== 0) {
+ obj.vcsType = vcsTypeToJSON(message.vcsType);
+ }
+ if (message.baseDir !== "") {
+ obj.baseDir = message.baseDir;
+ }
+ if (message.ref !== "") {
+ obj.ref = message.ref;
+ }
+ if (message.before !== "") {
+ obj.before = message.before;
+ }
+ if (message.after !== "") {
+ obj.after = message.after;
+ }
+ if (message.repositoryId !== "") {
+ obj.repositoryId = message.repositoryId;
+ }
+ if (message.repositoryUrl !== "") {
+ obj.repositoryUrl = message.repositoryUrl;
+ }
+ if (message.repositoryFullPath !== "") {
+ obj.repositoryFullPath = message.repositoryFullPath;
+ }
+ if (message.authorName !== "") {
+ obj.authorName = message.authorName;
+ }
+ if (message.commits?.length) {
+ obj.commits = message.commits.map((e) => Commit.toJSON(e));
+ }
+ if (message.fileCommit !== undefined) {
+ obj.fileCommit = FileCommit.toJSON(message.fileCommit);
+ }
return obj;
},
create(base?: DeepPartial<PushEvent>): PushEvent {
return PushEvent.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PushEvent>): PushEvent {
const message = createBasePushEvent();
message.vcsType = object.vcsType ?? 0;
@@ -376,36 +392,50 @@ export const Commit = {
fromJSON(object: any): Commit {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- message: isSet(object.message) ? String(object.message) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
createdTs: isSet(object.createdTs) ? Long.fromValue(object.createdTs) : Long.ZERO,
- url: isSet(object.url) ? String(object.url) : "",
- authorName: isSet(object.authorName) ? String(object.authorName) : "",
- authorEmail: isSet(object.authorEmail) ? String(object.authorEmail) : "",
- addedList: Array.isArray(object?.addedList) ? object.addedList.map((e: any) => String(e)) : [],
- modifiedList: Array.isArray(object?.modifiedList) ? object.modifiedList.map((e: any) => String(e)) : [],
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ authorName: isSet(object.authorName) ? globalThis.String(object.authorName) : "",
+ authorEmail: isSet(object.authorEmail) ? globalThis.String(object.authorEmail) : "",
+ addedList: globalThis.Array.isArray(object?.addedList)
+ ? object.addedList.map((e: any) => globalThis.String(e))
+ : [],
+ modifiedList: globalThis.Array.isArray(object?.modifiedList)
+ ? object.modifiedList.map((e: any) => globalThis.String(e))
+ : [],
};
},
toJSON(message: Commit): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.message !== undefined && (obj.message = message.message);
- message.createdTs !== undefined && (obj.createdTs = (message.createdTs || Long.ZERO).toString());
- message.url !== undefined && (obj.url = message.url);
- message.authorName !== undefined && (obj.authorName = message.authorName);
- message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);
- if (message.addedList) {
- obj.addedList = message.addedList.map((e) => e);
- } else {
- obj.addedList = [];
- }
- if (message.modifiedList) {
- obj.modifiedList = message.modifiedList.map((e) => e);
- } else {
- obj.modifiedList = [];
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.message !== "") {
+ obj.message = message.message;
+ }
+ if (!message.createdTs.isZero()) {
+ obj.createdTs = (message.createdTs || Long.ZERO).toString();
+ }
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.authorName !== "") {
+ obj.authorName = message.authorName;
+ }
+ if (message.authorEmail !== "") {
+ obj.authorEmail = message.authorEmail;
+ }
+ if (message.addedList?.length) {
+ obj.addedList = message.addedList;
+ }
+ if (message.modifiedList?.length) {
+ obj.modifiedList = message.modifiedList;
}
return obj;
},
@@ -413,7 +443,6 @@ export const Commit = {
create(base?: DeepPartial<Commit>): Commit {
return Commit.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Commit>): Commit {
const message = createBaseCommit();
message.id = object.id ?? "";
@@ -538,34 +567,49 @@ export const FileCommit = {
fromJSON(object: any): FileCommit {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- message: isSet(object.message) ? String(object.message) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
createdTs: isSet(object.createdTs) ? Long.fromValue(object.createdTs) : Long.ZERO,
- url: isSet(object.url) ? String(object.url) : "",
- authorName: isSet(object.authorName) ? String(object.authorName) : "",
- authorEmail: isSet(object.authorEmail) ? String(object.authorEmail) : "",
- added: isSet(object.added) ? String(object.added) : "",
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ authorName: isSet(object.authorName) ? globalThis.String(object.authorName) : "",
+ authorEmail: isSet(object.authorEmail) ? globalThis.String(object.authorEmail) : "",
+ added: isSet(object.added) ? globalThis.String(object.added) : "",
};
},
toJSON(message: FileCommit): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.message !== undefined && (obj.message = message.message);
- message.createdTs !== undefined && (obj.createdTs = (message.createdTs || Long.ZERO).toString());
- message.url !== undefined && (obj.url = message.url);
- message.authorName !== undefined && (obj.authorName = message.authorName);
- message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);
- message.added !== undefined && (obj.added = message.added);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.message !== "") {
+ obj.message = message.message;
+ }
+ if (!message.createdTs.isZero()) {
+ obj.createdTs = (message.createdTs || Long.ZERO).toString();
+ }
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.authorName !== "") {
+ obj.authorName = message.authorName;
+ }
+ if (message.authorEmail !== "") {
+ obj.authorEmail = message.authorEmail;
+ }
+ if (message.added !== "") {
+ obj.added = message.added;
+ }
return obj;
},
create(base?: DeepPartial<FileCommit>): FileCommit {
return FileCommit.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FileCommit>): FileCommit {
const message = createBaseFileCommit();
message.id = object.id ?? "";
@@ -585,7 +629,7 @@ export const FileCommit = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/actuator_service.ts b/frontend/src/types/proto/v1/actuator_service.ts
index b52bedf6ef..f9e57545ed 100644
--- a/frontend/src/types/proto/v1/actuator_service.ts
+++ b/frontend/src/types/proto/v1/actuator_service.ts
@@ -134,7 +134,6 @@ export const GetActuatorInfoRequest = {
create(base?: DeepPartial<GetActuatorInfoRequest>): GetActuatorInfoRequest {
return GetActuatorInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<GetActuatorInfoRequest>): GetActuatorInfoRequest {
const message = createBaseGetActuatorInfoRequest();
return message;
@@ -195,16 +194,18 @@ export const UpdateActuatorInfoRequest = {
toJSON(message: UpdateActuatorInfoRequest): unknown {
const obj: any = {};
- message.actuator !== undefined &&
- (obj.actuator = message.actuator ? ActuatorInfo.toJSON(message.actuator) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.actuator !== undefined) {
+ obj.actuator = ActuatorInfo.toJSON(message.actuator);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateActuatorInfoRequest>): UpdateActuatorInfoRequest {
return UpdateActuatorInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateActuatorInfoRequest>): UpdateActuatorInfoRequest {
const message = createBaseUpdateActuatorInfoRequest();
message.actuator = (object.actuator !== undefined && object.actuator !== null)
@@ -262,22 +263,25 @@ export const ListDebugLogRequest = {
fromJSON(object: any): ListDebugLogRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListDebugLogRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListDebugLogRequest>): ListDebugLogRequest {
return ListDebugLogRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListDebugLogRequest>): ListDebugLogRequest {
const message = createBaseListDebugLogRequest();
message.pageSize = object.pageSize ?? 0;
@@ -333,26 +337,25 @@ export const ListDebugLogResponse = {
fromJSON(object: any): ListDebugLogResponse {
return {
- logs: Array.isArray(object?.logs) ? object.logs.map((e: any) => DebugLog.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ logs: globalThis.Array.isArray(object?.logs) ? object.logs.map((e: any) => DebugLog.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListDebugLogResponse): unknown {
const obj: any = {};
- if (message.logs) {
- obj.logs = message.logs.map((e) => e ? DebugLog.toJSON(e) : undefined);
- } else {
- obj.logs = [];
+ if (message.logs?.length) {
+ obj.logs = message.logs.map((e) => DebugLog.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListDebugLogResponse>): ListDebugLogResponse {
return ListDebugLogResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListDebugLogResponse>): ListDebugLogResponse {
const message = createBaseListDebugLogResponse();
message.logs = object.logs?.map((e) => DebugLog.fromPartial(e)) || [];
@@ -439,27 +442,36 @@ export const DebugLog = {
fromJSON(object: any): DebugLog {
return {
recordTime: isSet(object.recordTime) ? fromJsonTimestamp(object.recordTime) : undefined,
- requestPath: isSet(object.requestPath) ? String(object.requestPath) : "",
- role: isSet(object.role) ? String(object.role) : "",
- error: isSet(object.error) ? String(object.error) : "",
- stackTrace: isSet(object.stackTrace) ? String(object.stackTrace) : "",
+ requestPath: isSet(object.requestPath) ? globalThis.String(object.requestPath) : "",
+ role: isSet(object.role) ? globalThis.String(object.role) : "",
+ error: isSet(object.error) ? globalThis.String(object.error) : "",
+ stackTrace: isSet(object.stackTrace) ? globalThis.String(object.stackTrace) : "",
};
},
toJSON(message: DebugLog): unknown {
const obj: any = {};
- message.recordTime !== undefined && (obj.recordTime = message.recordTime.toISOString());
- message.requestPath !== undefined && (obj.requestPath = message.requestPath);
- message.role !== undefined && (obj.role = message.role);
- message.error !== undefined && (obj.error = message.error);
- message.stackTrace !== undefined && (obj.stackTrace = message.stackTrace);
+ if (message.recordTime !== undefined) {
+ obj.recordTime = message.recordTime.toISOString();
+ }
+ if (message.requestPath !== "") {
+ obj.requestPath = message.requestPath;
+ }
+ if (message.role !== "") {
+ obj.role = message.role;
+ }
+ if (message.error !== "") {
+ obj.error = message.error;
+ }
+ if (message.stackTrace !== "") {
+ obj.stackTrace = message.stackTrace;
+ }
return obj;
},
create(base?: DeepPartial<DebugLog>): DebugLog {
return DebugLog.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DebugLog>): DebugLog {
const message = createBaseDebugLog();
message.recordTime = object.recordTime ?? undefined;
@@ -508,7 +520,6 @@ export const DeleteCacheRequest = {
create(base?: DeepPartial<DeleteCacheRequest>): DeleteCacheRequest {
return DeleteCacheRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<DeleteCacheRequest>): DeleteCacheRequest {
const message = createBaseDeleteCacheRequest();
return message;
@@ -708,48 +719,77 @@ export const ActuatorInfo = {
fromJSON(object: any): ActuatorInfo {
return {
- version: isSet(object.version) ? String(object.version) : "",
- gitCommit: isSet(object.gitCommit) ? String(object.gitCommit) : "",
- readonly: isSet(object.readonly) ? Boolean(object.readonly) : false,
- saas: isSet(object.saas) ? Boolean(object.saas) : false,
- demoName: isSet(object.demoName) ? String(object.demoName) : "",
- host: isSet(object.host) ? String(object.host) : "",
- port: isSet(object.port) ? String(object.port) : "",
- externalUrl: isSet(object.externalUrl) ? String(object.externalUrl) : "",
- needAdminSetup: isSet(object.needAdminSetup) ? Boolean(object.needAdminSetup) : false,
- disallowSignup: isSet(object.disallowSignup) ? Boolean(object.disallowSignup) : false,
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
+ gitCommit: isSet(object.gitCommit) ? globalThis.String(object.gitCommit) : "",
+ readonly: isSet(object.readonly) ? globalThis.Boolean(object.readonly) : false,
+ saas: isSet(object.saas) ? globalThis.Boolean(object.saas) : false,
+ demoName: isSet(object.demoName) ? globalThis.String(object.demoName) : "",
+ host: isSet(object.host) ? globalThis.String(object.host) : "",
+ port: isSet(object.port) ? globalThis.String(object.port) : "",
+ externalUrl: isSet(object.externalUrl) ? globalThis.String(object.externalUrl) : "",
+ needAdminSetup: isSet(object.needAdminSetup) ? globalThis.Boolean(object.needAdminSetup) : false,
+ disallowSignup: isSet(object.disallowSignup) ? globalThis.Boolean(object.disallowSignup) : false,
lastActiveTime: isSet(object.lastActiveTime) ? fromJsonTimestamp(object.lastActiveTime) : undefined,
- require2fa: isSet(object.require2fa) ? Boolean(object.require2fa) : false,
- workspaceId: isSet(object.workspaceId) ? String(object.workspaceId) : "",
- gitopsWebhookUrl: isSet(object.gitopsWebhookUrl) ? String(object.gitopsWebhookUrl) : "",
- debug: isSet(object.debug) ? Boolean(object.debug) : false,
+ require2fa: isSet(object.require2fa) ? globalThis.Boolean(object.require2fa) : false,
+ workspaceId: isSet(object.workspaceId) ? globalThis.String(object.workspaceId) : "",
+ gitopsWebhookUrl: isSet(object.gitopsWebhookUrl) ? globalThis.String(object.gitopsWebhookUrl) : "",
+ debug: isSet(object.debug) ? globalThis.Boolean(object.debug) : false,
};
},
toJSON(message: ActuatorInfo): unknown {
const obj: any = {};
- message.version !== undefined && (obj.version = message.version);
- message.gitCommit !== undefined && (obj.gitCommit = message.gitCommit);
- message.readonly !== undefined && (obj.readonly = message.readonly);
- message.saas !== undefined && (obj.saas = message.saas);
- message.demoName !== undefined && (obj.demoName = message.demoName);
- message.host !== undefined && (obj.host = message.host);
- message.port !== undefined && (obj.port = message.port);
- message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);
- message.needAdminSetup !== undefined && (obj.needAdminSetup = message.needAdminSetup);
- message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);
- message.lastActiveTime !== undefined && (obj.lastActiveTime = message.lastActiveTime.toISOString());
- message.require2fa !== undefined && (obj.require2fa = message.require2fa);
- message.workspaceId !== undefined && (obj.workspaceId = message.workspaceId);
- message.gitopsWebhookUrl !== undefined && (obj.gitopsWebhookUrl = message.gitopsWebhookUrl);
- message.debug !== undefined && (obj.debug = message.debug);
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.gitCommit !== "") {
+ obj.gitCommit = message.gitCommit;
+ }
+ if (message.readonly === true) {
+ obj.readonly = message.readonly;
+ }
+ if (message.saas === true) {
+ obj.saas = message.saas;
+ }
+ if (message.demoName !== "") {
+ obj.demoName = message.demoName;
+ }
+ if (message.host !== "") {
+ obj.host = message.host;
+ }
+ if (message.port !== "") {
+ obj.port = message.port;
+ }
+ if (message.externalUrl !== "") {
+ obj.externalUrl = message.externalUrl;
+ }
+ if (message.needAdminSetup === true) {
+ obj.needAdminSetup = message.needAdminSetup;
+ }
+ if (message.disallowSignup === true) {
+ obj.disallowSignup = message.disallowSignup;
+ }
+ if (message.lastActiveTime !== undefined) {
+ obj.lastActiveTime = message.lastActiveTime.toISOString();
+ }
+ if (message.require2fa === true) {
+ obj.require2fa = message.require2fa;
+ }
+ if (message.workspaceId !== "") {
+ obj.workspaceId = message.workspaceId;
+ }
+ if (message.gitopsWebhookUrl !== "") {
+ obj.gitopsWebhookUrl = message.gitopsWebhookUrl;
+ }
+ if (message.debug === true) {
+ obj.debug = message.debug;
+ }
return obj;
},
create(base?: DeepPartial<ActuatorInfo>): ActuatorInfo {
return ActuatorInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ActuatorInfo>): ActuatorInfo {
const message = createBaseActuatorInfo();
message.version = object.version ?? "";
@@ -940,7 +980,7 @@ export const ActuatorServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -954,14 +994,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/anomaly_service.ts b/frontend/src/types/proto/v1/anomaly_service.ts
index 14ad9b67e3..c243840ecf 100644
--- a/frontend/src/types/proto/v1/anomaly_service.ts
+++ b/frontend/src/types/proto/v1/anomaly_service.ts
@@ -305,24 +305,29 @@ export const SearchAnomaliesRequest = {
fromJSON(object: any): SearchAnomaliesRequest {
return {
- filter: isSet(object.filter) ? String(object.filter) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: SearchAnomaliesRequest): unknown {
const obj: any = {};
- message.filter !== undefined && (obj.filter = message.filter);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<SearchAnomaliesRequest>): SearchAnomaliesRequest {
return SearchAnomaliesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchAnomaliesRequest>): SearchAnomaliesRequest {
const message = createBaseSearchAnomaliesRequest();
message.filter = object.filter ?? "";
@@ -379,26 +384,27 @@ export const SearchAnomaliesResponse = {
fromJSON(object: any): SearchAnomaliesResponse {
return {
- anomalies: Array.isArray(object?.anomalies) ? object.anomalies.map((e: any) => Anomaly.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ anomalies: globalThis.Array.isArray(object?.anomalies)
+ ? object.anomalies.map((e: any) => Anomaly.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: SearchAnomaliesResponse): unknown {
const obj: any = {};
- if (message.anomalies) {
- obj.anomalies = message.anomalies.map((e) => e ? Anomaly.toJSON(e) : undefined);
- } else {
- obj.anomalies = [];
+ if (message.anomalies?.length) {
+ obj.anomalies = message.anomalies.map((e) => Anomaly.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<SearchAnomaliesResponse>): SearchAnomaliesResponse {
return SearchAnomaliesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchAnomaliesResponse>): SearchAnomaliesResponse {
const message = createBaseSearchAnomaliesResponse();
message.anomalies = object.anomalies?.map((e) => Anomaly.fromPartial(e)) || [];
@@ -552,7 +558,7 @@ export const Anomaly = {
fromJSON(object: any): Anomaly {
return {
- resource: isSet(object.resource) ? String(object.resource) : "",
+ resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
type: isSet(object.type) ? anomaly_AnomalyTypeFromJSON(object.type) : 0,
severity: isSet(object.severity) ? anomaly_AnomalySeverityFromJSON(object.severity) : 0,
instanceConnectionDetail: isSet(object.instanceConnectionDetail)
@@ -577,36 +583,44 @@ export const Anomaly = {
toJSON(message: Anomaly): unknown {
const obj: any = {};
- message.resource !== undefined && (obj.resource = message.resource);
- message.type !== undefined && (obj.type = anomaly_AnomalyTypeToJSON(message.type));
- message.severity !== undefined && (obj.severity = anomaly_AnomalySeverityToJSON(message.severity));
- message.instanceConnectionDetail !== undefined && (obj.instanceConnectionDetail = message.instanceConnectionDetail
- ? Anomaly_InstanceConnectionDetail.toJSON(message.instanceConnectionDetail)
- : undefined);
- message.databaseConnectionDetail !== undefined && (obj.databaseConnectionDetail = message.databaseConnectionDetail
- ? Anomaly_DatabaseConnectionDetail.toJSON(message.databaseConnectionDetail)
- : undefined);
- message.databaseBackupPolicyViolationDetail !== undefined &&
- (obj.databaseBackupPolicyViolationDetail = message.databaseBackupPolicyViolationDetail
- ? Anomaly_DatabaseBackupPolicyViolationDetail.toJSON(message.databaseBackupPolicyViolationDetail)
- : undefined);
- message.databaseBackupMissingDetail !== undefined &&
- (obj.databaseBackupMissingDetail = message.databaseBackupMissingDetail
- ? Anomaly_DatabaseBackupMissingDetail.toJSON(message.databaseBackupMissingDetail)
- : undefined);
- message.databaseSchemaDriftDetail !== undefined &&
- (obj.databaseSchemaDriftDetail = message.databaseSchemaDriftDetail
- ? Anomaly_DatabaseSchemaDriftDetail.toJSON(message.databaseSchemaDriftDetail)
- : undefined);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
+ if (message.resource !== "") {
+ obj.resource = message.resource;
+ }
+ if (message.type !== 0) {
+ obj.type = anomaly_AnomalyTypeToJSON(message.type);
+ }
+ if (message.severity !== 0) {
+ obj.severity = anomaly_AnomalySeverityToJSON(message.severity);
+ }
+ if (message.instanceConnectionDetail !== undefined) {
+ obj.instanceConnectionDetail = Anomaly_InstanceConnectionDetail.toJSON(message.instanceConnectionDetail);
+ }
+ if (message.databaseConnectionDetail !== undefined) {
+ obj.databaseConnectionDetail = Anomaly_DatabaseConnectionDetail.toJSON(message.databaseConnectionDetail);
+ }
+ if (message.databaseBackupPolicyViolationDetail !== undefined) {
+ obj.databaseBackupPolicyViolationDetail = Anomaly_DatabaseBackupPolicyViolationDetail.toJSON(
+ message.databaseBackupPolicyViolationDetail,
+ );
+ }
+ if (message.databaseBackupMissingDetail !== undefined) {
+ obj.databaseBackupMissingDetail = Anomaly_DatabaseBackupMissingDetail.toJSON(message.databaseBackupMissingDetail);
+ }
+ if (message.databaseSchemaDriftDetail !== undefined) {
+ obj.databaseSchemaDriftDetail = Anomaly_DatabaseSchemaDriftDetail.toJSON(message.databaseSchemaDriftDetail);
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<Anomaly>): Anomaly {
return Anomaly.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Anomaly>): Anomaly {
const message = createBaseAnomaly();
message.resource = object.resource ?? "";
@@ -674,19 +688,20 @@ export const Anomaly_InstanceConnectionDetail = {
},
fromJSON(object: any): Anomaly_InstanceConnectionDetail {
- return { detail: isSet(object.detail) ? String(object.detail) : "" };
+ return { detail: isSet(object.detail) ? globalThis.String(object.detail) : "" };
},
toJSON(message: Anomaly_InstanceConnectionDetail): unknown {
const obj: any = {};
- message.detail !== undefined && (obj.detail = message.detail);
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
return obj;
},
create(base?: DeepPartial<Anomaly_InstanceConnectionDetail>): Anomaly_InstanceConnectionDetail {
return Anomaly_InstanceConnectionDetail.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Anomaly_InstanceConnectionDetail>): Anomaly_InstanceConnectionDetail {
const message = createBaseAnomaly_InstanceConnectionDetail();
message.detail = object.detail ?? "";
@@ -730,19 +745,20 @@ export const Anomaly_DatabaseConnectionDetail = {
},
fromJSON(object: any): Anomaly_DatabaseConnectionDetail {
- return { detail: isSet(object.detail) ? String(object.detail) : "" };
+ return { detail: isSet(object.detail) ? globalThis.String(object.detail) : "" };
},
toJSON(message: Anomaly_DatabaseConnectionDetail): unknown {
const obj: any = {};
- message.detail !== undefined && (obj.detail = message.detail);
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
return obj;
},
create(base?: DeepPartial<Anomaly_DatabaseConnectionDetail>): Anomaly_DatabaseConnectionDetail {
return Anomaly_DatabaseConnectionDetail.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Anomaly_DatabaseConnectionDetail>): Anomaly_DatabaseConnectionDetail {
const message = createBaseAnomaly_DatabaseConnectionDetail();
message.detail = object.detail ?? "";
@@ -807,7 +823,7 @@ export const Anomaly_DatabaseBackupPolicyViolationDetail = {
fromJSON(object: any): Anomaly_DatabaseBackupPolicyViolationDetail {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
expectedSchedule: isSet(object.expectedSchedule) ? backupPlanScheduleFromJSON(object.expectedSchedule) : 0,
actualSchedule: isSet(object.actualSchedule) ? backupPlanScheduleFromJSON(object.actualSchedule) : 0,
};
@@ -815,17 +831,21 @@ export const Anomaly_DatabaseBackupPolicyViolationDetail = {
toJSON(message: Anomaly_DatabaseBackupPolicyViolationDetail): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.expectedSchedule !== undefined &&
- (obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule));
- message.actualSchedule !== undefined && (obj.actualSchedule = backupPlanScheduleToJSON(message.actualSchedule));
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.expectedSchedule !== 0) {
+ obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule);
+ }
+ if (message.actualSchedule !== 0) {
+ obj.actualSchedule = backupPlanScheduleToJSON(message.actualSchedule);
+ }
return obj;
},
create(base?: DeepPartial<Anomaly_DatabaseBackupPolicyViolationDetail>): Anomaly_DatabaseBackupPolicyViolationDetail {
return Anomaly_DatabaseBackupPolicyViolationDetail.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<Anomaly_DatabaseBackupPolicyViolationDetail>,
): Anomaly_DatabaseBackupPolicyViolationDetail {
@@ -891,16 +911,18 @@ export const Anomaly_DatabaseBackupMissingDetail = {
toJSON(message: Anomaly_DatabaseBackupMissingDetail): unknown {
const obj: any = {};
- message.expectedSchedule !== undefined &&
- (obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule));
- message.latestBackupTime !== undefined && (obj.latestBackupTime = message.latestBackupTime.toISOString());
+ if (message.expectedSchedule !== 0) {
+ obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule);
+ }
+ if (message.latestBackupTime !== undefined) {
+ obj.latestBackupTime = message.latestBackupTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<Anomaly_DatabaseBackupMissingDetail>): Anomaly_DatabaseBackupMissingDetail {
return Anomaly_DatabaseBackupMissingDetail.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Anomaly_DatabaseBackupMissingDetail>): Anomaly_DatabaseBackupMissingDetail {
const message = createBaseAnomaly_DatabaseBackupMissingDetail();
message.expectedSchedule = object.expectedSchedule ?? 0;
@@ -966,24 +988,29 @@ export const Anomaly_DatabaseSchemaDriftDetail = {
fromJSON(object: any): Anomaly_DatabaseSchemaDriftDetail {
return {
- recordVersion: isSet(object.recordVersion) ? String(object.recordVersion) : "",
- expectedSchema: isSet(object.expectedSchema) ? String(object.expectedSchema) : "",
- actualSchema: isSet(object.actualSchema) ? String(object.actualSchema) : "",
+ recordVersion: isSet(object.recordVersion) ? globalThis.String(object.recordVersion) : "",
+ expectedSchema: isSet(object.expectedSchema) ? globalThis.String(object.expectedSchema) : "",
+ actualSchema: isSet(object.actualSchema) ? globalThis.String(object.actualSchema) : "",
};
},
toJSON(message: Anomaly_DatabaseSchemaDriftDetail): unknown {
const obj: any = {};
- message.recordVersion !== undefined && (obj.recordVersion = message.recordVersion);
- message.expectedSchema !== undefined && (obj.expectedSchema = message.expectedSchema);
- message.actualSchema !== undefined && (obj.actualSchema = message.actualSchema);
+ if (message.recordVersion !== "") {
+ obj.recordVersion = message.recordVersion;
+ }
+ if (message.expectedSchema !== "") {
+ obj.expectedSchema = message.expectedSchema;
+ }
+ if (message.actualSchema !== "") {
+ obj.actualSchema = message.actualSchema;
+ }
return obj;
},
create(base?: DeepPartial<Anomaly_DatabaseSchemaDriftDetail>): Anomaly_DatabaseSchemaDriftDetail {
return Anomaly_DatabaseSchemaDriftDetail.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Anomaly_DatabaseSchemaDriftDetail>): Anomaly_DatabaseSchemaDriftDetail {
const message = createBaseAnomaly_DatabaseSchemaDriftDetail();
message.recordVersion = object.recordVersion ?? "";
@@ -1042,7 +1069,7 @@ export const AnomalyServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -1056,14 +1083,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/auth_service.ts b/frontend/src/types/proto/v1/auth_service.ts
index 90c3a87325..cbc4cd064c 100644
--- a/frontend/src/types/proto/v1/auth_service.ts
+++ b/frontend/src/types/proto/v1/auth_service.ts
@@ -292,19 +292,20 @@ export const GetUserRequest = {
},
fromJSON(object: any): GetUserRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetUserRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetUserRequest>): GetUserRequest {
return GetUserRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetUserRequest>): GetUserRequest {
const message = createBaseGetUserRequest();
message.name = object.name ?? "";
@@ -369,24 +370,29 @@ export const ListUsersRequest = {
fromJSON(object: any): ListUsersRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? Boolean(object.showDeleted) : false,
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
};
},
toJSON(message: ListUsersRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted === true) {
+ obj.showDeleted = message.showDeleted;
+ }
return obj;
},
create(base?: DeepPartial<ListUsersRequest>): ListUsersRequest {
return ListUsersRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListUsersRequest>): ListUsersRequest {
const message = createBaseListUsersRequest();
message.pageSize = object.pageSize ?? 0;
@@ -443,26 +449,25 @@ export const ListUsersResponse = {
fromJSON(object: any): ListUsersResponse {
return {
- users: Array.isArray(object?.users) ? object.users.map((e: any) => User.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ users: globalThis.Array.isArray(object?.users) ? object.users.map((e: any) => User.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListUsersResponse): unknown {
const obj: any = {};
- if (message.users) {
- obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);
- } else {
- obj.users = [];
+ if (message.users?.length) {
+ obj.users = message.users.map((e) => User.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListUsersResponse>): ListUsersResponse {
return ListUsersResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListUsersResponse>): ListUsersResponse {
const message = createBaseListUsersResponse();
message.users = object.users?.map((e) => User.fromPartial(e)) || [];
@@ -512,14 +517,15 @@ export const CreateUserRequest = {
toJSON(message: CreateUserRequest): unknown {
const obj: any = {};
- message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
+ if (message.user !== undefined) {
+ obj.user = User.toJSON(message.user);
+ }
return obj;
},
create(base?: DeepPartial<CreateUserRequest>): CreateUserRequest {
return CreateUserRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateUserRequest>): CreateUserRequest {
const message = createBaseCreateUserRequest();
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
@@ -612,26 +618,39 @@ export const UpdateUserRequest = {
return {
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
- otpCode: isSet(object.otpCode) ? String(object.otpCode) : undefined,
- regenerateTempMfaSecret: isSet(object.regenerateTempMfaSecret) ? Boolean(object.regenerateTempMfaSecret) : false,
- regenerateRecoveryCodes: isSet(object.regenerateRecoveryCodes) ? Boolean(object.regenerateRecoveryCodes) : false,
+ otpCode: isSet(object.otpCode) ? globalThis.String(object.otpCode) : undefined,
+ regenerateTempMfaSecret: isSet(object.regenerateTempMfaSecret)
+ ? globalThis.Boolean(object.regenerateTempMfaSecret)
+ : false,
+ regenerateRecoveryCodes: isSet(object.regenerateRecoveryCodes)
+ ? globalThis.Boolean(object.regenerateRecoveryCodes)
+ : false,
};
},
toJSON(message: UpdateUserRequest): unknown {
const obj: any = {};
- message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
- message.otpCode !== undefined && (obj.otpCode = message.otpCode);
- message.regenerateTempMfaSecret !== undefined && (obj.regenerateTempMfaSecret = message.regenerateTempMfaSecret);
- message.regenerateRecoveryCodes !== undefined && (obj.regenerateRecoveryCodes = message.regenerateRecoveryCodes);
+ if (message.user !== undefined) {
+ obj.user = User.toJSON(message.user);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
+ if (message.otpCode !== undefined) {
+ obj.otpCode = message.otpCode;
+ }
+ if (message.regenerateTempMfaSecret === true) {
+ obj.regenerateTempMfaSecret = message.regenerateTempMfaSecret;
+ }
+ if (message.regenerateRecoveryCodes === true) {
+ obj.regenerateRecoveryCodes = message.regenerateRecoveryCodes;
+ }
return obj;
},
create(base?: DeepPartial<UpdateUserRequest>): UpdateUserRequest {
return UpdateUserRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateUserRequest>): UpdateUserRequest {
const message = createBaseUpdateUserRequest();
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
@@ -679,19 +698,20 @@ export const DeleteUserRequest = {
},
fromJSON(object: any): DeleteUserRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteUserRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteUserRequest>): DeleteUserRequest {
return DeleteUserRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteUserRequest>): DeleteUserRequest {
const message = createBaseDeleteUserRequest();
message.name = object.name ?? "";
@@ -735,19 +755,20 @@ export const UndeleteUserRequest = {
},
fromJSON(object: any): UndeleteUserRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UndeleteUserRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UndeleteUserRequest>): UndeleteUserRequest {
return UndeleteUserRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UndeleteUserRequest>): UndeleteUserRequest {
const message = createBaseUndeleteUserRequest();
message.name = object.name ?? "";
@@ -871,35 +892,49 @@ export const LoginRequest = {
fromJSON(object: any): LoginRequest {
return {
- email: isSet(object.email) ? String(object.email) : "",
- password: isSet(object.password) ? String(object.password) : "",
- web: isSet(object.web) ? Boolean(object.web) : false,
- idpName: isSet(object.idpName) ? String(object.idpName) : "",
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
+ password: isSet(object.password) ? globalThis.String(object.password) : "",
+ web: isSet(object.web) ? globalThis.Boolean(object.web) : false,
+ idpName: isSet(object.idpName) ? globalThis.String(object.idpName) : "",
idpContext: isSet(object.idpContext) ? IdentityProviderContext.fromJSON(object.idpContext) : undefined,
- otpCode: isSet(object.otpCode) ? String(object.otpCode) : undefined,
- recoveryCode: isSet(object.recoveryCode) ? String(object.recoveryCode) : undefined,
- mfaTempToken: isSet(object.mfaTempToken) ? String(object.mfaTempToken) : undefined,
+ otpCode: isSet(object.otpCode) ? globalThis.String(object.otpCode) : undefined,
+ recoveryCode: isSet(object.recoveryCode) ? globalThis.String(object.recoveryCode) : undefined,
+ mfaTempToken: isSet(object.mfaTempToken) ? globalThis.String(object.mfaTempToken) : undefined,
};
},
toJSON(message: LoginRequest): unknown {
const obj: any = {};
- message.email !== undefined && (obj.email = message.email);
- message.password !== undefined && (obj.password = message.password);
- message.web !== undefined && (obj.web = message.web);
- message.idpName !== undefined && (obj.idpName = message.idpName);
- message.idpContext !== undefined &&
- (obj.idpContext = message.idpContext ? IdentityProviderContext.toJSON(message.idpContext) : undefined);
- message.otpCode !== undefined && (obj.otpCode = message.otpCode);
- message.recoveryCode !== undefined && (obj.recoveryCode = message.recoveryCode);
- message.mfaTempToken !== undefined && (obj.mfaTempToken = message.mfaTempToken);
+ if (message.email !== "") {
+ obj.email = message.email;
+ }
+ if (message.password !== "") {
+ obj.password = message.password;
+ }
+ if (message.web === true) {
+ obj.web = message.web;
+ }
+ if (message.idpName !== "") {
+ obj.idpName = message.idpName;
+ }
+ if (message.idpContext !== undefined) {
+ obj.idpContext = IdentityProviderContext.toJSON(message.idpContext);
+ }
+ if (message.otpCode !== undefined) {
+ obj.otpCode = message.otpCode;
+ }
+ if (message.recoveryCode !== undefined) {
+ obj.recoveryCode = message.recoveryCode;
+ }
+ if (message.mfaTempToken !== undefined) {
+ obj.mfaTempToken = message.mfaTempToken;
+ }
return obj;
},
create(base?: DeepPartial<LoginRequest>): LoginRequest {
return LoginRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LoginRequest>): LoginRequest {
const message = createBaseLoginRequest();
message.email = object.email ?? "";
@@ -972,18 +1007,18 @@ export const IdentityProviderContext = {
toJSON(message: IdentityProviderContext): unknown {
const obj: any = {};
- message.oauth2Context !== undefined && (obj.oauth2Context = message.oauth2Context
- ? OAuth2IdentityProviderContext.toJSON(message.oauth2Context)
- : undefined);
- message.oidcContext !== undefined &&
- (obj.oidcContext = message.oidcContext ? OIDCIdentityProviderContext.toJSON(message.oidcContext) : undefined);
+ if (message.oauth2Context !== undefined) {
+ obj.oauth2Context = OAuth2IdentityProviderContext.toJSON(message.oauth2Context);
+ }
+ if (message.oidcContext !== undefined) {
+ obj.oidcContext = OIDCIdentityProviderContext.toJSON(message.oidcContext);
+ }
return obj;
},
create(base?: DeepPartial<IdentityProviderContext>): IdentityProviderContext {
return IdentityProviderContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IdentityProviderContext>): IdentityProviderContext {
const message = createBaseIdentityProviderContext();
message.oauth2Context = (object.oauth2Context !== undefined && object.oauth2Context !== null)
@@ -1032,19 +1067,20 @@ export const OAuth2IdentityProviderContext = {
},
fromJSON(object: any): OAuth2IdentityProviderContext {
- return { code: isSet(object.code) ? String(object.code) : "" };
+ return { code: isSet(object.code) ? globalThis.String(object.code) : "" };
},
toJSON(message: OAuth2IdentityProviderContext): unknown {
const obj: any = {};
- message.code !== undefined && (obj.code = message.code);
+ if (message.code !== "") {
+ obj.code = message.code;
+ }
return obj;
},
create(base?: DeepPartial<OAuth2IdentityProviderContext>): OAuth2IdentityProviderContext {
return OAuth2IdentityProviderContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OAuth2IdentityProviderContext>): OAuth2IdentityProviderContext {
const message = createBaseOAuth2IdentityProviderContext();
message.code = object.code ?? "";
@@ -1089,7 +1125,6 @@ export const OIDCIdentityProviderContext = {
create(base?: DeepPartial<OIDCIdentityProviderContext>): OIDCIdentityProviderContext {
return OIDCIdentityProviderContext.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<OIDCIdentityProviderContext>): OIDCIdentityProviderContext {
const message = createBaseOIDCIdentityProviderContext();
return message;
@@ -1143,22 +1178,25 @@ export const LoginResponse = {
fromJSON(object: any): LoginResponse {
return {
- token: isSet(object.token) ? String(object.token) : "",
- mfaTempToken: isSet(object.mfaTempToken) ? String(object.mfaTempToken) : undefined,
+ token: isSet(object.token) ? globalThis.String(object.token) : "",
+ mfaTempToken: isSet(object.mfaTempToken) ? globalThis.String(object.mfaTempToken) : undefined,
};
},
toJSON(message: LoginResponse): unknown {
const obj: any = {};
- message.token !== undefined && (obj.token = message.token);
- message.mfaTempToken !== undefined && (obj.mfaTempToken = message.mfaTempToken);
+ if (message.token !== "") {
+ obj.token = message.token;
+ }
+ if (message.mfaTempToken !== undefined) {
+ obj.mfaTempToken = message.mfaTempToken;
+ }
return obj;
},
create(base?: DeepPartial<LoginResponse>): LoginResponse {
return LoginResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LoginResponse>): LoginResponse {
const message = createBaseLoginResponse();
message.token = object.token ?? "";
@@ -1204,7 +1242,6 @@ export const LogoutRequest = {
create(base?: DeepPartial<LogoutRequest>): LogoutRequest {
return LogoutRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<LogoutRequest>): LogoutRequest {
const message = createBaseLogoutRequest();
return message;
@@ -1371,46 +1408,67 @@ export const User = {
fromJSON(object: any): User {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
state: isSet(object.state) ? stateFromJSON(object.state) : 0,
- email: isSet(object.email) ? String(object.email) : "",
- title: isSet(object.title) ? String(object.title) : "",
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
userType: isSet(object.userType) ? userTypeFromJSON(object.userType) : 0,
userRole: isSet(object.userRole) ? userRoleFromJSON(object.userRole) : 0,
- password: isSet(object.password) ? String(object.password) : "",
- serviceKey: isSet(object.serviceKey) ? String(object.serviceKey) : "",
- mfaEnabled: isSet(object.mfaEnabled) ? Boolean(object.mfaEnabled) : false,
- mfaSecret: isSet(object.mfaSecret) ? String(object.mfaSecret) : "",
- recoveryCodes: Array.isArray(object?.recoveryCodes) ? object.recoveryCodes.map((e: any) => String(e)) : [],
- phone: isSet(object.phone) ? String(object.phone) : "",
+ password: isSet(object.password) ? globalThis.String(object.password) : "",
+ serviceKey: isSet(object.serviceKey) ? globalThis.String(object.serviceKey) : "",
+ mfaEnabled: isSet(object.mfaEnabled) ? globalThis.Boolean(object.mfaEnabled) : false,
+ mfaSecret: isSet(object.mfaSecret) ? globalThis.String(object.mfaSecret) : "",
+ recoveryCodes: globalThis.Array.isArray(object?.recoveryCodes)
+ ? object.recoveryCodes.map((e: any) => globalThis.String(e))
+ : [],
+ phone: isSet(object.phone) ? globalThis.String(object.phone) : "",
};
},
toJSON(message: User): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.state !== undefined && (obj.state = stateToJSON(message.state));
- message.email !== undefined && (obj.email = message.email);
- message.title !== undefined && (obj.title = message.title);
- message.userType !== undefined && (obj.userType = userTypeToJSON(message.userType));
- message.userRole !== undefined && (obj.userRole = userRoleToJSON(message.userRole));
- message.password !== undefined && (obj.password = message.password);
- message.serviceKey !== undefined && (obj.serviceKey = message.serviceKey);
- message.mfaEnabled !== undefined && (obj.mfaEnabled = message.mfaEnabled);
- message.mfaSecret !== undefined && (obj.mfaSecret = message.mfaSecret);
- if (message.recoveryCodes) {
- obj.recoveryCodes = message.recoveryCodes.map((e) => e);
- } else {
- obj.recoveryCodes = [];
- }
- message.phone !== undefined && (obj.phone = message.phone);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.state !== 0) {
+ obj.state = stateToJSON(message.state);
+ }
+ if (message.email !== "") {
+ obj.email = message.email;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.userType !== 0) {
+ obj.userType = userTypeToJSON(message.userType);
+ }
+ if (message.userRole !== 0) {
+ obj.userRole = userRoleToJSON(message.userRole);
+ }
+ if (message.password !== "") {
+ obj.password = message.password;
+ }
+ if (message.serviceKey !== "") {
+ obj.serviceKey = message.serviceKey;
+ }
+ if (message.mfaEnabled === true) {
+ obj.mfaEnabled = message.mfaEnabled;
+ }
+ if (message.mfaSecret !== "") {
+ obj.mfaSecret = message.mfaSecret;
+ }
+ if (message.recoveryCodes?.length) {
+ obj.recoveryCodes = message.recoveryCodes;
+ }
+ if (message.phone !== "") {
+ obj.phone = message.phone;
+ }
return obj;
},
create(base?: DeepPartial<User>): User {
return User.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<User>): User {
const message = createBaseUser();
message.name = object.name ?? "";
@@ -1686,7 +1744,7 @@ export const AuthServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/bookmark_service.ts b/frontend/src/types/proto/v1/bookmark_service.ts
index bd6e90ad81..f6fa688921 100644
--- a/frontend/src/types/proto/v1/bookmark_service.ts
+++ b/frontend/src/types/proto/v1/bookmark_service.ts
@@ -104,14 +104,15 @@ export const CreateBookmarkRequest = {
toJSON(message: CreateBookmarkRequest): unknown {
const obj: any = {};
- message.bookmark !== undefined && (obj.bookmark = message.bookmark ? Bookmark.toJSON(message.bookmark) : undefined);
+ if (message.bookmark !== undefined) {
+ obj.bookmark = Bookmark.toJSON(message.bookmark);
+ }
return obj;
},
create(base?: DeepPartial<CreateBookmarkRequest>): CreateBookmarkRequest {
return CreateBookmarkRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateBookmarkRequest>): CreateBookmarkRequest {
const message = createBaseCreateBookmarkRequest();
message.bookmark = (object.bookmark !== undefined && object.bookmark !== null)
@@ -157,19 +158,20 @@ export const DeleteBookmarkRequest = {
},
fromJSON(object: any): DeleteBookmarkRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteBookmarkRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteBookmarkRequest>): DeleteBookmarkRequest {
return DeleteBookmarkRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteBookmarkRequest>): DeleteBookmarkRequest {
const message = createBaseDeleteBookmarkRequest();
message.name = object.name ?? "";
@@ -224,22 +226,25 @@ export const ListBookmarksRequest = {
fromJSON(object: any): ListBookmarksRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListBookmarksRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListBookmarksRequest>): ListBookmarksRequest {
return ListBookmarksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListBookmarksRequest>): ListBookmarksRequest {
const message = createBaseListBookmarksRequest();
message.pageSize = object.pageSize ?? 0;
@@ -295,26 +300,27 @@ export const ListBookmarksResponse = {
fromJSON(object: any): ListBookmarksResponse {
return {
- bookmarks: Array.isArray(object?.bookmarks) ? object.bookmarks.map((e: any) => Bookmark.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ bookmarks: globalThis.Array.isArray(object?.bookmarks)
+ ? object.bookmarks.map((e: any) => Bookmark.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListBookmarksResponse): unknown {
const obj: any = {};
- if (message.bookmarks) {
- obj.bookmarks = message.bookmarks.map((e) => e ? Bookmark.toJSON(e) : undefined);
- } else {
- obj.bookmarks = [];
+ if (message.bookmarks?.length) {
+ obj.bookmarks = message.bookmarks.map((e) => Bookmark.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListBookmarksResponse>): ListBookmarksResponse {
return ListBookmarksResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListBookmarksResponse>): ListBookmarksResponse {
const message = createBaseListBookmarksResponse();
message.bookmarks = object.bookmarks?.map((e) => Bookmark.fromPartial(e)) || [];
@@ -380,24 +386,29 @@ export const Bookmark = {
fromJSON(object: any): Bookmark {
return {
- name: isSet(object.name) ? String(object.name) : "",
- title: isSet(object.title) ? String(object.title) : "",
- link: isSet(object.link) ? String(object.link) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ link: isSet(object.link) ? globalThis.String(object.link) : "",
};
},
toJSON(message: Bookmark): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.title !== undefined && (obj.title = message.title);
- message.link !== undefined && (obj.link = message.link);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.link !== "") {
+ obj.link = message.link;
+ }
return obj;
},
create(base?: DeepPartial<Bookmark>): Bookmark {
return Bookmark.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Bookmark>): Bookmark {
const message = createBaseBookmark();
message.name = object.name ?? "";
@@ -517,7 +528,7 @@ export const BookmarkServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/cel_service.ts b/frontend/src/types/proto/v1/cel_service.ts
index 47740b01b3..a4aa6d8ce9 100644
--- a/frontend/src/types/proto/v1/cel_service.ts
+++ b/frontend/src/types/proto/v1/cel_service.ts
@@ -57,15 +57,17 @@ export const BatchParseRequest = {
},
fromJSON(object: any): BatchParseRequest {
- return { expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => String(e)) : [] };
+ return {
+ expressions: globalThis.Array.isArray(object?.expressions)
+ ? object.expressions.map((e: any) => globalThis.String(e))
+ : [],
+ };
},
toJSON(message: BatchParseRequest): unknown {
const obj: any = {};
- if (message.expressions) {
- obj.expressions = message.expressions.map((e) => e);
- } else {
- obj.expressions = [];
+ if (message.expressions?.length) {
+ obj.expressions = message.expressions;
}
return obj;
},
@@ -73,7 +75,6 @@ export const BatchParseRequest = {
create(base?: DeepPartial<BatchParseRequest>): BatchParseRequest {
return BatchParseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchParseRequest>): BatchParseRequest {
const message = createBaseBatchParseRequest();
message.expressions = object.expressions?.map((e) => e) || [];
@@ -118,16 +119,16 @@ export const BatchParseResponse = {
fromJSON(object: any): BatchParseResponse {
return {
- expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => ParsedExpr.fromJSON(e)) : [],
+ expressions: globalThis.Array.isArray(object?.expressions)
+ ? object.expressions.map((e: any) => ParsedExpr.fromJSON(e))
+ : [],
};
},
toJSON(message: BatchParseResponse): unknown {
const obj: any = {};
- if (message.expressions) {
- obj.expressions = message.expressions.map((e) => e ? ParsedExpr.toJSON(e) : undefined);
- } else {
- obj.expressions = [];
+ if (message.expressions?.length) {
+ obj.expressions = message.expressions.map((e) => ParsedExpr.toJSON(e));
}
return obj;
},
@@ -135,7 +136,6 @@ export const BatchParseResponse = {
create(base?: DeepPartial<BatchParseResponse>): BatchParseResponse {
return BatchParseResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchParseResponse>): BatchParseResponse {
const message = createBaseBatchParseResponse();
message.expressions = object.expressions?.map((e) => ParsedExpr.fromPartial(e)) || [];
@@ -180,16 +180,16 @@ export const BatchDeparseRequest = {
fromJSON(object: any): BatchDeparseRequest {
return {
- expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => ParsedExpr.fromJSON(e)) : [],
+ expressions: globalThis.Array.isArray(object?.expressions)
+ ? object.expressions.map((e: any) => ParsedExpr.fromJSON(e))
+ : [],
};
},
toJSON(message: BatchDeparseRequest): unknown {
const obj: any = {};
- if (message.expressions) {
- obj.expressions = message.expressions.map((e) => e ? ParsedExpr.toJSON(e) : undefined);
- } else {
- obj.expressions = [];
+ if (message.expressions?.length) {
+ obj.expressions = message.expressions.map((e) => ParsedExpr.toJSON(e));
}
return obj;
},
@@ -197,7 +197,6 @@ export const BatchDeparseRequest = {
create(base?: DeepPartial<BatchDeparseRequest>): BatchDeparseRequest {
return BatchDeparseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchDeparseRequest>): BatchDeparseRequest {
const message = createBaseBatchDeparseRequest();
message.expressions = object.expressions?.map((e) => ParsedExpr.fromPartial(e)) || [];
@@ -241,15 +240,17 @@ export const BatchDeparseResponse = {
},
fromJSON(object: any): BatchDeparseResponse {
- return { expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => String(e)) : [] };
+ return {
+ expressions: globalThis.Array.isArray(object?.expressions)
+ ? object.expressions.map((e: any) => globalThis.String(e))
+ : [],
+ };
},
toJSON(message: BatchDeparseResponse): unknown {
const obj: any = {};
- if (message.expressions) {
- obj.expressions = message.expressions.map((e) => e);
- } else {
- obj.expressions = [];
+ if (message.expressions?.length) {
+ obj.expressions = message.expressions;
}
return obj;
},
@@ -257,7 +258,6 @@ export const BatchDeparseResponse = {
create(base?: DeepPartial<BatchDeparseResponse>): BatchDeparseResponse {
return BatchDeparseResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchDeparseResponse>): BatchDeparseResponse {
const message = createBaseBatchDeparseResponse();
message.expressions = object.expressions?.map((e) => e) || [];
@@ -356,7 +356,7 @@ export const CelServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/changelist_service.ts b/frontend/src/types/proto/v1/changelist_service.ts
index 086ba7568b..f3f7dba945 100644
--- a/frontend/src/types/proto/v1/changelist_service.ts
+++ b/frontend/src/types/proto/v1/changelist_service.ts
@@ -187,25 +187,29 @@ export const CreateChangelistRequest = {
fromJSON(object: any): CreateChangelistRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
changelist: isSet(object.changelist) ? Changelist.fromJSON(object.changelist) : undefined,
- changelistId: isSet(object.changelistId) ? String(object.changelistId) : "",
+ changelistId: isSet(object.changelistId) ? globalThis.String(object.changelistId) : "",
};
},
toJSON(message: CreateChangelistRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.changelist !== undefined &&
- (obj.changelist = message.changelist ? Changelist.toJSON(message.changelist) : undefined);
- message.changelistId !== undefined && (obj.changelistId = message.changelistId);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.changelist !== undefined) {
+ obj.changelist = Changelist.toJSON(message.changelist);
+ }
+ if (message.changelistId !== "") {
+ obj.changelistId = message.changelistId;
+ }
return obj;
},
create(base?: DeepPartial<CreateChangelistRequest>): CreateChangelistRequest {
return CreateChangelistRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateChangelistRequest>): CreateChangelistRequest {
const message = createBaseCreateChangelistRequest();
message.parent = object.parent ?? "";
@@ -253,19 +257,20 @@ export const GetChangelistRequest = {
},
fromJSON(object: any): GetChangelistRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetChangelistRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetChangelistRequest>): GetChangelistRequest {
return GetChangelistRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetChangelistRequest>): GetChangelistRequest {
const message = createBaseGetChangelistRequest();
message.name = object.name ?? "";
@@ -330,24 +335,29 @@ export const ListChangelistsRequest = {
fromJSON(object: any): ListChangelistsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListChangelistsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListChangelistsRequest>): ListChangelistsRequest {
return ListChangelistsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListChangelistsRequest>): ListChangelistsRequest {
const message = createBaseListChangelistsRequest();
message.parent = object.parent ?? "";
@@ -404,26 +414,27 @@ export const ListChangelistsResponse = {
fromJSON(object: any): ListChangelistsResponse {
return {
- changelists: Array.isArray(object?.changelists) ? object.changelists.map((e: any) => Changelist.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ changelists: globalThis.Array.isArray(object?.changelists)
+ ? object.changelists.map((e: any) => Changelist.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListChangelistsResponse): unknown {
const obj: any = {};
- if (message.changelists) {
- obj.changelists = message.changelists.map((e) => e ? Changelist.toJSON(e) : undefined);
- } else {
- obj.changelists = [];
+ if (message.changelists?.length) {
+ obj.changelists = message.changelists.map((e) => Changelist.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListChangelistsResponse>): ListChangelistsResponse {
return ListChangelistsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListChangelistsResponse>): ListChangelistsResponse {
const message = createBaseListChangelistsResponse();
message.changelists = object.changelists?.map((e) => Changelist.fromPartial(e)) || [];
@@ -486,16 +497,18 @@ export const UpdateChangelistRequest = {
toJSON(message: UpdateChangelistRequest): unknown {
const obj: any = {};
- message.changelist !== undefined &&
- (obj.changelist = message.changelist ? Changelist.toJSON(message.changelist) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.changelist !== undefined) {
+ obj.changelist = Changelist.toJSON(message.changelist);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateChangelistRequest>): UpdateChangelistRequest {
return UpdateChangelistRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateChangelistRequest>): UpdateChangelistRequest {
const message = createBaseUpdateChangelistRequest();
message.changelist = (object.changelist !== undefined && object.changelist !== null)
@@ -542,19 +555,20 @@ export const DeleteChangelistRequest = {
},
fromJSON(object: any): DeleteChangelistRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteChangelistRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteChangelistRequest>): DeleteChangelistRequest {
return DeleteChangelistRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteChangelistRequest>): DeleteChangelistRequest {
const message = createBaseDeleteChangelistRequest();
message.name = object.name ?? "";
@@ -667,28 +681,40 @@ export const Changelist = {
fromJSON(object: any): Changelist {
return {
- name: isSet(object.name) ? String(object.name) : "",
- description: isSet(object.description) ? String(object.description) : "",
- creator: isSet(object.creator) ? String(object.creator) : "",
- updater: isSet(object.updater) ? String(object.updater) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
+ updater: isSet(object.updater) ? globalThis.String(object.updater) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
- changes: Array.isArray(object?.changes) ? object.changes.map((e: any) => Changelist_Change.fromJSON(e)) : [],
+ changes: globalThis.Array.isArray(object?.changes)
+ ? object.changes.map((e: any) => Changelist_Change.fromJSON(e))
+ : [],
};
},
toJSON(message: Changelist): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.description !== undefined && (obj.description = message.description);
- message.creator !== undefined && (obj.creator = message.creator);
- message.updater !== undefined && (obj.updater = message.updater);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- if (message.changes) {
- obj.changes = message.changes.map((e) => e ? Changelist_Change.toJSON(e) : undefined);
- } else {
- obj.changes = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.updater !== "") {
+ obj.updater = message.updater;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.changes?.length) {
+ obj.changes = message.changes.map((e) => Changelist_Change.toJSON(e));
}
return obj;
},
@@ -696,7 +722,6 @@ export const Changelist = {
create(base?: DeepPartial<Changelist>): Changelist {
return Changelist.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Changelist>): Changelist {
const message = createBaseChangelist();
message.name = object.name ?? "";
@@ -757,22 +782,25 @@ export const Changelist_Change = {
fromJSON(object: any): Changelist_Change {
return {
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- source: isSet(object.source) ? String(object.source) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
};
},
toJSON(message: Changelist_Change): unknown {
const obj: any = {};
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.source !== undefined && (obj.source = message.source);
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.source !== "") {
+ obj.source = message.source;
+ }
return obj;
},
create(base?: DeepPartial<Changelist_Change>): Changelist_Change {
return Changelist_Change.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Changelist_Change>): Changelist_Change {
const message = createBaseChangelist_Change();
message.sheet = object.sheet ?? "";
@@ -1123,7 +1151,7 @@ export const ChangelistServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -1137,14 +1165,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index fa917f3676..fb7d6eaa70 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -1465,19 +1465,20 @@ export const GetDatabaseRequest = {
},
fromJSON(object: any): GetDatabaseRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetDatabaseRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetDatabaseRequest>): GetDatabaseRequest {
return GetDatabaseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetDatabaseRequest>): GetDatabaseRequest {
const message = createBaseGetDatabaseRequest();
message.name = object.name ?? "";
@@ -1552,26 +1553,33 @@ export const ListDatabasesRequest = {
fromJSON(object: any): ListDatabasesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: ListDatabasesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<ListDatabasesRequest>): ListDatabasesRequest {
return ListDatabasesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListDatabasesRequest>): ListDatabasesRequest {
const message = createBaseListDatabasesRequest();
message.parent = object.parent ?? "";
@@ -1629,26 +1637,27 @@ export const ListDatabasesResponse = {
fromJSON(object: any): ListDatabasesResponse {
return {
- databases: Array.isArray(object?.databases) ? object.databases.map((e: any) => Database.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ databases: globalThis.Array.isArray(object?.databases)
+ ? object.databases.map((e: any) => Database.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListDatabasesResponse): unknown {
const obj: any = {};
- if (message.databases) {
- obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);
- } else {
- obj.databases = [];
+ if (message.databases?.length) {
+ obj.databases = message.databases.map((e) => Database.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListDatabasesResponse>): ListDatabasesResponse {
return ListDatabasesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListDatabasesResponse>): ListDatabasesResponse {
const message = createBaseListDatabasesResponse();
message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];
@@ -1724,26 +1733,33 @@ export const SearchDatabasesRequest = {
fromJSON(object: any): SearchDatabasesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: SearchDatabasesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<SearchDatabasesRequest>): SearchDatabasesRequest {
return SearchDatabasesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchDatabasesRequest>): SearchDatabasesRequest {
const message = createBaseSearchDatabasesRequest();
message.parent = object.parent ?? "";
@@ -1801,26 +1817,27 @@ export const SearchDatabasesResponse = {
fromJSON(object: any): SearchDatabasesResponse {
return {
- databases: Array.isArray(object?.databases) ? object.databases.map((e: any) => Database.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ databases: globalThis.Array.isArray(object?.databases)
+ ? object.databases.map((e: any) => Database.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: SearchDatabasesResponse): unknown {
const obj: any = {};
- if (message.databases) {
- obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);
- } else {
- obj.databases = [];
+ if (message.databases?.length) {
+ obj.databases = message.databases.map((e) => Database.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<SearchDatabasesResponse>): SearchDatabasesResponse {
return SearchDatabasesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchDatabasesResponse>): SearchDatabasesResponse {
const message = createBaseSearchDatabasesResponse();
message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];
@@ -1883,15 +1900,18 @@ export const UpdateDatabaseRequest = {
toJSON(message: UpdateDatabaseRequest): unknown {
const obj: any = {};
- message.database !== undefined && (obj.database = message.database ? Database.toJSON(message.database) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.database !== undefined) {
+ obj.database = Database.toJSON(message.database);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateDatabaseRequest>): UpdateDatabaseRequest {
return UpdateDatabaseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateDatabaseRequest>): UpdateDatabaseRequest {
const message = createBaseUpdateDatabaseRequest();
message.database = (object.database !== undefined && object.database !== null)
@@ -1949,8 +1969,8 @@ export const BatchUpdateDatabasesRequest = {
fromJSON(object: any): BatchUpdateDatabasesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- requests: Array.isArray(object?.requests)
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ requests: globalThis.Array.isArray(object?.requests)
? object.requests.map((e: any) => UpdateDatabaseRequest.fromJSON(e))
: [],
};
@@ -1958,11 +1978,11 @@ export const BatchUpdateDatabasesRequest = {
toJSON(message: BatchUpdateDatabasesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- if (message.requests) {
- obj.requests = message.requests.map((e) => e ? UpdateDatabaseRequest.toJSON(e) : undefined);
- } else {
- obj.requests = [];
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.requests?.length) {
+ obj.requests = message.requests.map((e) => UpdateDatabaseRequest.toJSON(e));
}
return obj;
},
@@ -1970,7 +1990,6 @@ export const BatchUpdateDatabasesRequest = {
create(base?: DeepPartial<BatchUpdateDatabasesRequest>): BatchUpdateDatabasesRequest {
return BatchUpdateDatabasesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchUpdateDatabasesRequest>): BatchUpdateDatabasesRequest {
const message = createBaseBatchUpdateDatabasesRequest();
message.parent = object.parent ?? "";
@@ -2016,16 +2035,16 @@ export const BatchUpdateDatabasesResponse = {
fromJSON(object: any): BatchUpdateDatabasesResponse {
return {
- databases: Array.isArray(object?.databases) ? object.databases.map((e: any) => Database.fromJSON(e)) : [],
+ databases: globalThis.Array.isArray(object?.databases)
+ ? object.databases.map((e: any) => Database.fromJSON(e))
+ : [],
};
},
toJSON(message: BatchUpdateDatabasesResponse): unknown {
const obj: any = {};
- if (message.databases) {
- obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);
- } else {
- obj.databases = [];
+ if (message.databases?.length) {
+ obj.databases = message.databases.map((e) => Database.toJSON(e));
}
return obj;
},
@@ -2033,7 +2052,6 @@ export const BatchUpdateDatabasesResponse = {
create(base?: DeepPartial<BatchUpdateDatabasesResponse>): BatchUpdateDatabasesResponse {
return BatchUpdateDatabasesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchUpdateDatabasesResponse>): BatchUpdateDatabasesResponse {
const message = createBaseBatchUpdateDatabasesResponse();
message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];
@@ -2077,19 +2095,20 @@ export const SyncDatabaseRequest = {
},
fromJSON(object: any): SyncDatabaseRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: SyncDatabaseRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<SyncDatabaseRequest>): SyncDatabaseRequest {
return SyncDatabaseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SyncDatabaseRequest>): SyncDatabaseRequest {
const message = createBaseSyncDatabaseRequest();
message.name = object.name ?? "";
@@ -2134,7 +2153,6 @@ export const SyncDatabaseResponse = {
create(base?: DeepPartial<SyncDatabaseResponse>): SyncDatabaseResponse {
return SyncDatabaseResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<SyncDatabaseResponse>): SyncDatabaseResponse {
const message = createBaseSyncDatabaseResponse();
return message;
@@ -2198,24 +2216,29 @@ export const GetDatabaseMetadataRequest = {
fromJSON(object: any): GetDatabaseMetadataRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
view: isSet(object.view) ? databaseMetadataViewFromJSON(object.view) : 0,
- filter: isSet(object.filter) ? String(object.filter) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: GetDatabaseMetadataRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.view !== undefined && (obj.view = databaseMetadataViewToJSON(message.view));
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.view !== 0) {
+ obj.view = databaseMetadataViewToJSON(message.view);
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<GetDatabaseMetadataRequest>): GetDatabaseMetadataRequest {
return GetDatabaseMetadataRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetDatabaseMetadataRequest>): GetDatabaseMetadataRequest {
const message = createBaseGetDatabaseMetadataRequest();
message.name = object.name ?? "";
@@ -2279,16 +2302,18 @@ export const UpdateDatabaseMetadataRequest = {
toJSON(message: UpdateDatabaseMetadataRequest): unknown {
const obj: any = {};
- message.databaseMetadata !== undefined &&
- (obj.databaseMetadata = message.databaseMetadata ? DatabaseMetadata.toJSON(message.databaseMetadata) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.databaseMetadata !== undefined) {
+ obj.databaseMetadata = DatabaseMetadata.toJSON(message.databaseMetadata);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateDatabaseMetadataRequest>): UpdateDatabaseMetadataRequest {
return UpdateDatabaseMetadataRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateDatabaseMetadataRequest>): UpdateDatabaseMetadataRequest {
const message = createBaseUpdateDatabaseMetadataRequest();
message.databaseMetadata = (object.databaseMetadata !== undefined && object.databaseMetadata !== null)
@@ -2346,22 +2371,25 @@ export const GetDatabaseSchemaRequest = {
fromJSON(object: any): GetDatabaseSchemaRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- sdlFormat: isSet(object.sdlFormat) ? Boolean(object.sdlFormat) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ sdlFormat: isSet(object.sdlFormat) ? globalThis.Boolean(object.sdlFormat) : false,
};
},
toJSON(message: GetDatabaseSchemaRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.sdlFormat !== undefined && (obj.sdlFormat = message.sdlFormat);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.sdlFormat === true) {
+ obj.sdlFormat = message.sdlFormat;
+ }
return obj;
},
create(base?: DeepPartial<GetDatabaseSchemaRequest>): GetDatabaseSchemaRequest {
return GetDatabaseSchemaRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetDatabaseSchemaRequest>): GetDatabaseSchemaRequest {
const message = createBaseGetDatabaseSchemaRequest();
message.name = object.name ?? "";
@@ -2437,26 +2465,33 @@ export const DiffSchemaRequest = {
fromJSON(object: any): DiffSchemaRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schema: isSet(object.schema) ? String(object.schema) : undefined,
- changeHistory: isSet(object.changeHistory) ? String(object.changeHistory) : undefined,
- sdlFormat: isSet(object.sdlFormat) ? Boolean(object.sdlFormat) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : undefined,
+ changeHistory: isSet(object.changeHistory) ? globalThis.String(object.changeHistory) : undefined,
+ sdlFormat: isSet(object.sdlFormat) ? globalThis.Boolean(object.sdlFormat) : false,
};
},
toJSON(message: DiffSchemaRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.schema !== undefined && (obj.schema = message.schema);
- message.changeHistory !== undefined && (obj.changeHistory = message.changeHistory);
- message.sdlFormat !== undefined && (obj.sdlFormat = message.sdlFormat);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schema !== undefined) {
+ obj.schema = message.schema;
+ }
+ if (message.changeHistory !== undefined) {
+ obj.changeHistory = message.changeHistory;
+ }
+ if (message.sdlFormat === true) {
+ obj.sdlFormat = message.sdlFormat;
+ }
return obj;
},
create(base?: DeepPartial<DiffSchemaRequest>): DiffSchemaRequest {
return DiffSchemaRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DiffSchemaRequest>): DiffSchemaRequest {
const message = createBaseDiffSchemaRequest();
message.name = object.name ?? "";
@@ -2503,19 +2538,20 @@ export const DiffSchemaResponse = {
},
fromJSON(object: any): DiffSchemaResponse {
- return { diff: isSet(object.diff) ? String(object.diff) : "" };
+ return { diff: isSet(object.diff) ? globalThis.String(object.diff) : "" };
},
toJSON(message: DiffSchemaResponse): unknown {
const obj: any = {};
- message.diff !== undefined && (obj.diff = message.diff);
+ if (message.diff !== "") {
+ obj.diff = message.diff;
+ }
return obj;
},
create(base?: DeepPartial<DiffSchemaResponse>): DiffSchemaResponse {
return DiffSchemaResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DiffSchemaResponse>): DiffSchemaResponse {
const message = createBaseDiffSchemaResponse();
message.diff = object.diff ?? "";
@@ -2559,19 +2595,20 @@ export const GetBackupSettingRequest = {
},
fromJSON(object: any): GetBackupSettingRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetBackupSettingRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetBackupSettingRequest>): GetBackupSettingRequest {
return GetBackupSettingRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetBackupSettingRequest>): GetBackupSettingRequest {
const message = createBaseGetBackupSettingRequest();
message.name = object.name ?? "";
@@ -2620,15 +2657,15 @@ export const UpdateBackupSettingRequest = {
toJSON(message: UpdateBackupSettingRequest): unknown {
const obj: any = {};
- message.setting !== undefined &&
- (obj.setting = message.setting ? BackupSetting.toJSON(message.setting) : undefined);
+ if (message.setting !== undefined) {
+ obj.setting = BackupSetting.toJSON(message.setting);
+ }
return obj;
},
create(base?: DeepPartial<UpdateBackupSettingRequest>): UpdateBackupSettingRequest {
return UpdateBackupSettingRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateBackupSettingRequest>): UpdateBackupSettingRequest {
const message = createBaseUpdateBackupSettingRequest();
message.setting = (object.setting !== undefined && object.setting !== null)
@@ -2685,22 +2722,25 @@ export const CreateBackupRequest = {
fromJSON(object: any): CreateBackupRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
backup: isSet(object.backup) ? Backup.fromJSON(object.backup) : undefined,
};
},
toJSON(message: CreateBackupRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.backup !== undefined && (obj.backup = message.backup ? Backup.toJSON(message.backup) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.backup !== undefined) {
+ obj.backup = Backup.toJSON(message.backup);
+ }
return obj;
},
create(base?: DeepPartial<CreateBackupRequest>): CreateBackupRequest {
return CreateBackupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateBackupRequest>): CreateBackupRequest {
const message = createBaseCreateBackupRequest();
message.parent = object.parent ?? "";
@@ -2768,24 +2808,29 @@ export const ListBackupsRequest = {
fromJSON(object: any): ListBackupsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListBackupsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListBackupsRequest>): ListBackupsRequest {
return ListBackupsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListBackupsRequest>): ListBackupsRequest {
const message = createBaseListBackupsRequest();
message.parent = object.parent ?? "";
@@ -2842,26 +2887,25 @@ export const ListBackupsResponse = {
fromJSON(object: any): ListBackupsResponse {
return {
- backups: Array.isArray(object?.backups) ? object.backups.map((e: any) => Backup.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ backups: globalThis.Array.isArray(object?.backups) ? object.backups.map((e: any) => Backup.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListBackupsResponse): unknown {
const obj: any = {};
- if (message.backups) {
- obj.backups = message.backups.map((e) => e ? Backup.toJSON(e) : undefined);
- } else {
- obj.backups = [];
+ if (message.backups?.length) {
+ obj.backups = message.backups.map((e) => Backup.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListBackupsResponse>): ListBackupsResponse {
return ListBackupsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListBackupsResponse>): ListBackupsResponse {
const message = createBaseListBackupsResponse();
message.backups = object.backups?.map((e) => Backup.fromPartial(e)) || [];
@@ -3000,14 +3044,14 @@ export const Database = {
fromJSON(object: any): Database {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
syncState: isSet(object.syncState) ? stateFromJSON(object.syncState) : 0,
successfulSyncTime: isSet(object.successfulSyncTime) ? fromJsonTimestamp(object.successfulSyncTime) : undefined,
- project: isSet(object.project) ? String(object.project) : "",
- schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
- environment: isSet(object.environment) ? String(object.environment) : "",
- effectiveEnvironment: isSet(object.effectiveEnvironment) ? String(object.effectiveEnvironment) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
+ schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "",
+ environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
+ effectiveEnvironment: isSet(object.effectiveEnvironment) ? globalThis.String(object.effectiveEnvironment) : "",
labels: isObject(object.labels)
? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -3019,19 +3063,38 @@ export const Database = {
toJSON(message: Database): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.syncState !== undefined && (obj.syncState = stateToJSON(message.syncState));
- message.successfulSyncTime !== undefined && (obj.successfulSyncTime = message.successfulSyncTime.toISOString());
- message.project !== undefined && (obj.project = message.project);
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
- message.environment !== undefined && (obj.environment = message.environment);
- message.effectiveEnvironment !== undefined && (obj.effectiveEnvironment = message.effectiveEnvironment);
- obj.labels = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.syncState !== 0) {
+ obj.syncState = stateToJSON(message.syncState);
+ }
+ if (message.successfulSyncTime !== undefined) {
+ obj.successfulSyncTime = message.successfulSyncTime.toISOString();
+ }
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
+ if (message.environment !== "") {
+ obj.environment = message.environment;
+ }
+ if (message.effectiveEnvironment !== "") {
+ obj.effectiveEnvironment = message.effectiveEnvironment;
+ }
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
}
return obj;
},
@@ -3039,7 +3102,6 @@ export const Database = {
create(base?: DeepPartial<Database>): Database {
return Database.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Database>): Database {
const message = createBaseDatabase();
message.name = object.name ?? "";
@@ -3052,7 +3114,7 @@ export const Database = {
message.effectiveEnvironment = object.effectiveEnvironment ?? "";
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -3106,20 +3168,26 @@ export const Database_LabelsEntry = {
},
fromJSON(object: any): Database_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: Database_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<Database_LabelsEntry>): Database_LabelsEntry {
return Database_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Database_LabelsEntry>): Database_LabelsEntry {
const message = createBaseDatabase_LabelsEntry();
message.key = object.key ?? "";
@@ -3215,14 +3283,16 @@ export const DatabaseMetadata = {
fromJSON(object: any): DatabaseMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schemas: Array.isArray(object?.schemas) ? object.schemas.map((e: any) => SchemaMetadata.fromJSON(e)) : [],
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- extensions: Array.isArray(object?.extensions)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schemas: globalThis.Array.isArray(object?.schemas)
+ ? object.schemas.map((e: any) => SchemaMetadata.fromJSON(e))
+ : [],
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ extensions: globalThis.Array.isArray(object?.extensions)
? object.extensions.map((e: any) => ExtensionMetadata.fromJSON(e))
: [],
- schemaConfigs: Array.isArray(object?.schemaConfigs)
+ schemaConfigs: globalThis.Array.isArray(object?.schemaConfigs)
? object.schemaConfigs.map((e: any) => SchemaConfig.fromJSON(e))
: [],
};
@@ -3230,23 +3300,23 @@ export const DatabaseMetadata = {
toJSON(message: DatabaseMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.schemas) {
- obj.schemas = message.schemas.map((e) => e ? SchemaMetadata.toJSON(e) : undefined);
- } else {
- obj.schemas = [];
- }
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- if (message.extensions) {
- obj.extensions = message.extensions.map((e) => e ? ExtensionMetadata.toJSON(e) : undefined);
- } else {
- obj.extensions = [];
- }
- if (message.schemaConfigs) {
- obj.schemaConfigs = message.schemaConfigs.map((e) => e ? SchemaConfig.toJSON(e) : undefined);
- } else {
- obj.schemaConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schemas?.length) {
+ obj.schemas = message.schemas.map((e) => SchemaMetadata.toJSON(e));
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.extensions?.length) {
+ obj.extensions = message.extensions.map((e) => ExtensionMetadata.toJSON(e));
+ }
+ if (message.schemaConfigs?.length) {
+ obj.schemaConfigs = message.schemaConfigs.map((e) => SchemaConfig.toJSON(e));
}
return obj;
},
@@ -3254,7 +3324,6 @@ export const DatabaseMetadata = {
create(base?: DeepPartial<DatabaseMetadata>): DatabaseMetadata {
return DatabaseMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseMetadata>): DatabaseMetadata {
const message = createBaseDatabaseMetadata();
message.name = object.name ?? "";
@@ -3354,42 +3423,38 @@ export const SchemaMetadata = {
fromJSON(object: any): SchemaMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tables: Array.isArray(object?.tables) ? object.tables.map((e: any) => TableMetadata.fromJSON(e)) : [],
- views: Array.isArray(object?.views) ? object.views.map((e: any) => ViewMetadata.fromJSON(e)) : [],
- functions: Array.isArray(object?.functions) ? object.functions.map((e: any) => FunctionMetadata.fromJSON(e)) : [],
- streams: Array.isArray(object?.streams) ? object.streams.map((e: any) => StreamMetadata.fromJSON(e)) : [],
- tasks: Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskMetadata.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tables: globalThis.Array.isArray(object?.tables) ? object.tables.map((e: any) => TableMetadata.fromJSON(e)) : [],
+ views: globalThis.Array.isArray(object?.views) ? object.views.map((e: any) => ViewMetadata.fromJSON(e)) : [],
+ functions: globalThis.Array.isArray(object?.functions)
+ ? object.functions.map((e: any) => FunctionMetadata.fromJSON(e))
+ : [],
+ streams: globalThis.Array.isArray(object?.streams)
+ ? object.streams.map((e: any) => StreamMetadata.fromJSON(e))
+ : [],
+ tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskMetadata.fromJSON(e)) : [],
};
},
toJSON(message: SchemaMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.tables) {
- obj.tables = message.tables.map((e) => e ? TableMetadata.toJSON(e) : undefined);
- } else {
- obj.tables = [];
- }
- if (message.views) {
- obj.views = message.views.map((e) => e ? ViewMetadata.toJSON(e) : undefined);
- } else {
- obj.views = [];
- }
- if (message.functions) {
- obj.functions = message.functions.map((e) => e ? FunctionMetadata.toJSON(e) : undefined);
- } else {
- obj.functions = [];
- }
- if (message.streams) {
- obj.streams = message.streams.map((e) => e ? StreamMetadata.toJSON(e) : undefined);
- } else {
- obj.streams = [];
- }
- if (message.tasks) {
- obj.tasks = message.tasks.map((e) => e ? TaskMetadata.toJSON(e) : undefined);
- } else {
- obj.tasks = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tables?.length) {
+ obj.tables = message.tables.map((e) => TableMetadata.toJSON(e));
+ }
+ if (message.views?.length) {
+ obj.views = message.views.map((e) => ViewMetadata.toJSON(e));
+ }
+ if (message.functions?.length) {
+ obj.functions = message.functions.map((e) => FunctionMetadata.toJSON(e));
+ }
+ if (message.streams?.length) {
+ obj.streams = message.streams.map((e) => StreamMetadata.toJSON(e));
+ }
+ if (message.tasks?.length) {
+ obj.tasks = message.tasks.map((e) => TaskMetadata.toJSON(e));
}
return obj;
},
@@ -3397,7 +3462,6 @@ export const SchemaMetadata = {
create(base?: DeepPartial<SchemaMetadata>): SchemaMetadata {
return SchemaMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaMetadata>): SchemaMetadata {
const message = createBaseSchemaMetadata();
message.name = object.name ?? "";
@@ -3592,20 +3656,24 @@ export const TableMetadata = {
fromJSON(object: any): TableMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- columns: Array.isArray(object?.columns) ? object.columns.map((e: any) => ColumnMetadata.fromJSON(e)) : [],
- indexes: Array.isArray(object?.indexes) ? object.indexes.map((e: any) => IndexMetadata.fromJSON(e)) : [],
- engine: isSet(object.engine) ? String(object.engine) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ columns: globalThis.Array.isArray(object?.columns)
+ ? object.columns.map((e: any) => ColumnMetadata.fromJSON(e))
+ : [],
+ indexes: globalThis.Array.isArray(object?.indexes)
+ ? object.indexes.map((e: any) => IndexMetadata.fromJSON(e))
+ : [],
+ engine: isSet(object.engine) ? globalThis.String(object.engine) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
rowCount: isSet(object.rowCount) ? Long.fromValue(object.rowCount) : Long.ZERO,
dataSize: isSet(object.dataSize) ? Long.fromValue(object.dataSize) : Long.ZERO,
indexSize: isSet(object.indexSize) ? Long.fromValue(object.indexSize) : Long.ZERO,
dataFree: isSet(object.dataFree) ? Long.fromValue(object.dataFree) : Long.ZERO,
- createOptions: isSet(object.createOptions) ? String(object.createOptions) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- classification: isSet(object.classification) ? String(object.classification) : "",
- userComment: isSet(object.userComment) ? String(object.userComment) : "",
- foreignKeys: Array.isArray(object?.foreignKeys)
+ createOptions: isSet(object.createOptions) ? globalThis.String(object.createOptions) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ classification: isSet(object.classification) ? globalThis.String(object.classification) : "",
+ userComment: isSet(object.userComment) ? globalThis.String(object.userComment) : "",
+ foreignKeys: globalThis.Array.isArray(object?.foreignKeys)
? object.foreignKeys.map((e: any) => ForeignKeyMetadata.fromJSON(e))
: [],
};
@@ -3613,31 +3681,47 @@ export const TableMetadata = {
toJSON(message: TableMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.columns) {
- obj.columns = message.columns.map((e) => e ? ColumnMetadata.toJSON(e) : undefined);
- } else {
- obj.columns = [];
- }
- if (message.indexes) {
- obj.indexes = message.indexes.map((e) => e ? IndexMetadata.toJSON(e) : undefined);
- } else {
- obj.indexes = [];
- }
- message.engine !== undefined && (obj.engine = message.engine);
- message.collation !== undefined && (obj.collation = message.collation);
- message.rowCount !== undefined && (obj.rowCount = (message.rowCount || Long.ZERO).toString());
- message.dataSize !== undefined && (obj.dataSize = (message.dataSize || Long.ZERO).toString());
- message.indexSize !== undefined && (obj.indexSize = (message.indexSize || Long.ZERO).toString());
- message.dataFree !== undefined && (obj.dataFree = (message.dataFree || Long.ZERO).toString());
- message.createOptions !== undefined && (obj.createOptions = message.createOptions);
- message.comment !== undefined && (obj.comment = message.comment);
- message.classification !== undefined && (obj.classification = message.classification);
- message.userComment !== undefined && (obj.userComment = message.userComment);
- if (message.foreignKeys) {
- obj.foreignKeys = message.foreignKeys.map((e) => e ? ForeignKeyMetadata.toJSON(e) : undefined);
- } else {
- obj.foreignKeys = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.columns?.length) {
+ obj.columns = message.columns.map((e) => ColumnMetadata.toJSON(e));
+ }
+ if (message.indexes?.length) {
+ obj.indexes = message.indexes.map((e) => IndexMetadata.toJSON(e));
+ }
+ if (message.engine !== "") {
+ obj.engine = message.engine;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (!message.rowCount.isZero()) {
+ obj.rowCount = (message.rowCount || Long.ZERO).toString();
+ }
+ if (!message.dataSize.isZero()) {
+ obj.dataSize = (message.dataSize || Long.ZERO).toString();
+ }
+ if (!message.indexSize.isZero()) {
+ obj.indexSize = (message.indexSize || Long.ZERO).toString();
+ }
+ if (!message.dataFree.isZero()) {
+ obj.dataFree = (message.dataFree || Long.ZERO).toString();
+ }
+ if (message.createOptions !== "") {
+ obj.createOptions = message.createOptions;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.classification !== "") {
+ obj.classification = message.classification;
+ }
+ if (message.userComment !== "") {
+ obj.userComment = message.userComment;
+ }
+ if (message.foreignKeys?.length) {
+ obj.foreignKeys = message.foreignKeys.map((e) => ForeignKeyMetadata.toJSON(e));
}
return obj;
},
@@ -3645,7 +3729,6 @@ export const TableMetadata = {
create(base?: DeepPartial<TableMetadata>): TableMetadata {
return TableMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TableMetadata>): TableMetadata {
const message = createBaseTableMetadata();
message.name = object.name ?? "";
@@ -3856,19 +3939,19 @@ export const ColumnMetadata = {
fromJSON(object: any): ColumnMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- position: isSet(object.position) ? Number(object.position) : 0,
- hasDefault: isSet(object.hasDefault) ? Boolean(object.hasDefault) : false,
- defaultNull: isSet(object.defaultNull) ? Boolean(object.defaultNull) : undefined,
- defaultString: isSet(object.defaultString) ? String(object.defaultString) : undefined,
- defaultExpression: isSet(object.defaultExpression) ? String(object.defaultExpression) : undefined,
- nullable: isSet(object.nullable) ? Boolean(object.nullable) : false,
- type: isSet(object.type) ? String(object.type) : "",
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- classification: isSet(object.classification) ? String(object.classification) : "",
- userComment: isSet(object.userComment) ? String(object.userComment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ position: isSet(object.position) ? globalThis.Number(object.position) : 0,
+ hasDefault: isSet(object.hasDefault) ? globalThis.Boolean(object.hasDefault) : false,
+ defaultNull: isSet(object.defaultNull) ? globalThis.Boolean(object.defaultNull) : undefined,
+ defaultString: isSet(object.defaultString) ? globalThis.String(object.defaultString) : undefined,
+ defaultExpression: isSet(object.defaultExpression) ? globalThis.String(object.defaultExpression) : undefined,
+ nullable: isSet(object.nullable) ? globalThis.Boolean(object.nullable) : false,
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ classification: isSet(object.classification) ? globalThis.String(object.classification) : "",
+ userComment: isSet(object.userComment) ? globalThis.String(object.userComment) : "",
effectiveMaskingLevel: isSet(object.effectiveMaskingLevel)
? maskingLevelFromJSON(object.effectiveMaskingLevel)
: 0,
@@ -3877,28 +3960,54 @@ export const ColumnMetadata = {
toJSON(message: ColumnMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.position !== undefined && (obj.position = Math.round(message.position));
- message.hasDefault !== undefined && (obj.hasDefault = message.hasDefault);
- message.defaultNull !== undefined && (obj.defaultNull = message.defaultNull);
- message.defaultString !== undefined && (obj.defaultString = message.defaultString);
- message.defaultExpression !== undefined && (obj.defaultExpression = message.defaultExpression);
- message.nullable !== undefined && (obj.nullable = message.nullable);
- message.type !== undefined && (obj.type = message.type);
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- message.comment !== undefined && (obj.comment = message.comment);
- message.classification !== undefined && (obj.classification = message.classification);
- message.userComment !== undefined && (obj.userComment = message.userComment);
- message.effectiveMaskingLevel !== undefined &&
- (obj.effectiveMaskingLevel = maskingLevelToJSON(message.effectiveMaskingLevel));
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.position !== 0) {
+ obj.position = Math.round(message.position);
+ }
+ if (message.hasDefault === true) {
+ obj.hasDefault = message.hasDefault;
+ }
+ if (message.defaultNull !== undefined) {
+ obj.defaultNull = message.defaultNull;
+ }
+ if (message.defaultString !== undefined) {
+ obj.defaultString = message.defaultString;
+ }
+ if (message.defaultExpression !== undefined) {
+ obj.defaultExpression = message.defaultExpression;
+ }
+ if (message.nullable === true) {
+ obj.nullable = message.nullable;
+ }
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.classification !== "") {
+ obj.classification = message.classification;
+ }
+ if (message.userComment !== "") {
+ obj.userComment = message.userComment;
+ }
+ if (message.effectiveMaskingLevel !== 0) {
+ obj.effectiveMaskingLevel = maskingLevelToJSON(message.effectiveMaskingLevel);
+ }
return obj;
},
create(base?: DeepPartial<ColumnMetadata>): ColumnMetadata {
return ColumnMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ColumnMetadata>): ColumnMetadata {
const message = createBaseColumnMetadata();
message.name = object.name ?? "";
@@ -3986,10 +4095,10 @@ export const ViewMetadata = {
fromJSON(object: any): ViewMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- definition: isSet(object.definition) ? String(object.definition) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- dependentColumns: Array.isArray(object?.dependentColumns)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ dependentColumns: globalThis.Array.isArray(object?.dependentColumns)
? object.dependentColumns.map((e: any) => DependentColumn.fromJSON(e))
: [],
};
@@ -3997,13 +4106,17 @@ export const ViewMetadata = {
toJSON(message: ViewMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.definition !== undefined && (obj.definition = message.definition);
- message.comment !== undefined && (obj.comment = message.comment);
- if (message.dependentColumns) {
- obj.dependentColumns = message.dependentColumns.map((e) => e ? DependentColumn.toJSON(e) : undefined);
- } else {
- obj.dependentColumns = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.dependentColumns?.length) {
+ obj.dependentColumns = message.dependentColumns.map((e) => DependentColumn.toJSON(e));
}
return obj;
},
@@ -4011,7 +4124,6 @@ export const ViewMetadata = {
create(base?: DeepPartial<ViewMetadata>): ViewMetadata {
return ViewMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ViewMetadata>): ViewMetadata {
const message = createBaseViewMetadata();
message.name = object.name ?? "";
@@ -4079,24 +4191,29 @@ export const DependentColumn = {
fromJSON(object: any): DependentColumn {
return {
- schema: isSet(object.schema) ? String(object.schema) : "",
- table: isSet(object.table) ? String(object.table) : "",
- column: isSet(object.column) ? String(object.column) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ column: isSet(object.column) ? globalThis.String(object.column) : "",
};
},
toJSON(message: DependentColumn): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
- message.table !== undefined && (obj.table = message.table);
- message.column !== undefined && (obj.column = message.column);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
return obj;
},
create(base?: DeepPartial<DependentColumn>): DependentColumn {
return DependentColumn.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DependentColumn>): DependentColumn {
const message = createBaseDependentColumn();
message.schema = object.schema ?? "";
@@ -4153,22 +4270,25 @@ export const FunctionMetadata = {
fromJSON(object: any): FunctionMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- definition: isSet(object.definition) ? String(object.definition) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
};
},
toJSON(message: FunctionMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.definition !== undefined && (obj.definition = message.definition);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
return obj;
},
create(base?: DeepPartial<FunctionMetadata>): FunctionMetadata {
return FunctionMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FunctionMetadata>): FunctionMetadata {
const message = createBaseFunctionMetadata();
message.name = object.name ?? "";
@@ -4315,42 +4435,59 @@ export const TaskMetadata = {
fromJSON(object: any): TaskMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- id: isSet(object.id) ? String(object.id) : "",
- owner: isSet(object.owner) ? String(object.owner) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- warehouse: isSet(object.warehouse) ? String(object.warehouse) : "",
- schedule: isSet(object.schedule) ? String(object.schedule) : "",
- predecessors: Array.isArray(object?.predecessors) ? object.predecessors.map((e: any) => String(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ warehouse: isSet(object.warehouse) ? globalThis.String(object.warehouse) : "",
+ schedule: isSet(object.schedule) ? globalThis.String(object.schedule) : "",
+ predecessors: globalThis.Array.isArray(object?.predecessors)
+ ? object.predecessors.map((e: any) => globalThis.String(e))
+ : [],
state: isSet(object.state) ? taskMetadata_StateFromJSON(object.state) : 0,
- condition: isSet(object.condition) ? String(object.condition) : "",
- definition: isSet(object.definition) ? String(object.definition) : "",
+ condition: isSet(object.condition) ? globalThis.String(object.condition) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
};
},
toJSON(message: TaskMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.id !== undefined && (obj.id = message.id);
- message.owner !== undefined && (obj.owner = message.owner);
- message.comment !== undefined && (obj.comment = message.comment);
- message.warehouse !== undefined && (obj.warehouse = message.warehouse);
- message.schedule !== undefined && (obj.schedule = message.schedule);
- if (message.predecessors) {
- obj.predecessors = message.predecessors.map((e) => e);
- } else {
- obj.predecessors = [];
- }
- message.state !== undefined && (obj.state = taskMetadata_StateToJSON(message.state));
- message.condition !== undefined && (obj.condition = message.condition);
- message.definition !== undefined && (obj.definition = message.definition);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.owner !== "") {
+ obj.owner = message.owner;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.warehouse !== "") {
+ obj.warehouse = message.warehouse;
+ }
+ if (message.schedule !== "") {
+ obj.schedule = message.schedule;
+ }
+ if (message.predecessors?.length) {
+ obj.predecessors = message.predecessors;
+ }
+ if (message.state !== 0) {
+ obj.state = taskMetadata_StateToJSON(message.state);
+ }
+ if (message.condition !== "") {
+ obj.condition = message.condition;
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
return obj;
},
create(base?: DeepPartial<TaskMetadata>): TaskMetadata {
return TaskMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TaskMetadata>): TaskMetadata {
const message = createBaseTaskMetadata();
message.name = object.name ?? "";
@@ -4474,34 +4611,49 @@ export const StreamMetadata = {
fromJSON(object: any): StreamMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tableName: isSet(object.tableName) ? String(object.tableName) : "",
- owner: isSet(object.owner) ? String(object.owner) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tableName: isSet(object.tableName) ? globalThis.String(object.tableName) : "",
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
type: isSet(object.type) ? streamMetadata_TypeFromJSON(object.type) : 0,
- stale: isSet(object.stale) ? Boolean(object.stale) : false,
+ stale: isSet(object.stale) ? globalThis.Boolean(object.stale) : false,
mode: isSet(object.mode) ? streamMetadata_ModeFromJSON(object.mode) : 0,
- definition: isSet(object.definition) ? String(object.definition) : "",
+ definition: isSet(object.definition) ? globalThis.String(object.definition) : "",
};
},
toJSON(message: StreamMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.tableName !== undefined && (obj.tableName = message.tableName);
- message.owner !== undefined && (obj.owner = message.owner);
- message.comment !== undefined && (obj.comment = message.comment);
- message.type !== undefined && (obj.type = streamMetadata_TypeToJSON(message.type));
- message.stale !== undefined && (obj.stale = message.stale);
- message.mode !== undefined && (obj.mode = streamMetadata_ModeToJSON(message.mode));
- message.definition !== undefined && (obj.definition = message.definition);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tableName !== "") {
+ obj.tableName = message.tableName;
+ }
+ if (message.owner !== "") {
+ obj.owner = message.owner;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.type !== 0) {
+ obj.type = streamMetadata_TypeToJSON(message.type);
+ }
+ if (message.stale === true) {
+ obj.stale = message.stale;
+ }
+ if (message.mode !== 0) {
+ obj.mode = streamMetadata_ModeToJSON(message.mode);
+ }
+ if (message.definition !== "") {
+ obj.definition = message.definition;
+ }
return obj;
},
create(base?: DeepPartial<StreamMetadata>): StreamMetadata {
return StreamMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<StreamMetadata>): StreamMetadata {
const message = createBaseStreamMetadata();
message.name = object.name ?? "";
@@ -4613,36 +4765,47 @@ export const IndexMetadata = {
fromJSON(object: any): IndexMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- expressions: Array.isArray(object?.expressions) ? object.expressions.map((e: any) => String(e)) : [],
- type: isSet(object.type) ? String(object.type) : "",
- unique: isSet(object.unique) ? Boolean(object.unique) : false,
- primary: isSet(object.primary) ? Boolean(object.primary) : false,
- visible: isSet(object.visible) ? Boolean(object.visible) : false,
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ expressions: globalThis.Array.isArray(object?.expressions)
+ ? object.expressions.map((e: any) => globalThis.String(e))
+ : [],
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
+ unique: isSet(object.unique) ? globalThis.Boolean(object.unique) : false,
+ primary: isSet(object.primary) ? globalThis.Boolean(object.primary) : false,
+ visible: isSet(object.visible) ? globalThis.Boolean(object.visible) : false,
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: IndexMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.expressions) {
- obj.expressions = message.expressions.map((e) => e);
- } else {
- obj.expressions = [];
- }
- message.type !== undefined && (obj.type = message.type);
- message.unique !== undefined && (obj.unique = message.unique);
- message.primary !== undefined && (obj.primary = message.primary);
- message.visible !== undefined && (obj.visible = message.visible);
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.expressions?.length) {
+ obj.expressions = message.expressions;
+ }
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.unique === true) {
+ obj.unique = message.unique;
+ }
+ if (message.primary === true) {
+ obj.primary = message.primary;
+ }
+ if (message.visible === true) {
+ obj.visible = message.visible;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<IndexMetadata>): IndexMetadata {
return IndexMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IndexMetadata>): IndexMetadata {
const message = createBaseIndexMetadata();
message.name = object.name ?? "";
@@ -4723,26 +4886,33 @@ export const ExtensionMetadata = {
fromJSON(object: any): ExtensionMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schema: isSet(object.schema) ? String(object.schema) : "",
- version: isSet(object.version) ? String(object.version) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: ExtensionMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.schema !== undefined && (obj.schema = message.schema);
- message.version !== undefined && (obj.version = message.version);
- message.description !== undefined && (obj.description = message.description);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
create(base?: DeepPartial<ExtensionMetadata>): ExtensionMetadata {
return ExtensionMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExtensionMetadata>): ExtensionMetadata {
const message = createBaseExtensionMetadata();
message.name = object.name ?? "";
@@ -4869,44 +5039,51 @@ export const ForeignKeyMetadata = {
fromJSON(object: any): ForeignKeyMetadata {
return {
- name: isSet(object.name) ? String(object.name) : "",
- columns: Array.isArray(object?.columns) ? object.columns.map((e: any) => String(e)) : [],
- referencedSchema: isSet(object.referencedSchema) ? String(object.referencedSchema) : "",
- referencedTable: isSet(object.referencedTable) ? String(object.referencedTable) : "",
- referencedColumns: Array.isArray(object?.referencedColumns)
- ? object.referencedColumns.map((e: any) => String(e))
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ columns: globalThis.Array.isArray(object?.columns) ? object.columns.map((e: any) => globalThis.String(e)) : [],
+ referencedSchema: isSet(object.referencedSchema) ? globalThis.String(object.referencedSchema) : "",
+ referencedTable: isSet(object.referencedTable) ? globalThis.String(object.referencedTable) : "",
+ referencedColumns: globalThis.Array.isArray(object?.referencedColumns)
+ ? object.referencedColumns.map((e: any) => globalThis.String(e))
: [],
- onDelete: isSet(object.onDelete) ? String(object.onDelete) : "",
- onUpdate: isSet(object.onUpdate) ? String(object.onUpdate) : "",
- matchType: isSet(object.matchType) ? String(object.matchType) : "",
+ onDelete: isSet(object.onDelete) ? globalThis.String(object.onDelete) : "",
+ onUpdate: isSet(object.onUpdate) ? globalThis.String(object.onUpdate) : "",
+ matchType: isSet(object.matchType) ? globalThis.String(object.matchType) : "",
};
},
toJSON(message: ForeignKeyMetadata): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.columns) {
- obj.columns = message.columns.map((e) => e);
- } else {
- obj.columns = [];
- }
- message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);
- message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);
- if (message.referencedColumns) {
- obj.referencedColumns = message.referencedColumns.map((e) => e);
- } else {
- obj.referencedColumns = [];
- }
- message.onDelete !== undefined && (obj.onDelete = message.onDelete);
- message.onUpdate !== undefined && (obj.onUpdate = message.onUpdate);
- message.matchType !== undefined && (obj.matchType = message.matchType);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.columns?.length) {
+ obj.columns = message.columns;
+ }
+ if (message.referencedSchema !== "") {
+ obj.referencedSchema = message.referencedSchema;
+ }
+ if (message.referencedTable !== "") {
+ obj.referencedTable = message.referencedTable;
+ }
+ if (message.referencedColumns?.length) {
+ obj.referencedColumns = message.referencedColumns;
+ }
+ if (message.onDelete !== "") {
+ obj.onDelete = message.onDelete;
+ }
+ if (message.onUpdate !== "") {
+ obj.onUpdate = message.onUpdate;
+ }
+ if (message.matchType !== "") {
+ obj.matchType = message.matchType;
+ }
return obj;
},
create(base?: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {
return ForeignKeyMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {
const message = createBaseForeignKeyMetadata();
message.name = object.name ?? "";
@@ -4968,8 +5145,8 @@ export const DatabaseConfig = {
fromJSON(object: any): DatabaseConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schemaConfigs: Array.isArray(object?.schemaConfigs)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schemaConfigs: globalThis.Array.isArray(object?.schemaConfigs)
? object.schemaConfigs.map((e: any) => SchemaConfig.fromJSON(e))
: [],
};
@@ -4977,11 +5154,11 @@ export const DatabaseConfig = {
toJSON(message: DatabaseConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.schemaConfigs) {
- obj.schemaConfigs = message.schemaConfigs.map((e) => e ? SchemaConfig.toJSON(e) : undefined);
- } else {
- obj.schemaConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schemaConfigs?.length) {
+ obj.schemaConfigs = message.schemaConfigs.map((e) => SchemaConfig.toJSON(e));
}
return obj;
},
@@ -4989,7 +5166,6 @@ export const DatabaseConfig = {
create(base?: DeepPartial<DatabaseConfig>): DatabaseConfig {
return DatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseConfig>): DatabaseConfig {
const message = createBaseDatabaseConfig();
message.name = object.name ?? "";
@@ -5045,8 +5221,8 @@ export const SchemaConfig = {
fromJSON(object: any): SchemaConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tableConfigs: Array.isArray(object?.tableConfigs)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tableConfigs: globalThis.Array.isArray(object?.tableConfigs)
? object.tableConfigs.map((e: any) => TableConfig.fromJSON(e))
: [],
};
@@ -5054,11 +5230,11 @@ export const SchemaConfig = {
toJSON(message: SchemaConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.tableConfigs) {
- obj.tableConfigs = message.tableConfigs.map((e) => e ? TableConfig.toJSON(e) : undefined);
- } else {
- obj.tableConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tableConfigs?.length) {
+ obj.tableConfigs = message.tableConfigs.map((e) => TableConfig.toJSON(e));
}
return obj;
},
@@ -5066,7 +5242,6 @@ export const SchemaConfig = {
create(base?: DeepPartial<SchemaConfig>): SchemaConfig {
return SchemaConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaConfig>): SchemaConfig {
const message = createBaseSchemaConfig();
message.name = object.name ?? "";
@@ -5122,8 +5297,8 @@ export const TableConfig = {
fromJSON(object: any): TableConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- columnConfigs: Array.isArray(object?.columnConfigs)
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ columnConfigs: globalThis.Array.isArray(object?.columnConfigs)
? object.columnConfigs.map((e: any) => ColumnConfig.fromJSON(e))
: [],
};
@@ -5131,11 +5306,11 @@ export const TableConfig = {
toJSON(message: TableConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.columnConfigs) {
- obj.columnConfigs = message.columnConfigs.map((e) => e ? ColumnConfig.toJSON(e) : undefined);
- } else {
- obj.columnConfigs = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.columnConfigs?.length) {
+ obj.columnConfigs = message.columnConfigs.map((e) => ColumnConfig.toJSON(e));
}
return obj;
},
@@ -5143,7 +5318,6 @@ export const TableConfig = {
create(base?: DeepPartial<TableConfig>): TableConfig {
return TableConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TableConfig>): TableConfig {
const message = createBaseTableConfig();
message.name = object.name ?? "";
@@ -5212,8 +5386,8 @@ export const ColumnConfig = {
fromJSON(object: any): ColumnConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- semanticTypeId: isSet(object.semanticTypeId) ? String(object.semanticTypeId) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ semanticTypeId: isSet(object.semanticTypeId) ? globalThis.String(object.semanticTypeId) : "",
labels: isObject(object.labels)
? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -5225,13 +5399,20 @@ export const ColumnConfig = {
toJSON(message: ColumnConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.semanticTypeId !== undefined && (obj.semanticTypeId = message.semanticTypeId);
- obj.labels = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.semanticTypeId !== "") {
+ obj.semanticTypeId = message.semanticTypeId;
+ }
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
}
return obj;
},
@@ -5239,14 +5420,13 @@ export const ColumnConfig = {
create(base?: DeepPartial<ColumnConfig>): ColumnConfig {
return ColumnConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ColumnConfig>): ColumnConfig {
const message = createBaseColumnConfig();
message.name = object.name ?? "";
message.semanticTypeId = object.semanticTypeId ?? "";
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -5300,20 +5480,26 @@ export const ColumnConfig_LabelsEntry = {
},
fromJSON(object: any): ColumnConfig_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: ColumnConfig_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<ColumnConfig_LabelsEntry>): ColumnConfig_LabelsEntry {
return ColumnConfig_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ColumnConfig_LabelsEntry>): ColumnConfig_LabelsEntry {
const message = createBaseColumnConfig_LabelsEntry();
message.key = object.key ?? "";
@@ -5358,19 +5544,20 @@ export const DatabaseSchema = {
},
fromJSON(object: any): DatabaseSchema {
- return { schema: isSet(object.schema) ? String(object.schema) : "" };
+ return { schema: isSet(object.schema) ? globalThis.String(object.schema) : "" };
},
toJSON(message: DatabaseSchema): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
return obj;
},
create(base?: DeepPartial<DatabaseSchema>): DatabaseSchema {
return DatabaseSchema.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseSchema>): DatabaseSchema {
const message = createBaseDatabaseSchema();
message.schema = object.schema ?? "";
@@ -5445,30 +5632,35 @@ export const BackupSetting = {
fromJSON(object: any): BackupSetting {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
backupRetainDuration: isSet(object.backupRetainDuration)
? Duration.fromJSON(object.backupRetainDuration)
: undefined,
- cronSchedule: isSet(object.cronSchedule) ? String(object.cronSchedule) : "",
- hookUrl: isSet(object.hookUrl) ? String(object.hookUrl) : "",
+ cronSchedule: isSet(object.cronSchedule) ? globalThis.String(object.cronSchedule) : "",
+ hookUrl: isSet(object.hookUrl) ? globalThis.String(object.hookUrl) : "",
};
},
toJSON(message: BackupSetting): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.backupRetainDuration !== undefined && (obj.backupRetainDuration = message.backupRetainDuration
- ? Duration.toJSON(message.backupRetainDuration)
- : undefined);
- message.cronSchedule !== undefined && (obj.cronSchedule = message.cronSchedule);
- message.hookUrl !== undefined && (obj.hookUrl = message.hookUrl);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.backupRetainDuration !== undefined) {
+ obj.backupRetainDuration = Duration.toJSON(message.backupRetainDuration);
+ }
+ if (message.cronSchedule !== "") {
+ obj.cronSchedule = message.cronSchedule;
+ }
+ if (message.hookUrl !== "") {
+ obj.hookUrl = message.hookUrl;
+ }
return obj;
},
create(base?: DeepPartial<BackupSetting>): BackupSetting {
return BackupSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BackupSetting>): BackupSetting {
const message = createBaseBackupSetting();
message.name = object.name ?? "";
@@ -5578,32 +5770,45 @@ export const Backup = {
fromJSON(object: any): Backup {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
state: isSet(object.state) ? backup_BackupStateFromJSON(object.state) : 0,
backupType: isSet(object.backupType) ? backup_BackupTypeFromJSON(object.backupType) : 0,
- comment: isSet(object.comment) ? String(object.comment) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
};
},
toJSON(message: Backup): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- message.state !== undefined && (obj.state = backup_BackupStateToJSON(message.state));
- message.backupType !== undefined && (obj.backupType = backup_BackupTypeToJSON(message.backupType));
- message.comment !== undefined && (obj.comment = message.comment);
- message.uid !== undefined && (obj.uid = message.uid);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.state !== 0) {
+ obj.state = backup_BackupStateToJSON(message.state);
+ }
+ if (message.backupType !== 0) {
+ obj.backupType = backup_BackupTypeToJSON(message.backupType);
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
return obj;
},
create(base?: DeepPartial<Backup>): Backup {
return Backup.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Backup>): Backup {
const message = createBaseBackup();
message.name = object.name ?? "";
@@ -5674,24 +5879,29 @@ export const ListSlowQueriesRequest = {
fromJSON(object: any): ListSlowQueriesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
- orderBy: isSet(object.orderBy) ? String(object.orderBy) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ orderBy: isSet(object.orderBy) ? globalThis.String(object.orderBy) : "",
};
},
toJSON(message: ListSlowQueriesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.filter !== undefined && (obj.filter = message.filter);
- message.orderBy !== undefined && (obj.orderBy = message.orderBy);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.orderBy !== "") {
+ obj.orderBy = message.orderBy;
+ }
return obj;
},
create(base?: DeepPartial<ListSlowQueriesRequest>): ListSlowQueriesRequest {
return ListSlowQueriesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSlowQueriesRequest>): ListSlowQueriesRequest {
const message = createBaseListSlowQueriesRequest();
message.parent = object.parent ?? "";
@@ -5738,7 +5948,7 @@ export const ListSlowQueriesResponse = {
fromJSON(object: any): ListSlowQueriesResponse {
return {
- slowQueryLogs: Array.isArray(object?.slowQueryLogs)
+ slowQueryLogs: globalThis.Array.isArray(object?.slowQueryLogs)
? object.slowQueryLogs.map((e: any) => SlowQueryLog.fromJSON(e))
: [],
};
@@ -5746,10 +5956,8 @@ export const ListSlowQueriesResponse = {
toJSON(message: ListSlowQueriesResponse): unknown {
const obj: any = {};
- if (message.slowQueryLogs) {
- obj.slowQueryLogs = message.slowQueryLogs.map((e) => e ? SlowQueryLog.toJSON(e) : undefined);
- } else {
- obj.slowQueryLogs = [];
+ if (message.slowQueryLogs?.length) {
+ obj.slowQueryLogs = message.slowQueryLogs.map((e) => SlowQueryLog.toJSON(e));
}
return obj;
},
@@ -5757,7 +5965,6 @@ export const ListSlowQueriesResponse = {
create(base?: DeepPartial<ListSlowQueriesResponse>): ListSlowQueriesResponse {
return ListSlowQueriesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSlowQueriesResponse>): ListSlowQueriesResponse {
const message = createBaseListSlowQueriesResponse();
message.slowQueryLogs = object.slowQueryLogs?.map((e) => SlowQueryLog.fromPartial(e)) || [];
@@ -5822,25 +6029,29 @@ export const SlowQueryLog = {
fromJSON(object: any): SlowQueryLog {
return {
- resource: isSet(object.resource) ? String(object.resource) : "",
- project: isSet(object.project) ? String(object.project) : "",
+ resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
statistics: isSet(object.statistics) ? SlowQueryStatistics.fromJSON(object.statistics) : undefined,
};
},
toJSON(message: SlowQueryLog): unknown {
const obj: any = {};
- message.resource !== undefined && (obj.resource = message.resource);
- message.project !== undefined && (obj.project = message.project);
- message.statistics !== undefined &&
- (obj.statistics = message.statistics ? SlowQueryStatistics.toJSON(message.statistics) : undefined);
+ if (message.resource !== "") {
+ obj.resource = message.resource;
+ }
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.statistics !== undefined) {
+ obj.statistics = SlowQueryStatistics.toJSON(message.statistics);
+ }
return obj;
},
create(base?: DeepPartial<SlowQueryLog>): SlowQueryLog {
return SlowQueryLog.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryLog>): SlowQueryLog {
const message = createBaseSlowQueryLog();
message.resource = object.resource ?? "";
@@ -6012,40 +6223,60 @@ export const SlowQueryStatistics = {
fromJSON(object: any): SlowQueryStatistics {
return {
- sqlFingerprint: isSet(object.sqlFingerprint) ? String(object.sqlFingerprint) : "",
- count: isSet(object.count) ? Number(object.count) : 0,
+ sqlFingerprint: isSet(object.sqlFingerprint) ? globalThis.String(object.sqlFingerprint) : "",
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
latestLogTime: isSet(object.latestLogTime) ? fromJsonTimestamp(object.latestLogTime) : undefined,
averageQueryTime: isSet(object.averageQueryTime) ? Duration.fromJSON(object.averageQueryTime) : undefined,
maximumQueryTime: isSet(object.maximumQueryTime) ? Duration.fromJSON(object.maximumQueryTime) : undefined,
- averageRowsSent: isSet(object.averageRowsSent) ? Number(object.averageRowsSent) : 0,
- maximumRowsSent: isSet(object.maximumRowsSent) ? Number(object.maximumRowsSent) : 0,
- averageRowsExamined: isSet(object.averageRowsExamined) ? Number(object.averageRowsExamined) : 0,
- maximumRowsExamined: isSet(object.maximumRowsExamined) ? Number(object.maximumRowsExamined) : 0,
- queryTimePercent: isSet(object.queryTimePercent) ? Number(object.queryTimePercent) : 0,
- countPercent: isSet(object.countPercent) ? Number(object.countPercent) : 0,
- samples: Array.isArray(object?.samples) ? object.samples.map((e: any) => SlowQueryDetails.fromJSON(e)) : [],
+ averageRowsSent: isSet(object.averageRowsSent) ? globalThis.Number(object.averageRowsSent) : 0,
+ maximumRowsSent: isSet(object.maximumRowsSent) ? globalThis.Number(object.maximumRowsSent) : 0,
+ averageRowsExamined: isSet(object.averageRowsExamined) ? globalThis.Number(object.averageRowsExamined) : 0,
+ maximumRowsExamined: isSet(object.maximumRowsExamined) ? globalThis.Number(object.maximumRowsExamined) : 0,
+ queryTimePercent: isSet(object.queryTimePercent) ? globalThis.Number(object.queryTimePercent) : 0,
+ countPercent: isSet(object.countPercent) ? globalThis.Number(object.countPercent) : 0,
+ samples: globalThis.Array.isArray(object?.samples)
+ ? object.samples.map((e: any) => SlowQueryDetails.fromJSON(e))
+ : [],
};
},
toJSON(message: SlowQueryStatistics): unknown {
const obj: any = {};
- message.sqlFingerprint !== undefined && (obj.sqlFingerprint = message.sqlFingerprint);
- message.count !== undefined && (obj.count = Math.round(message.count));
- message.latestLogTime !== undefined && (obj.latestLogTime = message.latestLogTime.toISOString());
- message.averageQueryTime !== undefined &&
- (obj.averageQueryTime = message.averageQueryTime ? Duration.toJSON(message.averageQueryTime) : undefined);
- message.maximumQueryTime !== undefined &&
- (obj.maximumQueryTime = message.maximumQueryTime ? Duration.toJSON(message.maximumQueryTime) : undefined);
- message.averageRowsSent !== undefined && (obj.averageRowsSent = Math.round(message.averageRowsSent));
- message.maximumRowsSent !== undefined && (obj.maximumRowsSent = Math.round(message.maximumRowsSent));
- message.averageRowsExamined !== undefined && (obj.averageRowsExamined = Math.round(message.averageRowsExamined));
- message.maximumRowsExamined !== undefined && (obj.maximumRowsExamined = Math.round(message.maximumRowsExamined));
- message.queryTimePercent !== undefined && (obj.queryTimePercent = message.queryTimePercent);
- message.countPercent !== undefined && (obj.countPercent = message.countPercent);
- if (message.samples) {
- obj.samples = message.samples.map((e) => e ? SlowQueryDetails.toJSON(e) : undefined);
- } else {
- obj.samples = [];
+ if (message.sqlFingerprint !== "") {
+ obj.sqlFingerprint = message.sqlFingerprint;
+ }
+ if (message.count !== 0) {
+ obj.count = Math.round(message.count);
+ }
+ if (message.latestLogTime !== undefined) {
+ obj.latestLogTime = message.latestLogTime.toISOString();
+ }
+ if (message.averageQueryTime !== undefined) {
+ obj.averageQueryTime = Duration.toJSON(message.averageQueryTime);
+ }
+ if (message.maximumQueryTime !== undefined) {
+ obj.maximumQueryTime = Duration.toJSON(message.maximumQueryTime);
+ }
+ if (message.averageRowsSent !== 0) {
+ obj.averageRowsSent = Math.round(message.averageRowsSent);
+ }
+ if (message.maximumRowsSent !== 0) {
+ obj.maximumRowsSent = Math.round(message.maximumRowsSent);
+ }
+ if (message.averageRowsExamined !== 0) {
+ obj.averageRowsExamined = Math.round(message.averageRowsExamined);
+ }
+ if (message.maximumRowsExamined !== 0) {
+ obj.maximumRowsExamined = Math.round(message.maximumRowsExamined);
+ }
+ if (message.queryTimePercent !== 0) {
+ obj.queryTimePercent = message.queryTimePercent;
+ }
+ if (message.countPercent !== 0) {
+ obj.countPercent = message.countPercent;
+ }
+ if (message.samples?.length) {
+ obj.samples = message.samples.map((e) => SlowQueryDetails.toJSON(e));
}
return obj;
},
@@ -6053,7 +6284,6 @@ export const SlowQueryStatistics = {
create(base?: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {
return SlowQueryStatistics.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {
const message = createBaseSlowQueryStatistics();
message.sqlFingerprint = object.sqlFingerprint ?? "";
@@ -6166,28 +6396,38 @@ export const SlowQueryDetails = {
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,
queryTime: isSet(object.queryTime) ? Duration.fromJSON(object.queryTime) : undefined,
lockTime: isSet(object.lockTime) ? Duration.fromJSON(object.lockTime) : undefined,
- rowsSent: isSet(object.rowsSent) ? Number(object.rowsSent) : 0,
- rowsExamined: isSet(object.rowsExamined) ? Number(object.rowsExamined) : 0,
- sqlText: isSet(object.sqlText) ? String(object.sqlText) : "",
+ rowsSent: isSet(object.rowsSent) ? globalThis.Number(object.rowsSent) : 0,
+ rowsExamined: isSet(object.rowsExamined) ? globalThis.Number(object.rowsExamined) : 0,
+ sqlText: isSet(object.sqlText) ? globalThis.String(object.sqlText) : "",
};
},
toJSON(message: SlowQueryDetails): unknown {
const obj: any = {};
- message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());
- message.queryTime !== undefined &&
- (obj.queryTime = message.queryTime ? Duration.toJSON(message.queryTime) : undefined);
- message.lockTime !== undefined && (obj.lockTime = message.lockTime ? Duration.toJSON(message.lockTime) : undefined);
- message.rowsSent !== undefined && (obj.rowsSent = Math.round(message.rowsSent));
- message.rowsExamined !== undefined && (obj.rowsExamined = Math.round(message.rowsExamined));
- message.sqlText !== undefined && (obj.sqlText = message.sqlText);
+ if (message.startTime !== undefined) {
+ obj.startTime = message.startTime.toISOString();
+ }
+ if (message.queryTime !== undefined) {
+ obj.queryTime = Duration.toJSON(message.queryTime);
+ }
+ if (message.lockTime !== undefined) {
+ obj.lockTime = Duration.toJSON(message.lockTime);
+ }
+ if (message.rowsSent !== 0) {
+ obj.rowsSent = Math.round(message.rowsSent);
+ }
+ if (message.rowsExamined !== 0) {
+ obj.rowsExamined = Math.round(message.rowsExamined);
+ }
+ if (message.sqlText !== "") {
+ obj.sqlText = message.sqlText;
+ }
return obj;
},
create(base?: DeepPartial<SlowQueryDetails>): SlowQueryDetails {
return SlowQueryDetails.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryDetails>): SlowQueryDetails {
const message = createBaseSlowQueryDetails();
message.startTime = object.startTime ?? undefined;
@@ -6261,24 +6501,29 @@ export const ListSecretsRequest = {
fromJSON(object: any): ListSecretsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListSecretsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListSecretsRequest>): ListSecretsRequest {
return ListSecretsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSecretsRequest>): ListSecretsRequest {
const message = createBaseListSecretsRequest();
message.parent = object.parent ?? "";
@@ -6335,26 +6580,25 @@ export const ListSecretsResponse = {
fromJSON(object: any): ListSecretsResponse {
return {
- secrets: Array.isArray(object?.secrets) ? object.secrets.map((e: any) => Secret.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ secrets: globalThis.Array.isArray(object?.secrets) ? object.secrets.map((e: any) => Secret.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListSecretsResponse): unknown {
const obj: any = {};
- if (message.secrets) {
- obj.secrets = message.secrets.map((e) => e ? Secret.toJSON(e) : undefined);
- } else {
- obj.secrets = [];
+ if (message.secrets?.length) {
+ obj.secrets = message.secrets.map((e) => Secret.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListSecretsResponse>): ListSecretsResponse {
return ListSecretsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSecretsResponse>): ListSecretsResponse {
const message = createBaseListSecretsResponse();
message.secrets = object.secrets?.map((e) => Secret.fromPartial(e)) || [];
@@ -6422,22 +6666,27 @@ export const UpdateSecretRequest = {
return {
secret: isSet(object.secret) ? Secret.fromJSON(object.secret) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
- allowMissing: isSet(object.allowMissing) ? Boolean(object.allowMissing) : false,
+ allowMissing: isSet(object.allowMissing) ? globalThis.Boolean(object.allowMissing) : false,
};
},
toJSON(message: UpdateSecretRequest): unknown {
const obj: any = {};
- message.secret !== undefined && (obj.secret = message.secret ? Secret.toJSON(message.secret) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
- message.allowMissing !== undefined && (obj.allowMissing = message.allowMissing);
+ if (message.secret !== undefined) {
+ obj.secret = Secret.toJSON(message.secret);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
+ if (message.allowMissing === true) {
+ obj.allowMissing = message.allowMissing;
+ }
return obj;
},
create(base?: DeepPartial<UpdateSecretRequest>): UpdateSecretRequest {
return UpdateSecretRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateSecretRequest>): UpdateSecretRequest {
const message = createBaseUpdateSecretRequest();
message.secret = (object.secret !== undefined && object.secret !== null)
@@ -6485,19 +6734,20 @@ export const DeleteSecretRequest = {
},
fromJSON(object: any): DeleteSecretRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteSecretRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteSecretRequest>): DeleteSecretRequest {
return DeleteSecretRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteSecretRequest>): DeleteSecretRequest {
const message = createBaseDeleteSecretRequest();
message.name = object.name ?? "";
@@ -6582,28 +6832,37 @@ export const Secret = {
fromJSON(object: any): Secret {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
createdTime: isSet(object.createdTime) ? fromJsonTimestamp(object.createdTime) : undefined,
updatedTime: isSet(object.updatedTime) ? fromJsonTimestamp(object.updatedTime) : undefined,
- value: isSet(object.value) ? String(object.value) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: Secret): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.createdTime !== undefined && (obj.createdTime = message.createdTime.toISOString());
- message.updatedTime !== undefined && (obj.updatedTime = message.updatedTime.toISOString());
- message.value !== undefined && (obj.value = message.value);
- message.description !== undefined && (obj.description = message.description);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.createdTime !== undefined) {
+ obj.createdTime = message.createdTime.toISOString();
+ }
+ if (message.updatedTime !== undefined) {
+ obj.updatedTime = message.updatedTime.toISOString();
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
create(base?: DeepPartial<Secret>): Secret {
return Secret.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Secret>): Secret {
const message = createBaseSecret();
message.name = object.name ?? "";
@@ -6662,22 +6921,25 @@ export const AdviseIndexRequest = {
fromJSON(object: any): AdviseIndexRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- statement: isSet(object.statement) ? String(object.statement) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
};
},
toJSON(message: AdviseIndexRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.statement !== undefined && (obj.statement = message.statement);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
return obj;
},
create(base?: DeepPartial<AdviseIndexRequest>): AdviseIndexRequest {
return AdviseIndexRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AdviseIndexRequest>): AdviseIndexRequest {
const message = createBaseAdviseIndexRequest();
message.parent = object.parent ?? "";
@@ -6743,24 +7005,29 @@ export const AdviseIndexResponse = {
fromJSON(object: any): AdviseIndexResponse {
return {
- currentIndex: isSet(object.currentIndex) ? String(object.currentIndex) : "",
- suggestion: isSet(object.suggestion) ? String(object.suggestion) : "",
- createIndexStatement: isSet(object.createIndexStatement) ? String(object.createIndexStatement) : "",
+ currentIndex: isSet(object.currentIndex) ? globalThis.String(object.currentIndex) : "",
+ suggestion: isSet(object.suggestion) ? globalThis.String(object.suggestion) : "",
+ createIndexStatement: isSet(object.createIndexStatement) ? globalThis.String(object.createIndexStatement) : "",
};
},
toJSON(message: AdviseIndexResponse): unknown {
const obj: any = {};
- message.currentIndex !== undefined && (obj.currentIndex = message.currentIndex);
- message.suggestion !== undefined && (obj.suggestion = message.suggestion);
- message.createIndexStatement !== undefined && (obj.createIndexStatement = message.createIndexStatement);
+ if (message.currentIndex !== "") {
+ obj.currentIndex = message.currentIndex;
+ }
+ if (message.suggestion !== "") {
+ obj.suggestion = message.suggestion;
+ }
+ if (message.createIndexStatement !== "") {
+ obj.createIndexStatement = message.createIndexStatement;
+ }
return obj;
},
create(base?: DeepPartial<AdviseIndexResponse>): AdviseIndexResponse {
return AdviseIndexResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AdviseIndexResponse>): AdviseIndexResponse {
const message = createBaseAdviseIndexResponse();
message.currentIndex = object.currentIndex ?? "";
@@ -7018,24 +7285,24 @@ export const ChangeHistory = {
fromJSON(object: any): ChangeHistory {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- creator: isSet(object.creator) ? String(object.creator) : "",
- updater: isSet(object.updater) ? String(object.updater) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
+ updater: isSet(object.updater) ? globalThis.String(object.updater) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
- releaseVersion: isSet(object.releaseVersion) ? String(object.releaseVersion) : "",
+ releaseVersion: isSet(object.releaseVersion) ? globalThis.String(object.releaseVersion) : "",
source: isSet(object.source) ? changeHistory_SourceFromJSON(object.source) : 0,
type: isSet(object.type) ? changeHistory_TypeFromJSON(object.type) : 0,
status: isSet(object.status) ? changeHistory_StatusFromJSON(object.status) : 0,
- version: isSet(object.version) ? String(object.version) : "",
- description: isSet(object.description) ? String(object.description) : "",
- statement: isSet(object.statement) ? String(object.statement) : "",
- statementSheet: isSet(object.statementSheet) ? String(object.statementSheet) : "",
- schema: isSet(object.schema) ? String(object.schema) : "",
- prevSchema: isSet(object.prevSchema) ? String(object.prevSchema) : "",
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
+ statementSheet: isSet(object.statementSheet) ? globalThis.String(object.statementSheet) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ prevSchema: isSet(object.prevSchema) ? globalThis.String(object.prevSchema) : "",
executionDuration: isSet(object.executionDuration) ? Duration.fromJSON(object.executionDuration) : undefined,
- issue: isSet(object.issue) ? String(object.issue) : "",
+ issue: isSet(object.issue) ? globalThis.String(object.issue) : "",
pushEvent: isSet(object.pushEvent) ? PushEvent.fromJSON(object.pushEvent) : undefined,
changedResources: isSet(object.changedResources) ? ChangedResources.fromJSON(object.changedResources) : undefined,
};
@@ -7043,36 +7310,72 @@ export const ChangeHistory = {
toJSON(message: ChangeHistory): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.creator !== undefined && (obj.creator = message.creator);
- message.updater !== undefined && (obj.updater = message.updater);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- message.releaseVersion !== undefined && (obj.releaseVersion = message.releaseVersion);
- message.source !== undefined && (obj.source = changeHistory_SourceToJSON(message.source));
- message.type !== undefined && (obj.type = changeHistory_TypeToJSON(message.type));
- message.status !== undefined && (obj.status = changeHistory_StatusToJSON(message.status));
- message.version !== undefined && (obj.version = message.version);
- message.description !== undefined && (obj.description = message.description);
- message.statement !== undefined && (obj.statement = message.statement);
- message.statementSheet !== undefined && (obj.statementSheet = message.statementSheet);
- message.schema !== undefined && (obj.schema = message.schema);
- message.prevSchema !== undefined && (obj.prevSchema = message.prevSchema);
- message.executionDuration !== undefined &&
- (obj.executionDuration = message.executionDuration ? Duration.toJSON(message.executionDuration) : undefined);
- message.issue !== undefined && (obj.issue = message.issue);
- message.pushEvent !== undefined &&
- (obj.pushEvent = message.pushEvent ? PushEvent.toJSON(message.pushEvent) : undefined);
- message.changedResources !== undefined &&
- (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.updater !== "") {
+ obj.updater = message.updater;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.releaseVersion !== "") {
+ obj.releaseVersion = message.releaseVersion;
+ }
+ if (message.source !== 0) {
+ obj.source = changeHistory_SourceToJSON(message.source);
+ }
+ if (message.type !== 0) {
+ obj.type = changeHistory_TypeToJSON(message.type);
+ }
+ if (message.status !== 0) {
+ obj.status = changeHistory_StatusToJSON(message.status);
+ }
+ if (message.version !== "") {
+ obj.version = message.version;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
+ if (message.statementSheet !== "") {
+ obj.statementSheet = message.statementSheet;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.prevSchema !== "") {
+ obj.prevSchema = message.prevSchema;
+ }
+ if (message.executionDuration !== undefined) {
+ obj.executionDuration = Duration.toJSON(message.executionDuration);
+ }
+ if (message.issue !== "") {
+ obj.issue = message.issue;
+ }
+ if (message.pushEvent !== undefined) {
+ obj.pushEvent = PushEvent.toJSON(message.pushEvent);
+ }
+ if (message.changedResources !== undefined) {
+ obj.changedResources = ChangedResources.toJSON(message.changedResources);
+ }
return obj;
},
create(base?: DeepPartial<ChangeHistory>): ChangeHistory {
return ChangeHistory.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangeHistory>): ChangeHistory {
const message = createBaseChangeHistory();
message.name = object.name ?? "";
@@ -7142,7 +7445,7 @@ export const ChangedResources = {
fromJSON(object: any): ChangedResources {
return {
- databases: Array.isArray(object?.databases)
+ databases: globalThis.Array.isArray(object?.databases)
? object.databases.map((e: any) => ChangedResourceDatabase.fromJSON(e))
: [],
};
@@ -7150,10 +7453,8 @@ export const ChangedResources = {
toJSON(message: ChangedResources): unknown {
const obj: any = {};
- if (message.databases) {
- obj.databases = message.databases.map((e) => e ? ChangedResourceDatabase.toJSON(e) : undefined);
- } else {
- obj.databases = [];
+ if (message.databases?.length) {
+ obj.databases = message.databases.map((e) => ChangedResourceDatabase.toJSON(e));
}
return obj;
},
@@ -7161,7 +7462,6 @@ export const ChangedResources = {
create(base?: DeepPartial<ChangedResources>): ChangedResources {
return ChangedResources.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResources>): ChangedResources {
const message = createBaseChangedResources();
message.databases = object.databases?.map((e) => ChangedResourceDatabase.fromPartial(e)) || [];
@@ -7216,18 +7516,20 @@ export const ChangedResourceDatabase = {
fromJSON(object: any): ChangedResourceDatabase {
return {
- name: isSet(object.name) ? String(object.name) : "",
- schemas: Array.isArray(object?.schemas) ? object.schemas.map((e: any) => ChangedResourceSchema.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ schemas: globalThis.Array.isArray(object?.schemas)
+ ? object.schemas.map((e: any) => ChangedResourceSchema.fromJSON(e))
+ : [],
};
},
toJSON(message: ChangedResourceDatabase): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.schemas) {
- obj.schemas = message.schemas.map((e) => e ? ChangedResourceSchema.toJSON(e) : undefined);
- } else {
- obj.schemas = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schemas?.length) {
+ obj.schemas = message.schemas.map((e) => ChangedResourceSchema.toJSON(e));
}
return obj;
},
@@ -7235,7 +7537,6 @@ export const ChangedResourceDatabase = {
create(base?: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {
return ChangedResourceDatabase.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {
const message = createBaseChangedResourceDatabase();
message.name = object.name ?? "";
@@ -7291,18 +7592,20 @@ export const ChangedResourceSchema = {
fromJSON(object: any): ChangedResourceSchema {
return {
- name: isSet(object.name) ? String(object.name) : "",
- tables: Array.isArray(object?.tables) ? object.tables.map((e: any) => ChangedResourceTable.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ tables: globalThis.Array.isArray(object?.tables)
+ ? object.tables.map((e: any) => ChangedResourceTable.fromJSON(e))
+ : [],
};
},
toJSON(message: ChangedResourceSchema): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.tables) {
- obj.tables = message.tables.map((e) => e ? ChangedResourceTable.toJSON(e) : undefined);
- } else {
- obj.tables = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tables?.length) {
+ obj.tables = message.tables.map((e) => ChangedResourceTable.toJSON(e));
}
return obj;
},
@@ -7310,7 +7613,6 @@ export const ChangedResourceSchema = {
create(base?: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {
return ChangedResourceSchema.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {
const message = createBaseChangedResourceSchema();
message.name = object.name ?? "";
@@ -7355,19 +7657,20 @@ export const ChangedResourceTable = {
},
fromJSON(object: any): ChangedResourceTable {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: ChangedResourceTable): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<ChangedResourceTable>): ChangedResourceTable {
return ChangedResourceTable.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ChangedResourceTable>): ChangedResourceTable {
const message = createBaseChangedResourceTable();
message.name = object.name ?? "";
@@ -7452,28 +7755,37 @@ export const ListChangeHistoriesRequest = {
fromJSON(object: any): ListChangeHistoriesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
view: isSet(object.view) ? changeHistoryViewFromJSON(object.view) : 0,
- filter: isSet(object.filter) ? String(object.filter) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: ListChangeHistoriesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.view !== undefined && (obj.view = changeHistoryViewToJSON(message.view));
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.view !== 0) {
+ obj.view = changeHistoryViewToJSON(message.view);
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<ListChangeHistoriesRequest>): ListChangeHistoriesRequest {
return ListChangeHistoriesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListChangeHistoriesRequest>): ListChangeHistoriesRequest {
const message = createBaseListChangeHistoriesRequest();
message.parent = object.parent ?? "";
@@ -7532,28 +7844,27 @@ export const ListChangeHistoriesResponse = {
fromJSON(object: any): ListChangeHistoriesResponse {
return {
- changeHistories: Array.isArray(object?.changeHistories)
+ changeHistories: globalThis.Array.isArray(object?.changeHistories)
? object.changeHistories.map((e: any) => ChangeHistory.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListChangeHistoriesResponse): unknown {
const obj: any = {};
- if (message.changeHistories) {
- obj.changeHistories = message.changeHistories.map((e) => e ? ChangeHistory.toJSON(e) : undefined);
- } else {
- obj.changeHistories = [];
+ if (message.changeHistories?.length) {
+ obj.changeHistories = message.changeHistories.map((e) => ChangeHistory.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListChangeHistoriesResponse>): ListChangeHistoriesResponse {
return ListChangeHistoriesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListChangeHistoriesResponse>): ListChangeHistoriesResponse {
const message = createBaseListChangeHistoriesResponse();
message.changeHistories = object.changeHistories?.map((e) => ChangeHistory.fromPartial(e)) || [];
@@ -7619,24 +7930,29 @@ export const GetChangeHistoryRequest = {
fromJSON(object: any): GetChangeHistoryRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
view: isSet(object.view) ? changeHistoryViewFromJSON(object.view) : 0,
- sdlFormat: isSet(object.sdlFormat) ? Boolean(object.sdlFormat) : false,
+ sdlFormat: isSet(object.sdlFormat) ? globalThis.Boolean(object.sdlFormat) : false,
};
},
toJSON(message: GetChangeHistoryRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.view !== undefined && (obj.view = changeHistoryViewToJSON(message.view));
- message.sdlFormat !== undefined && (obj.sdlFormat = message.sdlFormat);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.view !== 0) {
+ obj.view = changeHistoryViewToJSON(message.view);
+ }
+ if (message.sdlFormat === true) {
+ obj.sdlFormat = message.sdlFormat;
+ }
return obj;
},
create(base?: DeepPartial<GetChangeHistoryRequest>): GetChangeHistoryRequest {
return GetChangeHistoryRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetChangeHistoryRequest>): GetChangeHistoryRequest {
const message = createBaseGetChangeHistoryRequest();
message.name = object.name ?? "";
@@ -9158,7 +9474,7 @@ export const DatabaseServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -9172,14 +9488,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/environment_service.ts b/frontend/src/types/proto/v1/environment_service.ts
index cf06000118..150f5cd7c8 100644
--- a/frontend/src/types/proto/v1/environment_service.ts
+++ b/frontend/src/types/proto/v1/environment_service.ts
@@ -193,19 +193,20 @@ export const GetEnvironmentRequest = {
},
fromJSON(object: any): GetEnvironmentRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetEnvironmentRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetEnvironmentRequest>): GetEnvironmentRequest {
return GetEnvironmentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetEnvironmentRequest>): GetEnvironmentRequest {
const message = createBaseGetEnvironmentRequest();
message.name = object.name ?? "";
@@ -270,24 +271,29 @@ export const ListEnvironmentsRequest = {
fromJSON(object: any): ListEnvironmentsRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? Boolean(object.showDeleted) : false,
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
};
},
toJSON(message: ListEnvironmentsRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted === true) {
+ obj.showDeleted = message.showDeleted;
+ }
return obj;
},
create(base?: DeepPartial<ListEnvironmentsRequest>): ListEnvironmentsRequest {
return ListEnvironmentsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListEnvironmentsRequest>): ListEnvironmentsRequest {
const message = createBaseListEnvironmentsRequest();
message.pageSize = object.pageSize ?? 0;
@@ -344,28 +350,27 @@ export const ListEnvironmentsResponse = {
fromJSON(object: any): ListEnvironmentsResponse {
return {
- environments: Array.isArray(object?.environments)
+ environments: globalThis.Array.isArray(object?.environments)
? object.environments.map((e: any) => Environment.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListEnvironmentsResponse): unknown {
const obj: any = {};
- if (message.environments) {
- obj.environments = message.environments.map((e) => e ? Environment.toJSON(e) : undefined);
- } else {
- obj.environments = [];
+ if (message.environments?.length) {
+ obj.environments = message.environments.map((e) => Environment.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListEnvironmentsResponse>): ListEnvironmentsResponse {
return ListEnvironmentsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListEnvironmentsResponse>): ListEnvironmentsResponse {
const message = createBaseListEnvironmentsResponse();
message.environments = object.environments?.map((e) => Environment.fromPartial(e)) || [];
@@ -422,22 +427,24 @@ export const CreateEnvironmentRequest = {
fromJSON(object: any): CreateEnvironmentRequest {
return {
environment: isSet(object.environment) ? Environment.fromJSON(object.environment) : undefined,
- environmentId: isSet(object.environmentId) ? String(object.environmentId) : "",
+ environmentId: isSet(object.environmentId) ? globalThis.String(object.environmentId) : "",
};
},
toJSON(message: CreateEnvironmentRequest): unknown {
const obj: any = {};
- message.environment !== undefined &&
- (obj.environment = message.environment ? Environment.toJSON(message.environment) : undefined);
- message.environmentId !== undefined && (obj.environmentId = message.environmentId);
+ if (message.environment !== undefined) {
+ obj.environment = Environment.toJSON(message.environment);
+ }
+ if (message.environmentId !== "") {
+ obj.environmentId = message.environmentId;
+ }
return obj;
},
create(base?: DeepPartial<CreateEnvironmentRequest>): CreateEnvironmentRequest {
return CreateEnvironmentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateEnvironmentRequest>): CreateEnvironmentRequest {
const message = createBaseCreateEnvironmentRequest();
message.environment = (object.environment !== undefined && object.environment !== null)
@@ -502,16 +509,18 @@ export const UpdateEnvironmentRequest = {
toJSON(message: UpdateEnvironmentRequest): unknown {
const obj: any = {};
- message.environment !== undefined &&
- (obj.environment = message.environment ? Environment.toJSON(message.environment) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.environment !== undefined) {
+ obj.environment = Environment.toJSON(message.environment);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateEnvironmentRequest>): UpdateEnvironmentRequest {
return UpdateEnvironmentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateEnvironmentRequest>): UpdateEnvironmentRequest {
const message = createBaseUpdateEnvironmentRequest();
message.environment = (object.environment !== undefined && object.environment !== null)
@@ -558,19 +567,20 @@ export const DeleteEnvironmentRequest = {
},
fromJSON(object: any): DeleteEnvironmentRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteEnvironmentRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteEnvironmentRequest>): DeleteEnvironmentRequest {
return DeleteEnvironmentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteEnvironmentRequest>): DeleteEnvironmentRequest {
const message = createBaseDeleteEnvironmentRequest();
message.name = object.name ?? "";
@@ -614,19 +624,20 @@ export const UndeleteEnvironmentRequest = {
},
fromJSON(object: any): UndeleteEnvironmentRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UndeleteEnvironmentRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UndeleteEnvironmentRequest>): UndeleteEnvironmentRequest {
return UndeleteEnvironmentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UndeleteEnvironmentRequest>): UndeleteEnvironmentRequest {
const message = createBaseUndeleteEnvironmentRequest();
message.name = object.name ?? "";
@@ -721,30 +732,41 @@ export const Environment = {
fromJSON(object: any): Environment {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
state: isSet(object.state) ? stateFromJSON(object.state) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- order: isSet(object.order) ? Number(object.order) : 0,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ order: isSet(object.order) ? globalThis.Number(object.order) : 0,
tier: isSet(object.tier) ? environmentTierFromJSON(object.tier) : 0,
};
},
toJSON(message: Environment): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.state !== undefined && (obj.state = stateToJSON(message.state));
- message.title !== undefined && (obj.title = message.title);
- message.order !== undefined && (obj.order = Math.round(message.order));
- message.tier !== undefined && (obj.tier = environmentTierToJSON(message.tier));
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.state !== 0) {
+ obj.state = stateToJSON(message.state);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.order !== 0) {
+ obj.order = Math.round(message.order);
+ }
+ if (message.tier !== 0) {
+ obj.tier = environmentTierToJSON(message.tier);
+ }
return obj;
},
create(base?: DeepPartial<Environment>): Environment {
return Environment.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Environment>): Environment {
const message = createBaseEnvironment();
message.name = object.name ?? "";
@@ -798,15 +820,15 @@ export const UpdateEnvironmentBackupSettingRequest = {
toJSON(message: UpdateEnvironmentBackupSettingRequest): unknown {
const obj: any = {};
- message.setting !== undefined &&
- (obj.setting = message.setting ? EnvironmentBackupSetting.toJSON(message.setting) : undefined);
+ if (message.setting !== undefined) {
+ obj.setting = EnvironmentBackupSetting.toJSON(message.setting);
+ }
return obj;
},
create(base?: DeepPartial<UpdateEnvironmentBackupSettingRequest>): UpdateEnvironmentBackupSettingRequest {
return UpdateEnvironmentBackupSettingRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateEnvironmentBackupSettingRequest>): UpdateEnvironmentBackupSettingRequest {
const message = createBaseUpdateEnvironmentBackupSettingRequest();
message.setting = (object.setting !== undefined && object.setting !== null)
@@ -863,22 +885,25 @@ export const EnvironmentBackupSetting = {
fromJSON(object: any): EnvironmentBackupSetting {
return {
- name: isSet(object.name) ? String(object.name) : "",
- enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
};
},
toJSON(message: EnvironmentBackupSetting): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.enabled !== undefined && (obj.enabled = message.enabled);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.enabled === true) {
+ obj.enabled = message.enabled;
+ }
return obj;
},
create(base?: DeepPartial<EnvironmentBackupSetting>): EnvironmentBackupSetting {
return EnvironmentBackupSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<EnvironmentBackupSetting>): EnvironmentBackupSetting {
const message = createBaseEnvironmentBackupSetting();
message.name = object.name ?? "";
@@ -1274,7 +1299,7 @@ export const EnvironmentServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/externalvs_service.ts b/frontend/src/types/proto/v1/externalvs_service.ts
index d2a4ba8c62..72ece7a8c9 100644
--- a/frontend/src/types/proto/v1/externalvs_service.ts
+++ b/frontend/src/types/proto/v1/externalvs_service.ts
@@ -290,16 +290,15 @@ export const CreateExternalVersionControlRequest = {
toJSON(message: CreateExternalVersionControlRequest): unknown {
const obj: any = {};
- message.externalVersionControl !== undefined && (obj.externalVersionControl = message.externalVersionControl
- ? ExternalVersionControl.toJSON(message.externalVersionControl)
- : undefined);
+ if (message.externalVersionControl !== undefined) {
+ obj.externalVersionControl = ExternalVersionControl.toJSON(message.externalVersionControl);
+ }
return obj;
},
create(base?: DeepPartial<CreateExternalVersionControlRequest>): CreateExternalVersionControlRequest {
return CreateExternalVersionControlRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateExternalVersionControlRequest>): CreateExternalVersionControlRequest {
const message = createBaseCreateExternalVersionControlRequest();
message.externalVersionControl =
@@ -346,19 +345,20 @@ export const GetExternalVersionControlRequest = {
},
fromJSON(object: any): GetExternalVersionControlRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetExternalVersionControlRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetExternalVersionControlRequest>): GetExternalVersionControlRequest {
return GetExternalVersionControlRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetExternalVersionControlRequest>): GetExternalVersionControlRequest {
const message = createBaseGetExternalVersionControlRequest();
message.name = object.name ?? "";
@@ -413,22 +413,25 @@ export const ListExternalVersionControlsRequest = {
fromJSON(object: any): ListExternalVersionControlsRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListExternalVersionControlsRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListExternalVersionControlsRequest>): ListExternalVersionControlsRequest {
return ListExternalVersionControlsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListExternalVersionControlsRequest>): ListExternalVersionControlsRequest {
const message = createBaseListExternalVersionControlsRequest();
message.pageSize = object.pageSize ?? 0;
@@ -484,30 +487,27 @@ export const ListExternalVersionControlsResponse = {
fromJSON(object: any): ListExternalVersionControlsResponse {
return {
- externalVersionControls: Array.isArray(object?.externalVersionControls)
+ externalVersionControls: globalThis.Array.isArray(object?.externalVersionControls)
? object.externalVersionControls.map((e: any) => ExternalVersionControl.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListExternalVersionControlsResponse): unknown {
const obj: any = {};
- if (message.externalVersionControls) {
- obj.externalVersionControls = message.externalVersionControls.map((e) =>
- e ? ExternalVersionControl.toJSON(e) : undefined
- );
- } else {
- obj.externalVersionControls = [];
- }
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ if (message.externalVersionControls?.length) {
+ obj.externalVersionControls = message.externalVersionControls.map((e) => ExternalVersionControl.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListExternalVersionControlsResponse>): ListExternalVersionControlsResponse {
return ListExternalVersionControlsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListExternalVersionControlsResponse>): ListExternalVersionControlsResponse {
const message = createBaseListExternalVersionControlsResponse();
message.externalVersionControls =
@@ -573,17 +573,18 @@ export const UpdateExternalVersionControlRequest = {
toJSON(message: UpdateExternalVersionControlRequest): unknown {
const obj: any = {};
- message.externalVersionControl !== undefined && (obj.externalVersionControl = message.externalVersionControl
- ? ExternalVersionControl.toJSON(message.externalVersionControl)
- : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.externalVersionControl !== undefined) {
+ obj.externalVersionControl = ExternalVersionControl.toJSON(message.externalVersionControl);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateExternalVersionControlRequest>): UpdateExternalVersionControlRequest {
return UpdateExternalVersionControlRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateExternalVersionControlRequest>): UpdateExternalVersionControlRequest {
const message = createBaseUpdateExternalVersionControlRequest();
message.externalVersionControl =
@@ -631,19 +632,20 @@ export const DeleteExternalVersionControlRequest = {
},
fromJSON(object: any): DeleteExternalVersionControlRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteExternalVersionControlRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteExternalVersionControlRequest>): DeleteExternalVersionControlRequest {
return DeleteExternalVersionControlRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteExternalVersionControlRequest>): DeleteExternalVersionControlRequest {
const message = createBaseDeleteExternalVersionControlRequest();
message.name = object.name ?? "";
@@ -708,24 +710,29 @@ export const SearchExternalVersionControlProjectsRequest = {
fromJSON(object: any): SearchExternalVersionControlProjectsRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- accessToken: isSet(object.accessToken) ? String(object.accessToken) : "",
- refreshToken: isSet(object.refreshToken) ? String(object.refreshToken) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ accessToken: isSet(object.accessToken) ? globalThis.String(object.accessToken) : "",
+ refreshToken: isSet(object.refreshToken) ? globalThis.String(object.refreshToken) : "",
};
},
toJSON(message: SearchExternalVersionControlProjectsRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.accessToken !== undefined && (obj.accessToken = message.accessToken);
- message.refreshToken !== undefined && (obj.refreshToken = message.refreshToken);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.accessToken !== "") {
+ obj.accessToken = message.accessToken;
+ }
+ if (message.refreshToken !== "") {
+ obj.refreshToken = message.refreshToken;
+ }
return obj;
},
create(base?: DeepPartial<SearchExternalVersionControlProjectsRequest>): SearchExternalVersionControlProjectsRequest {
return SearchExternalVersionControlProjectsRequest.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<SearchExternalVersionControlProjectsRequest>,
): SearchExternalVersionControlProjectsRequest {
@@ -774,7 +781,7 @@ export const SearchExternalVersionControlProjectsResponse = {
fromJSON(object: any): SearchExternalVersionControlProjectsResponse {
return {
- projects: Array.isArray(object?.projects)
+ projects: globalThis.Array.isArray(object?.projects)
? object.projects.map((e: any) => SearchExternalVersionControlProjectsResponse_Project.fromJSON(e))
: [],
};
@@ -782,12 +789,8 @@ export const SearchExternalVersionControlProjectsResponse = {
toJSON(message: SearchExternalVersionControlProjectsResponse): unknown {
const obj: any = {};
- if (message.projects) {
- obj.projects = message.projects.map((e) =>
- e ? SearchExternalVersionControlProjectsResponse_Project.toJSON(e) : undefined
- );
- } else {
- obj.projects = [];
+ if (message.projects?.length) {
+ obj.projects = message.projects.map((e) => SearchExternalVersionControlProjectsResponse_Project.toJSON(e));
}
return obj;
},
@@ -797,7 +800,6 @@ export const SearchExternalVersionControlProjectsResponse = {
): SearchExternalVersionControlProjectsResponse {
return SearchExternalVersionControlProjectsResponse.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<SearchExternalVersionControlProjectsResponse>,
): SearchExternalVersionControlProjectsResponse {
@@ -878,19 +880,27 @@ export const SearchExternalVersionControlProjectsResponse_Project = {
fromJSON(object: any): SearchExternalVersionControlProjectsResponse_Project {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- fullpath: isSet(object.fullpath) ? String(object.fullpath) : "",
- webUrl: isSet(object.webUrl) ? String(object.webUrl) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ fullpath: isSet(object.fullpath) ? globalThis.String(object.fullpath) : "",
+ webUrl: isSet(object.webUrl) ? globalThis.String(object.webUrl) : "",
};
},
toJSON(message: SearchExternalVersionControlProjectsResponse_Project): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.fullpath !== undefined && (obj.fullpath = message.fullpath);
- message.webUrl !== undefined && (obj.webUrl = message.webUrl);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.fullpath !== "") {
+ obj.fullpath = message.fullpath;
+ }
+ if (message.webUrl !== "") {
+ obj.webUrl = message.webUrl;
+ }
return obj;
},
@@ -899,7 +909,6 @@ export const SearchExternalVersionControlProjectsResponse_Project = {
): SearchExternalVersionControlProjectsResponse_Project {
return SearchExternalVersionControlProjectsResponse_Project.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<SearchExternalVersionControlProjectsResponse_Project>,
): SearchExternalVersionControlProjectsResponse_Project {
@@ -948,19 +957,20 @@ export const ListProjectGitOpsInfoRequest = {
},
fromJSON(object: any): ListProjectGitOpsInfoRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: ListProjectGitOpsInfoRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<ListProjectGitOpsInfoRequest>): ListProjectGitOpsInfoRequest {
return ListProjectGitOpsInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListProjectGitOpsInfoRequest>): ListProjectGitOpsInfoRequest {
const message = createBaseListProjectGitOpsInfoRequest();
message.name = object.name ?? "";
@@ -1005,7 +1015,7 @@ export const ListProjectGitOpsInfoResponse = {
fromJSON(object: any): ListProjectGitOpsInfoResponse {
return {
- projectGitopsInfo: Array.isArray(object?.projectGitopsInfo)
+ projectGitopsInfo: globalThis.Array.isArray(object?.projectGitopsInfo)
? object.projectGitopsInfo.map((e: any) => ProjectGitOpsInfo.fromJSON(e))
: [],
};
@@ -1013,10 +1023,8 @@ export const ListProjectGitOpsInfoResponse = {
toJSON(message: ListProjectGitOpsInfoResponse): unknown {
const obj: any = {};
- if (message.projectGitopsInfo) {
- obj.projectGitopsInfo = message.projectGitopsInfo.map((e) => e ? ProjectGitOpsInfo.toJSON(e) : undefined);
- } else {
- obj.projectGitopsInfo = [];
+ if (message.projectGitopsInfo?.length) {
+ obj.projectGitopsInfo = message.projectGitopsInfo.map((e) => ProjectGitOpsInfo.toJSON(e));
}
return obj;
},
@@ -1024,7 +1032,6 @@ export const ListProjectGitOpsInfoResponse = {
create(base?: DeepPartial<ListProjectGitOpsInfoResponse>): ListProjectGitOpsInfoResponse {
return ListProjectGitOpsInfoResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListProjectGitOpsInfoResponse>): ListProjectGitOpsInfoResponse {
const message = createBaseListProjectGitOpsInfoResponse();
message.projectGitopsInfo = object.projectGitopsInfo?.map((e) => ProjectGitOpsInfo.fromPartial(e)) || [];
@@ -1129,32 +1136,45 @@ export const ExternalVersionControl = {
fromJSON(object: any): ExternalVersionControl {
return {
- name: isSet(object.name) ? String(object.name) : "",
- title: isSet(object.title) ? String(object.title) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
type: isSet(object.type) ? externalVersionControl_TypeFromJSON(object.type) : 0,
- url: isSet(object.url) ? String(object.url) : "",
- apiUrl: isSet(object.apiUrl) ? String(object.apiUrl) : "",
- applicationId: isSet(object.applicationId) ? String(object.applicationId) : "",
- secret: isSet(object.secret) ? String(object.secret) : "",
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ apiUrl: isSet(object.apiUrl) ? globalThis.String(object.apiUrl) : "",
+ applicationId: isSet(object.applicationId) ? globalThis.String(object.applicationId) : "",
+ secret: isSet(object.secret) ? globalThis.String(object.secret) : "",
};
},
toJSON(message: ExternalVersionControl): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.title !== undefined && (obj.title = message.title);
- message.type !== undefined && (obj.type = externalVersionControl_TypeToJSON(message.type));
- message.url !== undefined && (obj.url = message.url);
- message.apiUrl !== undefined && (obj.apiUrl = message.apiUrl);
- message.applicationId !== undefined && (obj.applicationId = message.applicationId);
- message.secret !== undefined && (obj.secret = message.secret);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.type !== 0) {
+ obj.type = externalVersionControl_TypeToJSON(message.type);
+ }
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.apiUrl !== "") {
+ obj.apiUrl = message.apiUrl;
+ }
+ if (message.applicationId !== "") {
+ obj.applicationId = message.applicationId;
+ }
+ if (message.secret !== "") {
+ obj.secret = message.secret;
+ }
return obj;
},
create(base?: DeepPartial<ExternalVersionControl>): ExternalVersionControl {
return ExternalVersionControl.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExternalVersionControl>): ExternalVersionControl {
const message = createBaseExternalVersionControl();
message.name = object.name ?? "";
@@ -1372,50 +1392,81 @@ export const ProjectGitOpsInfo = {
fromJSON(object: any): ProjectGitOpsInfo {
return {
- name: isSet(object.name) ? String(object.name) : "",
- vcsUid: isSet(object.vcsUid) ? String(object.vcsUid) : "",
- title: isSet(object.title) ? String(object.title) : "",
- fullPath: isSet(object.fullPath) ? String(object.fullPath) : "",
- webUrl: isSet(object.webUrl) ? String(object.webUrl) : "",
- branchFilter: isSet(object.branchFilter) ? String(object.branchFilter) : "",
- baseDirectory: isSet(object.baseDirectory) ? String(object.baseDirectory) : "",
- filePathTemplate: isSet(object.filePathTemplate) ? String(object.filePathTemplate) : "",
- schemaPathTemplate: isSet(object.schemaPathTemplate) ? String(object.schemaPathTemplate) : "",
- sheetPathTemplate: isSet(object.sheetPathTemplate) ? String(object.sheetPathTemplate) : "",
- externalId: isSet(object.externalId) ? String(object.externalId) : "",
- enableSqlReviewCi: isSet(object.enableSqlReviewCi) ? Boolean(object.enableSqlReviewCi) : false,
- webhookEndpointId: isSet(object.webhookEndpointId) ? String(object.webhookEndpointId) : "",
- accessToken: isSet(object.accessToken) ? String(object.accessToken) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ vcsUid: isSet(object.vcsUid) ? globalThis.String(object.vcsUid) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ fullPath: isSet(object.fullPath) ? globalThis.String(object.fullPath) : "",
+ webUrl: isSet(object.webUrl) ? globalThis.String(object.webUrl) : "",
+ branchFilter: isSet(object.branchFilter) ? globalThis.String(object.branchFilter) : "",
+ baseDirectory: isSet(object.baseDirectory) ? globalThis.String(object.baseDirectory) : "",
+ filePathTemplate: isSet(object.filePathTemplate) ? globalThis.String(object.filePathTemplate) : "",
+ schemaPathTemplate: isSet(object.schemaPathTemplate) ? globalThis.String(object.schemaPathTemplate) : "",
+ sheetPathTemplate: isSet(object.sheetPathTemplate) ? globalThis.String(object.sheetPathTemplate) : "",
+ externalId: isSet(object.externalId) ? globalThis.String(object.externalId) : "",
+ enableSqlReviewCi: isSet(object.enableSqlReviewCi) ? globalThis.Boolean(object.enableSqlReviewCi) : false,
+ webhookEndpointId: isSet(object.webhookEndpointId) ? globalThis.String(object.webhookEndpointId) : "",
+ accessToken: isSet(object.accessToken) ? globalThis.String(object.accessToken) : "",
expiresTime: isSet(object.expiresTime) ? fromJsonTimestamp(object.expiresTime) : undefined,
- refreshToken: isSet(object.refreshToken) ? String(object.refreshToken) : "",
+ refreshToken: isSet(object.refreshToken) ? globalThis.String(object.refreshToken) : "",
};
},
toJSON(message: ProjectGitOpsInfo): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.vcsUid !== undefined && (obj.vcsUid = message.vcsUid);
- message.title !== undefined && (obj.title = message.title);
- message.fullPath !== undefined && (obj.fullPath = message.fullPath);
- message.webUrl !== undefined && (obj.webUrl = message.webUrl);
- message.branchFilter !== undefined && (obj.branchFilter = message.branchFilter);
- message.baseDirectory !== undefined && (obj.baseDirectory = message.baseDirectory);
- message.filePathTemplate !== undefined && (obj.filePathTemplate = message.filePathTemplate);
- message.schemaPathTemplate !== undefined && (obj.schemaPathTemplate = message.schemaPathTemplate);
- message.sheetPathTemplate !== undefined && (obj.sheetPathTemplate = message.sheetPathTemplate);
- message.externalId !== undefined && (obj.externalId = message.externalId);
- message.enableSqlReviewCi !== undefined && (obj.enableSqlReviewCi = message.enableSqlReviewCi);
- message.webhookEndpointId !== undefined && (obj.webhookEndpointId = message.webhookEndpointId);
- message.accessToken !== undefined && (obj.accessToken = message.accessToken);
- message.expiresTime !== undefined && (obj.expiresTime = message.expiresTime.toISOString());
- message.refreshToken !== undefined && (obj.refreshToken = message.refreshToken);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.vcsUid !== "") {
+ obj.vcsUid = message.vcsUid;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.fullPath !== "") {
+ obj.fullPath = message.fullPath;
+ }
+ if (message.webUrl !== "") {
+ obj.webUrl = message.webUrl;
+ }
+ if (message.branchFilter !== "") {
+ obj.branchFilter = message.branchFilter;
+ }
+ if (message.baseDirectory !== "") {
+ obj.baseDirectory = message.baseDirectory;
+ }
+ if (message.filePathTemplate !== "") {
+ obj.filePathTemplate = message.filePathTemplate;
+ }
+ if (message.schemaPathTemplate !== "") {
+ obj.schemaPathTemplate = message.schemaPathTemplate;
+ }
+ if (message.sheetPathTemplate !== "") {
+ obj.sheetPathTemplate = message.sheetPathTemplate;
+ }
+ if (message.externalId !== "") {
+ obj.externalId = message.externalId;
+ }
+ if (message.enableSqlReviewCi === true) {
+ obj.enableSqlReviewCi = message.enableSqlReviewCi;
+ }
+ if (message.webhookEndpointId !== "") {
+ obj.webhookEndpointId = message.webhookEndpointId;
+ }
+ if (message.accessToken !== "") {
+ obj.accessToken = message.accessToken;
+ }
+ if (message.expiresTime !== undefined) {
+ obj.expiresTime = message.expiresTime.toISOString();
+ }
+ if (message.refreshToken !== "") {
+ obj.refreshToken = message.refreshToken;
+ }
return obj;
},
create(base?: DeepPartial<ProjectGitOpsInfo>): ProjectGitOpsInfo {
return ProjectGitOpsInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ProjectGitOpsInfo>): ProjectGitOpsInfo {
const message = createBaseProjectGitOpsInfo();
message.name = object.name ?? "";
@@ -1479,15 +1530,15 @@ export const ExchangeTokenRequest = {
toJSON(message: ExchangeTokenRequest): unknown {
const obj: any = {};
- message.exchangeToken !== undefined &&
- (obj.exchangeToken = message.exchangeToken ? ExchangeToken.toJSON(message.exchangeToken) : undefined);
+ if (message.exchangeToken !== undefined) {
+ obj.exchangeToken = ExchangeToken.toJSON(message.exchangeToken);
+ }
return obj;
},
create(base?: DeepPartial<ExchangeTokenRequest>): ExchangeTokenRequest {
return ExchangeTokenRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExchangeTokenRequest>): ExchangeTokenRequest {
const message = createBaseExchangeTokenRequest();
message.exchangeToken = (object.exchangeToken !== undefined && object.exchangeToken !== null)
@@ -1584,30 +1635,41 @@ export const ExchangeToken = {
fromJSON(object: any): ExchangeToken {
return {
- name: isSet(object.name) ? String(object.name) : "",
- code: isSet(object.code) ? String(object.code) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ code: isSet(object.code) ? globalThis.String(object.code) : "",
type: isSet(object.type) ? externalVersionControl_TypeFromJSON(object.type) : 0,
- instanceUrl: isSet(object.instanceUrl) ? String(object.instanceUrl) : "",
- clientId: isSet(object.clientId) ? String(object.clientId) : "",
- clientSecret: isSet(object.clientSecret) ? String(object.clientSecret) : "",
+ instanceUrl: isSet(object.instanceUrl) ? globalThis.String(object.instanceUrl) : "",
+ clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
+ clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
};
},
toJSON(message: ExchangeToken): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.code !== undefined && (obj.code = message.code);
- message.type !== undefined && (obj.type = externalVersionControl_TypeToJSON(message.type));
- message.instanceUrl !== undefined && (obj.instanceUrl = message.instanceUrl);
- message.clientId !== undefined && (obj.clientId = message.clientId);
- message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.code !== "") {
+ obj.code = message.code;
+ }
+ if (message.type !== 0) {
+ obj.type = externalVersionControl_TypeToJSON(message.type);
+ }
+ if (message.instanceUrl !== "") {
+ obj.instanceUrl = message.instanceUrl;
+ }
+ if (message.clientId !== "") {
+ obj.clientId = message.clientId;
+ }
+ if (message.clientSecret !== "") {
+ obj.clientSecret = message.clientSecret;
+ }
return obj;
},
create(base?: DeepPartial<ExchangeToken>): ExchangeToken {
return ExchangeToken.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExchangeToken>): ExchangeToken {
const message = createBaseExchangeToken();
message.name = object.name ?? "";
@@ -1677,24 +1739,29 @@ export const OAuthToken = {
fromJSON(object: any): OAuthToken {
return {
- accessToken: isSet(object.accessToken) ? String(object.accessToken) : "",
- refreshToken: isSet(object.refreshToken) ? String(object.refreshToken) : "",
+ accessToken: isSet(object.accessToken) ? globalThis.String(object.accessToken) : "",
+ refreshToken: isSet(object.refreshToken) ? globalThis.String(object.refreshToken) : "",
expiresTime: isSet(object.expiresTime) ? fromJsonTimestamp(object.expiresTime) : undefined,
};
},
toJSON(message: OAuthToken): unknown {
const obj: any = {};
- message.accessToken !== undefined && (obj.accessToken = message.accessToken);
- message.refreshToken !== undefined && (obj.refreshToken = message.refreshToken);
- message.expiresTime !== undefined && (obj.expiresTime = message.expiresTime.toISOString());
+ if (message.accessToken !== "") {
+ obj.accessToken = message.accessToken;
+ }
+ if (message.refreshToken !== "") {
+ obj.refreshToken = message.refreshToken;
+ }
+ if (message.expiresTime !== undefined) {
+ obj.expiresTime = message.expiresTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<OAuthToken>): OAuthToken {
return OAuthToken.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OAuthToken>): OAuthToken {
const message = createBaseOAuthToken();
message.accessToken = object.accessToken ?? "";
@@ -2323,7 +2390,7 @@ export const ExternalVersionControlServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -2337,14 +2404,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/iam_policy.ts b/frontend/src/types/proto/v1/iam_policy.ts
index 37b97cf5dc..6f02f6bcdb 100644
--- a/frontend/src/types/proto/v1/iam_policy.ts
+++ b/frontend/src/types/proto/v1/iam_policy.ts
@@ -70,15 +70,15 @@ export const IamPolicy = {
},
fromJSON(object: any): IamPolicy {
- return { bindings: Array.isArray(object?.bindings) ? object.bindings.map((e: any) => Binding.fromJSON(e)) : [] };
+ return {
+ bindings: globalThis.Array.isArray(object?.bindings) ? object.bindings.map((e: any) => Binding.fromJSON(e)) : [],
+ };
},
toJSON(message: IamPolicy): unknown {
const obj: any = {};
- if (message.bindings) {
- obj.bindings = message.bindings.map((e) => e ? Binding.toJSON(e) : undefined);
- } else {
- obj.bindings = [];
+ if (message.bindings?.length) {
+ obj.bindings = message.bindings.map((e) => Binding.toJSON(e));
}
return obj;
},
@@ -86,7 +86,6 @@ export const IamPolicy = {
create(base?: DeepPartial<IamPolicy>): IamPolicy {
return IamPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IamPolicy>): IamPolicy {
const message = createBaseIamPolicy();
message.bindings = object.bindings?.map((e) => Binding.fromPartial(e)) || [];
@@ -161,8 +160,8 @@ export const Binding = {
fromJSON(object: any): Binding {
return {
- role: isSet(object.role) ? String(object.role) : "",
- members: Array.isArray(object?.members) ? object.members.map((e: any) => String(e)) : [],
+ role: isSet(object.role) ? globalThis.String(object.role) : "",
+ members: globalThis.Array.isArray(object?.members) ? object.members.map((e: any) => globalThis.String(e)) : [],
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
parsedExpr: isSet(object.parsedExpr) ? ParsedExpr.fromJSON(object.parsedExpr) : undefined,
};
@@ -170,22 +169,24 @@ export const Binding = {
toJSON(message: Binding): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role);
- if (message.members) {
- obj.members = message.members.map((e) => e);
- } else {
- obj.members = [];
+ if (message.role !== "") {
+ obj.role = message.role;
+ }
+ if (message.members?.length) {
+ obj.members = message.members;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
+ if (message.parsedExpr !== undefined) {
+ obj.parsedExpr = ParsedExpr.toJSON(message.parsedExpr);
}
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
- message.parsedExpr !== undefined &&
- (obj.parsedExpr = message.parsedExpr ? ParsedExpr.toJSON(message.parsedExpr) : undefined);
return obj;
},
create(base?: DeepPartial<Binding>): Binding {
return Binding.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Binding>): Binding {
const message = createBaseBinding();
message.role = object.role ?? "";
@@ -203,7 +204,7 @@ export const Binding = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/idp_service.ts b/frontend/src/types/proto/v1/idp_service.ts
index 5fea977e88..fb88b5db02 100644
--- a/frontend/src/types/proto/v1/idp_service.ts
+++ b/frontend/src/types/proto/v1/idp_service.ts
@@ -333,19 +333,20 @@ export const GetIdentityProviderRequest = {
},
fromJSON(object: any): GetIdentityProviderRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetIdentityProviderRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetIdentityProviderRequest>): GetIdentityProviderRequest {
return GetIdentityProviderRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetIdentityProviderRequest>): GetIdentityProviderRequest {
const message = createBaseGetIdentityProviderRequest();
message.name = object.name ?? "";
@@ -410,24 +411,29 @@ export const ListIdentityProvidersRequest = {
fromJSON(object: any): ListIdentityProvidersRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? Boolean(object.showDeleted) : false,
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
};
},
toJSON(message: ListIdentityProvidersRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted === true) {
+ obj.showDeleted = message.showDeleted;
+ }
return obj;
},
create(base?: DeepPartial<ListIdentityProvidersRequest>): ListIdentityProvidersRequest {
return ListIdentityProvidersRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListIdentityProvidersRequest>): ListIdentityProvidersRequest {
const message = createBaseListIdentityProvidersRequest();
message.pageSize = object.pageSize ?? 0;
@@ -484,28 +490,27 @@ export const ListIdentityProvidersResponse = {
fromJSON(object: any): ListIdentityProvidersResponse {
return {
- identityProviders: Array.isArray(object?.identityProviders)
+ identityProviders: globalThis.Array.isArray(object?.identityProviders)
? object.identityProviders.map((e: any) => IdentityProvider.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListIdentityProvidersResponse): unknown {
const obj: any = {};
- if (message.identityProviders) {
- obj.identityProviders = message.identityProviders.map((e) => e ? IdentityProvider.toJSON(e) : undefined);
- } else {
- obj.identityProviders = [];
+ if (message.identityProviders?.length) {
+ obj.identityProviders = message.identityProviders.map((e) => IdentityProvider.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListIdentityProvidersResponse>): ListIdentityProvidersResponse {
return ListIdentityProvidersResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListIdentityProvidersResponse>): ListIdentityProvidersResponse {
const message = createBaseListIdentityProvidersResponse();
message.identityProviders = object.identityProviders?.map((e) => IdentityProvider.fromPartial(e)) || [];
@@ -562,22 +567,24 @@ export const CreateIdentityProviderRequest = {
fromJSON(object: any): CreateIdentityProviderRequest {
return {
identityProvider: isSet(object.identityProvider) ? IdentityProvider.fromJSON(object.identityProvider) : undefined,
- identityProviderId: isSet(object.identityProviderId) ? String(object.identityProviderId) : "",
+ identityProviderId: isSet(object.identityProviderId) ? globalThis.String(object.identityProviderId) : "",
};
},
toJSON(message: CreateIdentityProviderRequest): unknown {
const obj: any = {};
- message.identityProvider !== undefined &&
- (obj.identityProvider = message.identityProvider ? IdentityProvider.toJSON(message.identityProvider) : undefined);
- message.identityProviderId !== undefined && (obj.identityProviderId = message.identityProviderId);
+ if (message.identityProvider !== undefined) {
+ obj.identityProvider = IdentityProvider.toJSON(message.identityProvider);
+ }
+ if (message.identityProviderId !== "") {
+ obj.identityProviderId = message.identityProviderId;
+ }
return obj;
},
create(base?: DeepPartial<CreateIdentityProviderRequest>): CreateIdentityProviderRequest {
return CreateIdentityProviderRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateIdentityProviderRequest>): CreateIdentityProviderRequest {
const message = createBaseCreateIdentityProviderRequest();
message.identityProvider = (object.identityProvider !== undefined && object.identityProvider !== null)
@@ -642,16 +649,18 @@ export const UpdateIdentityProviderRequest = {
toJSON(message: UpdateIdentityProviderRequest): unknown {
const obj: any = {};
- message.identityProvider !== undefined &&
- (obj.identityProvider = message.identityProvider ? IdentityProvider.toJSON(message.identityProvider) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.identityProvider !== undefined) {
+ obj.identityProvider = IdentityProvider.toJSON(message.identityProvider);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateIdentityProviderRequest>): UpdateIdentityProviderRequest {
return UpdateIdentityProviderRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateIdentityProviderRequest>): UpdateIdentityProviderRequest {
const message = createBaseUpdateIdentityProviderRequest();
message.identityProvider = (object.identityProvider !== undefined && object.identityProvider !== null)
@@ -698,19 +707,20 @@ export const DeleteIdentityProviderRequest = {
},
fromJSON(object: any): DeleteIdentityProviderRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteIdentityProviderRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteIdentityProviderRequest>): DeleteIdentityProviderRequest {
return DeleteIdentityProviderRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteIdentityProviderRequest>): DeleteIdentityProviderRequest {
const message = createBaseDeleteIdentityProviderRequest();
message.name = object.name ?? "";
@@ -754,19 +764,20 @@ export const UndeleteIdentityProviderRequest = {
},
fromJSON(object: any): UndeleteIdentityProviderRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UndeleteIdentityProviderRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UndeleteIdentityProviderRequest>): UndeleteIdentityProviderRequest {
return UndeleteIdentityProviderRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UndeleteIdentityProviderRequest>): UndeleteIdentityProviderRequest {
const message = createBaseUndeleteIdentityProviderRequest();
message.name = object.name ?? "";
@@ -830,18 +841,18 @@ export const TestIdentityProviderRequest = {
toJSON(message: TestIdentityProviderRequest): unknown {
const obj: any = {};
- message.identityProvider !== undefined &&
- (obj.identityProvider = message.identityProvider ? IdentityProvider.toJSON(message.identityProvider) : undefined);
- message.oauth2Context !== undefined && (obj.oauth2Context = message.oauth2Context
- ? OAuth2IdentityProviderTestRequestContext.toJSON(message.oauth2Context)
- : undefined);
+ if (message.identityProvider !== undefined) {
+ obj.identityProvider = IdentityProvider.toJSON(message.identityProvider);
+ }
+ if (message.oauth2Context !== undefined) {
+ obj.oauth2Context = OAuth2IdentityProviderTestRequestContext.toJSON(message.oauth2Context);
+ }
return obj;
},
create(base?: DeepPartial<TestIdentityProviderRequest>): TestIdentityProviderRequest {
return TestIdentityProviderRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TestIdentityProviderRequest>): TestIdentityProviderRequest {
const message = createBaseTestIdentityProviderRequest();
message.identityProvider = (object.identityProvider !== undefined && object.identityProvider !== null)
@@ -890,19 +901,20 @@ export const OAuth2IdentityProviderTestRequestContext = {
},
fromJSON(object: any): OAuth2IdentityProviderTestRequestContext {
- return { code: isSet(object.code) ? String(object.code) : "" };
+ return { code: isSet(object.code) ? globalThis.String(object.code) : "" };
},
toJSON(message: OAuth2IdentityProviderTestRequestContext): unknown {
const obj: any = {};
- message.code !== undefined && (obj.code = message.code);
+ if (message.code !== "") {
+ obj.code = message.code;
+ }
return obj;
},
create(base?: DeepPartial<OAuth2IdentityProviderTestRequestContext>): OAuth2IdentityProviderTestRequestContext {
return OAuth2IdentityProviderTestRequestContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OAuth2IdentityProviderTestRequestContext>): OAuth2IdentityProviderTestRequestContext {
const message = createBaseOAuth2IdentityProviderTestRequestContext();
message.code = object.code ?? "";
@@ -947,7 +959,6 @@ export const TestIdentityProviderResponse = {
create(base?: DeepPartial<TestIdentityProviderResponse>): TestIdentityProviderResponse {
return TestIdentityProviderResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<TestIdentityProviderResponse>): TestIdentityProviderResponse {
const message = createBaseTestIdentityProviderResponse();
return message;
@@ -1051,11 +1062,11 @@ export const IdentityProvider = {
fromJSON(object: any): IdentityProvider {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
state: isSet(object.state) ? stateFromJSON(object.state) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- domain: isSet(object.domain) ? String(object.domain) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
type: isSet(object.type) ? identityProviderTypeFromJSON(object.type) : 0,
config: isSet(object.config) ? IdentityProviderConfig.fromJSON(object.config) : undefined,
};
@@ -1063,21 +1074,33 @@ export const IdentityProvider = {
toJSON(message: IdentityProvider): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.state !== undefined && (obj.state = stateToJSON(message.state));
- message.title !== undefined && (obj.title = message.title);
- message.domain !== undefined && (obj.domain = message.domain);
- message.type !== undefined && (obj.type = identityProviderTypeToJSON(message.type));
- message.config !== undefined &&
- (obj.config = message.config ? IdentityProviderConfig.toJSON(message.config) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.state !== 0) {
+ obj.state = stateToJSON(message.state);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.domain !== "") {
+ obj.domain = message.domain;
+ }
+ if (message.type !== 0) {
+ obj.type = identityProviderTypeToJSON(message.type);
+ }
+ if (message.config !== undefined) {
+ obj.config = IdentityProviderConfig.toJSON(message.config);
+ }
return obj;
},
create(base?: DeepPartial<IdentityProvider>): IdentityProvider {
return IdentityProvider.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IdentityProvider>): IdentityProvider {
const message = createBaseIdentityProvider();
message.name = object.name ?? "";
@@ -1158,19 +1181,21 @@ export const IdentityProviderConfig = {
toJSON(message: IdentityProviderConfig): unknown {
const obj: any = {};
- message.oauth2Config !== undefined &&
- (obj.oauth2Config = message.oauth2Config ? OAuth2IdentityProviderConfig.toJSON(message.oauth2Config) : undefined);
- message.oidcConfig !== undefined &&
- (obj.oidcConfig = message.oidcConfig ? OIDCIdentityProviderConfig.toJSON(message.oidcConfig) : undefined);
- message.ldapConfig !== undefined &&
- (obj.ldapConfig = message.ldapConfig ? LDAPIdentityProviderConfig.toJSON(message.ldapConfig) : undefined);
+ if (message.oauth2Config !== undefined) {
+ obj.oauth2Config = OAuth2IdentityProviderConfig.toJSON(message.oauth2Config);
+ }
+ if (message.oidcConfig !== undefined) {
+ obj.oidcConfig = OIDCIdentityProviderConfig.toJSON(message.oidcConfig);
+ }
+ if (message.ldapConfig !== undefined) {
+ obj.ldapConfig = LDAPIdentityProviderConfig.toJSON(message.ldapConfig);
+ }
return obj;
},
create(base?: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {
return IdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {
const message = createBaseIdentityProviderConfig();
message.oauth2Config = (object.oauth2Config !== undefined && object.oauth2Config !== null)
@@ -1313,41 +1338,53 @@ export const OAuth2IdentityProviderConfig = {
fromJSON(object: any): OAuth2IdentityProviderConfig {
return {
- authUrl: isSet(object.authUrl) ? String(object.authUrl) : "",
- tokenUrl: isSet(object.tokenUrl) ? String(object.tokenUrl) : "",
- userInfoUrl: isSet(object.userInfoUrl) ? String(object.userInfoUrl) : "",
- clientId: isSet(object.clientId) ? String(object.clientId) : "",
- clientSecret: isSet(object.clientSecret) ? String(object.clientSecret) : "",
- scopes: Array.isArray(object?.scopes) ? object.scopes.map((e: any) => String(e)) : [],
+ authUrl: isSet(object.authUrl) ? globalThis.String(object.authUrl) : "",
+ tokenUrl: isSet(object.tokenUrl) ? globalThis.String(object.tokenUrl) : "",
+ userInfoUrl: isSet(object.userInfoUrl) ? globalThis.String(object.userInfoUrl) : "",
+ clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
+ clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
+ scopes: globalThis.Array.isArray(object?.scopes) ? object.scopes.map((e: any) => globalThis.String(e)) : [],
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
- skipTlsVerify: isSet(object.skipTlsVerify) ? Boolean(object.skipTlsVerify) : false,
+ skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
authStyle: isSet(object.authStyle) ? oAuth2AuthStyleFromJSON(object.authStyle) : 0,
};
},
toJSON(message: OAuth2IdentityProviderConfig): unknown {
const obj: any = {};
- message.authUrl !== undefined && (obj.authUrl = message.authUrl);
- message.tokenUrl !== undefined && (obj.tokenUrl = message.tokenUrl);
- message.userInfoUrl !== undefined && (obj.userInfoUrl = message.userInfoUrl);
- message.clientId !== undefined && (obj.clientId = message.clientId);
- message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);
- if (message.scopes) {
- obj.scopes = message.scopes.map((e) => e);
- } else {
- obj.scopes = [];
- }
- message.fieldMapping !== undefined &&
- (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);
- message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);
- message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));
+ if (message.authUrl !== "") {
+ obj.authUrl = message.authUrl;
+ }
+ if (message.tokenUrl !== "") {
+ obj.tokenUrl = message.tokenUrl;
+ }
+ if (message.userInfoUrl !== "") {
+ obj.userInfoUrl = message.userInfoUrl;
+ }
+ if (message.clientId !== "") {
+ obj.clientId = message.clientId;
+ }
+ if (message.clientSecret !== "") {
+ obj.clientSecret = message.clientSecret;
+ }
+ if (message.scopes?.length) {
+ obj.scopes = message.scopes;
+ }
+ if (message.fieldMapping !== undefined) {
+ obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
+ }
+ if (message.skipTlsVerify === true) {
+ obj.skipTlsVerify = message.skipTlsVerify;
+ }
+ if (message.authStyle !== 0) {
+ obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);
+ }
return obj;
},
create(base?: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {
return OAuth2IdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {
const message = createBaseOAuth2IdentityProviderConfig();
message.authUrl = object.authUrl ?? "";
@@ -1470,37 +1507,45 @@ export const OIDCIdentityProviderConfig = {
fromJSON(object: any): OIDCIdentityProviderConfig {
return {
- issuer: isSet(object.issuer) ? String(object.issuer) : "",
- clientId: isSet(object.clientId) ? String(object.clientId) : "",
- clientSecret: isSet(object.clientSecret) ? String(object.clientSecret) : "",
- scopes: Array.isArray(object?.scopes) ? object.scopes.map((e: any) => String(e)) : [],
+ issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
+ clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
+ clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
+ scopes: globalThis.Array.isArray(object?.scopes) ? object.scopes.map((e: any) => globalThis.String(e)) : [],
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
- skipTlsVerify: isSet(object.skipTlsVerify) ? Boolean(object.skipTlsVerify) : false,
+ skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
authStyle: isSet(object.authStyle) ? oAuth2AuthStyleFromJSON(object.authStyle) : 0,
};
},
toJSON(message: OIDCIdentityProviderConfig): unknown {
const obj: any = {};
- message.issuer !== undefined && (obj.issuer = message.issuer);
- message.clientId !== undefined && (obj.clientId = message.clientId);
- message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);
- if (message.scopes) {
- obj.scopes = message.scopes.map((e) => e);
- } else {
- obj.scopes = [];
- }
- message.fieldMapping !== undefined &&
- (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);
- message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);
- message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));
+ if (message.issuer !== "") {
+ obj.issuer = message.issuer;
+ }
+ if (message.clientId !== "") {
+ obj.clientId = message.clientId;
+ }
+ if (message.clientSecret !== "") {
+ obj.clientSecret = message.clientSecret;
+ }
+ if (message.scopes?.length) {
+ obj.scopes = message.scopes;
+ }
+ if (message.fieldMapping !== undefined) {
+ obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
+ }
+ if (message.skipTlsVerify === true) {
+ obj.skipTlsVerify = message.skipTlsVerify;
+ }
+ if (message.authStyle !== 0) {
+ obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);
+ }
return obj;
},
create(base?: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {
return OIDCIdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {
const message = createBaseOIDCIdentityProviderConfig();
message.issuer = object.issuer ?? "";
@@ -1643,37 +1688,53 @@ export const LDAPIdentityProviderConfig = {
fromJSON(object: any): LDAPIdentityProviderConfig {
return {
- host: isSet(object.host) ? String(object.host) : "",
- port: isSet(object.port) ? Number(object.port) : 0,
- skipTlsVerify: isSet(object.skipTlsVerify) ? Boolean(object.skipTlsVerify) : false,
- bindDn: isSet(object.bindDn) ? String(object.bindDn) : "",
- bindPassword: isSet(object.bindPassword) ? String(object.bindPassword) : "",
- baseDn: isSet(object.baseDn) ? String(object.baseDn) : "",
- userFilter: isSet(object.userFilter) ? String(object.userFilter) : "",
- securityProtocol: isSet(object.securityProtocol) ? String(object.securityProtocol) : "",
+ host: isSet(object.host) ? globalThis.String(object.host) : "",
+ port: isSet(object.port) ? globalThis.Number(object.port) : 0,
+ skipTlsVerify: isSet(object.skipTlsVerify) ? globalThis.Boolean(object.skipTlsVerify) : false,
+ bindDn: isSet(object.bindDn) ? globalThis.String(object.bindDn) : "",
+ bindPassword: isSet(object.bindPassword) ? globalThis.String(object.bindPassword) : "",
+ baseDn: isSet(object.baseDn) ? globalThis.String(object.baseDn) : "",
+ userFilter: isSet(object.userFilter) ? globalThis.String(object.userFilter) : "",
+ securityProtocol: isSet(object.securityProtocol) ? globalThis.String(object.securityProtocol) : "",
fieldMapping: isSet(object.fieldMapping) ? FieldMapping.fromJSON(object.fieldMapping) : undefined,
};
},
toJSON(message: LDAPIdentityProviderConfig): unknown {
const obj: any = {};
- message.host !== undefined && (obj.host = message.host);
- message.port !== undefined && (obj.port = Math.round(message.port));
- message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);
- message.bindDn !== undefined && (obj.bindDn = message.bindDn);
- message.bindPassword !== undefined && (obj.bindPassword = message.bindPassword);
- message.baseDn !== undefined && (obj.baseDn = message.baseDn);
- message.userFilter !== undefined && (obj.userFilter = message.userFilter);
- message.securityProtocol !== undefined && (obj.securityProtocol = message.securityProtocol);
- message.fieldMapping !== undefined &&
- (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);
+ if (message.host !== "") {
+ obj.host = message.host;
+ }
+ if (message.port !== 0) {
+ obj.port = Math.round(message.port);
+ }
+ if (message.skipTlsVerify === true) {
+ obj.skipTlsVerify = message.skipTlsVerify;
+ }
+ if (message.bindDn !== "") {
+ obj.bindDn = message.bindDn;
+ }
+ if (message.bindPassword !== "") {
+ obj.bindPassword = message.bindPassword;
+ }
+ if (message.baseDn !== "") {
+ obj.baseDn = message.baseDn;
+ }
+ if (message.userFilter !== "") {
+ obj.userFilter = message.userFilter;
+ }
+ if (message.securityProtocol !== "") {
+ obj.securityProtocol = message.securityProtocol;
+ }
+ if (message.fieldMapping !== undefined) {
+ obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);
+ }
return obj;
},
create(base?: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {
return LDAPIdentityProviderConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {
const message = createBaseLDAPIdentityProviderConfig();
message.host = object.host ?? "";
@@ -1758,26 +1819,33 @@ export const FieldMapping = {
fromJSON(object: any): FieldMapping {
return {
- identifier: isSet(object.identifier) ? String(object.identifier) : "",
- displayName: isSet(object.displayName) ? String(object.displayName) : "",
- email: isSet(object.email) ? String(object.email) : "",
- phone: isSet(object.phone) ? String(object.phone) : "",
+ identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "",
+ displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "",
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
+ phone: isSet(object.phone) ? globalThis.String(object.phone) : "",
};
},
toJSON(message: FieldMapping): unknown {
const obj: any = {};
- message.identifier !== undefined && (obj.identifier = message.identifier);
- message.displayName !== undefined && (obj.displayName = message.displayName);
- message.email !== undefined && (obj.email = message.email);
- message.phone !== undefined && (obj.phone = message.phone);
+ if (message.identifier !== "") {
+ obj.identifier = message.identifier;
+ }
+ if (message.displayName !== "") {
+ obj.displayName = message.displayName;
+ }
+ if (message.email !== "") {
+ obj.email = message.email;
+ }
+ if (message.phone !== "") {
+ obj.phone = message.phone;
+ }
return obj;
},
create(base?: DeepPartial<FieldMapping>): FieldMapping {
return FieldMapping.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FieldMapping>): FieldMapping {
const message = createBaseFieldMapping();
message.identifier = object.identifier ?? "";
@@ -2077,7 +2145,7 @@ export const IdentityProviderServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/inbox_service.ts b/frontend/src/types/proto/v1/inbox_service.ts
index 03192dd55f..b42e2b4a98 100644
--- a/frontend/src/types/proto/v1/inbox_service.ts
+++ b/frontend/src/types/proto/v1/inbox_service.ts
@@ -161,24 +161,29 @@ export const ListInboxRequest = {
fromJSON(object: any): ListInboxRequest {
return {
- filter: isSet(object.filter) ? String(object.filter) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListInboxRequest): unknown {
const obj: any = {};
- message.filter !== undefined && (obj.filter = message.filter);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListInboxRequest>): ListInboxRequest {
return ListInboxRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListInboxRequest>): ListInboxRequest {
const message = createBaseListInboxRequest();
message.filter = object.filter ?? "";
@@ -235,28 +240,27 @@ export const ListInboxResponse = {
fromJSON(object: any): ListInboxResponse {
return {
- inboxMessages: Array.isArray(object?.inboxMessages)
+ inboxMessages: globalThis.Array.isArray(object?.inboxMessages)
? object.inboxMessages.map((e: any) => InboxMessage.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListInboxResponse): unknown {
const obj: any = {};
- if (message.inboxMessages) {
- obj.inboxMessages = message.inboxMessages.map((e) => e ? InboxMessage.toJSON(e) : undefined);
- } else {
- obj.inboxMessages = [];
+ if (message.inboxMessages?.length) {
+ obj.inboxMessages = message.inboxMessages.map((e) => InboxMessage.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListInboxResponse>): ListInboxResponse {
return ListInboxResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListInboxResponse>): ListInboxResponse {
const message = createBaseListInboxResponse();
message.inboxMessages = object.inboxMessages?.map((e) => InboxMessage.fromPartial(e)) || [];
@@ -302,7 +306,6 @@ export const GetInboxSummaryRequest = {
create(base?: DeepPartial<GetInboxSummaryRequest>): GetInboxSummaryRequest {
return GetInboxSummaryRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<GetInboxSummaryRequest>): GetInboxSummaryRequest {
const message = createBaseGetInboxSummaryRequest();
return message;
@@ -363,16 +366,18 @@ export const UpdateInboxRequest = {
toJSON(message: UpdateInboxRequest): unknown {
const obj: any = {};
- message.inboxMessage !== undefined &&
- (obj.inboxMessage = message.inboxMessage ? InboxMessage.toJSON(message.inboxMessage) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.inboxMessage !== undefined) {
+ obj.inboxMessage = InboxMessage.toJSON(message.inboxMessage);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateInboxRequest>): UpdateInboxRequest {
return UpdateInboxRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateInboxRequest>): UpdateInboxRequest {
const message = createBaseUpdateInboxRequest();
message.inboxMessage = (object.inboxMessage !== undefined && object.inboxMessage !== null)
@@ -450,8 +455,8 @@ export const InboxMessage = {
fromJSON(object: any): InboxMessage {
return {
- name: isSet(object.name) ? String(object.name) : "",
- activityUid: isSet(object.activityUid) ? String(object.activityUid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ activityUid: isSet(object.activityUid) ? globalThis.String(object.activityUid) : "",
status: isSet(object.status) ? inboxMessage_StatusFromJSON(object.status) : 0,
activity: isSet(object.activity) ? LogEntity.fromJSON(object.activity) : undefined,
};
@@ -459,18 +464,24 @@ export const InboxMessage = {
toJSON(message: InboxMessage): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.activityUid !== undefined && (obj.activityUid = message.activityUid);
- message.status !== undefined && (obj.status = inboxMessage_StatusToJSON(message.status));
- message.activity !== undefined &&
- (obj.activity = message.activity ? LogEntity.toJSON(message.activity) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.activityUid !== "") {
+ obj.activityUid = message.activityUid;
+ }
+ if (message.status !== 0) {
+ obj.status = inboxMessage_StatusToJSON(message.status);
+ }
+ if (message.activity !== undefined) {
+ obj.activity = LogEntity.toJSON(message.activity);
+ }
return obj;
},
create(base?: DeepPartial<InboxMessage>): InboxMessage {
return InboxMessage.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InboxMessage>): InboxMessage {
const message = createBaseInboxMessage();
message.name = object.name ?? "";
@@ -530,22 +541,25 @@ export const InboxSummary = {
fromJSON(object: any): InboxSummary {
return {
- unread: isSet(object.unread) ? Number(object.unread) : 0,
- unreadError: isSet(object.unreadError) ? Number(object.unreadError) : 0,
+ unread: isSet(object.unread) ? globalThis.Number(object.unread) : 0,
+ unreadError: isSet(object.unreadError) ? globalThis.Number(object.unreadError) : 0,
};
},
toJSON(message: InboxSummary): unknown {
const obj: any = {};
- message.unread !== undefined && (obj.unread = Math.round(message.unread));
- message.unreadError !== undefined && (obj.unreadError = Math.round(message.unreadError));
+ if (message.unread !== 0) {
+ obj.unread = Math.round(message.unread);
+ }
+ if (message.unreadError !== 0) {
+ obj.unreadError = Math.round(message.unreadError);
+ }
return obj;
},
create(base?: DeepPartial<InboxSummary>): InboxSummary {
return InboxSummary.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InboxSummary>): InboxSummary {
const message = createBaseInboxSummary();
message.unread = object.unread ?? 0;
@@ -684,7 +698,7 @@ export const InboxServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/instance_role_service.ts b/frontend/src/types/proto/v1/instance_role_service.ts
index e48c6279b0..d40aeeec51 100644
--- a/frontend/src/types/proto/v1/instance_role_service.ts
+++ b/frontend/src/types/proto/v1/instance_role_service.ts
@@ -156,19 +156,20 @@ export const GetInstanceRoleRequest = {
},
fromJSON(object: any): GetInstanceRoleRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetInstanceRoleRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetInstanceRoleRequest>): GetInstanceRoleRequest {
return GetInstanceRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetInstanceRoleRequest>): GetInstanceRoleRequest {
const message = createBaseGetInstanceRoleRequest();
message.name = object.name ?? "";
@@ -243,26 +244,33 @@ export const ListInstanceRolesRequest = {
fromJSON(object: any): ListInstanceRolesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- refresh: isSet(object.refresh) ? Boolean(object.refresh) : false,
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ refresh: isSet(object.refresh) ? globalThis.Boolean(object.refresh) : false,
};
},
toJSON(message: ListInstanceRolesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.refresh !== undefined && (obj.refresh = message.refresh);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.refresh === true) {
+ obj.refresh = message.refresh;
+ }
return obj;
},
create(base?: DeepPartial<ListInstanceRolesRequest>): ListInstanceRolesRequest {
return ListInstanceRolesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListInstanceRolesRequest>): ListInstanceRolesRequest {
const message = createBaseListInstanceRolesRequest();
message.parent = object.parent ?? "";
@@ -320,26 +328,25 @@ export const ListInstanceRolesResponse = {
fromJSON(object: any): ListInstanceRolesResponse {
return {
- roles: Array.isArray(object?.roles) ? object.roles.map((e: any) => InstanceRole.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e: any) => InstanceRole.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListInstanceRolesResponse): unknown {
const obj: any = {};
- if (message.roles) {
- obj.roles = message.roles.map((e) => e ? InstanceRole.toJSON(e) : undefined);
- } else {
- obj.roles = [];
+ if (message.roles?.length) {
+ obj.roles = message.roles.map((e) => InstanceRole.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListInstanceRolesResponse>): ListInstanceRolesResponse {
return ListInstanceRolesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListInstanceRolesResponse>): ListInstanceRolesResponse {
const message = createBaseListInstanceRolesResponse();
message.roles = object.roles?.map((e) => InstanceRole.fromPartial(e)) || [];
@@ -395,22 +402,25 @@ export const CreateInstanceRoleRequest = {
fromJSON(object: any): CreateInstanceRoleRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
role: isSet(object.role) ? InstanceRole.fromJSON(object.role) : undefined,
};
},
toJSON(message: CreateInstanceRoleRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.role !== undefined && (obj.role = message.role ? InstanceRole.toJSON(message.role) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.role !== undefined) {
+ obj.role = InstanceRole.toJSON(message.role);
+ }
return obj;
},
create(base?: DeepPartial<CreateInstanceRoleRequest>): CreateInstanceRoleRequest {
return CreateInstanceRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateInstanceRoleRequest>): CreateInstanceRoleRequest {
const message = createBaseCreateInstanceRoleRequest();
message.parent = object.parent ?? "";
@@ -475,15 +485,18 @@ export const UpdateInstanceRoleRequest = {
toJSON(message: UpdateInstanceRoleRequest): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role ? InstanceRole.toJSON(message.role) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.role !== undefined) {
+ obj.role = InstanceRole.toJSON(message.role);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateInstanceRoleRequest>): UpdateInstanceRoleRequest {
return UpdateInstanceRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateInstanceRoleRequest>): UpdateInstanceRoleRequest {
const message = createBaseUpdateInstanceRoleRequest();
message.role = (object.role !== undefined && object.role !== null)
@@ -530,19 +543,20 @@ export const DeleteInstanceRoleRequest = {
},
fromJSON(object: any): DeleteInstanceRoleRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteInstanceRoleRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteInstanceRoleRequest>): DeleteInstanceRoleRequest {
return DeleteInstanceRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteInstanceRoleRequest>): DeleteInstanceRoleRequest {
const message = createBaseDeleteInstanceRoleRequest();
message.name = object.name ?? "";
@@ -586,19 +600,20 @@ export const UndeleteInstanceRoleRequest = {
},
fromJSON(object: any): UndeleteInstanceRoleRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UndeleteInstanceRoleRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UndeleteInstanceRoleRequest>): UndeleteInstanceRoleRequest {
return UndeleteInstanceRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UndeleteInstanceRoleRequest>): UndeleteInstanceRoleRequest {
const message = createBaseUndeleteInstanceRoleRequest();
message.name = object.name ?? "";
@@ -700,30 +715,41 @@ export const InstanceRole = {
fromJSON(object: any): InstanceRole {
return {
- name: isSet(object.name) ? String(object.name) : "",
- roleName: isSet(object.roleName) ? String(object.roleName) : "",
- password: isSet(object.password) ? String(object.password) : undefined,
- connectionLimit: isSet(object.connectionLimit) ? Number(object.connectionLimit) : undefined,
- validUntil: isSet(object.validUntil) ? String(object.validUntil) : undefined,
- attribute: isSet(object.attribute) ? String(object.attribute) : undefined,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ roleName: isSet(object.roleName) ? globalThis.String(object.roleName) : "",
+ password: isSet(object.password) ? globalThis.String(object.password) : undefined,
+ connectionLimit: isSet(object.connectionLimit) ? globalThis.Number(object.connectionLimit) : undefined,
+ validUntil: isSet(object.validUntil) ? globalThis.String(object.validUntil) : undefined,
+ attribute: isSet(object.attribute) ? globalThis.String(object.attribute) : undefined,
};
},
toJSON(message: InstanceRole): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.roleName !== undefined && (obj.roleName = message.roleName);
- message.password !== undefined && (obj.password = message.password);
- message.connectionLimit !== undefined && (obj.connectionLimit = Math.round(message.connectionLimit));
- message.validUntil !== undefined && (obj.validUntil = message.validUntil);
- message.attribute !== undefined && (obj.attribute = message.attribute);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.roleName !== "") {
+ obj.roleName = message.roleName;
+ }
+ if (message.password !== undefined) {
+ obj.password = message.password;
+ }
+ if (message.connectionLimit !== undefined) {
+ obj.connectionLimit = Math.round(message.connectionLimit);
+ }
+ if (message.validUntil !== undefined) {
+ obj.validUntil = message.validUntil;
+ }
+ if (message.attribute !== undefined) {
+ obj.attribute = message.attribute;
+ }
return obj;
},
create(base?: DeepPartial<InstanceRole>): InstanceRole {
return InstanceRole.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceRole>): InstanceRole {
const message = createBaseInstanceRole();
message.name = object.name ?? "";
@@ -1069,7 +1095,7 @@ export const InstanceRoleServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.ts
index 9587912c10..d1ce3ea0ee 100644
--- a/frontend/src/types/proto/v1/instance_service.ts
+++ b/frontend/src/types/proto/v1/instance_service.ts
@@ -322,19 +322,20 @@ export const GetInstanceRequest = {
},
fromJSON(object: any): GetInstanceRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetInstanceRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetInstanceRequest>): GetInstanceRequest {
return GetInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetInstanceRequest>): GetInstanceRequest {
const message = createBaseGetInstanceRequest();
message.name = object.name ?? "";
@@ -399,24 +400,29 @@ export const ListInstancesRequest = {
fromJSON(object: any): ListInstancesRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? Boolean(object.showDeleted) : false,
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
};
},
toJSON(message: ListInstancesRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted === true) {
+ obj.showDeleted = message.showDeleted;
+ }
return obj;
},
create(base?: DeepPartial<ListInstancesRequest>): ListInstancesRequest {
return ListInstancesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListInstancesRequest>): ListInstancesRequest {
const message = createBaseListInstancesRequest();
message.pageSize = object.pageSize ?? 0;
@@ -473,26 +479,27 @@ export const ListInstancesResponse = {
fromJSON(object: any): ListInstancesResponse {
return {
- instances: Array.isArray(object?.instances) ? object.instances.map((e: any) => Instance.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ instances: globalThis.Array.isArray(object?.instances)
+ ? object.instances.map((e: any) => Instance.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListInstancesResponse): unknown {
const obj: any = {};
- if (message.instances) {
- obj.instances = message.instances.map((e) => e ? Instance.toJSON(e) : undefined);
- } else {
- obj.instances = [];
+ if (message.instances?.length) {
+ obj.instances = message.instances.map((e) => Instance.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListInstancesResponse>): ListInstancesResponse {
return ListInstancesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListInstancesResponse>): ListInstancesResponse {
const message = createBaseListInstancesResponse();
message.instances = object.instances?.map((e) => Instance.fromPartial(e)) || [];
@@ -559,23 +566,28 @@ export const CreateInstanceRequest = {
fromJSON(object: any): CreateInstanceRequest {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
- instanceId: isSet(object.instanceId) ? String(object.instanceId) : "",
- validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,
+ instanceId: isSet(object.instanceId) ? globalThis.String(object.instanceId) : "",
+ validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
},
toJSON(message: CreateInstanceRequest): unknown {
const obj: any = {};
- message.instance !== undefined && (obj.instance = message.instance ? Instance.toJSON(message.instance) : undefined);
- message.instanceId !== undefined && (obj.instanceId = message.instanceId);
- message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);
+ if (message.instance !== undefined) {
+ obj.instance = Instance.toJSON(message.instance);
+ }
+ if (message.instanceId !== "") {
+ obj.instanceId = message.instanceId;
+ }
+ if (message.validateOnly === true) {
+ obj.validateOnly = message.validateOnly;
+ }
return obj;
},
create(base?: DeepPartial<CreateInstanceRequest>): CreateInstanceRequest {
return CreateInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateInstanceRequest>): CreateInstanceRequest {
const message = createBaseCreateInstanceRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
@@ -641,15 +653,18 @@ export const UpdateInstanceRequest = {
toJSON(message: UpdateInstanceRequest): unknown {
const obj: any = {};
- message.instance !== undefined && (obj.instance = message.instance ? Instance.toJSON(message.instance) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.instance !== undefined) {
+ obj.instance = Instance.toJSON(message.instance);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateInstanceRequest>): UpdateInstanceRequest {
return UpdateInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateInstanceRequest>): UpdateInstanceRequest {
const message = createBaseUpdateInstanceRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
@@ -707,22 +722,25 @@ export const DeleteInstanceRequest = {
fromJSON(object: any): DeleteInstanceRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- force: isSet(object.force) ? Boolean(object.force) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ force: isSet(object.force) ? globalThis.Boolean(object.force) : false,
};
},
toJSON(message: DeleteInstanceRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.force !== undefined && (obj.force = message.force);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.force === true) {
+ obj.force = message.force;
+ }
return obj;
},
create(base?: DeepPartial<DeleteInstanceRequest>): DeleteInstanceRequest {
return DeleteInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteInstanceRequest>): DeleteInstanceRequest {
const message = createBaseDeleteInstanceRequest();
message.name = object.name ?? "";
@@ -767,19 +785,20 @@ export const UndeleteInstanceRequest = {
},
fromJSON(object: any): UndeleteInstanceRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UndeleteInstanceRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UndeleteInstanceRequest>): UndeleteInstanceRequest {
return UndeleteInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UndeleteInstanceRequest>): UndeleteInstanceRequest {
const message = createBaseUndeleteInstanceRequest();
message.name = object.name ?? "";
@@ -823,19 +842,20 @@ export const SyncInstanceRequest = {
},
fromJSON(object: any): SyncInstanceRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: SyncInstanceRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<SyncInstanceRequest>): SyncInstanceRequest {
return SyncInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SyncInstanceRequest>): SyncInstanceRequest {
const message = createBaseSyncInstanceRequest();
message.name = object.name ?? "";
@@ -880,7 +900,6 @@ export const SyncInstanceResponse = {
create(base?: DeepPartial<SyncInstanceResponse>): SyncInstanceResponse {
return SyncInstanceResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<SyncInstanceResponse>): SyncInstanceResponse {
const message = createBaseSyncInstanceResponse();
return message;
@@ -924,16 +943,16 @@ export const BatchSyncInstanceRequest = {
fromJSON(object: any): BatchSyncInstanceRequest {
return {
- requests: Array.isArray(object?.requests) ? object.requests.map((e: any) => SyncInstanceRequest.fromJSON(e)) : [],
+ requests: globalThis.Array.isArray(object?.requests)
+ ? object.requests.map((e: any) => SyncInstanceRequest.fromJSON(e))
+ : [],
};
},
toJSON(message: BatchSyncInstanceRequest): unknown {
const obj: any = {};
- if (message.requests) {
- obj.requests = message.requests.map((e) => e ? SyncInstanceRequest.toJSON(e) : undefined);
- } else {
- obj.requests = [];
+ if (message.requests?.length) {
+ obj.requests = message.requests.map((e) => SyncInstanceRequest.toJSON(e));
}
return obj;
},
@@ -941,7 +960,6 @@ export const BatchSyncInstanceRequest = {
create(base?: DeepPartial<BatchSyncInstanceRequest>): BatchSyncInstanceRequest {
return BatchSyncInstanceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchSyncInstanceRequest>): BatchSyncInstanceRequest {
const message = createBaseBatchSyncInstanceRequest();
message.requests = object.requests?.map((e) => SyncInstanceRequest.fromPartial(e)) || [];
@@ -986,7 +1004,6 @@ export const BatchSyncInstanceResponse = {
create(base?: DeepPartial<BatchSyncInstanceResponse>): BatchSyncInstanceResponse {
return BatchSyncInstanceResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchSyncInstanceResponse>): BatchSyncInstanceResponse {
const message = createBaseBatchSyncInstanceResponse();
return message;
@@ -1050,25 +1067,29 @@ export const AddDataSourceRequest = {
fromJSON(object: any): AddDataSourceRequest {
return {
- instance: isSet(object.instance) ? String(object.instance) : "",
+ instance: isSet(object.instance) ? globalThis.String(object.instance) : "",
dataSource: isSet(object.dataSource) ? DataSource.fromJSON(object.dataSource) : undefined,
- validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,
+ validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
},
toJSON(message: AddDataSourceRequest): unknown {
const obj: any = {};
- message.instance !== undefined && (obj.instance = message.instance);
- message.dataSource !== undefined &&
- (obj.dataSource = message.dataSource ? DataSource.toJSON(message.dataSource) : undefined);
- message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);
+ if (message.instance !== "") {
+ obj.instance = message.instance;
+ }
+ if (message.dataSource !== undefined) {
+ obj.dataSource = DataSource.toJSON(message.dataSource);
+ }
+ if (message.validateOnly === true) {
+ obj.validateOnly = message.validateOnly;
+ }
return obj;
},
create(base?: DeepPartial<AddDataSourceRequest>): AddDataSourceRequest {
return AddDataSourceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AddDataSourceRequest>): AddDataSourceRequest {
const message = createBaseAddDataSourceRequest();
message.instance = object.instance ?? "";
@@ -1127,23 +1148,25 @@ export const RemoveDataSourceRequest = {
fromJSON(object: any): RemoveDataSourceRequest {
return {
- instance: isSet(object.instance) ? String(object.instance) : "",
+ instance: isSet(object.instance) ? globalThis.String(object.instance) : "",
dataSource: isSet(object.dataSource) ? DataSource.fromJSON(object.dataSource) : undefined,
};
},
toJSON(message: RemoveDataSourceRequest): unknown {
const obj: any = {};
- message.instance !== undefined && (obj.instance = message.instance);
- message.dataSource !== undefined &&
- (obj.dataSource = message.dataSource ? DataSource.toJSON(message.dataSource) : undefined);
+ if (message.instance !== "") {
+ obj.instance = message.instance;
+ }
+ if (message.dataSource !== undefined) {
+ obj.dataSource = DataSource.toJSON(message.dataSource);
+ }
return obj;
},
create(base?: DeepPartial<RemoveDataSourceRequest>): RemoveDataSourceRequest {
return RemoveDataSourceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RemoveDataSourceRequest>): RemoveDataSourceRequest {
const message = createBaseRemoveDataSourceRequest();
message.instance = object.instance ?? "";
@@ -1221,27 +1244,33 @@ export const UpdateDataSourceRequest = {
fromJSON(object: any): UpdateDataSourceRequest {
return {
- instance: isSet(object.instance) ? String(object.instance) : "",
+ instance: isSet(object.instance) ? globalThis.String(object.instance) : "",
dataSource: isSet(object.dataSource) ? DataSource.fromJSON(object.dataSource) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
- validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,
+ validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
},
toJSON(message: UpdateDataSourceRequest): unknown {
const obj: any = {};
- message.instance !== undefined && (obj.instance = message.instance);
- message.dataSource !== undefined &&
- (obj.dataSource = message.dataSource ? DataSource.toJSON(message.dataSource) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
- message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);
+ if (message.instance !== "") {
+ obj.instance = message.instance;
+ }
+ if (message.dataSource !== undefined) {
+ obj.dataSource = DataSource.toJSON(message.dataSource);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
+ if (message.validateOnly === true) {
+ obj.validateOnly = message.validateOnly;
+ }
return obj;
},
create(base?: DeepPartial<UpdateDataSourceRequest>): UpdateDataSourceRequest {
return UpdateDataSourceRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateDataSourceRequest>): UpdateDataSourceRequest {
const message = createBaseUpdateDataSourceRequest();
message.instance = object.instance ?? "";
@@ -1290,19 +1319,20 @@ export const SyncSlowQueriesRequest = {
},
fromJSON(object: any): SyncSlowQueriesRequest {
- return { parent: isSet(object.parent) ? String(object.parent) : "" };
+ return { parent: isSet(object.parent) ? globalThis.String(object.parent) : "" };
},
toJSON(message: SyncSlowQueriesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
return obj;
},
create(base?: DeepPartial<SyncSlowQueriesRequest>): SyncSlowQueriesRequest {
return SyncSlowQueriesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SyncSlowQueriesRequest>): SyncSlowQueriesRequest {
const message = createBaseSyncSlowQueriesRequest();
message.parent = object.parent ?? "";
@@ -1357,23 +1387,25 @@ export const InstanceOptions = {
fromJSON(object: any): InstanceOptions {
return {
- schemaTenantMode: isSet(object.schemaTenantMode) ? Boolean(object.schemaTenantMode) : false,
+ schemaTenantMode: isSet(object.schemaTenantMode) ? globalThis.Boolean(object.schemaTenantMode) : false,
syncInterval: isSet(object.syncInterval) ? Duration.fromJSON(object.syncInterval) : undefined,
};
},
toJSON(message: InstanceOptions): unknown {
const obj: any = {};
- message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);
- message.syncInterval !== undefined &&
- (obj.syncInterval = message.syncInterval ? Duration.toJSON(message.syncInterval) : undefined);
+ if (message.schemaTenantMode === true) {
+ obj.schemaTenantMode = message.schemaTenantMode;
+ }
+ if (message.syncInterval !== undefined) {
+ obj.syncInterval = Duration.toJSON(message.syncInterval);
+ }
return obj;
},
create(base?: DeepPartial<InstanceOptions>): InstanceOptions {
return InstanceOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {
const message = createBaseInstanceOptions();
message.schemaTenantMode = object.schemaTenantMode ?? false;
@@ -1533,45 +1565,63 @@ export const Instance = {
fromJSON(object: any): Instance {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
state: isSet(object.state) ? stateFromJSON(object.state) : 0,
- title: isSet(object.title) ? String(object.title) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- engineVersion: isSet(object.engineVersion) ? String(object.engineVersion) : "",
- externalLink: isSet(object.externalLink) ? String(object.externalLink) : "",
- dataSources: Array.isArray(object?.dataSources) ? object.dataSources.map((e: any) => DataSource.fromJSON(e)) : [],
- environment: isSet(object.environment) ? String(object.environment) : "",
- activation: isSet(object.activation) ? Boolean(object.activation) : false,
+ engineVersion: isSet(object.engineVersion) ? globalThis.String(object.engineVersion) : "",
+ externalLink: isSet(object.externalLink) ? globalThis.String(object.externalLink) : "",
+ dataSources: globalThis.Array.isArray(object?.dataSources)
+ ? object.dataSources.map((e: any) => DataSource.fromJSON(e))
+ : [],
+ environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
+ activation: isSet(object.activation) ? globalThis.Boolean(object.activation) : false,
options: isSet(object.options) ? InstanceOptions.fromJSON(object.options) : undefined,
};
},
toJSON(message: Instance): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.state !== undefined && (obj.state = stateToJSON(message.state));
- message.title !== undefined && (obj.title = message.title);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.engineVersion !== undefined && (obj.engineVersion = message.engineVersion);
- message.externalLink !== undefined && (obj.externalLink = message.externalLink);
- if (message.dataSources) {
- obj.dataSources = message.dataSources.map((e) => e ? DataSource.toJSON(e) : undefined);
- } else {
- obj.dataSources = [];
- }
- message.environment !== undefined && (obj.environment = message.environment);
- message.activation !== undefined && (obj.activation = message.activation);
- message.options !== undefined &&
- (obj.options = message.options ? InstanceOptions.toJSON(message.options) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.state !== 0) {
+ obj.state = stateToJSON(message.state);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.engineVersion !== "") {
+ obj.engineVersion = message.engineVersion;
+ }
+ if (message.externalLink !== "") {
+ obj.externalLink = message.externalLink;
+ }
+ if (message.dataSources?.length) {
+ obj.dataSources = message.dataSources.map((e) => DataSource.toJSON(e));
+ }
+ if (message.environment !== "") {
+ obj.environment = message.environment;
+ }
+ if (message.activation === true) {
+ obj.activation = message.activation;
+ }
+ if (message.options !== undefined) {
+ obj.options = InstanceOptions.toJSON(message.options);
+ }
return obj;
},
create(base?: DeepPartial<Instance>): Instance {
return Instance.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Instance>): Instance {
const message = createBaseInstance();
message.name = object.name ?? "";
@@ -1828,56 +1878,95 @@ export const DataSource = {
fromJSON(object: any): DataSource {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
type: isSet(object.type) ? dataSourceTypeFromJSON(object.type) : 0,
- username: isSet(object.username) ? String(object.username) : "",
- password: isSet(object.password) ? String(object.password) : "",
- sslCa: isSet(object.sslCa) ? String(object.sslCa) : "",
- sslCert: isSet(object.sslCert) ? String(object.sslCert) : "",
- sslKey: isSet(object.sslKey) ? String(object.sslKey) : "",
- host: isSet(object.host) ? String(object.host) : "",
- port: isSet(object.port) ? String(object.port) : "",
- database: isSet(object.database) ? String(object.database) : "",
- srv: isSet(object.srv) ? Boolean(object.srv) : false,
- authenticationDatabase: isSet(object.authenticationDatabase) ? String(object.authenticationDatabase) : "",
- sid: isSet(object.sid) ? String(object.sid) : "",
- serviceName: isSet(object.serviceName) ? String(object.serviceName) : "",
- sshHost: isSet(object.sshHost) ? String(object.sshHost) : "",
- sshPort: isSet(object.sshPort) ? String(object.sshPort) : "",
- sshUser: isSet(object.sshUser) ? String(object.sshUser) : "",
- sshPassword: isSet(object.sshPassword) ? String(object.sshPassword) : "",
- sshPrivateKey: isSet(object.sshPrivateKey) ? String(object.sshPrivateKey) : "",
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
+ password: isSet(object.password) ? globalThis.String(object.password) : "",
+ sslCa: isSet(object.sslCa) ? globalThis.String(object.sslCa) : "",
+ sslCert: isSet(object.sslCert) ? globalThis.String(object.sslCert) : "",
+ sslKey: isSet(object.sslKey) ? globalThis.String(object.sslKey) : "",
+ host: isSet(object.host) ? globalThis.String(object.host) : "",
+ port: isSet(object.port) ? globalThis.String(object.port) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
+ srv: isSet(object.srv) ? globalThis.Boolean(object.srv) : false,
+ authenticationDatabase: isSet(object.authenticationDatabase)
+ ? globalThis.String(object.authenticationDatabase)
+ : "",
+ sid: isSet(object.sid) ? globalThis.String(object.sid) : "",
+ serviceName: isSet(object.serviceName) ? globalThis.String(object.serviceName) : "",
+ sshHost: isSet(object.sshHost) ? globalThis.String(object.sshHost) : "",
+ sshPort: isSet(object.sshPort) ? globalThis.String(object.sshPort) : "",
+ sshUser: isSet(object.sshUser) ? globalThis.String(object.sshUser) : "",
+ sshPassword: isSet(object.sshPassword) ? globalThis.String(object.sshPassword) : "",
+ sshPrivateKey: isSet(object.sshPrivateKey) ? globalThis.String(object.sshPrivateKey) : "",
};
},
toJSON(message: DataSource): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.type !== undefined && (obj.type = dataSourceTypeToJSON(message.type));
- message.username !== undefined && (obj.username = message.username);
- message.password !== undefined && (obj.password = message.password);
- message.sslCa !== undefined && (obj.sslCa = message.sslCa);
- message.sslCert !== undefined && (obj.sslCert = message.sslCert);
- message.sslKey !== undefined && (obj.sslKey = message.sslKey);
- message.host !== undefined && (obj.host = message.host);
- message.port !== undefined && (obj.port = message.port);
- message.database !== undefined && (obj.database = message.database);
- message.srv !== undefined && (obj.srv = message.srv);
- message.authenticationDatabase !== undefined && (obj.authenticationDatabase = message.authenticationDatabase);
- message.sid !== undefined && (obj.sid = message.sid);
- message.serviceName !== undefined && (obj.serviceName = message.serviceName);
- message.sshHost !== undefined && (obj.sshHost = message.sshHost);
- message.sshPort !== undefined && (obj.sshPort = message.sshPort);
- message.sshUser !== undefined && (obj.sshUser = message.sshUser);
- message.sshPassword !== undefined && (obj.sshPassword = message.sshPassword);
- message.sshPrivateKey !== undefined && (obj.sshPrivateKey = message.sshPrivateKey);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.type !== 0) {
+ obj.type = dataSourceTypeToJSON(message.type);
+ }
+ if (message.username !== "") {
+ obj.username = message.username;
+ }
+ if (message.password !== "") {
+ obj.password = message.password;
+ }
+ if (message.sslCa !== "") {
+ obj.sslCa = message.sslCa;
+ }
+ if (message.sslCert !== "") {
+ obj.sslCert = message.sslCert;
+ }
+ if (message.sslKey !== "") {
+ obj.sslKey = message.sslKey;
+ }
+ if (message.host !== "") {
+ obj.host = message.host;
+ }
+ if (message.port !== "") {
+ obj.port = message.port;
+ }
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
+ if (message.srv === true) {
+ obj.srv = message.srv;
+ }
+ if (message.authenticationDatabase !== "") {
+ obj.authenticationDatabase = message.authenticationDatabase;
+ }
+ if (message.sid !== "") {
+ obj.sid = message.sid;
+ }
+ if (message.serviceName !== "") {
+ obj.serviceName = message.serviceName;
+ }
+ if (message.sshHost !== "") {
+ obj.sshHost = message.sshHost;
+ }
+ if (message.sshPort !== "") {
+ obj.sshPort = message.sshPort;
+ }
+ if (message.sshUser !== "") {
+ obj.sshUser = message.sshUser;
+ }
+ if (message.sshPassword !== "") {
+ obj.sshPassword = message.sshPassword;
+ }
+ if (message.sshPrivateKey !== "") {
+ obj.sshPrivateKey = message.sshPrivateKey;
+ }
return obj;
},
create(base?: DeepPartial<DataSource>): DataSource {
return DataSource.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DataSource>): DataSource {
const message = createBaseDataSource();
message.id = object.id ?? "";
@@ -2572,7 +2661,7 @@ export const InstanceServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/issue_service.ts b/frontend/src/types/proto/v1/issue_service.ts
index 607e83197b..fa08cf4ce2 100644
--- a/frontend/src/types/proto/v1/issue_service.ts
+++ b/frontend/src/types/proto/v1/issue_service.ts
@@ -637,22 +637,25 @@ export const GetIssueRequest = {
fromJSON(object: any): GetIssueRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- force: isSet(object.force) ? Boolean(object.force) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ force: isSet(object.force) ? globalThis.Boolean(object.force) : false,
};
},
toJSON(message: GetIssueRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.force !== undefined && (obj.force = message.force);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.force === true) {
+ obj.force = message.force;
+ }
return obj;
},
create(base?: DeepPartial<GetIssueRequest>): GetIssueRequest {
return GetIssueRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetIssueRequest>): GetIssueRequest {
const message = createBaseGetIssueRequest();
message.name = object.name ?? "";
@@ -708,22 +711,25 @@ export const CreateIssueRequest = {
fromJSON(object: any): CreateIssueRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
issue: isSet(object.issue) ? Issue.fromJSON(object.issue) : undefined,
};
},
toJSON(message: CreateIssueRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.issue !== undefined && (obj.issue = message.issue ? Issue.toJSON(message.issue) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.issue !== undefined) {
+ obj.issue = Issue.toJSON(message.issue);
+ }
return obj;
},
create(base?: DeepPartial<CreateIssueRequest>): CreateIssueRequest {
return CreateIssueRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateIssueRequest>): CreateIssueRequest {
const message = createBaseCreateIssueRequest();
message.parent = object.parent ?? "";
@@ -799,26 +805,33 @@ export const ListIssuesRequest = {
fromJSON(object: any): ListIssuesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: ListIssuesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<ListIssuesRequest>): ListIssuesRequest {
return ListIssuesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListIssuesRequest>): ListIssuesRequest {
const message = createBaseListIssuesRequest();
message.parent = object.parent ?? "";
@@ -876,26 +889,25 @@ export const ListIssuesResponse = {
fromJSON(object: any): ListIssuesResponse {
return {
- issues: Array.isArray(object?.issues) ? object.issues.map((e: any) => Issue.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ issues: globalThis.Array.isArray(object?.issues) ? object.issues.map((e: any) => Issue.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListIssuesResponse): unknown {
const obj: any = {};
- if (message.issues) {
- obj.issues = message.issues.map((e) => e ? Issue.toJSON(e) : undefined);
- } else {
- obj.issues = [];
+ if (message.issues?.length) {
+ obj.issues = message.issues.map((e) => Issue.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListIssuesResponse>): ListIssuesResponse {
return ListIssuesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListIssuesResponse>): ListIssuesResponse {
const message = createBaseListIssuesResponse();
message.issues = object.issues?.map((e) => Issue.fromPartial(e)) || [];
@@ -958,15 +970,18 @@ export const UpdateIssueRequest = {
toJSON(message: UpdateIssueRequest): unknown {
const obj: any = {};
- message.issue !== undefined && (obj.issue = message.issue ? Issue.toJSON(message.issue) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.issue !== undefined) {
+ obj.issue = Issue.toJSON(message.issue);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateIssueRequest>): UpdateIssueRequest {
return UpdateIssueRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateIssueRequest>): UpdateIssueRequest {
const message = createBaseUpdateIssueRequest();
message.issue = (object.issue !== undefined && object.issue !== null) ? Issue.fromPartial(object.issue) : undefined;
@@ -1052,28 +1067,37 @@ export const SearchIssuesRequest = {
fromJSON(object: any): SearchIssuesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- query: isSet(object.query) ? String(object.query) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ query: isSet(object.query) ? globalThis.String(object.query) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: SearchIssuesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.query !== undefined && (obj.query = message.query);
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.query !== "") {
+ obj.query = message.query;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<SearchIssuesRequest>): SearchIssuesRequest {
return SearchIssuesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchIssuesRequest>): SearchIssuesRequest {
const message = createBaseSearchIssuesRequest();
message.parent = object.parent ?? "";
@@ -1132,26 +1156,25 @@ export const SearchIssuesResponse = {
fromJSON(object: any): SearchIssuesResponse {
return {
- issues: Array.isArray(object?.issues) ? object.issues.map((e: any) => Issue.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ issues: globalThis.Array.isArray(object?.issues) ? object.issues.map((e: any) => Issue.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: SearchIssuesResponse): unknown {
const obj: any = {};
- if (message.issues) {
- obj.issues = message.issues.map((e) => e ? Issue.toJSON(e) : undefined);
- } else {
- obj.issues = [];
+ if (message.issues?.length) {
+ obj.issues = message.issues.map((e) => Issue.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<SearchIssuesResponse>): SearchIssuesResponse {
return SearchIssuesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchIssuesResponse>): SearchIssuesResponse {
const message = createBaseSearchIssuesResponse();
message.issues = object.issues?.map((e) => Issue.fromPartial(e)) || [];
@@ -1227,30 +1250,33 @@ export const BatchUpdateIssuesStatusRequest = {
fromJSON(object: any): BatchUpdateIssuesStatusRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- issues: Array.isArray(object?.issues) ? object.issues.map((e: any) => String(e)) : [],
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ issues: globalThis.Array.isArray(object?.issues) ? object.issues.map((e: any) => globalThis.String(e)) : [],
status: isSet(object.status) ? issueStatusFromJSON(object.status) : 0,
- reason: isSet(object.reason) ? String(object.reason) : "",
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
};
},
toJSON(message: BatchUpdateIssuesStatusRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- if (message.issues) {
- obj.issues = message.issues.map((e) => e);
- } else {
- obj.issues = [];
- }
- message.status !== undefined && (obj.status = issueStatusToJSON(message.status));
- message.reason !== undefined && (obj.reason = message.reason);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.issues?.length) {
+ obj.issues = message.issues;
+ }
+ if (message.status !== 0) {
+ obj.status = issueStatusToJSON(message.status);
+ }
+ if (message.reason !== "") {
+ obj.reason = message.reason;
+ }
return obj;
},
create(base?: DeepPartial<BatchUpdateIssuesStatusRequest>): BatchUpdateIssuesStatusRequest {
return BatchUpdateIssuesStatusRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchUpdateIssuesStatusRequest>): BatchUpdateIssuesStatusRequest {
const message = createBaseBatchUpdateIssuesStatusRequest();
message.parent = object.parent ?? "";
@@ -1298,7 +1324,6 @@ export const BatchUpdateIssuesStatusResponse = {
create(base?: DeepPartial<BatchUpdateIssuesStatusResponse>): BatchUpdateIssuesStatusResponse {
return BatchUpdateIssuesStatusResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchUpdateIssuesStatusResponse>): BatchUpdateIssuesStatusResponse {
const message = createBaseBatchUpdateIssuesStatusResponse();
return message;
@@ -1352,22 +1377,25 @@ export const ApproveIssueRequest = {
fromJSON(object: any): ApproveIssueRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: ApproveIssueRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<ApproveIssueRequest>): ApproveIssueRequest {
return ApproveIssueRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApproveIssueRequest>): ApproveIssueRequest {
const message = createBaseApproveIssueRequest();
message.name = object.name ?? "";
@@ -1423,22 +1451,25 @@ export const RejectIssueRequest = {
fromJSON(object: any): RejectIssueRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: RejectIssueRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<RejectIssueRequest>): RejectIssueRequest {
return RejectIssueRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RejectIssueRequest>): RejectIssueRequest {
const message = createBaseRejectIssueRequest();
message.name = object.name ?? "";
@@ -1494,22 +1525,25 @@ export const RequestIssueRequest = {
fromJSON(object: any): RequestIssueRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: RequestIssueRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<RequestIssueRequest>): RequestIssueRequest {
return RequestIssueRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RequestIssueRequest>): RequestIssueRequest {
const message = createBaseRequestIssueRequest();
message.name = object.name ?? "";
@@ -1755,71 +1789,99 @@ export const Issue = {
fromJSON(object: any): Issue {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
type: isSet(object.type) ? issue_TypeFromJSON(object.type) : 0,
status: isSet(object.status) ? issueStatusFromJSON(object.status) : 0,
- assignee: isSet(object.assignee) ? String(object.assignee) : "",
- assigneeAttention: isSet(object.assigneeAttention) ? Boolean(object.assigneeAttention) : false,
- approvers: Array.isArray(object?.approvers) ? object.approvers.map((e: any) => Issue_Approver.fromJSON(e)) : [],
- approvalTemplates: Array.isArray(object?.approvalTemplates)
+ assignee: isSet(object.assignee) ? globalThis.String(object.assignee) : "",
+ assigneeAttention: isSet(object.assigneeAttention) ? globalThis.Boolean(object.assigneeAttention) : false,
+ approvers: globalThis.Array.isArray(object?.approvers)
+ ? object.approvers.map((e: any) => Issue_Approver.fromJSON(e))
+ : [],
+ approvalTemplates: globalThis.Array.isArray(object?.approvalTemplates)
? object.approvalTemplates.map((e: any) => ApprovalTemplate.fromJSON(e))
: [],
- approvalFindingDone: isSet(object.approvalFindingDone) ? Boolean(object.approvalFindingDone) : false,
- approvalFindingError: isSet(object.approvalFindingError) ? String(object.approvalFindingError) : "",
- subscribers: Array.isArray(object?.subscribers) ? object.subscribers.map((e: any) => String(e)) : [],
- creator: isSet(object.creator) ? String(object.creator) : "",
+ approvalFindingDone: isSet(object.approvalFindingDone) ? globalThis.Boolean(object.approvalFindingDone) : false,
+ approvalFindingError: isSet(object.approvalFindingError) ? globalThis.String(object.approvalFindingError) : "",
+ subscribers: globalThis.Array.isArray(object?.subscribers)
+ ? object.subscribers.map((e: any) => globalThis.String(e))
+ : [],
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
- plan: isSet(object.plan) ? String(object.plan) : "",
- rollout: isSet(object.rollout) ? String(object.rollout) : "",
+ plan: isSet(object.plan) ? globalThis.String(object.plan) : "",
+ rollout: isSet(object.rollout) ? globalThis.String(object.rollout) : "",
grantRequest: isSet(object.grantRequest) ? GrantRequest.fromJSON(object.grantRequest) : undefined,
};
},
toJSON(message: Issue): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.type !== undefined && (obj.type = issue_TypeToJSON(message.type));
- message.status !== undefined && (obj.status = issueStatusToJSON(message.status));
- message.assignee !== undefined && (obj.assignee = message.assignee);
- message.assigneeAttention !== undefined && (obj.assigneeAttention = message.assigneeAttention);
- if (message.approvers) {
- obj.approvers = message.approvers.map((e) => e ? Issue_Approver.toJSON(e) : undefined);
- } else {
- obj.approvers = [];
- }
- if (message.approvalTemplates) {
- obj.approvalTemplates = message.approvalTemplates.map((e) => e ? ApprovalTemplate.toJSON(e) : undefined);
- } else {
- obj.approvalTemplates = [];
- }
- message.approvalFindingDone !== undefined && (obj.approvalFindingDone = message.approvalFindingDone);
- message.approvalFindingError !== undefined && (obj.approvalFindingError = message.approvalFindingError);
- if (message.subscribers) {
- obj.subscribers = message.subscribers.map((e) => e);
- } else {
- obj.subscribers = [];
- }
- message.creator !== undefined && (obj.creator = message.creator);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- message.plan !== undefined && (obj.plan = message.plan);
- message.rollout !== undefined && (obj.rollout = message.rollout);
- message.grantRequest !== undefined &&
- (obj.grantRequest = message.grantRequest ? GrantRequest.toJSON(message.grantRequest) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.type !== 0) {
+ obj.type = issue_TypeToJSON(message.type);
+ }
+ if (message.status !== 0) {
+ obj.status = issueStatusToJSON(message.status);
+ }
+ if (message.assignee !== "") {
+ obj.assignee = message.assignee;
+ }
+ if (message.assigneeAttention === true) {
+ obj.assigneeAttention = message.assigneeAttention;
+ }
+ if (message.approvers?.length) {
+ obj.approvers = message.approvers.map((e) => Issue_Approver.toJSON(e));
+ }
+ if (message.approvalTemplates?.length) {
+ obj.approvalTemplates = message.approvalTemplates.map((e) => ApprovalTemplate.toJSON(e));
+ }
+ if (message.approvalFindingDone === true) {
+ obj.approvalFindingDone = message.approvalFindingDone;
+ }
+ if (message.approvalFindingError !== "") {
+ obj.approvalFindingError = message.approvalFindingError;
+ }
+ if (message.subscribers?.length) {
+ obj.subscribers = message.subscribers;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.plan !== "") {
+ obj.plan = message.plan;
+ }
+ if (message.rollout !== "") {
+ obj.rollout = message.rollout;
+ }
+ if (message.grantRequest !== undefined) {
+ obj.grantRequest = GrantRequest.toJSON(message.grantRequest);
+ }
return obj;
},
create(base?: DeepPartial<Issue>): Issue {
return Issue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Issue>): Issue {
const message = createBaseIssue();
message.name = object.name ?? "";
@@ -1895,21 +1957,24 @@ export const Issue_Approver = {
fromJSON(object: any): Issue_Approver {
return {
status: isSet(object.status) ? issue_Approver_StatusFromJSON(object.status) : 0,
- principal: isSet(object.principal) ? String(object.principal) : "",
+ principal: isSet(object.principal) ? globalThis.String(object.principal) : "",
};
},
toJSON(message: Issue_Approver): unknown {
const obj: any = {};
- message.status !== undefined && (obj.status = issue_Approver_StatusToJSON(message.status));
- message.principal !== undefined && (obj.principal = message.principal);
+ if (message.status !== 0) {
+ obj.status = issue_Approver_StatusToJSON(message.status);
+ }
+ if (message.principal !== "") {
+ obj.principal = message.principal;
+ }
return obj;
},
create(base?: DeepPartial<Issue_Approver>): Issue_Approver {
return Issue_Approver.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Issue_Approver>): Issue_Approver {
const message = createBaseIssue_Approver();
message.status = object.status ?? 0;
@@ -1985,8 +2050,8 @@ export const GrantRequest = {
fromJSON(object: any): GrantRequest {
return {
- role: isSet(object.role) ? String(object.role) : "",
- user: isSet(object.user) ? String(object.user) : "",
+ role: isSet(object.role) ? globalThis.String(object.role) : "",
+ user: isSet(object.user) ? globalThis.String(object.user) : "",
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
expiration: isSet(object.expiration) ? Duration.fromJSON(object.expiration) : undefined,
};
@@ -1994,18 +2059,24 @@ export const GrantRequest = {
toJSON(message: GrantRequest): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role);
- message.user !== undefined && (obj.user = message.user);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
- message.expiration !== undefined &&
- (obj.expiration = message.expiration ? Duration.toJSON(message.expiration) : undefined);
+ if (message.role !== "") {
+ obj.role = message.role;
+ }
+ if (message.user !== "") {
+ obj.user = message.user;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
+ if (message.expiration !== undefined) {
+ obj.expiration = Duration.toJSON(message.expiration);
+ }
return obj;
},
create(base?: DeepPartial<GrantRequest>): GrantRequest {
return GrantRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GrantRequest>): GrantRequest {
const message = createBaseGrantRequest();
message.role = object.role ?? "";
@@ -2088,25 +2159,32 @@ export const ApprovalTemplate = {
fromJSON(object: any): ApprovalTemplate {
return {
flow: isSet(object.flow) ? ApprovalFlow.fromJSON(object.flow) : undefined,
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- creator: isSet(object.creator) ? String(object.creator) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
};
},
toJSON(message: ApprovalTemplate): unknown {
const obj: any = {};
- message.flow !== undefined && (obj.flow = message.flow ? ApprovalFlow.toJSON(message.flow) : undefined);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.creator !== undefined && (obj.creator = message.creator);
+ if (message.flow !== undefined) {
+ obj.flow = ApprovalFlow.toJSON(message.flow);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
return obj;
},
create(base?: DeepPartial<ApprovalTemplate>): ApprovalTemplate {
return ApprovalTemplate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalTemplate>): ApprovalTemplate {
const message = createBaseApprovalTemplate();
message.flow = (object.flow !== undefined && object.flow !== null)
@@ -2155,15 +2233,15 @@ export const ApprovalFlow = {
},
fromJSON(object: any): ApprovalFlow {
- return { steps: Array.isArray(object?.steps) ? object.steps.map((e: any) => ApprovalStep.fromJSON(e)) : [] };
+ return {
+ steps: globalThis.Array.isArray(object?.steps) ? object.steps.map((e: any) => ApprovalStep.fromJSON(e)) : [],
+ };
},
toJSON(message: ApprovalFlow): unknown {
const obj: any = {};
- if (message.steps) {
- obj.steps = message.steps.map((e) => e ? ApprovalStep.toJSON(e) : undefined);
- } else {
- obj.steps = [];
+ if (message.steps?.length) {
+ obj.steps = message.steps.map((e) => ApprovalStep.toJSON(e));
}
return obj;
},
@@ -2171,7 +2249,6 @@ export const ApprovalFlow = {
create(base?: DeepPartial<ApprovalFlow>): ApprovalFlow {
return ApprovalFlow.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalFlow>): ApprovalFlow {
const message = createBaseApprovalFlow();
message.steps = object.steps?.map((e) => ApprovalStep.fromPartial(e)) || [];
@@ -2227,17 +2304,17 @@ export const ApprovalStep = {
fromJSON(object: any): ApprovalStep {
return {
type: isSet(object.type) ? approvalStep_TypeFromJSON(object.type) : 0,
- nodes: Array.isArray(object?.nodes) ? object.nodes.map((e: any) => ApprovalNode.fromJSON(e)) : [],
+ nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => ApprovalNode.fromJSON(e)) : [],
};
},
toJSON(message: ApprovalStep): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = approvalStep_TypeToJSON(message.type));
- if (message.nodes) {
- obj.nodes = message.nodes.map((e) => e ? ApprovalNode.toJSON(e) : undefined);
- } else {
- obj.nodes = [];
+ if (message.type !== 0) {
+ obj.type = approvalStep_TypeToJSON(message.type);
+ }
+ if (message.nodes?.length) {
+ obj.nodes = message.nodes.map((e) => ApprovalNode.toJSON(e));
}
return obj;
},
@@ -2245,7 +2322,6 @@ export const ApprovalStep = {
create(base?: DeepPartial<ApprovalStep>): ApprovalStep {
return ApprovalStep.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalStep>): ApprovalStep {
const message = createBaseApprovalStep();
message.type = object.type ?? 0;
@@ -2323,27 +2399,31 @@ export const ApprovalNode = {
return {
type: isSet(object.type) ? approvalNode_TypeFromJSON(object.type) : 0,
groupValue: isSet(object.groupValue) ? approvalNode_GroupValueFromJSON(object.groupValue) : undefined,
- role: isSet(object.role) ? String(object.role) : undefined,
- externalNodeId: isSet(object.externalNodeId) ? String(object.externalNodeId) : undefined,
+ role: isSet(object.role) ? globalThis.String(object.role) : undefined,
+ externalNodeId: isSet(object.externalNodeId) ? globalThis.String(object.externalNodeId) : undefined,
};
},
toJSON(message: ApprovalNode): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = approvalNode_TypeToJSON(message.type));
- message.groupValue !== undefined &&
- (obj.groupValue = message.groupValue !== undefined
- ? approvalNode_GroupValueToJSON(message.groupValue)
- : undefined);
- message.role !== undefined && (obj.role = message.role);
- message.externalNodeId !== undefined && (obj.externalNodeId = message.externalNodeId);
+ if (message.type !== 0) {
+ obj.type = approvalNode_TypeToJSON(message.type);
+ }
+ if (message.groupValue !== undefined) {
+ obj.groupValue = approvalNode_GroupValueToJSON(message.groupValue);
+ }
+ if (message.role !== undefined) {
+ obj.role = message.role;
+ }
+ if (message.externalNodeId !== undefined) {
+ obj.externalNodeId = message.externalNodeId;
+ }
return obj;
},
create(base?: DeepPartial<ApprovalNode>): ApprovalNode {
return ApprovalNode.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ApprovalNode>): ApprovalNode {
const message = createBaseApprovalNode();
message.type = object.type ?? 0;
@@ -2401,23 +2481,25 @@ export const CreateIssueCommentRequest = {
fromJSON(object: any): CreateIssueCommentRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
issueComment: isSet(object.issueComment) ? IssueComment.fromJSON(object.issueComment) : undefined,
};
},
toJSON(message: CreateIssueCommentRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.issueComment !== undefined &&
- (obj.issueComment = message.issueComment ? IssueComment.toJSON(message.issueComment) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.issueComment !== undefined) {
+ obj.issueComment = IssueComment.toJSON(message.issueComment);
+ }
return obj;
},
create(base?: DeepPartial<CreateIssueCommentRequest>): CreateIssueCommentRequest {
return CreateIssueCommentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateIssueCommentRequest>): CreateIssueCommentRequest {
const message = createBaseCreateIssueCommentRequest();
message.parent = object.parent ?? "";
@@ -2485,7 +2567,7 @@ export const UpdateIssueCommentRequest = {
fromJSON(object: any): UpdateIssueCommentRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
issueComment: isSet(object.issueComment) ? IssueComment.fromJSON(object.issueComment) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
};
@@ -2493,17 +2575,21 @@ export const UpdateIssueCommentRequest = {
toJSON(message: UpdateIssueCommentRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.issueComment !== undefined &&
- (obj.issueComment = message.issueComment ? IssueComment.toJSON(message.issueComment) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.issueComment !== undefined) {
+ obj.issueComment = IssueComment.toJSON(message.issueComment);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateIssueCommentRequest>): UpdateIssueCommentRequest {
return UpdateIssueCommentRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateIssueCommentRequest>): UpdateIssueCommentRequest {
const message = createBaseUpdateIssueCommentRequest();
message.parent = object.parent ?? "";
@@ -2592,9 +2678,9 @@ export const IssueComment = {
fromJSON(object: any): IssueComment {
return {
- uid: isSet(object.uid) ? String(object.uid) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
- payload: isSet(object.payload) ? String(object.payload) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
+ payload: isSet(object.payload) ? globalThis.String(object.payload) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
};
@@ -2602,18 +2688,27 @@ export const IssueComment = {
toJSON(message: IssueComment): unknown {
const obj: any = {};
- message.uid !== undefined && (obj.uid = message.uid);
- message.comment !== undefined && (obj.comment = message.comment);
- message.payload !== undefined && (obj.payload = message.payload);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.payload !== "") {
+ obj.payload = message.payload;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<IssueComment>): IssueComment {
return IssueComment.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<IssueComment>): IssueComment {
const message = createBaseIssueComment();
message.uid = object.uid ?? "";
@@ -3361,7 +3456,7 @@ export const IssueServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -3375,14 +3470,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/logging_service.ts b/frontend/src/types/proto/v1/logging_service.ts
index 722c51bbe1..40c334a4f9 100644
--- a/frontend/src/types/proto/v1/logging_service.ts
+++ b/frontend/src/types/proto/v1/logging_service.ts
@@ -456,26 +456,33 @@ export const ListLogsRequest = {
fromJSON(object: any): ListLogsRequest {
return {
- filter: isSet(object.filter) ? String(object.filter) : "",
- orderBy: isSet(object.orderBy) ? String(object.orderBy) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ orderBy: isSet(object.orderBy) ? globalThis.String(object.orderBy) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListLogsRequest): unknown {
const obj: any = {};
- message.filter !== undefined && (obj.filter = message.filter);
- message.orderBy !== undefined && (obj.orderBy = message.orderBy);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.orderBy !== "") {
+ obj.orderBy = message.orderBy;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListLogsRequest>): ListLogsRequest {
return ListLogsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListLogsRequest>): ListLogsRequest {
const message = createBaseListLogsRequest();
message.filter = object.filter ?? "";
@@ -533,26 +540,27 @@ export const ListLogsResponse = {
fromJSON(object: any): ListLogsResponse {
return {
- logEntities: Array.isArray(object?.logEntities) ? object.logEntities.map((e: any) => LogEntity.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ logEntities: globalThis.Array.isArray(object?.logEntities)
+ ? object.logEntities.map((e: any) => LogEntity.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListLogsResponse): unknown {
const obj: any = {};
- if (message.logEntities) {
- obj.logEntities = message.logEntities.map((e) => e ? LogEntity.toJSON(e) : undefined);
- } else {
- obj.logEntities = [];
+ if (message.logEntities?.length) {
+ obj.logEntities = message.logEntities.map((e) => LogEntity.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListLogsResponse>): ListLogsResponse {
return ListLogsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListLogsResponse>): ListLogsResponse {
const message = createBaseListLogsResponse();
message.logEntities = object.logEntities?.map((e) => LogEntity.fromPartial(e)) || [];
@@ -597,19 +605,20 @@ export const GetLogRequest = {
},
fromJSON(object: any): GetLogRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetLogRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetLogRequest>): GetLogRequest {
return GetLogRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetLogRequest>): GetLogRequest {
const message = createBaseGetLogRequest();
message.name = object.name ?? "";
@@ -674,24 +683,29 @@ export const ExportLogsRequest = {
fromJSON(object: any): ExportLogsRequest {
return {
- filter: isSet(object.filter) ? String(object.filter) : "",
- orderBy: isSet(object.orderBy) ? String(object.orderBy) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ orderBy: isSet(object.orderBy) ? globalThis.String(object.orderBy) : "",
format: isSet(object.format) ? exportFormatFromJSON(object.format) : 0,
};
},
toJSON(message: ExportLogsRequest): unknown {
const obj: any = {};
- message.filter !== undefined && (obj.filter = message.filter);
- message.orderBy !== undefined && (obj.orderBy = message.orderBy);
- message.format !== undefined && (obj.format = exportFormatToJSON(message.format));
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.orderBy !== "") {
+ obj.orderBy = message.orderBy;
+ }
+ if (message.format !== 0) {
+ obj.format = exportFormatToJSON(message.format);
+ }
return obj;
},
create(base?: DeepPartial<ExportLogsRequest>): ExportLogsRequest {
return ExportLogsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExportLogsRequest>): ExportLogsRequest {
const message = createBaseExportLogsRequest();
message.filter = object.filter ?? "";
@@ -742,15 +756,15 @@ export const ExportLogsResponse = {
toJSON(message: ExportLogsResponse): unknown {
const obj: any = {};
- message.content !== undefined &&
- (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array(0)));
+ if (message.content.length !== 0) {
+ obj.content = base64FromBytes(message.content);
+ }
return obj;
},
create(base?: DeepPartial<ExportLogsResponse>): ExportLogsResponse {
return ExportLogsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExportLogsResponse>): ExportLogsResponse {
const message = createBaseExportLogsResponse();
message.content = object.content ?? new Uint8Array(0);
@@ -885,36 +899,53 @@ export const LogEntity = {
fromJSON(object: any): LogEntity {
return {
- name: isSet(object.name) ? String(object.name) : "",
- creator: isSet(object.creator) ? String(object.creator) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
action: isSet(object.action) ? logEntity_ActionFromJSON(object.action) : 0,
level: isSet(object.level) ? logEntity_LevelFromJSON(object.level) : 0,
- resource: isSet(object.resource) ? String(object.resource) : "",
- payload: isSet(object.payload) ? String(object.payload) : "",
- comment: isSet(object.comment) ? String(object.comment) : "",
+ resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
+ payload: isSet(object.payload) ? globalThis.String(object.payload) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: LogEntity): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.creator !== undefined && (obj.creator = message.creator);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- message.action !== undefined && (obj.action = logEntity_ActionToJSON(message.action));
- message.level !== undefined && (obj.level = logEntity_LevelToJSON(message.level));
- message.resource !== undefined && (obj.resource = message.resource);
- message.payload !== undefined && (obj.payload = message.payload);
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.action !== 0) {
+ obj.action = logEntity_ActionToJSON(message.action);
+ }
+ if (message.level !== 0) {
+ obj.level = logEntity_LevelToJSON(message.level);
+ }
+ if (message.resource !== "") {
+ obj.resource = message.resource;
+ }
+ if (message.payload !== "") {
+ obj.payload = message.payload;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<LogEntity>): LogEntity {
return LogEntity.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LogEntity>): LogEntity {
const message = createBaseLogEntity();
message.name = object.name ?? "";
@@ -1003,30 +1034,11 @@ export const LoggingServiceDefinition = {
},
} as const;
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
function bytesFromBase64(b64: string): Uint8Array {
- if (tsProtoGlobalThis.Buffer) {
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
- const bin = tsProtoGlobalThis.atob(b64);
+ const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
@@ -1036,21 +1048,21 @@ function bytesFromBase64(b64: string): Uint8Array {
}
function base64FromBytes(arr: Uint8Array): string {
- if (tsProtoGlobalThis.Buffer) {
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
- bin.push(String.fromCharCode(byte));
+ bin.push(globalThis.String.fromCharCode(byte));
});
- return tsProtoGlobalThis.btoa(bin.join(""));
+ return globalThis.btoa(bin.join(""));
}
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -1064,14 +1076,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/org_policy_service.ts b/frontend/src/types/proto/v1/org_policy_service.ts
index 12807aa35d..83f6f39705 100644
--- a/frontend/src/types/proto/v1/org_policy_service.ts
+++ b/frontend/src/types/proto/v1/org_policy_service.ts
@@ -643,7 +643,7 @@ export const CreatePolicyRequest = {
fromJSON(object: any): CreatePolicyRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
policy: isSet(object.policy) ? Policy.fromJSON(object.policy) : undefined,
type: isSet(object.type) ? policyTypeFromJSON(object.type) : 0,
};
@@ -651,16 +651,21 @@ export const CreatePolicyRequest = {
toJSON(message: CreatePolicyRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.policy !== undefined && (obj.policy = message.policy ? Policy.toJSON(message.policy) : undefined);
- message.type !== undefined && (obj.type = policyTypeToJSON(message.type));
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.policy !== undefined) {
+ obj.policy = Policy.toJSON(message.policy);
+ }
+ if (message.type !== 0) {
+ obj.type = policyTypeToJSON(message.type);
+ }
return obj;
},
create(base?: DeepPartial<CreatePolicyRequest>): CreatePolicyRequest {
return CreatePolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreatePolicyRequest>): CreatePolicyRequest {
const message = createBaseCreatePolicyRequest();
message.parent = object.parent ?? "";
@@ -731,22 +736,27 @@ export const UpdatePolicyRequest = {
return {
policy: isSet(object.policy) ? Policy.fromJSON(object.policy) : undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
- allowMissing: isSet(object.allowMissing) ? Boolean(object.allowMissing) : false,
+ allowMissing: isSet(object.allowMissing) ? globalThis.Boolean(object.allowMissing) : false,
};
},
toJSON(message: UpdatePolicyRequest): unknown {
const obj: any = {};
- message.policy !== undefined && (obj.policy = message.policy ? Policy.toJSON(message.policy) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
- message.allowMissing !== undefined && (obj.allowMissing = message.allowMissing);
+ if (message.policy !== undefined) {
+ obj.policy = Policy.toJSON(message.policy);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
+ if (message.allowMissing === true) {
+ obj.allowMissing = message.allowMissing;
+ }
return obj;
},
create(base?: DeepPartial<UpdatePolicyRequest>): UpdatePolicyRequest {
return UpdatePolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdatePolicyRequest>): UpdatePolicyRequest {
const message = createBaseUpdatePolicyRequest();
message.policy = (object.policy !== undefined && object.policy !== null)
@@ -794,19 +804,20 @@ export const DeletePolicyRequest = {
},
fromJSON(object: any): DeletePolicyRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeletePolicyRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeletePolicyRequest>): DeletePolicyRequest {
return DeletePolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeletePolicyRequest>): DeletePolicyRequest {
const message = createBaseDeletePolicyRequest();
message.name = object.name ?? "";
@@ -850,19 +861,20 @@ export const GetPolicyRequest = {
},
fromJSON(object: any): GetPolicyRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetPolicyRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetPolicyRequest>): GetPolicyRequest {
return GetPolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetPolicyRequest>): GetPolicyRequest {
const message = createBaseGetPolicyRequest();
message.name = object.name ?? "";
@@ -947,29 +959,37 @@ export const ListPoliciesRequest = {
fromJSON(object: any): ListPoliciesRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
policyType: isSet(object.policyType) ? policyTypeFromJSON(object.policyType) : undefined,
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? Boolean(object.showDeleted) : false,
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
};
},
toJSON(message: ListPoliciesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.policyType !== undefined &&
- (obj.policyType = message.policyType !== undefined ? policyTypeToJSON(message.policyType) : undefined);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.policyType !== undefined) {
+ obj.policyType = policyTypeToJSON(message.policyType);
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted === true) {
+ obj.showDeleted = message.showDeleted;
+ }
return obj;
},
create(base?: DeepPartial<ListPoliciesRequest>): ListPoliciesRequest {
return ListPoliciesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListPoliciesRequest>): ListPoliciesRequest {
const message = createBaseListPoliciesRequest();
message.parent = object.parent ?? "";
@@ -1028,26 +1048,25 @@ export const ListPoliciesResponse = {
fromJSON(object: any): ListPoliciesResponse {
return {
- policies: Array.isArray(object?.policies) ? object.policies.map((e: any) => Policy.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ policies: globalThis.Array.isArray(object?.policies) ? object.policies.map((e: any) => Policy.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListPoliciesResponse): unknown {
const obj: any = {};
- if (message.policies) {
- obj.policies = message.policies.map((e) => e ? Policy.toJSON(e) : undefined);
- } else {
- obj.policies = [];
+ if (message.policies?.length) {
+ obj.policies = message.policies.map((e) => Policy.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListPoliciesResponse>): ListPoliciesResponse {
return ListPoliciesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListPoliciesResponse>): ListPoliciesResponse {
const message = createBaseListPoliciesResponse();
message.policies = object.policies?.map((e) => Policy.fromPartial(e)) || [];
@@ -1271,9 +1290,9 @@ export const Policy = {
fromJSON(object: any): Policy {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- inheritFromParent: isSet(object.inheritFromParent) ? Boolean(object.inheritFromParent) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ inheritFromParent: isSet(object.inheritFromParent) ? globalThis.Boolean(object.inheritFromParent) : false,
type: isSet(object.type) ? policyTypeFromJSON(object.type) : 0,
workspaceIamPolicy: isSet(object.workspaceIamPolicy) ? IamPolicy.fromJSON(object.workspaceIamPolicy) : undefined,
deploymentApprovalPolicy: isSet(object.deploymentApprovalPolicy)
@@ -1293,52 +1312,71 @@ export const Policy = {
maskingExceptionPolicy: isSet(object.maskingExceptionPolicy)
? MaskingExceptionPolicy.fromJSON(object.maskingExceptionPolicy)
: undefined,
- enforce: isSet(object.enforce) ? Boolean(object.enforce) : false,
+ enforce: isSet(object.enforce) ? globalThis.Boolean(object.enforce) : false,
resourceType: isSet(object.resourceType) ? policyResourceTypeFromJSON(object.resourceType) : 0,
- resourceUid: isSet(object.resourceUid) ? String(object.resourceUid) : "",
+ resourceUid: isSet(object.resourceUid) ? globalThis.String(object.resourceUid) : "",
};
},
toJSON(message: Policy): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.inheritFromParent !== undefined && (obj.inheritFromParent = message.inheritFromParent);
- message.type !== undefined && (obj.type = policyTypeToJSON(message.type));
- message.workspaceIamPolicy !== undefined &&
- (obj.workspaceIamPolicy = message.workspaceIamPolicy ? IamPolicy.toJSON(message.workspaceIamPolicy) : undefined);
- message.deploymentApprovalPolicy !== undefined && (obj.deploymentApprovalPolicy = message.deploymentApprovalPolicy
- ? DeploymentApprovalPolicy.toJSON(message.deploymentApprovalPolicy)
- : undefined);
- message.rolloutPolicy !== undefined &&
- (obj.rolloutPolicy = message.rolloutPolicy ? RolloutPolicy.toJSON(message.rolloutPolicy) : undefined);
- message.backupPlanPolicy !== undefined &&
- (obj.backupPlanPolicy = message.backupPlanPolicy ? BackupPlanPolicy.toJSON(message.backupPlanPolicy) : undefined);
- message.maskingPolicy !== undefined &&
- (obj.maskingPolicy = message.maskingPolicy ? MaskingPolicy.toJSON(message.maskingPolicy) : undefined);
- message.sqlReviewPolicy !== undefined &&
- (obj.sqlReviewPolicy = message.sqlReviewPolicy ? SQLReviewPolicy.toJSON(message.sqlReviewPolicy) : undefined);
- message.slowQueryPolicy !== undefined &&
- (obj.slowQueryPolicy = message.slowQueryPolicy ? SlowQueryPolicy.toJSON(message.slowQueryPolicy) : undefined);
- message.disableCopyDataPolicy !== undefined && (obj.disableCopyDataPolicy = message.disableCopyDataPolicy
- ? DisableCopyDataPolicy.toJSON(message.disableCopyDataPolicy)
- : undefined);
- message.maskingRulePolicy !== undefined && (obj.maskingRulePolicy = message.maskingRulePolicy
- ? MaskingRulePolicy.toJSON(message.maskingRulePolicy)
- : undefined);
- message.maskingExceptionPolicy !== undefined && (obj.maskingExceptionPolicy = message.maskingExceptionPolicy
- ? MaskingExceptionPolicy.toJSON(message.maskingExceptionPolicy)
- : undefined);
- message.enforce !== undefined && (obj.enforce = message.enforce);
- message.resourceType !== undefined && (obj.resourceType = policyResourceTypeToJSON(message.resourceType));
- message.resourceUid !== undefined && (obj.resourceUid = message.resourceUid);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.inheritFromParent === true) {
+ obj.inheritFromParent = message.inheritFromParent;
+ }
+ if (message.type !== 0) {
+ obj.type = policyTypeToJSON(message.type);
+ }
+ if (message.workspaceIamPolicy !== undefined) {
+ obj.workspaceIamPolicy = IamPolicy.toJSON(message.workspaceIamPolicy);
+ }
+ if (message.deploymentApprovalPolicy !== undefined) {
+ obj.deploymentApprovalPolicy = DeploymentApprovalPolicy.toJSON(message.deploymentApprovalPolicy);
+ }
+ if (message.rolloutPolicy !== undefined) {
+ obj.rolloutPolicy = RolloutPolicy.toJSON(message.rolloutPolicy);
+ }
+ if (message.backupPlanPolicy !== undefined) {
+ obj.backupPlanPolicy = BackupPlanPolicy.toJSON(message.backupPlanPolicy);
+ }
+ if (message.maskingPolicy !== undefined) {
+ obj.maskingPolicy = MaskingPolicy.toJSON(message.maskingPolicy);
+ }
+ if (message.sqlReviewPolicy !== undefined) {
+ obj.sqlReviewPolicy = SQLReviewPolicy.toJSON(message.sqlReviewPolicy);
+ }
+ if (message.slowQueryPolicy !== undefined) {
+ obj.slowQueryPolicy = SlowQueryPolicy.toJSON(message.slowQueryPolicy);
+ }
+ if (message.disableCopyDataPolicy !== undefined) {
+ obj.disableCopyDataPolicy = DisableCopyDataPolicy.toJSON(message.disableCopyDataPolicy);
+ }
+ if (message.maskingRulePolicy !== undefined) {
+ obj.maskingRulePolicy = MaskingRulePolicy.toJSON(message.maskingRulePolicy);
+ }
+ if (message.maskingExceptionPolicy !== undefined) {
+ obj.maskingExceptionPolicy = MaskingExceptionPolicy.toJSON(message.maskingExceptionPolicy);
+ }
+ if (message.enforce === true) {
+ obj.enforce = message.enforce;
+ }
+ if (message.resourceType !== 0) {
+ obj.resourceType = policyResourceTypeToJSON(message.resourceType);
+ }
+ if (message.resourceUid !== "") {
+ obj.resourceUid = message.resourceUid;
+ }
return obj;
},
create(base?: DeepPartial<Policy>): Policy {
return Policy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Policy>): Policy {
const message = createBasePolicy();
message.name = object.name ?? "";
@@ -1433,7 +1471,7 @@ export const DeploymentApprovalPolicy = {
fromJSON(object: any): DeploymentApprovalPolicy {
return {
defaultStrategy: isSet(object.defaultStrategy) ? approvalStrategyFromJSON(object.defaultStrategy) : 0,
- deploymentApprovalStrategies: Array.isArray(object?.deploymentApprovalStrategies)
+ deploymentApprovalStrategies: globalThis.Array.isArray(object?.deploymentApprovalStrategies)
? object.deploymentApprovalStrategies.map((e: any) => DeploymentApprovalStrategy.fromJSON(e))
: [],
};
@@ -1441,13 +1479,13 @@ export const DeploymentApprovalPolicy = {
toJSON(message: DeploymentApprovalPolicy): unknown {
const obj: any = {};
- message.defaultStrategy !== undefined && (obj.defaultStrategy = approvalStrategyToJSON(message.defaultStrategy));
- if (message.deploymentApprovalStrategies) {
+ if (message.defaultStrategy !== 0) {
+ obj.defaultStrategy = approvalStrategyToJSON(message.defaultStrategy);
+ }
+ if (message.deploymentApprovalStrategies?.length) {
obj.deploymentApprovalStrategies = message.deploymentApprovalStrategies.map((e) =>
- e ? DeploymentApprovalStrategy.toJSON(e) : undefined
+ DeploymentApprovalStrategy.toJSON(e)
);
- } else {
- obj.deploymentApprovalStrategies = [];
}
return obj;
},
@@ -1455,7 +1493,6 @@ export const DeploymentApprovalPolicy = {
create(base?: DeepPartial<DeploymentApprovalPolicy>): DeploymentApprovalPolicy {
return DeploymentApprovalPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeploymentApprovalPolicy>): DeploymentApprovalPolicy {
const message = createBaseDeploymentApprovalPolicy();
message.defaultStrategy = object.defaultStrategy ?? 0;
@@ -1532,30 +1569,32 @@ export const RolloutPolicy = {
fromJSON(object: any): RolloutPolicy {
return {
- automatic: isSet(object.automatic) ? Boolean(object.automatic) : false,
- workspaceRoles: Array.isArray(object?.workspaceRoles) ? object.workspaceRoles.map((e: any) => String(e)) : [],
- projectRoles: Array.isArray(object?.projectRoles) ? object.projectRoles.map((e: any) => String(e)) : [],
- issueRoles: Array.isArray(object?.issueRoles) ? object.issueRoles.map((e: any) => String(e)) : [],
+ automatic: isSet(object.automatic) ? globalThis.Boolean(object.automatic) : false,
+ workspaceRoles: globalThis.Array.isArray(object?.workspaceRoles)
+ ? object.workspaceRoles.map((e: any) => globalThis.String(e))
+ : [],
+ projectRoles: globalThis.Array.isArray(object?.projectRoles)
+ ? object.projectRoles.map((e: any) => globalThis.String(e))
+ : [],
+ issueRoles: globalThis.Array.isArray(object?.issueRoles)
+ ? object.issueRoles.map((e: any) => globalThis.String(e))
+ : [],
};
},
toJSON(message: RolloutPolicy): unknown {
const obj: any = {};
- message.automatic !== undefined && (obj.automatic = message.automatic);
- if (message.workspaceRoles) {
- obj.workspaceRoles = message.workspaceRoles.map((e) => e);
- } else {
- obj.workspaceRoles = [];
- }
- if (message.projectRoles) {
- obj.projectRoles = message.projectRoles.map((e) => e);
- } else {
- obj.projectRoles = [];
- }
- if (message.issueRoles) {
- obj.issueRoles = message.issueRoles.map((e) => e);
- } else {
- obj.issueRoles = [];
+ if (message.automatic === true) {
+ obj.automatic = message.automatic;
+ }
+ if (message.workspaceRoles?.length) {
+ obj.workspaceRoles = message.workspaceRoles;
+ }
+ if (message.projectRoles?.length) {
+ obj.projectRoles = message.projectRoles;
+ }
+ if (message.issueRoles?.length) {
+ obj.issueRoles = message.issueRoles;
}
return obj;
},
@@ -1563,7 +1602,6 @@ export const RolloutPolicy = {
create(base?: DeepPartial<RolloutPolicy>): RolloutPolicy {
return RolloutPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RolloutPolicy>): RolloutPolicy {
const message = createBaseRolloutPolicy();
message.automatic = object.automatic ?? false;
@@ -1639,16 +1677,21 @@ export const DeploymentApprovalStrategy = {
toJSON(message: DeploymentApprovalStrategy): unknown {
const obj: any = {};
- message.deploymentType !== undefined && (obj.deploymentType = deploymentTypeToJSON(message.deploymentType));
- message.approvalGroup !== undefined && (obj.approvalGroup = approvalGroupToJSON(message.approvalGroup));
- message.approvalStrategy !== undefined && (obj.approvalStrategy = approvalStrategyToJSON(message.approvalStrategy));
+ if (message.deploymentType !== 0) {
+ obj.deploymentType = deploymentTypeToJSON(message.deploymentType);
+ }
+ if (message.approvalGroup !== 0) {
+ obj.approvalGroup = approvalGroupToJSON(message.approvalGroup);
+ }
+ if (message.approvalStrategy !== 0) {
+ obj.approvalStrategy = approvalStrategyToJSON(message.approvalStrategy);
+ }
return obj;
},
create(base?: DeepPartial<DeploymentApprovalStrategy>): DeploymentApprovalStrategy {
return DeploymentApprovalStrategy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeploymentApprovalStrategy>): DeploymentApprovalStrategy {
const message = createBaseDeploymentApprovalStrategy();
message.deploymentType = object.deploymentType ?? 0;
@@ -1712,16 +1755,18 @@ export const BackupPlanPolicy = {
toJSON(message: BackupPlanPolicy): unknown {
const obj: any = {};
- message.schedule !== undefined && (obj.schedule = backupPlanScheduleToJSON(message.schedule));
- message.retentionDuration !== undefined &&
- (obj.retentionDuration = message.retentionDuration ? Duration.toJSON(message.retentionDuration) : undefined);
+ if (message.schedule !== 0) {
+ obj.schedule = backupPlanScheduleToJSON(message.schedule);
+ }
+ if (message.retentionDuration !== undefined) {
+ obj.retentionDuration = Duration.toJSON(message.retentionDuration);
+ }
return obj;
},
create(base?: DeepPartial<BackupPlanPolicy>): BackupPlanPolicy {
return BackupPlanPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BackupPlanPolicy>): BackupPlanPolicy {
const message = createBaseBackupPlanPolicy();
message.schedule = object.schedule ?? 0;
@@ -1768,19 +1813,20 @@ export const SlowQueryPolicy = {
},
fromJSON(object: any): SlowQueryPolicy {
- return { active: isSet(object.active) ? Boolean(object.active) : false };
+ return { active: isSet(object.active) ? globalThis.Boolean(object.active) : false };
},
toJSON(message: SlowQueryPolicy): unknown {
const obj: any = {};
- message.active !== undefined && (obj.active = message.active);
+ if (message.active === true) {
+ obj.active = message.active;
+ }
return obj;
},
create(base?: DeepPartial<SlowQueryPolicy>): SlowQueryPolicy {
return SlowQueryPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SlowQueryPolicy>): SlowQueryPolicy {
const message = createBaseSlowQueryPolicy();
message.active = object.active ?? false;
@@ -1824,19 +1870,20 @@ export const DisableCopyDataPolicy = {
},
fromJSON(object: any): DisableCopyDataPolicy {
- return { active: isSet(object.active) ? Boolean(object.active) : false };
+ return { active: isSet(object.active) ? globalThis.Boolean(object.active) : false };
},
toJSON(message: DisableCopyDataPolicy): unknown {
const obj: any = {};
- message.active !== undefined && (obj.active = message.active);
+ if (message.active === true) {
+ obj.active = message.active;
+ }
return obj;
},
create(base?: DeepPartial<DisableCopyDataPolicy>): DisableCopyDataPolicy {
return DisableCopyDataPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DisableCopyDataPolicy>): DisableCopyDataPolicy {
const message = createBaseDisableCopyDataPolicy();
message.active = object.active ?? false;
@@ -1880,15 +1927,15 @@ export const MaskingPolicy = {
},
fromJSON(object: any): MaskingPolicy {
- return { maskData: Array.isArray(object?.maskData) ? object.maskData.map((e: any) => MaskData.fromJSON(e)) : [] };
+ return {
+ maskData: globalThis.Array.isArray(object?.maskData) ? object.maskData.map((e: any) => MaskData.fromJSON(e)) : [],
+ };
},
toJSON(message: MaskingPolicy): unknown {
const obj: any = {};
- if (message.maskData) {
- obj.maskData = message.maskData.map((e) => e ? MaskData.toJSON(e) : undefined);
- } else {
- obj.maskData = [];
+ if (message.maskData?.length) {
+ obj.maskData = message.maskData.map((e) => MaskData.toJSON(e));
}
return obj;
},
@@ -1896,7 +1943,6 @@ export const MaskingPolicy = {
create(base?: DeepPartial<MaskingPolicy>): MaskingPolicy {
return MaskingPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingPolicy>): MaskingPolicy {
const message = createBaseMaskingPolicy();
message.maskData = object.maskData?.map((e) => MaskData.fromPartial(e)) || [];
@@ -1998,33 +2044,45 @@ export const MaskData = {
fromJSON(object: any): MaskData {
return {
- schema: isSet(object.schema) ? String(object.schema) : "",
- table: isSet(object.table) ? String(object.table) : "",
- column: isSet(object.column) ? String(object.column) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ column: isSet(object.column) ? globalThis.String(object.column) : "",
maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
- fullMaskingAlgorithmId: isSet(object.fullMaskingAlgorithmId) ? String(object.fullMaskingAlgorithmId) : "",
+ fullMaskingAlgorithmId: isSet(object.fullMaskingAlgorithmId)
+ ? globalThis.String(object.fullMaskingAlgorithmId)
+ : "",
partialMaskingAlgorithmId: isSet(object.partialMaskingAlgorithmId)
- ? String(object.partialMaskingAlgorithmId)
+ ? globalThis.String(object.partialMaskingAlgorithmId)
: "",
};
},
toJSON(message: MaskData): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
- message.table !== undefined && (obj.table = message.table);
- message.column !== undefined && (obj.column = message.column);
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
- message.fullMaskingAlgorithmId !== undefined && (obj.fullMaskingAlgorithmId = message.fullMaskingAlgorithmId);
- message.partialMaskingAlgorithmId !== undefined &&
- (obj.partialMaskingAlgorithmId = message.partialMaskingAlgorithmId);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
+ if (message.fullMaskingAlgorithmId !== "") {
+ obj.fullMaskingAlgorithmId = message.fullMaskingAlgorithmId;
+ }
+ if (message.partialMaskingAlgorithmId !== "") {
+ obj.partialMaskingAlgorithmId = message.partialMaskingAlgorithmId;
+ }
return obj;
},
create(base?: DeepPartial<MaskData>): MaskData {
return MaskData.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskData>): MaskData {
const message = createBaseMaskData();
message.schema = object.schema ?? "";
@@ -2084,18 +2142,18 @@ export const SQLReviewPolicy = {
fromJSON(object: any): SQLReviewPolicy {
return {
- name: isSet(object.name) ? String(object.name) : "",
- rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => SQLReviewRule.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e: any) => SQLReviewRule.fromJSON(e)) : [],
};
},
toJSON(message: SQLReviewPolicy): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? SQLReviewRule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => SQLReviewRule.toJSON(e));
}
return obj;
},
@@ -2103,7 +2161,6 @@ export const SQLReviewPolicy = {
create(base?: DeepPartial<SQLReviewPolicy>): SQLReviewPolicy {
return SQLReviewPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SQLReviewPolicy>): SQLReviewPolicy {
const message = createBaseSQLReviewPolicy();
message.name = object.name ?? "";
@@ -2189,28 +2246,37 @@ export const SQLReviewRule = {
fromJSON(object: any): SQLReviewRule {
return {
- type: isSet(object.type) ? String(object.type) : "",
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
level: isSet(object.level) ? sQLReviewRuleLevelFromJSON(object.level) : 0,
- payload: isSet(object.payload) ? String(object.payload) : "",
+ payload: isSet(object.payload) ? globalThis.String(object.payload) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- comment: isSet(object.comment) ? String(object.comment) : "",
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
};
},
toJSON(message: SQLReviewRule): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = message.type);
- message.level !== undefined && (obj.level = sQLReviewRuleLevelToJSON(message.level));
- message.payload !== undefined && (obj.payload = message.payload);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.comment !== undefined && (obj.comment = message.comment);
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.level !== 0) {
+ obj.level = sQLReviewRuleLevelToJSON(message.level);
+ }
+ if (message.payload !== "") {
+ obj.payload = message.payload;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
return obj;
},
create(base?: DeepPartial<SQLReviewRule>): SQLReviewRule {
return SQLReviewRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SQLReviewRule>): SQLReviewRule {
const message = createBaseSQLReviewRule();
message.type = object.type ?? "";
@@ -2259,7 +2325,7 @@ export const MaskingExceptionPolicy = {
fromJSON(object: any): MaskingExceptionPolicy {
return {
- maskingExceptions: Array.isArray(object?.maskingExceptions)
+ maskingExceptions: globalThis.Array.isArray(object?.maskingExceptions)
? object.maskingExceptions.map((e: any) => MaskingExceptionPolicy_MaskingException.fromJSON(e))
: [],
};
@@ -2267,12 +2333,8 @@ export const MaskingExceptionPolicy = {
toJSON(message: MaskingExceptionPolicy): unknown {
const obj: any = {};
- if (message.maskingExceptions) {
- obj.maskingExceptions = message.maskingExceptions.map((e) =>
- e ? MaskingExceptionPolicy_MaskingException.toJSON(e) : undefined
- );
- } else {
- obj.maskingExceptions = [];
+ if (message.maskingExceptions?.length) {
+ obj.maskingExceptions = message.maskingExceptions.map((e) => MaskingExceptionPolicy_MaskingException.toJSON(e));
}
return obj;
},
@@ -2280,7 +2342,6 @@ export const MaskingExceptionPolicy = {
create(base?: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {
return MaskingExceptionPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {
const message = createBaseMaskingExceptionPolicy();
message.maskingExceptions =
@@ -2358,24 +2419,31 @@ export const MaskingExceptionPolicy_MaskingException = {
return {
action: isSet(object.action) ? maskingExceptionPolicy_MaskingException_ActionFromJSON(object.action) : 0,
maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
- member: isSet(object.member) ? String(object.member) : "",
+ member: isSet(object.member) ? globalThis.String(object.member) : "",
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
};
},
toJSON(message: MaskingExceptionPolicy_MaskingException): unknown {
const obj: any = {};
- message.action !== undefined && (obj.action = maskingExceptionPolicy_MaskingException_ActionToJSON(message.action));
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
- message.member !== undefined && (obj.member = message.member);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
+ if (message.action !== 0) {
+ obj.action = maskingExceptionPolicy_MaskingException_ActionToJSON(message.action);
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
+ if (message.member !== "") {
+ obj.member = message.member;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
return obj;
},
create(base?: DeepPartial<MaskingExceptionPolicy_MaskingException>): MaskingExceptionPolicy_MaskingException {
return MaskingExceptionPolicy_MaskingException.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingExceptionPolicy_MaskingException>): MaskingExceptionPolicy_MaskingException {
const message = createBaseMaskingExceptionPolicy_MaskingException();
message.action = object.action ?? 0;
@@ -2425,7 +2493,7 @@ export const MaskingRulePolicy = {
fromJSON(object: any): MaskingRulePolicy {
return {
- rules: Array.isArray(object?.rules)
+ rules: globalThis.Array.isArray(object?.rules)
? object.rules.map((e: any) => MaskingRulePolicy_MaskingRule.fromJSON(e))
: [],
};
@@ -2433,10 +2501,8 @@ export const MaskingRulePolicy = {
toJSON(message: MaskingRulePolicy): unknown {
const obj: any = {};
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? MaskingRulePolicy_MaskingRule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => MaskingRulePolicy_MaskingRule.toJSON(e));
}
return obj;
},
@@ -2444,7 +2510,6 @@ export const MaskingRulePolicy = {
create(base?: DeepPartial<MaskingRulePolicy>): MaskingRulePolicy {
return MaskingRulePolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingRulePolicy>): MaskingRulePolicy {
const message = createBaseMaskingRulePolicy();
message.rules = object.rules?.map((e) => MaskingRulePolicy_MaskingRule.fromPartial(e)) || [];
@@ -2509,7 +2574,7 @@ export const MaskingRulePolicy_MaskingRule = {
fromJSON(object: any): MaskingRulePolicy_MaskingRule {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
};
@@ -2517,16 +2582,21 @@ export const MaskingRulePolicy_MaskingRule = {
toJSON(message: MaskingRulePolicy_MaskingRule): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
return obj;
},
create(base?: DeepPartial<MaskingRulePolicy_MaskingRule>): MaskingRulePolicy_MaskingRule {
return MaskingRulePolicy_MaskingRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingRulePolicy_MaskingRule>): MaskingRulePolicy_MaskingRule {
const message = createBaseMaskingRulePolicy_MaskingRule();
message.id = object.id ?? "";
@@ -3663,7 +3733,7 @@ export const OrgPolicyServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.ts
index fe55e6a2f8..5cedb7111e 100644
--- a/frontend/src/types/proto/v1/project_service.ts
+++ b/frontend/src/types/proto/v1/project_service.ts
@@ -1278,19 +1278,20 @@ export const GetProjectRequest = {
},
fromJSON(object: any): GetProjectRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetProjectRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetProjectRequest>): GetProjectRequest {
return GetProjectRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetProjectRequest>): GetProjectRequest {
const message = createBaseGetProjectRequest();
message.name = object.name ?? "";
@@ -1355,24 +1356,29 @@ export const ListProjectsRequest = {
fromJSON(object: any): ListProjectsRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- showDeleted: isSet(object.showDeleted) ? Boolean(object.showDeleted) : false,
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ showDeleted: isSet(object.showDeleted) ? globalThis.Boolean(object.showDeleted) : false,
};
},
toJSON(message: ListProjectsRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.showDeleted === true) {
+ obj.showDeleted = message.showDeleted;
+ }
return obj;
},
create(base?: DeepPartial<ListProjectsRequest>): ListProjectsRequest {
return ListProjectsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListProjectsRequest>): ListProjectsRequest {
const message = createBaseListProjectsRequest();
message.pageSize = object.pageSize ?? 0;
@@ -1429,26 +1435,25 @@ export const ListProjectsResponse = {
fromJSON(object: any): ListProjectsResponse {
return {
- projects: Array.isArray(object?.projects) ? object.projects.map((e: any) => Project.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ projects: globalThis.Array.isArray(object?.projects) ? object.projects.map((e: any) => Project.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListProjectsResponse): unknown {
const obj: any = {};
- if (message.projects) {
- obj.projects = message.projects.map((e) => e ? Project.toJSON(e) : undefined);
- } else {
- obj.projects = [];
+ if (message.projects?.length) {
+ obj.projects = message.projects.map((e) => Project.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListProjectsResponse>): ListProjectsResponse {
return ListProjectsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListProjectsResponse>): ListProjectsResponse {
const message = createBaseListProjectsResponse();
message.projects = object.projects?.map((e) => Project.fromPartial(e)) || [];
@@ -1514,24 +1519,29 @@ export const SearchProjectsRequest = {
fromJSON(object: any): SearchProjectsRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
};
},
toJSON(message: SearchProjectsRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.filter !== undefined && (obj.filter = message.filter);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
return obj;
},
create(base?: DeepPartial<SearchProjectsRequest>): SearchProjectsRequest {
return SearchProjectsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchProjectsRequest>): SearchProjectsRequest {
const message = createBaseSearchProjectsRequest();
message.pageSize = object.pageSize ?? 0;
@@ -1588,26 +1598,25 @@ export const SearchProjectsResponse = {
fromJSON(object: any): SearchProjectsResponse {
return {
- projects: Array.isArray(object?.projects) ? object.projects.map((e: any) => Project.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ projects: globalThis.Array.isArray(object?.projects) ? object.projects.map((e: any) => Project.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: SearchProjectsResponse): unknown {
const obj: any = {};
- if (message.projects) {
- obj.projects = message.projects.map((e) => e ? Project.toJSON(e) : undefined);
- } else {
- obj.projects = [];
+ if (message.projects?.length) {
+ obj.projects = message.projects.map((e) => Project.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<SearchProjectsResponse>): SearchProjectsResponse {
return SearchProjectsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchProjectsResponse>): SearchProjectsResponse {
const message = createBaseSearchProjectsResponse();
message.projects = object.projects?.map((e) => Project.fromPartial(e)) || [];
@@ -1664,21 +1673,24 @@ export const CreateProjectRequest = {
fromJSON(object: any): CreateProjectRequest {
return {
project: isSet(object.project) ? Project.fromJSON(object.project) : undefined,
- projectId: isSet(object.projectId) ? String(object.projectId) : "",
+ projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
};
},
toJSON(message: CreateProjectRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project ? Project.toJSON(message.project) : undefined);
- message.projectId !== undefined && (obj.projectId = message.projectId);
+ if (message.project !== undefined) {
+ obj.project = Project.toJSON(message.project);
+ }
+ if (message.projectId !== "") {
+ obj.projectId = message.projectId;
+ }
return obj;
},
create(base?: DeepPartial<CreateProjectRequest>): CreateProjectRequest {
return CreateProjectRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateProjectRequest>): CreateProjectRequest {
const message = createBaseCreateProjectRequest();
message.project = (object.project !== undefined && object.project !== null)
@@ -1743,15 +1755,18 @@ export const UpdateProjectRequest = {
toJSON(message: UpdateProjectRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project ? Project.toJSON(message.project) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.project !== undefined) {
+ obj.project = Project.toJSON(message.project);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateProjectRequest>): UpdateProjectRequest {
return UpdateProjectRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateProjectRequest>): UpdateProjectRequest {
const message = createBaseUpdateProjectRequest();
message.project = (object.project !== undefined && object.project !== null)
@@ -1809,22 +1824,25 @@ export const DeleteProjectRequest = {
fromJSON(object: any): DeleteProjectRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- force: isSet(object.force) ? Boolean(object.force) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ force: isSet(object.force) ? globalThis.Boolean(object.force) : false,
};
},
toJSON(message: DeleteProjectRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.force !== undefined && (obj.force = message.force);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.force === true) {
+ obj.force = message.force;
+ }
return obj;
},
create(base?: DeepPartial<DeleteProjectRequest>): DeleteProjectRequest {
return DeleteProjectRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteProjectRequest>): DeleteProjectRequest {
const message = createBaseDeleteProjectRequest();
message.name = object.name ?? "";
@@ -1869,19 +1887,20 @@ export const UndeleteProjectRequest = {
},
fromJSON(object: any): UndeleteProjectRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UndeleteProjectRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UndeleteProjectRequest>): UndeleteProjectRequest {
return UndeleteProjectRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UndeleteProjectRequest>): UndeleteProjectRequest {
const message = createBaseUndeleteProjectRequest();
message.name = object.name ?? "";
@@ -1925,19 +1944,20 @@ export const GetIamPolicyRequest = {
},
fromJSON(object: any): GetIamPolicyRequest {
- return { project: isSet(object.project) ? String(object.project) : "" };
+ return { project: isSet(object.project) ? globalThis.String(object.project) : "" };
},
toJSON(message: GetIamPolicyRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
return obj;
},
create(base?: DeepPartial<GetIamPolicyRequest>): GetIamPolicyRequest {
return GetIamPolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetIamPolicyRequest>): GetIamPolicyRequest {
const message = createBaseGetIamPolicyRequest();
message.project = object.project ?? "";
@@ -1992,18 +2012,18 @@ export const BatchGetIamPolicyRequest = {
fromJSON(object: any): BatchGetIamPolicyRequest {
return {
- scope: isSet(object.scope) ? String(object.scope) : "",
- names: Array.isArray(object?.names) ? object.names.map((e: any) => String(e)) : [],
+ scope: isSet(object.scope) ? globalThis.String(object.scope) : "",
+ names: globalThis.Array.isArray(object?.names) ? object.names.map((e: any) => globalThis.String(e)) : [],
};
},
toJSON(message: BatchGetIamPolicyRequest): unknown {
const obj: any = {};
- message.scope !== undefined && (obj.scope = message.scope);
- if (message.names) {
- obj.names = message.names.map((e) => e);
- } else {
- obj.names = [];
+ if (message.scope !== "") {
+ obj.scope = message.scope;
+ }
+ if (message.names?.length) {
+ obj.names = message.names;
}
return obj;
},
@@ -2011,7 +2031,6 @@ export const BatchGetIamPolicyRequest = {
create(base?: DeepPartial<BatchGetIamPolicyRequest>): BatchGetIamPolicyRequest {
return BatchGetIamPolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchGetIamPolicyRequest>): BatchGetIamPolicyRequest {
const message = createBaseBatchGetIamPolicyRequest();
message.scope = object.scope ?? "";
@@ -2057,7 +2076,7 @@ export const BatchGetIamPolicyResponse = {
fromJSON(object: any): BatchGetIamPolicyResponse {
return {
- policyResults: Array.isArray(object?.policyResults)
+ policyResults: globalThis.Array.isArray(object?.policyResults)
? object.policyResults.map((e: any) => BatchGetIamPolicyResponse_PolicyResult.fromJSON(e))
: [],
};
@@ -2065,12 +2084,8 @@ export const BatchGetIamPolicyResponse = {
toJSON(message: BatchGetIamPolicyResponse): unknown {
const obj: any = {};
- if (message.policyResults) {
- obj.policyResults = message.policyResults.map((e) =>
- e ? BatchGetIamPolicyResponse_PolicyResult.toJSON(e) : undefined
- );
- } else {
- obj.policyResults = [];
+ if (message.policyResults?.length) {
+ obj.policyResults = message.policyResults.map((e) => BatchGetIamPolicyResponse_PolicyResult.toJSON(e));
}
return obj;
},
@@ -2078,7 +2093,6 @@ export const BatchGetIamPolicyResponse = {
create(base?: DeepPartial<BatchGetIamPolicyResponse>): BatchGetIamPolicyResponse {
return BatchGetIamPolicyResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchGetIamPolicyResponse>): BatchGetIamPolicyResponse {
const message = createBaseBatchGetIamPolicyResponse();
message.policyResults = object.policyResults?.map((e) => BatchGetIamPolicyResponse_PolicyResult.fromPartial(e)) ||
@@ -2134,22 +2148,25 @@ export const BatchGetIamPolicyResponse_PolicyResult = {
fromJSON(object: any): BatchGetIamPolicyResponse_PolicyResult {
return {
- project: isSet(object.project) ? String(object.project) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
policy: isSet(object.policy) ? IamPolicy.fromJSON(object.policy) : undefined,
};
},
toJSON(message: BatchGetIamPolicyResponse_PolicyResult): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
- message.policy !== undefined && (obj.policy = message.policy ? IamPolicy.toJSON(message.policy) : undefined);
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.policy !== undefined) {
+ obj.policy = IamPolicy.toJSON(message.policy);
+ }
return obj;
},
create(base?: DeepPartial<BatchGetIamPolicyResponse_PolicyResult>): BatchGetIamPolicyResponse_PolicyResult {
return BatchGetIamPolicyResponse_PolicyResult.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchGetIamPolicyResponse_PolicyResult>): BatchGetIamPolicyResponse_PolicyResult {
const message = createBaseBatchGetIamPolicyResponse_PolicyResult();
message.project = object.project ?? "";
@@ -2207,22 +2224,25 @@ export const SetIamPolicyRequest = {
fromJSON(object: any): SetIamPolicyRequest {
return {
- project: isSet(object.project) ? String(object.project) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
policy: isSet(object.policy) ? IamPolicy.fromJSON(object.policy) : undefined,
};
},
toJSON(message: SetIamPolicyRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
- message.policy !== undefined && (obj.policy = message.policy ? IamPolicy.toJSON(message.policy) : undefined);
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.policy !== undefined) {
+ obj.policy = IamPolicy.toJSON(message.policy);
+ }
return obj;
},
create(base?: DeepPartial<SetIamPolicyRequest>): SetIamPolicyRequest {
return SetIamPolicyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SetIamPolicyRequest>): SetIamPolicyRequest {
const message = createBaseSetIamPolicyRequest();
message.project = object.project ?? "";
@@ -2269,19 +2289,20 @@ export const GetDeploymentConfigRequest = {
},
fromJSON(object: any): GetDeploymentConfigRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetDeploymentConfigRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetDeploymentConfigRequest>): GetDeploymentConfigRequest {
return GetDeploymentConfigRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetDeploymentConfigRequest>): GetDeploymentConfigRequest {
const message = createBaseGetDeploymentConfigRequest();
message.name = object.name ?? "";
@@ -2330,14 +2351,15 @@ export const UpdateDeploymentConfigRequest = {
toJSON(message: UpdateDeploymentConfigRequest): unknown {
const obj: any = {};
- message.config !== undefined && (obj.config = message.config ? DeploymentConfig.toJSON(message.config) : undefined);
+ if (message.config !== undefined) {
+ obj.config = DeploymentConfig.toJSON(message.config);
+ }
return obj;
},
create(base?: DeepPartial<UpdateDeploymentConfigRequest>): UpdateDeploymentConfigRequest {
return UpdateDeploymentConfigRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateDeploymentConfigRequest>): UpdateDeploymentConfigRequest {
const message = createBaseUpdateDeploymentConfigRequest();
message.config = (object.config !== undefined && object.config !== null)
@@ -2408,24 +2430,27 @@ export const UpdateProjectGitOpsInfoRequest = {
? ProjectGitOpsInfo.fromJSON(object.projectGitopsInfo)
: undefined,
updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
- allowMissing: isSet(object.allowMissing) ? Boolean(object.allowMissing) : false,
+ allowMissing: isSet(object.allowMissing) ? globalThis.Boolean(object.allowMissing) : false,
};
},
toJSON(message: UpdateProjectGitOpsInfoRequest): unknown {
const obj: any = {};
- message.projectGitopsInfo !== undefined && (obj.projectGitopsInfo = message.projectGitopsInfo
- ? ProjectGitOpsInfo.toJSON(message.projectGitopsInfo)
- : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
- message.allowMissing !== undefined && (obj.allowMissing = message.allowMissing);
+ if (message.projectGitopsInfo !== undefined) {
+ obj.projectGitopsInfo = ProjectGitOpsInfo.toJSON(message.projectGitopsInfo);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
+ if (message.allowMissing === true) {
+ obj.allowMissing = message.allowMissing;
+ }
return obj;
},
create(base?: DeepPartial<UpdateProjectGitOpsInfoRequest>): UpdateProjectGitOpsInfoRequest {
return UpdateProjectGitOpsInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateProjectGitOpsInfoRequest>): UpdateProjectGitOpsInfoRequest {
const message = createBaseUpdateProjectGitOpsInfoRequest();
message.projectGitopsInfo = (object.projectGitopsInfo !== undefined && object.projectGitopsInfo !== null)
@@ -2473,19 +2498,20 @@ export const UnsetProjectGitOpsInfoRequest = {
},
fromJSON(object: any): UnsetProjectGitOpsInfoRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: UnsetProjectGitOpsInfoRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<UnsetProjectGitOpsInfoRequest>): UnsetProjectGitOpsInfoRequest {
return UnsetProjectGitOpsInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UnsetProjectGitOpsInfoRequest>): UnsetProjectGitOpsInfoRequest {
const message = createBaseUnsetProjectGitOpsInfoRequest();
message.name = object.name ?? "";
@@ -2529,19 +2555,20 @@ export const GetProjectGitOpsInfoRequest = {
},
fromJSON(object: any): GetProjectGitOpsInfoRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetProjectGitOpsInfoRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetProjectGitOpsInfoRequest>): GetProjectGitOpsInfoRequest {
return GetProjectGitOpsInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetProjectGitOpsInfoRequest>): GetProjectGitOpsInfoRequest {
const message = createBaseGetProjectGitOpsInfoRequest();
message.name = object.name ?? "";
@@ -2585,19 +2612,20 @@ export const SetupSQLReviewCIRequest = {
},
fromJSON(object: any): SetupSQLReviewCIRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: SetupSQLReviewCIRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<SetupSQLReviewCIRequest>): SetupSQLReviewCIRequest {
return SetupSQLReviewCIRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SetupSQLReviewCIRequest>): SetupSQLReviewCIRequest {
const message = createBaseSetupSQLReviewCIRequest();
message.name = object.name ?? "";
@@ -2641,19 +2669,20 @@ export const SetupSQLReviewCIResponse = {
},
fromJSON(object: any): SetupSQLReviewCIResponse {
- return { pullRequestUrl: isSet(object.pullRequestUrl) ? String(object.pullRequestUrl) : "" };
+ return { pullRequestUrl: isSet(object.pullRequestUrl) ? globalThis.String(object.pullRequestUrl) : "" };
},
toJSON(message: SetupSQLReviewCIResponse): unknown {
const obj: any = {};
- message.pullRequestUrl !== undefined && (obj.pullRequestUrl = message.pullRequestUrl);
+ if (message.pullRequestUrl !== "") {
+ obj.pullRequestUrl = message.pullRequestUrl;
+ }
return obj;
},
create(base?: DeepPartial<SetupSQLReviewCIResponse>): SetupSQLReviewCIResponse {
return SetupSQLReviewCIResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SetupSQLReviewCIResponse>): SetupSQLReviewCIResponse {
const message = createBaseSetupSQLReviewCIResponse();
message.pullRequestUrl = object.pullRequestUrl ?? "";
@@ -2821,49 +2850,67 @@ export const Project = {
fromJSON(object: any): Project {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
state: isSet(object.state) ? stateFromJSON(object.state) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- key: isSet(object.key) ? String(object.key) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
workflow: isSet(object.workflow) ? workflowFromJSON(object.workflow) : 0,
visibility: isSet(object.visibility) ? visibilityFromJSON(object.visibility) : 0,
tenantMode: isSet(object.tenantMode) ? tenantModeFromJSON(object.tenantMode) : 0,
- dbNameTemplate: isSet(object.dbNameTemplate) ? String(object.dbNameTemplate) : "",
+ dbNameTemplate: isSet(object.dbNameTemplate) ? globalThis.String(object.dbNameTemplate) : "",
schemaChange: isSet(object.schemaChange) ? schemaChangeFromJSON(object.schemaChange) : 0,
- webhooks: Array.isArray(object?.webhooks) ? object.webhooks.map((e: any) => Webhook.fromJSON(e)) : [],
+ webhooks: globalThis.Array.isArray(object?.webhooks) ? object.webhooks.map((e: any) => Webhook.fromJSON(e)) : [],
dataClassificationConfigId: isSet(object.dataClassificationConfigId)
- ? String(object.dataClassificationConfigId)
+ ? globalThis.String(object.dataClassificationConfigId)
: "",
};
},
toJSON(message: Project): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.state !== undefined && (obj.state = stateToJSON(message.state));
- message.title !== undefined && (obj.title = message.title);
- message.key !== undefined && (obj.key = message.key);
- message.workflow !== undefined && (obj.workflow = workflowToJSON(message.workflow));
- message.visibility !== undefined && (obj.visibility = visibilityToJSON(message.visibility));
- message.tenantMode !== undefined && (obj.tenantMode = tenantModeToJSON(message.tenantMode));
- message.dbNameTemplate !== undefined && (obj.dbNameTemplate = message.dbNameTemplate);
- message.schemaChange !== undefined && (obj.schemaChange = schemaChangeToJSON(message.schemaChange));
- if (message.webhooks) {
- obj.webhooks = message.webhooks.map((e) => e ? Webhook.toJSON(e) : undefined);
- } else {
- obj.webhooks = [];
- }
- message.dataClassificationConfigId !== undefined &&
- (obj.dataClassificationConfigId = message.dataClassificationConfigId);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.state !== 0) {
+ obj.state = stateToJSON(message.state);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.workflow !== 0) {
+ obj.workflow = workflowToJSON(message.workflow);
+ }
+ if (message.visibility !== 0) {
+ obj.visibility = visibilityToJSON(message.visibility);
+ }
+ if (message.tenantMode !== 0) {
+ obj.tenantMode = tenantModeToJSON(message.tenantMode);
+ }
+ if (message.dbNameTemplate !== "") {
+ obj.dbNameTemplate = message.dbNameTemplate;
+ }
+ if (message.schemaChange !== 0) {
+ obj.schemaChange = schemaChangeToJSON(message.schemaChange);
+ }
+ if (message.webhooks?.length) {
+ obj.webhooks = message.webhooks.map((e) => Webhook.toJSON(e));
+ }
+ if (message.dataClassificationConfigId !== "") {
+ obj.dataClassificationConfigId = message.dataClassificationConfigId;
+ }
return obj;
},
create(base?: DeepPartial<Project>): Project {
return Project.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Project>): Project {
const message = createBaseProject();
message.name = object.name ?? "";
@@ -2929,22 +2976,25 @@ export const AddWebhookRequest = {
fromJSON(object: any): AddWebhookRequest {
return {
- project: isSet(object.project) ? String(object.project) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
webhook: isSet(object.webhook) ? Webhook.fromJSON(object.webhook) : undefined,
};
},
toJSON(message: AddWebhookRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
- message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.webhook !== undefined) {
+ obj.webhook = Webhook.toJSON(message.webhook);
+ }
return obj;
},
create(base?: DeepPartial<AddWebhookRequest>): AddWebhookRequest {
return AddWebhookRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AddWebhookRequest>): AddWebhookRequest {
const message = createBaseAddWebhookRequest();
message.project = object.project ?? "";
@@ -3009,15 +3059,18 @@ export const UpdateWebhookRequest = {
toJSON(message: UpdateWebhookRequest): unknown {
const obj: any = {};
- message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.webhook !== undefined) {
+ obj.webhook = Webhook.toJSON(message.webhook);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateWebhookRequest>): UpdateWebhookRequest {
return UpdateWebhookRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateWebhookRequest>): UpdateWebhookRequest {
const message = createBaseUpdateWebhookRequest();
message.webhook = (object.webhook !== undefined && object.webhook !== null)
@@ -3069,14 +3122,15 @@ export const RemoveWebhookRequest = {
toJSON(message: RemoveWebhookRequest): unknown {
const obj: any = {};
- message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);
+ if (message.webhook !== undefined) {
+ obj.webhook = Webhook.toJSON(message.webhook);
+ }
return obj;
},
create(base?: DeepPartial<RemoveWebhookRequest>): RemoveWebhookRequest {
return RemoveWebhookRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RemoveWebhookRequest>): RemoveWebhookRequest {
const message = createBaseRemoveWebhookRequest();
message.webhook = (object.webhook !== undefined && object.webhook !== null)
@@ -3133,22 +3187,25 @@ export const TestWebhookRequest = {
fromJSON(object: any): TestWebhookRequest {
return {
- project: isSet(object.project) ? String(object.project) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
webhook: isSet(object.webhook) ? Webhook.fromJSON(object.webhook) : undefined,
};
},
toJSON(message: TestWebhookRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
- message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.webhook !== undefined) {
+ obj.webhook = Webhook.toJSON(message.webhook);
+ }
return obj;
},
create(base?: DeepPartial<TestWebhookRequest>): TestWebhookRequest {
return TestWebhookRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TestWebhookRequest>): TestWebhookRequest {
const message = createBaseTestWebhookRequest();
message.project = object.project ?? "";
@@ -3195,19 +3252,20 @@ export const TestWebhookResponse = {
},
fromJSON(object: any): TestWebhookResponse {
- return { error: isSet(object.error) ? String(object.error) : "" };
+ return { error: isSet(object.error) ? globalThis.String(object.error) : "" };
},
toJSON(message: TestWebhookResponse): unknown {
const obj: any = {};
- message.error !== undefined && (obj.error = message.error);
+ if (message.error !== "") {
+ obj.error = message.error;
+ }
return obj;
},
create(base?: DeepPartial<TestWebhookResponse>): TestWebhookResponse {
return TestWebhookResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TestWebhookResponse>): TestWebhookResponse {
const message = createBaseTestWebhookResponse();
message.error = object.error ?? "";
@@ -3304,11 +3362,11 @@ export const Webhook = {
fromJSON(object: any): Webhook {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
type: isSet(object.type) ? webhook_TypeFromJSON(object.type) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- url: isSet(object.url) ? String(object.url) : "",
- notificationTypes: Array.isArray(object?.notificationTypes)
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ notificationTypes: globalThis.Array.isArray(object?.notificationTypes)
? object.notificationTypes.map((e: any) => activity_TypeFromJSON(e))
: [],
};
@@ -3316,14 +3374,20 @@ export const Webhook = {
toJSON(message: Webhook): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.type !== undefined && (obj.type = webhook_TypeToJSON(message.type));
- message.title !== undefined && (obj.title = message.title);
- message.url !== undefined && (obj.url = message.url);
- if (message.notificationTypes) {
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.type !== 0) {
+ obj.type = webhook_TypeToJSON(message.type);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.notificationTypes?.length) {
obj.notificationTypes = message.notificationTypes.map((e) => activity_TypeToJSON(e));
- } else {
- obj.notificationTypes = [];
}
return obj;
},
@@ -3331,7 +3395,6 @@ export const Webhook = {
create(base?: DeepPartial<Webhook>): Webhook {
return Webhook.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Webhook>): Webhook {
const message = createBaseWebhook();
message.name = object.name ?? "";
@@ -3400,24 +3463,29 @@ export const DeploymentConfig = {
fromJSON(object: any): DeploymentConfig {
return {
- name: isSet(object.name) ? String(object.name) : "",
- title: isSet(object.title) ? String(object.title) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
schedule: isSet(object.schedule) ? Schedule.fromJSON(object.schedule) : undefined,
};
},
toJSON(message: DeploymentConfig): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.title !== undefined && (obj.title = message.title);
- message.schedule !== undefined && (obj.schedule = message.schedule ? Schedule.toJSON(message.schedule) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.schedule !== undefined) {
+ obj.schedule = Schedule.toJSON(message.schedule);
+ }
return obj;
},
create(base?: DeepPartial<DeploymentConfig>): DeploymentConfig {
return DeploymentConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeploymentConfig>): DeploymentConfig {
const message = createBaseDeploymentConfig();
message.name = object.name ?? "";
@@ -3466,7 +3534,7 @@ export const Schedule = {
fromJSON(object: any): Schedule {
return {
- deployments: Array.isArray(object?.deployments)
+ deployments: globalThis.Array.isArray(object?.deployments)
? object.deployments.map((e: any) => ScheduleDeployment.fromJSON(e))
: [],
};
@@ -3474,10 +3542,8 @@ export const Schedule = {
toJSON(message: Schedule): unknown {
const obj: any = {};
- if (message.deployments) {
- obj.deployments = message.deployments.map((e) => e ? ScheduleDeployment.toJSON(e) : undefined);
- } else {
- obj.deployments = [];
+ if (message.deployments?.length) {
+ obj.deployments = message.deployments.map((e) => ScheduleDeployment.toJSON(e));
}
return obj;
},
@@ -3485,7 +3551,6 @@ export const Schedule = {
create(base?: DeepPartial<Schedule>): Schedule {
return Schedule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Schedule>): Schedule {
const message = createBaseSchedule();
message.deployments = object.deployments?.map((e) => ScheduleDeployment.fromPartial(e)) || [];
@@ -3540,22 +3605,25 @@ export const ScheduleDeployment = {
fromJSON(object: any): ScheduleDeployment {
return {
- title: isSet(object.title) ? String(object.title) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
spec: isSet(object.spec) ? DeploymentSpec.fromJSON(object.spec) : undefined,
};
},
toJSON(message: ScheduleDeployment): unknown {
const obj: any = {};
- message.title !== undefined && (obj.title = message.title);
- message.spec !== undefined && (obj.spec = message.spec ? DeploymentSpec.toJSON(message.spec) : undefined);
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.spec !== undefined) {
+ obj.spec = DeploymentSpec.toJSON(message.spec);
+ }
return obj;
},
create(base?: DeepPartial<ScheduleDeployment>): ScheduleDeployment {
return ScheduleDeployment.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ScheduleDeployment>): ScheduleDeployment {
const message = createBaseScheduleDeployment();
message.title = object.title ?? "";
@@ -3607,15 +3675,15 @@ export const DeploymentSpec = {
toJSON(message: DeploymentSpec): unknown {
const obj: any = {};
- message.labelSelector !== undefined &&
- (obj.labelSelector = message.labelSelector ? LabelSelector.toJSON(message.labelSelector) : undefined);
+ if (message.labelSelector !== undefined) {
+ obj.labelSelector = LabelSelector.toJSON(message.labelSelector);
+ }
return obj;
},
create(base?: DeepPartial<DeploymentSpec>): DeploymentSpec {
return DeploymentSpec.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeploymentSpec>): DeploymentSpec {
const message = createBaseDeploymentSpec();
message.labelSelector = (object.labelSelector !== undefined && object.labelSelector !== null)
@@ -3662,7 +3730,7 @@ export const LabelSelector = {
fromJSON(object: any): LabelSelector {
return {
- matchExpressions: Array.isArray(object?.matchExpressions)
+ matchExpressions: globalThis.Array.isArray(object?.matchExpressions)
? object.matchExpressions.map((e: any) => LabelSelectorRequirement.fromJSON(e))
: [],
};
@@ -3670,10 +3738,8 @@ export const LabelSelector = {
toJSON(message: LabelSelector): unknown {
const obj: any = {};
- if (message.matchExpressions) {
- obj.matchExpressions = message.matchExpressions.map((e) => e ? LabelSelectorRequirement.toJSON(e) : undefined);
- } else {
- obj.matchExpressions = [];
+ if (message.matchExpressions?.length) {
+ obj.matchExpressions = message.matchExpressions.map((e) => LabelSelectorRequirement.toJSON(e));
}
return obj;
},
@@ -3681,7 +3747,6 @@ export const LabelSelector = {
create(base?: DeepPartial<LabelSelector>): LabelSelector {
return LabelSelector.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LabelSelector>): LabelSelector {
const message = createBaseLabelSelector();
message.matchExpressions = object.matchExpressions?.map((e) => LabelSelectorRequirement.fromPartial(e)) || [];
@@ -3746,20 +3811,22 @@ export const LabelSelectorRequirement = {
fromJSON(object: any): LabelSelectorRequirement {
return {
- key: isSet(object.key) ? String(object.key) : "",
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
operator: isSet(object.operator) ? operatorTypeFromJSON(object.operator) : 0,
- values: Array.isArray(object?.values) ? object.values.map((e: any) => String(e)) : [],
+ values: globalThis.Array.isArray(object?.values) ? object.values.map((e: any) => globalThis.String(e)) : [],
};
},
toJSON(message: LabelSelectorRequirement): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.operator !== undefined && (obj.operator = operatorTypeToJSON(message.operator));
- if (message.values) {
- obj.values = message.values.map((e) => e);
- } else {
- obj.values = [];
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.operator !== 0) {
+ obj.operator = operatorTypeToJSON(message.operator);
+ }
+ if (message.values?.length) {
+ obj.values = message.values;
}
return obj;
},
@@ -3767,7 +3834,6 @@ export const LabelSelectorRequirement = {
create(base?: DeepPartial<LabelSelectorRequirement>): LabelSelectorRequirement {
return LabelSelectorRequirement.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<LabelSelectorRequirement>): LabelSelectorRequirement {
const message = createBaseLabelSelectorRequirement();
message.key = object.key ?? "";
@@ -3814,7 +3880,6 @@ export const Activity = {
create(base?: DeepPartial<Activity>): Activity {
return Activity.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<Activity>): Activity {
const message = createBaseActivity();
return message;
@@ -3878,24 +3943,29 @@ export const ListDatabaseGroupsRequest = {
fromJSON(object: any): ListDatabaseGroupsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListDatabaseGroupsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListDatabaseGroupsRequest>): ListDatabaseGroupsRequest {
return ListDatabaseGroupsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListDatabaseGroupsRequest>): ListDatabaseGroupsRequest {
const message = createBaseListDatabaseGroupsRequest();
message.parent = object.parent ?? "";
@@ -3952,28 +4022,27 @@ export const ListDatabaseGroupsResponse = {
fromJSON(object: any): ListDatabaseGroupsResponse {
return {
- databaseGroups: Array.isArray(object?.databaseGroups)
+ databaseGroups: globalThis.Array.isArray(object?.databaseGroups)
? object.databaseGroups.map((e: any) => DatabaseGroup.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListDatabaseGroupsResponse): unknown {
const obj: any = {};
- if (message.databaseGroups) {
- obj.databaseGroups = message.databaseGroups.map((e) => e ? DatabaseGroup.toJSON(e) : undefined);
- } else {
- obj.databaseGroups = [];
+ if (message.databaseGroups?.length) {
+ obj.databaseGroups = message.databaseGroups.map((e) => DatabaseGroup.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListDatabaseGroupsResponse>): ListDatabaseGroupsResponse {
return ListDatabaseGroupsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListDatabaseGroupsResponse>): ListDatabaseGroupsResponse {
const message = createBaseListDatabaseGroupsResponse();
message.databaseGroups = object.databaseGroups?.map((e) => DatabaseGroup.fromPartial(e)) || [];
@@ -4029,22 +4098,25 @@ export const GetDatabaseGroupRequest = {
fromJSON(object: any): GetDatabaseGroupRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
view: isSet(object.view) ? databaseGroupViewFromJSON(object.view) : 0,
};
},
toJSON(message: GetDatabaseGroupRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.view !== undefined && (obj.view = databaseGroupViewToJSON(message.view));
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.view !== 0) {
+ obj.view = databaseGroupViewToJSON(message.view);
+ }
return obj;
},
create(base?: DeepPartial<GetDatabaseGroupRequest>): GetDatabaseGroupRequest {
return GetDatabaseGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetDatabaseGroupRequest>): GetDatabaseGroupRequest {
const message = createBaseGetDatabaseGroupRequest();
message.name = object.name ?? "";
@@ -4120,27 +4192,33 @@ export const CreateDatabaseGroupRequest = {
fromJSON(object: any): CreateDatabaseGroupRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
databaseGroup: isSet(object.databaseGroup) ? DatabaseGroup.fromJSON(object.databaseGroup) : undefined,
- databaseGroupId: isSet(object.databaseGroupId) ? String(object.databaseGroupId) : "",
- validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,
+ databaseGroupId: isSet(object.databaseGroupId) ? globalThis.String(object.databaseGroupId) : "",
+ validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
},
toJSON(message: CreateDatabaseGroupRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.databaseGroup !== undefined &&
- (obj.databaseGroup = message.databaseGroup ? DatabaseGroup.toJSON(message.databaseGroup) : undefined);
- message.databaseGroupId !== undefined && (obj.databaseGroupId = message.databaseGroupId);
- message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.databaseGroup !== undefined) {
+ obj.databaseGroup = DatabaseGroup.toJSON(message.databaseGroup);
+ }
+ if (message.databaseGroupId !== "") {
+ obj.databaseGroupId = message.databaseGroupId;
+ }
+ if (message.validateOnly === true) {
+ obj.validateOnly = message.validateOnly;
+ }
return obj;
},
create(base?: DeepPartial<CreateDatabaseGroupRequest>): CreateDatabaseGroupRequest {
return CreateDatabaseGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateDatabaseGroupRequest>): CreateDatabaseGroupRequest {
const message = createBaseCreateDatabaseGroupRequest();
message.parent = object.parent ?? "";
@@ -4207,16 +4285,18 @@ export const UpdateDatabaseGroupRequest = {
toJSON(message: UpdateDatabaseGroupRequest): unknown {
const obj: any = {};
- message.databaseGroup !== undefined &&
- (obj.databaseGroup = message.databaseGroup ? DatabaseGroup.toJSON(message.databaseGroup) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.databaseGroup !== undefined) {
+ obj.databaseGroup = DatabaseGroup.toJSON(message.databaseGroup);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateDatabaseGroupRequest>): UpdateDatabaseGroupRequest {
return UpdateDatabaseGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateDatabaseGroupRequest>): UpdateDatabaseGroupRequest {
const message = createBaseUpdateDatabaseGroupRequest();
message.databaseGroup = (object.databaseGroup !== undefined && object.databaseGroup !== null)
@@ -4263,19 +4343,20 @@ export const DeleteDatabaseGroupRequest = {
},
fromJSON(object: any): DeleteDatabaseGroupRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteDatabaseGroupRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteDatabaseGroupRequest>): DeleteDatabaseGroupRequest {
return DeleteDatabaseGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteDatabaseGroupRequest>): DeleteDatabaseGroupRequest {
const message = createBaseDeleteDatabaseGroupRequest();
message.name = object.name ?? "";
@@ -4360,13 +4441,13 @@ export const DatabaseGroup = {
fromJSON(object: any): DatabaseGroup {
return {
- name: isSet(object.name) ? String(object.name) : "",
- databasePlaceholder: isSet(object.databasePlaceholder) ? String(object.databasePlaceholder) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ databasePlaceholder: isSet(object.databasePlaceholder) ? globalThis.String(object.databasePlaceholder) : "",
databaseExpr: isSet(object.databaseExpr) ? Expr.fromJSON(object.databaseExpr) : undefined,
- matchedDatabases: Array.isArray(object?.matchedDatabases)
+ matchedDatabases: globalThis.Array.isArray(object?.matchedDatabases)
? object.matchedDatabases.map((e: any) => DatabaseGroup_Database.fromJSON(e))
: [],
- unmatchedDatabases: Array.isArray(object?.unmatchedDatabases)
+ unmatchedDatabases: globalThis.Array.isArray(object?.unmatchedDatabases)
? object.unmatchedDatabases.map((e: any) => DatabaseGroup_Database.fromJSON(e))
: [],
};
@@ -4374,19 +4455,20 @@ export const DatabaseGroup = {
toJSON(message: DatabaseGroup): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.databasePlaceholder !== undefined && (obj.databasePlaceholder = message.databasePlaceholder);
- message.databaseExpr !== undefined &&
- (obj.databaseExpr = message.databaseExpr ? Expr.toJSON(message.databaseExpr) : undefined);
- if (message.matchedDatabases) {
- obj.matchedDatabases = message.matchedDatabases.map((e) => e ? DatabaseGroup_Database.toJSON(e) : undefined);
- } else {
- obj.matchedDatabases = [];
- }
- if (message.unmatchedDatabases) {
- obj.unmatchedDatabases = message.unmatchedDatabases.map((e) => e ? DatabaseGroup_Database.toJSON(e) : undefined);
- } else {
- obj.unmatchedDatabases = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.databasePlaceholder !== "") {
+ obj.databasePlaceholder = message.databasePlaceholder;
+ }
+ if (message.databaseExpr !== undefined) {
+ obj.databaseExpr = Expr.toJSON(message.databaseExpr);
+ }
+ if (message.matchedDatabases?.length) {
+ obj.matchedDatabases = message.matchedDatabases.map((e) => DatabaseGroup_Database.toJSON(e));
+ }
+ if (message.unmatchedDatabases?.length) {
+ obj.unmatchedDatabases = message.unmatchedDatabases.map((e) => DatabaseGroup_Database.toJSON(e));
}
return obj;
},
@@ -4394,7 +4476,6 @@ export const DatabaseGroup = {
create(base?: DeepPartial<DatabaseGroup>): DatabaseGroup {
return DatabaseGroup.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseGroup>): DatabaseGroup {
const message = createBaseDatabaseGroup();
message.name = object.name ?? "";
@@ -4444,19 +4525,20 @@ export const DatabaseGroup_Database = {
},
fromJSON(object: any): DatabaseGroup_Database {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DatabaseGroup_Database): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DatabaseGroup_Database>): DatabaseGroup_Database {
return DatabaseGroup_Database.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseGroup_Database>): DatabaseGroup_Database {
const message = createBaseDatabaseGroup_Database();
message.name = object.name ?? "";
@@ -4531,27 +4613,33 @@ export const CreateSchemaGroupRequest = {
fromJSON(object: any): CreateSchemaGroupRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
schemaGroup: isSet(object.schemaGroup) ? SchemaGroup.fromJSON(object.schemaGroup) : undefined,
- schemaGroupId: isSet(object.schemaGroupId) ? String(object.schemaGroupId) : "",
- validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,
+ schemaGroupId: isSet(object.schemaGroupId) ? globalThis.String(object.schemaGroupId) : "",
+ validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
},
toJSON(message: CreateSchemaGroupRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.schemaGroup !== undefined &&
- (obj.schemaGroup = message.schemaGroup ? SchemaGroup.toJSON(message.schemaGroup) : undefined);
- message.schemaGroupId !== undefined && (obj.schemaGroupId = message.schemaGroupId);
- message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.schemaGroup !== undefined) {
+ obj.schemaGroup = SchemaGroup.toJSON(message.schemaGroup);
+ }
+ if (message.schemaGroupId !== "") {
+ obj.schemaGroupId = message.schemaGroupId;
+ }
+ if (message.validateOnly === true) {
+ obj.validateOnly = message.validateOnly;
+ }
return obj;
},
create(base?: DeepPartial<CreateSchemaGroupRequest>): CreateSchemaGroupRequest {
return CreateSchemaGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateSchemaGroupRequest>): CreateSchemaGroupRequest {
const message = createBaseCreateSchemaGroupRequest();
message.parent = object.parent ?? "";
@@ -4618,16 +4706,18 @@ export const UpdateSchemaGroupRequest = {
toJSON(message: UpdateSchemaGroupRequest): unknown {
const obj: any = {};
- message.schemaGroup !== undefined &&
- (obj.schemaGroup = message.schemaGroup ? SchemaGroup.toJSON(message.schemaGroup) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.schemaGroup !== undefined) {
+ obj.schemaGroup = SchemaGroup.toJSON(message.schemaGroup);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateSchemaGroupRequest>): UpdateSchemaGroupRequest {
return UpdateSchemaGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateSchemaGroupRequest>): UpdateSchemaGroupRequest {
const message = createBaseUpdateSchemaGroupRequest();
message.schemaGroup = (object.schemaGroup !== undefined && object.schemaGroup !== null)
@@ -4674,19 +4764,20 @@ export const DeleteSchemaGroupRequest = {
},
fromJSON(object: any): DeleteSchemaGroupRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteSchemaGroupRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteSchemaGroupRequest>): DeleteSchemaGroupRequest {
return DeleteSchemaGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteSchemaGroupRequest>): DeleteSchemaGroupRequest {
const message = createBaseDeleteSchemaGroupRequest();
message.name = object.name ?? "";
@@ -4751,24 +4842,29 @@ export const ListSchemaGroupsRequest = {
fromJSON(object: any): ListSchemaGroupsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListSchemaGroupsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListSchemaGroupsRequest>): ListSchemaGroupsRequest {
return ListSchemaGroupsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSchemaGroupsRequest>): ListSchemaGroupsRequest {
const message = createBaseListSchemaGroupsRequest();
message.parent = object.parent ?? "";
@@ -4825,28 +4921,27 @@ export const ListSchemaGroupsResponse = {
fromJSON(object: any): ListSchemaGroupsResponse {
return {
- schemaGroups: Array.isArray(object?.schemaGroups)
+ schemaGroups: globalThis.Array.isArray(object?.schemaGroups)
? object.schemaGroups.map((e: any) => SchemaGroup.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListSchemaGroupsResponse): unknown {
const obj: any = {};
- if (message.schemaGroups) {
- obj.schemaGroups = message.schemaGroups.map((e) => e ? SchemaGroup.toJSON(e) : undefined);
- } else {
- obj.schemaGroups = [];
+ if (message.schemaGroups?.length) {
+ obj.schemaGroups = message.schemaGroups.map((e) => SchemaGroup.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListSchemaGroupsResponse>): ListSchemaGroupsResponse {
return ListSchemaGroupsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSchemaGroupsResponse>): ListSchemaGroupsResponse {
const message = createBaseListSchemaGroupsResponse();
message.schemaGroups = object.schemaGroups?.map((e) => SchemaGroup.fromPartial(e)) || [];
@@ -4902,22 +4997,25 @@ export const GetSchemaGroupRequest = {
fromJSON(object: any): GetSchemaGroupRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
view: isSet(object.view) ? schemaGroupViewFromJSON(object.view) : 0,
};
},
toJSON(message: GetSchemaGroupRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.view !== undefined && (obj.view = schemaGroupViewToJSON(message.view));
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.view !== 0) {
+ obj.view = schemaGroupViewToJSON(message.view);
+ }
return obj;
},
create(base?: DeepPartial<GetSchemaGroupRequest>): GetSchemaGroupRequest {
return GetSchemaGroupRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetSchemaGroupRequest>): GetSchemaGroupRequest {
const message = createBaseGetSchemaGroupRequest();
message.name = object.name ?? "";
@@ -5003,13 +5101,13 @@ export const SchemaGroup = {
fromJSON(object: any): SchemaGroup {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
tableExpr: isSet(object.tableExpr) ? Expr.fromJSON(object.tableExpr) : undefined,
- tablePlaceholder: isSet(object.tablePlaceholder) ? String(object.tablePlaceholder) : "",
- matchedTables: Array.isArray(object?.matchedTables)
+ tablePlaceholder: isSet(object.tablePlaceholder) ? globalThis.String(object.tablePlaceholder) : "",
+ matchedTables: globalThis.Array.isArray(object?.matchedTables)
? object.matchedTables.map((e: any) => SchemaGroup_Table.fromJSON(e))
: [],
- unmatchedTables: Array.isArray(object?.unmatchedTables)
+ unmatchedTables: globalThis.Array.isArray(object?.unmatchedTables)
? object.unmatchedTables.map((e: any) => SchemaGroup_Table.fromJSON(e))
: [],
};
@@ -5017,18 +5115,20 @@ export const SchemaGroup = {
toJSON(message: SchemaGroup): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.tableExpr !== undefined && (obj.tableExpr = message.tableExpr ? Expr.toJSON(message.tableExpr) : undefined);
- message.tablePlaceholder !== undefined && (obj.tablePlaceholder = message.tablePlaceholder);
- if (message.matchedTables) {
- obj.matchedTables = message.matchedTables.map((e) => e ? SchemaGroup_Table.toJSON(e) : undefined);
- } else {
- obj.matchedTables = [];
- }
- if (message.unmatchedTables) {
- obj.unmatchedTables = message.unmatchedTables.map((e) => e ? SchemaGroup_Table.toJSON(e) : undefined);
- } else {
- obj.unmatchedTables = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.tableExpr !== undefined) {
+ obj.tableExpr = Expr.toJSON(message.tableExpr);
+ }
+ if (message.tablePlaceholder !== "") {
+ obj.tablePlaceholder = message.tablePlaceholder;
+ }
+ if (message.matchedTables?.length) {
+ obj.matchedTables = message.matchedTables.map((e) => SchemaGroup_Table.toJSON(e));
+ }
+ if (message.unmatchedTables?.length) {
+ obj.unmatchedTables = message.unmatchedTables.map((e) => SchemaGroup_Table.toJSON(e));
}
return obj;
},
@@ -5036,7 +5136,6 @@ export const SchemaGroup = {
create(base?: DeepPartial<SchemaGroup>): SchemaGroup {
return SchemaGroup.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaGroup>): SchemaGroup {
const message = createBaseSchemaGroup();
message.name = object.name ?? "";
@@ -5107,24 +5206,29 @@ export const SchemaGroup_Table = {
fromJSON(object: any): SchemaGroup_Table {
return {
- database: isSet(object.database) ? String(object.database) : "",
- schema: isSet(object.schema) ? String(object.schema) : "",
- table: isSet(object.table) ? String(object.table) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
};
},
toJSON(message: SchemaGroup_Table): unknown {
const obj: any = {};
- message.database !== undefined && (obj.database = message.database);
- message.schema !== undefined && (obj.schema = message.schema);
- message.table !== undefined && (obj.table = message.table);
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
return obj;
},
create(base?: DeepPartial<SchemaGroup_Table>): SchemaGroup_Table {
return SchemaGroup_Table.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaGroup_Table>): SchemaGroup_Table {
const message = createBaseSchemaGroup_Table();
message.database = object.database ?? "";
@@ -5170,19 +5274,20 @@ export const GetProjectProtectionRulesRequest = {
},
fromJSON(object: any): GetProjectProtectionRulesRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetProjectProtectionRulesRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetProjectProtectionRulesRequest>): GetProjectProtectionRulesRequest {
return GetProjectProtectionRulesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetProjectProtectionRulesRequest>): GetProjectProtectionRulesRequest {
const message = createBaseGetProjectProtectionRulesRequest();
message.name = object.name ?? "";
@@ -5233,15 +5338,15 @@ export const UpdateProjectProtectionRulesRequest = {
toJSON(message: UpdateProjectProtectionRulesRequest): unknown {
const obj: any = {};
- message.protectionRules !== undefined &&
- (obj.protectionRules = message.protectionRules ? ProtectionRules.toJSON(message.protectionRules) : undefined);
+ if (message.protectionRules !== undefined) {
+ obj.protectionRules = ProtectionRules.toJSON(message.protectionRules);
+ }
return obj;
},
create(base?: DeepPartial<UpdateProjectProtectionRulesRequest>): UpdateProjectProtectionRulesRequest {
return UpdateProjectProtectionRulesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateProjectProtectionRulesRequest>): UpdateProjectProtectionRulesRequest {
const message = createBaseUpdateProjectProtectionRulesRequest();
message.protectionRules = (object.protectionRules !== undefined && object.protectionRules !== null)
@@ -5298,18 +5403,18 @@ export const ProtectionRules = {
fromJSON(object: any): ProtectionRules {
return {
- name: isSet(object.name) ? String(object.name) : "",
- rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => ProtectionRule.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e: any) => ProtectionRule.fromJSON(e)) : [],
};
},
toJSON(message: ProtectionRules): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? ProtectionRule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => ProtectionRule.toJSON(e));
}
return obj;
},
@@ -5317,7 +5422,6 @@ export const ProtectionRules = {
create(base?: DeepPartial<ProtectionRules>): ProtectionRules {
return ProtectionRules.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ProtectionRules>): ProtectionRules {
const message = createBaseProtectionRules();
message.name = object.name ?? "";
@@ -5393,24 +5497,28 @@ export const ProtectionRule = {
fromJSON(object: any): ProtectionRule {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
target: isSet(object.target) ? protectionRule_TargetFromJSON(object.target) : 0,
- nameFilter: isSet(object.nameFilter) ? String(object.nameFilter) : "",
- createAllowedRoles: Array.isArray(object?.createAllowedRoles)
- ? object.createAllowedRoles.map((e: any) => String(e))
+ nameFilter: isSet(object.nameFilter) ? globalThis.String(object.nameFilter) : "",
+ createAllowedRoles: globalThis.Array.isArray(object?.createAllowedRoles)
+ ? object.createAllowedRoles.map((e: any) => globalThis.String(e))
: [],
};
},
toJSON(message: ProtectionRule): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.target !== undefined && (obj.target = protectionRule_TargetToJSON(message.target));
- message.nameFilter !== undefined && (obj.nameFilter = message.nameFilter);
- if (message.createAllowedRoles) {
- obj.createAllowedRoles = message.createAllowedRoles.map((e) => e);
- } else {
- obj.createAllowedRoles = [];
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.target !== 0) {
+ obj.target = protectionRule_TargetToJSON(message.target);
+ }
+ if (message.nameFilter !== "") {
+ obj.nameFilter = message.nameFilter;
+ }
+ if (message.createAllowedRoles?.length) {
+ obj.createAllowedRoles = message.createAllowedRoles;
}
return obj;
},
@@ -5418,7 +5526,6 @@ export const ProtectionRule = {
create(base?: DeepPartial<ProtectionRule>): ProtectionRule {
return ProtectionRule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ProtectionRule>): ProtectionRule {
const message = createBaseProtectionRule();
message.id = object.id ?? "";
@@ -7543,7 +7650,7 @@ export const ProjectServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/risk_service.ts b/frontend/src/types/proto/v1/risk_service.ts
index ea1b25442c..f8ca9a4d8c 100644
--- a/frontend/src/types/proto/v1/risk_service.ts
+++ b/frontend/src/types/proto/v1/risk_service.ts
@@ -177,22 +177,25 @@ export const ListRisksRequest = {
fromJSON(object: any): ListRisksRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListRisksRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListRisksRequest>): ListRisksRequest {
return ListRisksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListRisksRequest>): ListRisksRequest {
const message = createBaseListRisksRequest();
message.pageSize = object.pageSize ?? 0;
@@ -248,26 +251,25 @@ export const ListRisksResponse = {
fromJSON(object: any): ListRisksResponse {
return {
- risks: Array.isArray(object?.risks) ? object.risks.map((e: any) => Risk.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ risks: globalThis.Array.isArray(object?.risks) ? object.risks.map((e: any) => Risk.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListRisksResponse): unknown {
const obj: any = {};
- if (message.risks) {
- obj.risks = message.risks.map((e) => e ? Risk.toJSON(e) : undefined);
- } else {
- obj.risks = [];
+ if (message.risks?.length) {
+ obj.risks = message.risks.map((e) => Risk.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListRisksResponse>): ListRisksResponse {
return ListRisksResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListRisksResponse>): ListRisksResponse {
const message = createBaseListRisksResponse();
message.risks = object.risks?.map((e) => Risk.fromPartial(e)) || [];
@@ -317,14 +319,15 @@ export const CreateRiskRequest = {
toJSON(message: CreateRiskRequest): unknown {
const obj: any = {};
- message.risk !== undefined && (obj.risk = message.risk ? Risk.toJSON(message.risk) : undefined);
+ if (message.risk !== undefined) {
+ obj.risk = Risk.toJSON(message.risk);
+ }
return obj;
},
create(base?: DeepPartial<CreateRiskRequest>): CreateRiskRequest {
return CreateRiskRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateRiskRequest>): CreateRiskRequest {
const message = createBaseCreateRiskRequest();
message.risk = (object.risk !== undefined && object.risk !== null) ? Risk.fromPartial(object.risk) : undefined;
@@ -386,15 +389,18 @@ export const UpdateRiskRequest = {
toJSON(message: UpdateRiskRequest): unknown {
const obj: any = {};
- message.risk !== undefined && (obj.risk = message.risk ? Risk.toJSON(message.risk) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.risk !== undefined) {
+ obj.risk = Risk.toJSON(message.risk);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateRiskRequest>): UpdateRiskRequest {
return UpdateRiskRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateRiskRequest>): UpdateRiskRequest {
const message = createBaseUpdateRiskRequest();
message.risk = (object.risk !== undefined && object.risk !== null) ? Risk.fromPartial(object.risk) : undefined;
@@ -439,19 +445,20 @@ export const DeleteRiskRequest = {
},
fromJSON(object: any): DeleteRiskRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteRiskRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteRiskRequest>): DeleteRiskRequest {
return DeleteRiskRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteRiskRequest>): DeleteRiskRequest {
const message = createBaseDeleteRiskRequest();
message.name = object.name ?? "";
@@ -556,32 +563,45 @@ export const Risk = {
fromJSON(object: any): Risk {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
source: isSet(object.source) ? risk_SourceFromJSON(object.source) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- level: isSet(object.level) ? Number(object.level) : 0,
- active: isSet(object.active) ? Boolean(object.active) : false,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ level: isSet(object.level) ? globalThis.Number(object.level) : 0,
+ active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
};
},
toJSON(message: Risk): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.source !== undefined && (obj.source = risk_SourceToJSON(message.source));
- message.title !== undefined && (obj.title = message.title);
- message.level !== undefined && (obj.level = Math.round(message.level));
- message.active !== undefined && (obj.active = message.active);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.source !== 0) {
+ obj.source = risk_SourceToJSON(message.source);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.level !== 0) {
+ obj.level = Math.round(message.level);
+ }
+ if (message.active === true) {
+ obj.active = message.active;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
return obj;
},
create(base?: DeepPartial<Risk>): Risk {
return Risk.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Risk>): Risk {
const message = createBaseRisk();
message.name = object.name ?? "";
@@ -718,7 +738,7 @@ export const RiskServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/role_service.ts b/frontend/src/types/proto/v1/role_service.ts
index 0fe81aaca3..eda7c1db3f 100644
--- a/frontend/src/types/proto/v1/role_service.ts
+++ b/frontend/src/types/proto/v1/role_service.ts
@@ -111,22 +111,25 @@ export const ListRolesRequest = {
fromJSON(object: any): ListRolesRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListRolesRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListRolesRequest>): ListRolesRequest {
return ListRolesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListRolesRequest>): ListRolesRequest {
const message = createBaseListRolesRequest();
message.pageSize = object.pageSize ?? 0;
@@ -182,26 +185,25 @@ export const ListRolesResponse = {
fromJSON(object: any): ListRolesResponse {
return {
- roles: Array.isArray(object?.roles) ? object.roles.map((e: any) => Role.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e: any) => Role.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListRolesResponse): unknown {
const obj: any = {};
- if (message.roles) {
- obj.roles = message.roles.map((e) => e ? Role.toJSON(e) : undefined);
- } else {
- obj.roles = [];
+ if (message.roles?.length) {
+ obj.roles = message.roles.map((e) => Role.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListRolesResponse>): ListRolesResponse {
return ListRolesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListRolesResponse>): ListRolesResponse {
const message = createBaseListRolesResponse();
message.roles = object.roles?.map((e) => Role.fromPartial(e)) || [];
@@ -258,21 +260,24 @@ export const CreateRoleRequest = {
fromJSON(object: any): CreateRoleRequest {
return {
role: isSet(object.role) ? Role.fromJSON(object.role) : undefined,
- roleId: isSet(object.roleId) ? String(object.roleId) : "",
+ roleId: isSet(object.roleId) ? globalThis.String(object.roleId) : "",
};
},
toJSON(message: CreateRoleRequest): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role ? Role.toJSON(message.role) : undefined);
- message.roleId !== undefined && (obj.roleId = message.roleId);
+ if (message.role !== undefined) {
+ obj.role = Role.toJSON(message.role);
+ }
+ if (message.roleId !== "") {
+ obj.roleId = message.roleId;
+ }
return obj;
},
create(base?: DeepPartial<CreateRoleRequest>): CreateRoleRequest {
return CreateRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateRoleRequest>): CreateRoleRequest {
const message = createBaseCreateRoleRequest();
message.role = (object.role !== undefined && object.role !== null) ? Role.fromPartial(object.role) : undefined;
@@ -335,15 +340,18 @@ export const UpdateRoleRequest = {
toJSON(message: UpdateRoleRequest): unknown {
const obj: any = {};
- message.role !== undefined && (obj.role = message.role ? Role.toJSON(message.role) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.role !== undefined) {
+ obj.role = Role.toJSON(message.role);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateRoleRequest>): UpdateRoleRequest {
return UpdateRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateRoleRequest>): UpdateRoleRequest {
const message = createBaseUpdateRoleRequest();
message.role = (object.role !== undefined && object.role !== null) ? Role.fromPartial(object.role) : undefined;
@@ -388,19 +396,20 @@ export const DeleteRoleRequest = {
},
fromJSON(object: any): DeleteRoleRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteRoleRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteRoleRequest>): DeleteRoleRequest {
return DeleteRoleRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteRoleRequest>): DeleteRoleRequest {
const message = createBaseDeleteRoleRequest();
message.name = object.name ?? "";
@@ -465,24 +474,29 @@ export const Role = {
fromJSON(object: any): Role {
return {
- name: isSet(object.name) ? String(object.name) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: Role): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
create(base?: DeepPartial<Role>): Role {
return Role.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Role>): Role {
const message = createBaseRole();
message.name = object.name ?? "";
@@ -610,7 +624,7 @@ export const RoleServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.ts
index b8f8ca3b9a..4c31381a08 100644
--- a/frontend/src/types/proto/v1/rollout_service.ts
+++ b/frontend/src/types/proto/v1/rollout_service.ts
@@ -1187,19 +1187,20 @@ export const GetPlanRequest = {
},
fromJSON(object: any): GetPlanRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetPlanRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetPlanRequest>): GetPlanRequest {
return GetPlanRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetPlanRequest>): GetPlanRequest {
const message = createBaseGetPlanRequest();
message.name = object.name ?? "";
@@ -1264,24 +1265,29 @@ export const ListPlansRequest = {
fromJSON(object: any): ListPlansRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListPlansRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListPlansRequest>): ListPlansRequest {
return ListPlansRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListPlansRequest>): ListPlansRequest {
const message = createBaseListPlansRequest();
message.parent = object.parent ?? "";
@@ -1338,26 +1344,25 @@ export const ListPlansResponse = {
fromJSON(object: any): ListPlansResponse {
return {
- plans: Array.isArray(object?.plans) ? object.plans.map((e: any) => Plan.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ plans: globalThis.Array.isArray(object?.plans) ? object.plans.map((e: any) => Plan.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListPlansResponse): unknown {
const obj: any = {};
- if (message.plans) {
- obj.plans = message.plans.map((e) => e ? Plan.toJSON(e) : undefined);
- } else {
- obj.plans = [];
+ if (message.plans?.length) {
+ obj.plans = message.plans.map((e) => Plan.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListPlansResponse>): ListPlansResponse {
return ListPlansResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListPlansResponse>): ListPlansResponse {
const message = createBaseListPlansResponse();
message.plans = object.plans?.map((e) => Plan.fromPartial(e)) || [];
@@ -1413,22 +1418,25 @@ export const CreatePlanRequest = {
fromJSON(object: any): CreatePlanRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,
};
},
toJSON(message: CreatePlanRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.plan !== undefined) {
+ obj.plan = Plan.toJSON(message.plan);
+ }
return obj;
},
create(base?: DeepPartial<CreatePlanRequest>): CreatePlanRequest {
return CreatePlanRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreatePlanRequest>): CreatePlanRequest {
const message = createBaseCreatePlanRequest();
message.parent = object.parent ?? "";
@@ -1491,15 +1499,18 @@ export const UpdatePlanRequest = {
toJSON(message: UpdatePlanRequest): unknown {
const obj: any = {};
- message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.plan !== undefined) {
+ obj.plan = Plan.toJSON(message.plan);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdatePlanRequest>): UpdatePlanRequest {
return UpdatePlanRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdatePlanRequest>): UpdatePlanRequest {
const message = createBaseUpdatePlanRequest();
message.plan = (object.plan !== undefined && object.plan !== null) ? Plan.fromPartial(object.plan) : undefined;
@@ -1595,26 +1606,34 @@ export const Plan = {
fromJSON(object: any): Plan {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- issue: isSet(object.issue) ? String(object.issue) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- steps: Array.isArray(object?.steps) ? object.steps.map((e: any) => Plan_Step.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ issue: isSet(object.issue) ? globalThis.String(object.issue) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ steps: globalThis.Array.isArray(object?.steps) ? object.steps.map((e: any) => Plan_Step.fromJSON(e)) : [],
};
},
toJSON(message: Plan): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.issue !== undefined && (obj.issue = message.issue);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- if (message.steps) {
- obj.steps = message.steps.map((e) => e ? Plan_Step.toJSON(e) : undefined);
- } else {
- obj.steps = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.issue !== "") {
+ obj.issue = message.issue;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.steps?.length) {
+ obj.steps = message.steps.map((e) => Plan_Step.toJSON(e));
}
return obj;
},
@@ -1622,7 +1641,6 @@ export const Plan = {
create(base?: DeepPartial<Plan>): Plan {
return Plan.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan>): Plan {
const message = createBasePlan();
message.name = object.name ?? "";
@@ -1671,15 +1689,15 @@ export const Plan_Step = {
},
fromJSON(object: any): Plan_Step {
- return { specs: Array.isArray(object?.specs) ? object.specs.map((e: any) => Plan_Spec.fromJSON(e)) : [] };
+ return {
+ specs: globalThis.Array.isArray(object?.specs) ? object.specs.map((e: any) => Plan_Spec.fromJSON(e)) : [],
+ };
},
toJSON(message: Plan_Step): unknown {
const obj: any = {};
- if (message.specs) {
- obj.specs = message.specs.map((e) => e ? Plan_Spec.toJSON(e) : undefined);
- } else {
- obj.specs = [];
+ if (message.specs?.length) {
+ obj.specs = message.specs.map((e) => Plan_Spec.toJSON(e));
}
return obj;
},
@@ -1687,7 +1705,6 @@ export const Plan_Step = {
create(base?: DeepPartial<Plan_Step>): Plan_Step {
return Plan_Step.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_Step>): Plan_Step {
const message = createBasePlan_Step();
message.specs = object.specs?.map((e) => Plan_Spec.fromPartial(e)) || [];
@@ -1781,7 +1798,7 @@ export const Plan_Spec = {
earliestAllowedTime: isSet(object.earliestAllowedTime)
? fromJsonTimestamp(object.earliestAllowedTime)
: undefined,
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
createDatabaseConfig: isSet(object.createDatabaseConfig)
? Plan_CreateDatabaseConfig.fromJSON(object.createDatabaseConfig)
: undefined,
@@ -1796,24 +1813,27 @@ export const Plan_Spec = {
toJSON(message: Plan_Spec): unknown {
const obj: any = {};
- message.earliestAllowedTime !== undefined && (obj.earliestAllowedTime = message.earliestAllowedTime.toISOString());
- message.id !== undefined && (obj.id = message.id);
- message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig
- ? Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)
- : undefined);
- message.changeDatabaseConfig !== undefined && (obj.changeDatabaseConfig = message.changeDatabaseConfig
- ? Plan_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig)
- : undefined);
- message.restoreDatabaseConfig !== undefined && (obj.restoreDatabaseConfig = message.restoreDatabaseConfig
- ? Plan_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig)
- : undefined);
+ if (message.earliestAllowedTime !== undefined) {
+ obj.earliestAllowedTime = message.earliestAllowedTime.toISOString();
+ }
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.createDatabaseConfig !== undefined) {
+ obj.createDatabaseConfig = Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);
+ }
+ if (message.changeDatabaseConfig !== undefined) {
+ obj.changeDatabaseConfig = Plan_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig);
+ }
+ if (message.restoreDatabaseConfig !== undefined) {
+ obj.restoreDatabaseConfig = Plan_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig);
+ }
return obj;
},
create(base?: DeepPartial<Plan_Spec>): Plan_Spec {
return Plan_Spec.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_Spec>): Plan_Spec {
const message = createBasePlan_Spec();
message.earliestAllowedTime = object.earliestAllowedTime ?? undefined;
@@ -1973,15 +1993,15 @@ export const Plan_CreateDatabaseConfig = {
fromJSON(object: any): Plan_CreateDatabaseConfig {
return {
- target: isSet(object.target) ? String(object.target) : "",
- database: isSet(object.database) ? String(object.database) : "",
- table: isSet(object.table) ? String(object.table) : "",
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- cluster: isSet(object.cluster) ? String(object.cluster) : "",
- owner: isSet(object.owner) ? String(object.owner) : "",
- backup: isSet(object.backup) ? String(object.backup) : "",
- environment: isSet(object.environment) ? String(object.environment) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ cluster: isSet(object.cluster) ? globalThis.String(object.cluster) : "",
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
+ backup: isSet(object.backup) ? globalThis.String(object.backup) : "",
+ environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
labels: isObject(object.labels)
? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -1993,20 +2013,41 @@ export const Plan_CreateDatabaseConfig = {
toJSON(message: Plan_CreateDatabaseConfig): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.database !== undefined && (obj.database = message.database);
- message.table !== undefined && (obj.table = message.table);
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- message.cluster !== undefined && (obj.cluster = message.cluster);
- message.owner !== undefined && (obj.owner = message.owner);
- message.backup !== undefined && (obj.backup = message.backup);
- message.environment !== undefined && (obj.environment = message.environment);
- obj.labels = {};
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.cluster !== "") {
+ obj.cluster = message.cluster;
+ }
+ if (message.owner !== "") {
+ obj.owner = message.owner;
+ }
+ if (message.backup !== "") {
+ obj.backup = message.backup;
+ }
+ if (message.environment !== "") {
+ obj.environment = message.environment;
+ }
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
}
return obj;
},
@@ -2014,7 +2055,6 @@ export const Plan_CreateDatabaseConfig = {
create(base?: DeepPartial<Plan_CreateDatabaseConfig>): Plan_CreateDatabaseConfig {
return Plan_CreateDatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_CreateDatabaseConfig>): Plan_CreateDatabaseConfig {
const message = createBasePlan_CreateDatabaseConfig();
message.target = object.target ?? "";
@@ -2028,7 +2068,7 @@ export const Plan_CreateDatabaseConfig = {
message.environment = object.environment ?? "";
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -2082,20 +2122,26 @@ export const Plan_CreateDatabaseConfig_LabelsEntry = {
},
fromJSON(object: any): Plan_CreateDatabaseConfig_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: Plan_CreateDatabaseConfig_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<Plan_CreateDatabaseConfig_LabelsEntry>): Plan_CreateDatabaseConfig_LabelsEntry {
return Plan_CreateDatabaseConfig_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_CreateDatabaseConfig_LabelsEntry>): Plan_CreateDatabaseConfig_LabelsEntry {
const message = createBasePlan_CreateDatabaseConfig_LabelsEntry();
message.key = object.key ?? "";
@@ -2212,11 +2258,11 @@ export const Plan_ChangeDatabaseConfig = {
fromJSON(object: any): Plan_ChangeDatabaseConfig {
return {
- target: isSet(object.target) ? String(object.target) : "",
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
type: isSet(object.type) ? plan_ChangeDatabaseConfig_TypeFromJSON(object.type) : 0,
- schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
- rollbackEnabled: isSet(object.rollbackEnabled) ? Boolean(object.rollbackEnabled) : false,
+ schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "",
+ rollbackEnabled: isSet(object.rollbackEnabled) ? globalThis.Boolean(object.rollbackEnabled) : false,
rollbackDetail: isSet(object.rollbackDetail)
? Plan_ChangeDatabaseConfig_RollbackDetail.fromJSON(object.rollbackDetail)
: undefined,
@@ -2231,19 +2277,32 @@ export const Plan_ChangeDatabaseConfig = {
toJSON(message: Plan_ChangeDatabaseConfig): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.type !== undefined && (obj.type = plan_ChangeDatabaseConfig_TypeToJSON(message.type));
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
- message.rollbackEnabled !== undefined && (obj.rollbackEnabled = message.rollbackEnabled);
- message.rollbackDetail !== undefined && (obj.rollbackDetail = message.rollbackDetail
- ? Plan_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail)
- : undefined);
- obj.ghostFlags = {};
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.type !== 0) {
+ obj.type = plan_ChangeDatabaseConfig_TypeToJSON(message.type);
+ }
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
+ if (message.rollbackEnabled === true) {
+ obj.rollbackEnabled = message.rollbackEnabled;
+ }
+ if (message.rollbackDetail !== undefined) {
+ obj.rollbackDetail = Plan_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail);
+ }
if (message.ghostFlags) {
- Object.entries(message.ghostFlags).forEach(([k, v]) => {
- obj.ghostFlags[k] = v;
- });
+ const entries = Object.entries(message.ghostFlags);
+ if (entries.length > 0) {
+ obj.ghostFlags = {};
+ entries.forEach(([k, v]) => {
+ obj.ghostFlags[k] = v;
+ });
+ }
}
return obj;
},
@@ -2251,7 +2310,6 @@ export const Plan_ChangeDatabaseConfig = {
create(base?: DeepPartial<Plan_ChangeDatabaseConfig>): Plan_ChangeDatabaseConfig {
return Plan_ChangeDatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_ChangeDatabaseConfig>): Plan_ChangeDatabaseConfig {
const message = createBasePlan_ChangeDatabaseConfig();
message.target = object.target ?? "";
@@ -2265,7 +2323,7 @@ export const Plan_ChangeDatabaseConfig = {
message.ghostFlags = Object.entries(object.ghostFlags ?? {}).reduce<{ [key: string]: string }>(
(acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
},
@@ -2322,22 +2380,25 @@ export const Plan_ChangeDatabaseConfig_RollbackDetail = {
fromJSON(object: any): Plan_ChangeDatabaseConfig_RollbackDetail {
return {
- rollbackFromTask: isSet(object.rollbackFromTask) ? String(object.rollbackFromTask) : "",
- rollbackFromIssue: isSet(object.rollbackFromIssue) ? String(object.rollbackFromIssue) : "",
+ rollbackFromTask: isSet(object.rollbackFromTask) ? globalThis.String(object.rollbackFromTask) : "",
+ rollbackFromIssue: isSet(object.rollbackFromIssue) ? globalThis.String(object.rollbackFromIssue) : "",
};
},
toJSON(message: Plan_ChangeDatabaseConfig_RollbackDetail): unknown {
const obj: any = {};
- message.rollbackFromTask !== undefined && (obj.rollbackFromTask = message.rollbackFromTask);
- message.rollbackFromIssue !== undefined && (obj.rollbackFromIssue = message.rollbackFromIssue);
+ if (message.rollbackFromTask !== "") {
+ obj.rollbackFromTask = message.rollbackFromTask;
+ }
+ if (message.rollbackFromIssue !== "") {
+ obj.rollbackFromIssue = message.rollbackFromIssue;
+ }
return obj;
},
create(base?: DeepPartial<Plan_ChangeDatabaseConfig_RollbackDetail>): Plan_ChangeDatabaseConfig_RollbackDetail {
return Plan_ChangeDatabaseConfig_RollbackDetail.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_ChangeDatabaseConfig_RollbackDetail>): Plan_ChangeDatabaseConfig_RollbackDetail {
const message = createBasePlan_ChangeDatabaseConfig_RollbackDetail();
message.rollbackFromTask = object.rollbackFromTask ?? "";
@@ -2392,20 +2453,26 @@ export const Plan_ChangeDatabaseConfig_GhostFlagsEntry = {
},
fromJSON(object: any): Plan_ChangeDatabaseConfig_GhostFlagsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: Plan_ChangeDatabaseConfig_GhostFlagsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<Plan_ChangeDatabaseConfig_GhostFlagsEntry>): Plan_ChangeDatabaseConfig_GhostFlagsEntry {
return Plan_ChangeDatabaseConfig_GhostFlagsEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<Plan_ChangeDatabaseConfig_GhostFlagsEntry>,
): Plan_ChangeDatabaseConfig_GhostFlagsEntry {
@@ -2483,30 +2550,35 @@ export const Plan_RestoreDatabaseConfig = {
fromJSON(object: any): Plan_RestoreDatabaseConfig {
return {
- target: isSet(object.target) ? String(object.target) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
createDatabaseConfig: isSet(object.createDatabaseConfig)
? Plan_CreateDatabaseConfig.fromJSON(object.createDatabaseConfig)
: undefined,
- backup: isSet(object.backup) ? String(object.backup) : undefined,
+ backup: isSet(object.backup) ? globalThis.String(object.backup) : undefined,
pointInTime: isSet(object.pointInTime) ? fromJsonTimestamp(object.pointInTime) : undefined,
};
},
toJSON(message: Plan_RestoreDatabaseConfig): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig
- ? Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)
- : undefined);
- message.backup !== undefined && (obj.backup = message.backup);
- message.pointInTime !== undefined && (obj.pointInTime = message.pointInTime.toISOString());
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.createDatabaseConfig !== undefined) {
+ obj.createDatabaseConfig = Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);
+ }
+ if (message.backup !== undefined) {
+ obj.backup = message.backup;
+ }
+ if (message.pointInTime !== undefined) {
+ obj.pointInTime = message.pointInTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<Plan_RestoreDatabaseConfig>): Plan_RestoreDatabaseConfig {
return Plan_RestoreDatabaseConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Plan_RestoreDatabaseConfig>): Plan_RestoreDatabaseConfig {
const message = createBasePlan_RestoreDatabaseConfig();
message.target = object.target ?? "";
@@ -2576,24 +2648,29 @@ export const ListPlanCheckRunsRequest = {
fromJSON(object: any): ListPlanCheckRunsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListPlanCheckRunsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListPlanCheckRunsRequest>): ListPlanCheckRunsRequest {
return ListPlanCheckRunsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListPlanCheckRunsRequest>): ListPlanCheckRunsRequest {
const message = createBaseListPlanCheckRunsRequest();
message.parent = object.parent ?? "";
@@ -2650,28 +2727,27 @@ export const ListPlanCheckRunsResponse = {
fromJSON(object: any): ListPlanCheckRunsResponse {
return {
- planCheckRuns: Array.isArray(object?.planCheckRuns)
+ planCheckRuns: globalThis.Array.isArray(object?.planCheckRuns)
? object.planCheckRuns.map((e: any) => PlanCheckRun.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListPlanCheckRunsResponse): unknown {
const obj: any = {};
- if (message.planCheckRuns) {
- obj.planCheckRuns = message.planCheckRuns.map((e) => e ? PlanCheckRun.toJSON(e) : undefined);
- } else {
- obj.planCheckRuns = [];
+ if (message.planCheckRuns?.length) {
+ obj.planCheckRuns = message.planCheckRuns.map((e) => PlanCheckRun.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListPlanCheckRunsResponse>): ListPlanCheckRunsResponse {
return ListPlanCheckRunsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListPlanCheckRunsResponse>): ListPlanCheckRunsResponse {
const message = createBaseListPlanCheckRunsResponse();
message.planCheckRuns = object.planCheckRuns?.map((e) => PlanCheckRun.fromPartial(e)) || [];
@@ -2716,19 +2792,20 @@ export const RunPlanChecksRequest = {
},
fromJSON(object: any): RunPlanChecksRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: RunPlanChecksRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<RunPlanChecksRequest>): RunPlanChecksRequest {
return RunPlanChecksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RunPlanChecksRequest>): RunPlanChecksRequest {
const message = createBaseRunPlanChecksRequest();
message.name = object.name ?? "";
@@ -2773,7 +2850,6 @@ export const RunPlanChecksResponse = {
create(base?: DeepPartial<RunPlanChecksResponse>): RunPlanChecksResponse {
return RunPlanChecksResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<RunPlanChecksResponse>): RunPlanChecksResponse {
const message = createBaseRunPlanChecksResponse();
return message;
@@ -2837,28 +2913,29 @@ export const BatchRunTasksRequest = {
fromJSON(object: any): BatchRunTasksRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- tasks: Array.isArray(object?.tasks) ? object.tasks.map((e: any) => String(e)) : [],
- reason: isSet(object.reason) ? String(object.reason) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => globalThis.String(e)) : [],
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
};
},
toJSON(message: BatchRunTasksRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- if (message.tasks) {
- obj.tasks = message.tasks.map((e) => e);
- } else {
- obj.tasks = [];
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.tasks?.length) {
+ obj.tasks = message.tasks;
+ }
+ if (message.reason !== "") {
+ obj.reason = message.reason;
}
- message.reason !== undefined && (obj.reason = message.reason);
return obj;
},
create(base?: DeepPartial<BatchRunTasksRequest>): BatchRunTasksRequest {
return BatchRunTasksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchRunTasksRequest>): BatchRunTasksRequest {
const message = createBaseBatchRunTasksRequest();
message.parent = object.parent ?? "";
@@ -2905,7 +2982,6 @@ export const BatchRunTasksResponse = {
create(base?: DeepPartial<BatchRunTasksResponse>): BatchRunTasksResponse {
return BatchRunTasksResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchRunTasksResponse>): BatchRunTasksResponse {
const message = createBaseBatchRunTasksResponse();
return message;
@@ -2969,28 +3045,29 @@ export const BatchSkipTasksRequest = {
fromJSON(object: any): BatchSkipTasksRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- tasks: Array.isArray(object?.tasks) ? object.tasks.map((e: any) => String(e)) : [],
- reason: isSet(object.reason) ? String(object.reason) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => globalThis.String(e)) : [],
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
};
},
toJSON(message: BatchSkipTasksRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- if (message.tasks) {
- obj.tasks = message.tasks.map((e) => e);
- } else {
- obj.tasks = [];
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.tasks?.length) {
+ obj.tasks = message.tasks;
+ }
+ if (message.reason !== "") {
+ obj.reason = message.reason;
}
- message.reason !== undefined && (obj.reason = message.reason);
return obj;
},
create(base?: DeepPartial<BatchSkipTasksRequest>): BatchSkipTasksRequest {
return BatchSkipTasksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchSkipTasksRequest>): BatchSkipTasksRequest {
const message = createBaseBatchSkipTasksRequest();
message.parent = object.parent ?? "";
@@ -3037,7 +3114,6 @@ export const BatchSkipTasksResponse = {
create(base?: DeepPartial<BatchSkipTasksResponse>): BatchSkipTasksResponse {
return BatchSkipTasksResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchSkipTasksResponse>): BatchSkipTasksResponse {
const message = createBaseBatchSkipTasksResponse();
return message;
@@ -3101,28 +3177,29 @@ export const BatchCancelTaskRunsRequest = {
fromJSON(object: any): BatchCancelTaskRunsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- taskRuns: Array.isArray(object?.taskRuns) ? object.taskRuns.map((e: any) => String(e)) : [],
- reason: isSet(object.reason) ? String(object.reason) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ taskRuns: globalThis.Array.isArray(object?.taskRuns) ? object.taskRuns.map((e: any) => globalThis.String(e)) : [],
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
};
},
toJSON(message: BatchCancelTaskRunsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- if (message.taskRuns) {
- obj.taskRuns = message.taskRuns.map((e) => e);
- } else {
- obj.taskRuns = [];
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.taskRuns?.length) {
+ obj.taskRuns = message.taskRuns;
+ }
+ if (message.reason !== "") {
+ obj.reason = message.reason;
}
- message.reason !== undefined && (obj.reason = message.reason);
return obj;
},
create(base?: DeepPartial<BatchCancelTaskRunsRequest>): BatchCancelTaskRunsRequest {
return BatchCancelTaskRunsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchCancelTaskRunsRequest>): BatchCancelTaskRunsRequest {
const message = createBaseBatchCancelTaskRunsRequest();
message.parent = object.parent ?? "";
@@ -3169,7 +3246,6 @@ export const BatchCancelTaskRunsResponse = {
create(base?: DeepPartial<BatchCancelTaskRunsResponse>): BatchCancelTaskRunsResponse {
return BatchCancelTaskRunsResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchCancelTaskRunsResponse>): BatchCancelTaskRunsResponse {
const message = createBaseBatchCancelTaskRunsResponse();
return message;
@@ -3303,40 +3379,55 @@ export const PlanCheckRun = {
fromJSON(object: any): PlanCheckRun {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
type: isSet(object.type) ? planCheckRun_TypeFromJSON(object.type) : 0,
status: isSet(object.status) ? planCheckRun_StatusFromJSON(object.status) : 0,
- target: isSet(object.target) ? String(object.target) : "",
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- results: Array.isArray(object?.results) ? object.results.map((e: any) => PlanCheckRun_Result.fromJSON(e)) : [],
- error: isSet(object.error) ? String(object.error) : "",
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ results: globalThis.Array.isArray(object?.results)
+ ? object.results.map((e: any) => PlanCheckRun_Result.fromJSON(e))
+ : [],
+ error: isSet(object.error) ? globalThis.String(object.error) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
};
},
toJSON(message: PlanCheckRun): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.type !== undefined && (obj.type = planCheckRun_TypeToJSON(message.type));
- message.status !== undefined && (obj.status = planCheckRun_StatusToJSON(message.status));
- message.target !== undefined && (obj.target = message.target);
- message.sheet !== undefined && (obj.sheet = message.sheet);
- if (message.results) {
- obj.results = message.results.map((e) => e ? PlanCheckRun_Result.toJSON(e) : undefined);
- } else {
- obj.results = [];
- }
- message.error !== undefined && (obj.error = message.error);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.type !== 0) {
+ obj.type = planCheckRun_TypeToJSON(message.type);
+ }
+ if (message.status !== 0) {
+ obj.status = planCheckRun_StatusToJSON(message.status);
+ }
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.results?.length) {
+ obj.results = message.results.map((e) => PlanCheckRun_Result.toJSON(e));
+ }
+ if (message.error !== "") {
+ obj.error = message.error;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRun>): PlanCheckRun {
return PlanCheckRun.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRun>): PlanCheckRun {
const message = createBasePlanCheckRun();
message.name = object.name ?? "";
@@ -3440,9 +3531,9 @@ export const PlanCheckRun_Result = {
fromJSON(object: any): PlanCheckRun_Result {
return {
status: isSet(object.status) ? planCheckRun_Result_StatusFromJSON(object.status) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- content: isSet(object.content) ? String(object.content) : "",
- code: isSet(object.code) ? Number(object.code) : 0,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
sqlSummaryReport: isSet(object.sqlSummaryReport)
? PlanCheckRun_Result_SqlSummaryReport.fromJSON(object.sqlSummaryReport)
: undefined,
@@ -3454,23 +3545,30 @@ export const PlanCheckRun_Result = {
toJSON(message: PlanCheckRun_Result): unknown {
const obj: any = {};
- message.status !== undefined && (obj.status = planCheckRun_Result_StatusToJSON(message.status));
- message.title !== undefined && (obj.title = message.title);
- message.content !== undefined && (obj.content = message.content);
- message.code !== undefined && (obj.code = Math.round(message.code));
- message.sqlSummaryReport !== undefined && (obj.sqlSummaryReport = message.sqlSummaryReport
- ? PlanCheckRun_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport)
- : undefined);
- message.sqlReviewReport !== undefined && (obj.sqlReviewReport = message.sqlReviewReport
- ? PlanCheckRun_Result_SqlReviewReport.toJSON(message.sqlReviewReport)
- : undefined);
+ if (message.status !== 0) {
+ obj.status = planCheckRun_Result_StatusToJSON(message.status);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.content !== "") {
+ obj.content = message.content;
+ }
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
+ if (message.sqlSummaryReport !== undefined) {
+ obj.sqlSummaryReport = PlanCheckRun_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport);
+ }
+ if (message.sqlReviewReport !== undefined) {
+ obj.sqlReviewReport = PlanCheckRun_Result_SqlReviewReport.toJSON(message.sqlReviewReport);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRun_Result>): PlanCheckRun_Result {
return PlanCheckRun_Result.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRun_Result>): PlanCheckRun_Result {
const message = createBasePlanCheckRun_Result();
message.status = object.status ?? 0;
@@ -3554,31 +3652,35 @@ export const PlanCheckRun_Result_SqlSummaryReport = {
fromJSON(object: any): PlanCheckRun_Result_SqlSummaryReport {
return {
- code: isSet(object.code) ? Number(object.code) : 0,
- statementTypes: Array.isArray(object?.statementTypes) ? object.statementTypes.map((e: any) => String(e)) : [],
- affectedRows: isSet(object.affectedRows) ? Number(object.affectedRows) : 0,
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
+ statementTypes: globalThis.Array.isArray(object?.statementTypes)
+ ? object.statementTypes.map((e: any) => globalThis.String(e))
+ : [],
+ affectedRows: isSet(object.affectedRows) ? globalThis.Number(object.affectedRows) : 0,
changedResources: isSet(object.changedResources) ? ChangedResources.fromJSON(object.changedResources) : undefined,
};
},
toJSON(message: PlanCheckRun_Result_SqlSummaryReport): unknown {
const obj: any = {};
- message.code !== undefined && (obj.code = Math.round(message.code));
- if (message.statementTypes) {
- obj.statementTypes = message.statementTypes.map((e) => e);
- } else {
- obj.statementTypes = [];
- }
- message.affectedRows !== undefined && (obj.affectedRows = Math.round(message.affectedRows));
- message.changedResources !== undefined &&
- (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
+ if (message.statementTypes?.length) {
+ obj.statementTypes = message.statementTypes;
+ }
+ if (message.affectedRows !== 0) {
+ obj.affectedRows = Math.round(message.affectedRows);
+ }
+ if (message.changedResources !== undefined) {
+ obj.changedResources = ChangedResources.toJSON(message.changedResources);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRun_Result_SqlSummaryReport>): PlanCheckRun_Result_SqlSummaryReport {
return PlanCheckRun_Result_SqlSummaryReport.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRun_Result_SqlSummaryReport>): PlanCheckRun_Result_SqlSummaryReport {
const message = createBasePlanCheckRun_Result_SqlSummaryReport();
message.code = object.code ?? 0;
@@ -3658,26 +3760,33 @@ export const PlanCheckRun_Result_SqlReviewReport = {
fromJSON(object: any): PlanCheckRun_Result_SqlReviewReport {
return {
- line: isSet(object.line) ? Number(object.line) : 0,
- column: isSet(object.column) ? Number(object.column) : 0,
- detail: isSet(object.detail) ? String(object.detail) : "",
- code: isSet(object.code) ? Number(object.code) : 0,
+ line: isSet(object.line) ? globalThis.Number(object.line) : 0,
+ column: isSet(object.column) ? globalThis.Number(object.column) : 0,
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
};
},
toJSON(message: PlanCheckRun_Result_SqlReviewReport): unknown {
const obj: any = {};
- message.line !== undefined && (obj.line = Math.round(message.line));
- message.column !== undefined && (obj.column = Math.round(message.column));
- message.detail !== undefined && (obj.detail = message.detail);
- message.code !== undefined && (obj.code = Math.round(message.code));
+ if (message.line !== 0) {
+ obj.line = Math.round(message.line);
+ }
+ if (message.column !== 0) {
+ obj.column = Math.round(message.column);
+ }
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRun_Result_SqlReviewReport>): PlanCheckRun_Result_SqlReviewReport {
return PlanCheckRun_Result_SqlReviewReport.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRun_Result_SqlReviewReport>): PlanCheckRun_Result_SqlReviewReport {
const message = createBasePlanCheckRun_Result_SqlReviewReport();
message.line = object.line ?? 0;
@@ -3724,19 +3833,20 @@ export const GetRolloutRequest = {
},
fromJSON(object: any): GetRolloutRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetRolloutRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetRolloutRequest>): GetRolloutRequest {
return GetRolloutRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetRolloutRequest>): GetRolloutRequest {
const message = createBaseGetRolloutRequest();
message.name = object.name ?? "";
@@ -3791,22 +3901,25 @@ export const CreateRolloutRequest = {
fromJSON(object: any): CreateRolloutRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- plan: isSet(object.plan) ? String(object.plan) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ plan: isSet(object.plan) ? globalThis.String(object.plan) : "",
};
},
toJSON(message: CreateRolloutRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.plan !== undefined && (obj.plan = message.plan);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.plan !== "") {
+ obj.plan = message.plan;
+ }
return obj;
},
create(base?: DeepPartial<CreateRolloutRequest>): CreateRolloutRequest {
return CreateRolloutRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateRolloutRequest>): CreateRolloutRequest {
const message = createBaseCreateRolloutRequest();
message.parent = object.parent ?? "";
@@ -3862,22 +3975,25 @@ export const PreviewRolloutRequest = {
fromJSON(object: any): PreviewRolloutRequest {
return {
- project: isSet(object.project) ? String(object.project) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,
};
},
toJSON(message: PreviewRolloutRequest): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
- message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.plan !== undefined) {
+ obj.plan = Plan.toJSON(message.plan);
+ }
return obj;
},
create(base?: DeepPartial<PreviewRolloutRequest>): PreviewRolloutRequest {
return PreviewRolloutRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PreviewRolloutRequest>): PreviewRolloutRequest {
const message = createBasePreviewRolloutRequest();
message.project = object.project ?? "";
@@ -3943,24 +4059,29 @@ export const ListTaskRunsRequest = {
fromJSON(object: any): ListTaskRunsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListTaskRunsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListTaskRunsRequest>): ListTaskRunsRequest {
return ListTaskRunsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListTaskRunsRequest>): ListTaskRunsRequest {
const message = createBaseListTaskRunsRequest();
message.parent = object.parent ?? "";
@@ -4017,26 +4138,25 @@ export const ListTaskRunsResponse = {
fromJSON(object: any): ListTaskRunsResponse {
return {
- taskRuns: Array.isArray(object?.taskRuns) ? object.taskRuns.map((e: any) => TaskRun.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ taskRuns: globalThis.Array.isArray(object?.taskRuns) ? object.taskRuns.map((e: any) => TaskRun.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListTaskRunsResponse): unknown {
const obj: any = {};
- if (message.taskRuns) {
- obj.taskRuns = message.taskRuns.map((e) => e ? TaskRun.toJSON(e) : undefined);
- } else {
- obj.taskRuns = [];
+ if (message.taskRuns?.length) {
+ obj.taskRuns = message.taskRuns.map((e) => TaskRun.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListTaskRunsResponse>): ListTaskRunsResponse {
return ListTaskRunsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListTaskRunsResponse>): ListTaskRunsResponse {
const message = createBaseListTaskRunsResponse();
message.taskRuns = object.taskRuns?.map((e) => TaskRun.fromPartial(e)) || [];
@@ -4122,24 +4242,30 @@ export const Rollout = {
fromJSON(object: any): Rollout {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- plan: isSet(object.plan) ? String(object.plan) : "",
- title: isSet(object.title) ? String(object.title) : "",
- stages: Array.isArray(object?.stages) ? object.stages.map((e: any) => Stage.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ plan: isSet(object.plan) ? globalThis.String(object.plan) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ stages: globalThis.Array.isArray(object?.stages) ? object.stages.map((e: any) => Stage.fromJSON(e)) : [],
};
},
toJSON(message: Rollout): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.plan !== undefined && (obj.plan = message.plan);
- message.title !== undefined && (obj.title = message.title);
- if (message.stages) {
- obj.stages = message.stages.map((e) => e ? Stage.toJSON(e) : undefined);
- } else {
- obj.stages = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.plan !== "") {
+ obj.plan = message.plan;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.stages?.length) {
+ obj.stages = message.stages.map((e) => Stage.toJSON(e));
}
return obj;
},
@@ -4147,7 +4273,6 @@ export const Rollout = {
create(base?: DeepPartial<Rollout>): Rollout {
return Rollout.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Rollout>): Rollout {
const message = createBaseRollout();
message.name = object.name ?? "";
@@ -4236,24 +4361,30 @@ export const Stage = {
fromJSON(object: any): Stage {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- environment: isSet(object.environment) ? String(object.environment) : "",
- title: isSet(object.title) ? String(object.title) : "",
- tasks: Array.isArray(object?.tasks) ? object.tasks.map((e: any) => Task.fromJSON(e)) : [],
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ tasks: globalThis.Array.isArray(object?.tasks) ? object.tasks.map((e: any) => Task.fromJSON(e)) : [],
};
},
toJSON(message: Stage): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.environment !== undefined && (obj.environment = message.environment);
- message.title !== undefined && (obj.title = message.title);
- if (message.tasks) {
- obj.tasks = message.tasks.map((e) => e ? Task.toJSON(e) : undefined);
- } else {
- obj.tasks = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.environment !== "") {
+ obj.environment = message.environment;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.tasks?.length) {
+ obj.tasks = message.tasks.map((e) => Task.toJSON(e));
}
return obj;
},
@@ -4261,7 +4392,6 @@ export const Stage = {
create(base?: DeepPartial<Stage>): Stage {
return Stage.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Stage>): Stage {
const message = createBaseStage();
message.name = object.name ?? "";
@@ -4466,15 +4596,17 @@ export const Task = {
fromJSON(object: any): Task {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- title: isSet(object.title) ? String(object.title) : "",
- specId: isSet(object.specId) ? String(object.specId) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ specId: isSet(object.specId) ? globalThis.String(object.specId) : "",
status: isSet(object.status) ? task_StatusFromJSON(object.status) : 0,
- skippedReason: isSet(object.skippedReason) ? String(object.skippedReason) : "",
+ skippedReason: isSet(object.skippedReason) ? globalThis.String(object.skippedReason) : "",
type: isSet(object.type) ? task_TypeFromJSON(object.type) : 0,
- blockedByTasks: Array.isArray(object?.blockedByTasks) ? object.blockedByTasks.map((e: any) => String(e)) : [],
- target: isSet(object.target) ? String(object.target) : "",
+ blockedByTasks: globalThis.Array.isArray(object?.blockedByTasks)
+ ? object.blockedByTasks.map((e: any) => globalThis.String(e))
+ : [],
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
databaseCreate: isSet(object.databaseCreate) ? Task_DatabaseCreate.fromJSON(object.databaseCreate) : undefined,
databaseSchemaBaseline: isSet(object.databaseSchemaBaseline)
? Task_DatabaseSchemaBaseline.fromJSON(object.databaseSchemaBaseline)
@@ -4494,42 +4626,57 @@ export const Task = {
toJSON(message: Task): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.title !== undefined && (obj.title = message.title);
- message.specId !== undefined && (obj.specId = message.specId);
- message.status !== undefined && (obj.status = task_StatusToJSON(message.status));
- message.skippedReason !== undefined && (obj.skippedReason = message.skippedReason);
- message.type !== undefined && (obj.type = task_TypeToJSON(message.type));
- if (message.blockedByTasks) {
- obj.blockedByTasks = message.blockedByTasks.map((e) => e);
- } else {
- obj.blockedByTasks = [];
- }
- message.target !== undefined && (obj.target = message.target);
- message.databaseCreate !== undefined &&
- (obj.databaseCreate = message.databaseCreate ? Task_DatabaseCreate.toJSON(message.databaseCreate) : undefined);
- message.databaseSchemaBaseline !== undefined && (obj.databaseSchemaBaseline = message.databaseSchemaBaseline
- ? Task_DatabaseSchemaBaseline.toJSON(message.databaseSchemaBaseline)
- : undefined);
- message.databaseSchemaUpdate !== undefined && (obj.databaseSchemaUpdate = message.databaseSchemaUpdate
- ? Task_DatabaseSchemaUpdate.toJSON(message.databaseSchemaUpdate)
- : undefined);
- message.databaseDataUpdate !== undefined && (obj.databaseDataUpdate = message.databaseDataUpdate
- ? Task_DatabaseDataUpdate.toJSON(message.databaseDataUpdate)
- : undefined);
- message.databaseBackup !== undefined &&
- (obj.databaseBackup = message.databaseBackup ? Task_DatabaseBackup.toJSON(message.databaseBackup) : undefined);
- message.databaseRestoreRestore !== undefined && (obj.databaseRestoreRestore = message.databaseRestoreRestore
- ? Task_DatabaseRestoreRestore.toJSON(message.databaseRestoreRestore)
- : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.specId !== "") {
+ obj.specId = message.specId;
+ }
+ if (message.status !== 0) {
+ obj.status = task_StatusToJSON(message.status);
+ }
+ if (message.skippedReason !== "") {
+ obj.skippedReason = message.skippedReason;
+ }
+ if (message.type !== 0) {
+ obj.type = task_TypeToJSON(message.type);
+ }
+ if (message.blockedByTasks?.length) {
+ obj.blockedByTasks = message.blockedByTasks;
+ }
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.databaseCreate !== undefined) {
+ obj.databaseCreate = Task_DatabaseCreate.toJSON(message.databaseCreate);
+ }
+ if (message.databaseSchemaBaseline !== undefined) {
+ obj.databaseSchemaBaseline = Task_DatabaseSchemaBaseline.toJSON(message.databaseSchemaBaseline);
+ }
+ if (message.databaseSchemaUpdate !== undefined) {
+ obj.databaseSchemaUpdate = Task_DatabaseSchemaUpdate.toJSON(message.databaseSchemaUpdate);
+ }
+ if (message.databaseDataUpdate !== undefined) {
+ obj.databaseDataUpdate = Task_DatabaseDataUpdate.toJSON(message.databaseDataUpdate);
+ }
+ if (message.databaseBackup !== undefined) {
+ obj.databaseBackup = Task_DatabaseBackup.toJSON(message.databaseBackup);
+ }
+ if (message.databaseRestoreRestore !== undefined) {
+ obj.databaseRestoreRestore = Task_DatabaseRestoreRestore.toJSON(message.databaseRestoreRestore);
+ }
return obj;
},
create(base?: DeepPartial<Task>): Task {
return Task.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task>): Task {
const message = createBaseTask();
message.name = object.name ?? "";
@@ -4684,13 +4831,13 @@ export const Task_DatabaseCreate = {
fromJSON(object: any): Task_DatabaseCreate {
return {
- project: isSet(object.project) ? String(object.project) : "",
- database: isSet(object.database) ? String(object.database) : "",
- table: isSet(object.table) ? String(object.table) : "",
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",
- collation: isSet(object.collation) ? String(object.collation) : "",
- environment: isSet(object.environment) ? String(object.environment) : "",
+ project: isSet(object.project) ? globalThis.String(object.project) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
+ table: isSet(object.table) ? globalThis.String(object.table) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ characterSet: isSet(object.characterSet) ? globalThis.String(object.characterSet) : "",
+ collation: isSet(object.collation) ? globalThis.String(object.collation) : "",
+ environment: isSet(object.environment) ? globalThis.String(object.environment) : "",
labels: isObject(object.labels)
? Object.entries(object.labels).reduce<{ [key: string]: string }>((acc, [key, value]) => {
acc[key] = String(value);
@@ -4702,18 +4849,35 @@ export const Task_DatabaseCreate = {
toJSON(message: Task_DatabaseCreate): unknown {
const obj: any = {};
- message.project !== undefined && (obj.project = message.project);
- message.database !== undefined && (obj.database = message.database);
- message.table !== undefined && (obj.table = message.table);
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- message.environment !== undefined && (obj.environment = message.environment);
- obj.labels = {};
+ if (message.project !== "") {
+ obj.project = message.project;
+ }
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.environment !== "") {
+ obj.environment = message.environment;
+ }
if (message.labels) {
- Object.entries(message.labels).forEach(([k, v]) => {
- obj.labels[k] = v;
- });
+ const entries = Object.entries(message.labels);
+ if (entries.length > 0) {
+ obj.labels = {};
+ entries.forEach(([k, v]) => {
+ obj.labels[k] = v;
+ });
+ }
}
return obj;
},
@@ -4721,7 +4885,6 @@ export const Task_DatabaseCreate = {
create(base?: DeepPartial<Task_DatabaseCreate>): Task_DatabaseCreate {
return Task_DatabaseCreate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseCreate>): Task_DatabaseCreate {
const message = createBaseTask_DatabaseCreate();
message.project = object.project ?? "";
@@ -4733,7 +4896,7 @@ export const Task_DatabaseCreate = {
message.environment = object.environment ?? "";
message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = String(value);
+ acc[key] = globalThis.String(value);
}
return acc;
}, {});
@@ -4787,20 +4950,26 @@ export const Task_DatabaseCreate_LabelsEntry = {
},
fromJSON(object: any): Task_DatabaseCreate_LabelsEntry {
- return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
+ return {
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
+ };
},
toJSON(message: Task_DatabaseCreate_LabelsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== "") {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<Task_DatabaseCreate_LabelsEntry>): Task_DatabaseCreate_LabelsEntry {
return Task_DatabaseCreate_LabelsEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseCreate_LabelsEntry>): Task_DatabaseCreate_LabelsEntry {
const message = createBaseTask_DatabaseCreate_LabelsEntry();
message.key = object.key ?? "";
@@ -4845,19 +5014,20 @@ export const Task_DatabaseSchemaBaseline = {
},
fromJSON(object: any): Task_DatabaseSchemaBaseline {
- return { schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "" };
+ return { schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "" };
},
toJSON(message: Task_DatabaseSchemaBaseline): unknown {
const obj: any = {};
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
return obj;
},
create(base?: DeepPartial<Task_DatabaseSchemaBaseline>): Task_DatabaseSchemaBaseline {
return Task_DatabaseSchemaBaseline.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseSchemaBaseline>): Task_DatabaseSchemaBaseline {
const message = createBaseTask_DatabaseSchemaBaseline();
message.schemaVersion = object.schemaVersion ?? "";
@@ -4912,22 +5082,25 @@ export const Task_DatabaseSchemaUpdate = {
fromJSON(object: any): Task_DatabaseSchemaUpdate {
return {
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "",
};
},
toJSON(message: Task_DatabaseSchemaUpdate): unknown {
const obj: any = {};
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
return obj;
},
create(base?: DeepPartial<Task_DatabaseSchemaUpdate>): Task_DatabaseSchemaUpdate {
return Task_DatabaseSchemaUpdate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseSchemaUpdate>): Task_DatabaseSchemaUpdate {
const message = createBaseTask_DatabaseSchemaUpdate();
message.sheet = object.sheet ?? "";
@@ -5052,37 +5225,51 @@ export const Task_DatabaseDataUpdate = {
fromJSON(object: any): Task_DatabaseDataUpdate {
return {
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
- rollbackEnabled: isSet(object.rollbackEnabled) ? Boolean(object.rollbackEnabled) : false,
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "",
+ rollbackEnabled: isSet(object.rollbackEnabled) ? globalThis.Boolean(object.rollbackEnabled) : false,
rollbackSqlStatus: isSet(object.rollbackSqlStatus)
? task_DatabaseDataUpdate_RollbackSqlStatusFromJSON(object.rollbackSqlStatus)
: 0,
- rollbackError: isSet(object.rollbackError) ? String(object.rollbackError) : "",
- rollbackSheet: isSet(object.rollbackSheet) ? String(object.rollbackSheet) : "",
- rollbackFromIssue: isSet(object.rollbackFromIssue) ? String(object.rollbackFromIssue) : "",
- rollbackFromTask: isSet(object.rollbackFromTask) ? String(object.rollbackFromTask) : "",
+ rollbackError: isSet(object.rollbackError) ? globalThis.String(object.rollbackError) : "",
+ rollbackSheet: isSet(object.rollbackSheet) ? globalThis.String(object.rollbackSheet) : "",
+ rollbackFromIssue: isSet(object.rollbackFromIssue) ? globalThis.String(object.rollbackFromIssue) : "",
+ rollbackFromTask: isSet(object.rollbackFromTask) ? globalThis.String(object.rollbackFromTask) : "",
};
},
toJSON(message: Task_DatabaseDataUpdate): unknown {
const obj: any = {};
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
- message.rollbackEnabled !== undefined && (obj.rollbackEnabled = message.rollbackEnabled);
- message.rollbackSqlStatus !== undefined &&
- (obj.rollbackSqlStatus = task_DatabaseDataUpdate_RollbackSqlStatusToJSON(message.rollbackSqlStatus));
- message.rollbackError !== undefined && (obj.rollbackError = message.rollbackError);
- message.rollbackSheet !== undefined && (obj.rollbackSheet = message.rollbackSheet);
- message.rollbackFromIssue !== undefined && (obj.rollbackFromIssue = message.rollbackFromIssue);
- message.rollbackFromTask !== undefined && (obj.rollbackFromTask = message.rollbackFromTask);
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
+ if (message.rollbackEnabled === true) {
+ obj.rollbackEnabled = message.rollbackEnabled;
+ }
+ if (message.rollbackSqlStatus !== 0) {
+ obj.rollbackSqlStatus = task_DatabaseDataUpdate_RollbackSqlStatusToJSON(message.rollbackSqlStatus);
+ }
+ if (message.rollbackError !== "") {
+ obj.rollbackError = message.rollbackError;
+ }
+ if (message.rollbackSheet !== "") {
+ obj.rollbackSheet = message.rollbackSheet;
+ }
+ if (message.rollbackFromIssue !== "") {
+ obj.rollbackFromIssue = message.rollbackFromIssue;
+ }
+ if (message.rollbackFromTask !== "") {
+ obj.rollbackFromTask = message.rollbackFromTask;
+ }
return obj;
},
create(base?: DeepPartial<Task_DatabaseDataUpdate>): Task_DatabaseDataUpdate {
return Task_DatabaseDataUpdate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseDataUpdate>): Task_DatabaseDataUpdate {
const message = createBaseTask_DatabaseDataUpdate();
message.sheet = object.sheet ?? "";
@@ -5133,19 +5320,20 @@ export const Task_DatabaseBackup = {
},
fromJSON(object: any): Task_DatabaseBackup {
- return { backup: isSet(object.backup) ? String(object.backup) : "" };
+ return { backup: isSet(object.backup) ? globalThis.String(object.backup) : "" };
},
toJSON(message: Task_DatabaseBackup): unknown {
const obj: any = {};
- message.backup !== undefined && (obj.backup = message.backup);
+ if (message.backup !== "") {
+ obj.backup = message.backup;
+ }
return obj;
},
create(base?: DeepPartial<Task_DatabaseBackup>): Task_DatabaseBackup {
return Task_DatabaseBackup.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseBackup>): Task_DatabaseBackup {
const message = createBaseTask_DatabaseBackup();
message.backup = object.backup ?? "";
@@ -5210,24 +5398,29 @@ export const Task_DatabaseRestoreRestore = {
fromJSON(object: any): Task_DatabaseRestoreRestore {
return {
- target: isSet(object.target) ? String(object.target) : "",
- backup: isSet(object.backup) ? String(object.backup) : undefined,
+ target: isSet(object.target) ? globalThis.String(object.target) : "",
+ backup: isSet(object.backup) ? globalThis.String(object.backup) : undefined,
pointInTime: isSet(object.pointInTime) ? fromJsonTimestamp(object.pointInTime) : undefined,
};
},
toJSON(message: Task_DatabaseRestoreRestore): unknown {
const obj: any = {};
- message.target !== undefined && (obj.target = message.target);
- message.backup !== undefined && (obj.backup = message.backup);
- message.pointInTime !== undefined && (obj.pointInTime = message.pointInTime.toISOString());
+ if (message.target !== "") {
+ obj.target = message.target;
+ }
+ if (message.backup !== undefined) {
+ obj.backup = message.backup;
+ }
+ if (message.pointInTime !== undefined) {
+ obj.pointInTime = message.pointInTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<Task_DatabaseRestoreRestore>): Task_DatabaseRestoreRestore {
return Task_DatabaseRestoreRestore.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Task_DatabaseRestoreRestore>): Task_DatabaseRestoreRestore {
const message = createBaseTask_DatabaseRestoreRestore();
message.target = object.target ?? "";
@@ -5419,17 +5612,17 @@ export const TaskRun = {
fromJSON(object: any): TaskRun {
return {
- name: isSet(object.name) ? String(object.name) : "",
- uid: isSet(object.uid) ? String(object.uid) : "",
- creator: isSet(object.creator) ? String(object.creator) : "",
- updater: isSet(object.updater) ? String(object.updater) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ uid: isSet(object.uid) ? globalThis.String(object.uid) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
+ updater: isSet(object.updater) ? globalThis.String(object.updater) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
- title: isSet(object.title) ? String(object.title) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
status: isSet(object.status) ? taskRun_StatusFromJSON(object.status) : 0,
- detail: isSet(object.detail) ? String(object.detail) : "",
- changeHistory: isSet(object.changeHistory) ? String(object.changeHistory) : "",
- schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
+ changeHistory: isSet(object.changeHistory) ? globalThis.String(object.changeHistory) : "",
+ schemaVersion: isSet(object.schemaVersion) ? globalThis.String(object.schemaVersion) : "",
executionStatus: isSet(object.executionStatus) ? taskRun_ExecutionStatusFromJSON(object.executionStatus) : 0,
executionStatusUpdateTime: isSet(object.executionStatusUpdateTime)
? fromJsonTimestamp(object.executionStatusUpdateTime)
@@ -5440,29 +5633,54 @@ export const TaskRun = {
toJSON(message: TaskRun): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.uid !== undefined && (obj.uid = message.uid);
- message.creator !== undefined && (obj.creator = message.creator);
- message.updater !== undefined && (obj.updater = message.updater);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- message.title !== undefined && (obj.title = message.title);
- message.status !== undefined && (obj.status = taskRun_StatusToJSON(message.status));
- message.detail !== undefined && (obj.detail = message.detail);
- message.changeHistory !== undefined && (obj.changeHistory = message.changeHistory);
- message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
- message.executionStatus !== undefined &&
- (obj.executionStatus = taskRun_ExecutionStatusToJSON(message.executionStatus));
- message.executionStatusUpdateTime !== undefined &&
- (obj.executionStatusUpdateTime = message.executionStatusUpdateTime.toISOString());
- message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.uid !== "") {
+ obj.uid = message.uid;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.updater !== "") {
+ obj.updater = message.updater;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.status !== 0) {
+ obj.status = taskRun_StatusToJSON(message.status);
+ }
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
+ if (message.changeHistory !== "") {
+ obj.changeHistory = message.changeHistory;
+ }
+ if (message.schemaVersion !== "") {
+ obj.schemaVersion = message.schemaVersion;
+ }
+ if (message.executionStatus !== 0) {
+ obj.executionStatus = taskRun_ExecutionStatusToJSON(message.executionStatus);
+ }
+ if (message.executionStatusUpdateTime !== undefined) {
+ obj.executionStatusUpdateTime = message.executionStatusUpdateTime.toISOString();
+ }
+ if (message.startTime !== undefined) {
+ obj.startTime = message.startTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<TaskRun>): TaskRun {
return TaskRun.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TaskRun>): TaskRun {
const message = createBaseTaskRun();
message.name = object.name ?? "";
@@ -6335,7 +6553,7 @@ export const RolloutServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -6349,14 +6567,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/schema_design_service.ts b/frontend/src/types/proto/v1/schema_design_service.ts
index 2fd679e2ae..44be72c073 100644
--- a/frontend/src/types/proto/v1/schema_design_service.ts
+++ b/frontend/src/types/proto/v1/schema_design_service.ts
@@ -497,25 +497,25 @@ export const SchemaDesign = {
fromJSON(object: any): SchemaDesign {
return {
- name: isSet(object.name) ? String(object.name) : "",
- title: isSet(object.title) ? String(object.title) : "",
- schema: isSet(object.schema) ? String(object.schema) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",
schemaMetadata: isSet(object.schemaMetadata) ? DatabaseMetadata.fromJSON(object.schemaMetadata) : undefined,
- baselineSchema: isSet(object.baselineSchema) ? String(object.baselineSchema) : "",
+ baselineSchema: isSet(object.baselineSchema) ? globalThis.String(object.baselineSchema) : "",
baselineSchemaMetadata: isSet(object.baselineSchemaMetadata)
? DatabaseMetadata.fromJSON(object.baselineSchemaMetadata)
: undefined,
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- baselineDatabase: isSet(object.baselineDatabase) ? String(object.baselineDatabase) : "",
- baselineSheetName: isSet(object.baselineSheetName) ? String(object.baselineSheetName) : "",
+ baselineDatabase: isSet(object.baselineDatabase) ? globalThis.String(object.baselineDatabase) : "",
+ baselineSheetName: isSet(object.baselineSheetName) ? globalThis.String(object.baselineSheetName) : "",
baselineChangeHistoryId: isSet(object.baselineChangeHistoryId)
- ? String(object.baselineChangeHistoryId)
+ ? globalThis.String(object.baselineChangeHistoryId)
: undefined,
type: isSet(object.type) ? schemaDesign_TypeFromJSON(object.type) : 0,
- etag: isSet(object.etag) ? String(object.etag) : "",
+ etag: isSet(object.etag) ? globalThis.String(object.etag) : "",
protection: isSet(object.protection) ? SchemaDesign_Protection.fromJSON(object.protection) : undefined,
- creator: isSet(object.creator) ? String(object.creator) : "",
- updater: isSet(object.updater) ? String(object.updater) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
+ updater: isSet(object.updater) ? globalThis.String(object.updater) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
};
@@ -523,34 +523,63 @@ export const SchemaDesign = {
toJSON(message: SchemaDesign): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.title !== undefined && (obj.title = message.title);
- message.schema !== undefined && (obj.schema = message.schema);
- message.schemaMetadata !== undefined &&
- (obj.schemaMetadata = message.schemaMetadata ? DatabaseMetadata.toJSON(message.schemaMetadata) : undefined);
- message.baselineSchema !== undefined && (obj.baselineSchema = message.baselineSchema);
- message.baselineSchemaMetadata !== undefined && (obj.baselineSchemaMetadata = message.baselineSchemaMetadata
- ? DatabaseMetadata.toJSON(message.baselineSchemaMetadata)
- : undefined);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.baselineDatabase !== undefined && (obj.baselineDatabase = message.baselineDatabase);
- message.baselineSheetName !== undefined && (obj.baselineSheetName = message.baselineSheetName);
- message.baselineChangeHistoryId !== undefined && (obj.baselineChangeHistoryId = message.baselineChangeHistoryId);
- message.type !== undefined && (obj.type = schemaDesign_TypeToJSON(message.type));
- message.etag !== undefined && (obj.etag = message.etag);
- message.protection !== undefined &&
- (obj.protection = message.protection ? SchemaDesign_Protection.toJSON(message.protection) : undefined);
- message.creator !== undefined && (obj.creator = message.creator);
- message.updater !== undefined && (obj.updater = message.updater);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.schemaMetadata !== undefined) {
+ obj.schemaMetadata = DatabaseMetadata.toJSON(message.schemaMetadata);
+ }
+ if (message.baselineSchema !== "") {
+ obj.baselineSchema = message.baselineSchema;
+ }
+ if (message.baselineSchemaMetadata !== undefined) {
+ obj.baselineSchemaMetadata = DatabaseMetadata.toJSON(message.baselineSchemaMetadata);
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.baselineDatabase !== "") {
+ obj.baselineDatabase = message.baselineDatabase;
+ }
+ if (message.baselineSheetName !== "") {
+ obj.baselineSheetName = message.baselineSheetName;
+ }
+ if (message.baselineChangeHistoryId !== undefined) {
+ obj.baselineChangeHistoryId = message.baselineChangeHistoryId;
+ }
+ if (message.type !== 0) {
+ obj.type = schemaDesign_TypeToJSON(message.type);
+ }
+ if (message.etag !== "") {
+ obj.etag = message.etag;
+ }
+ if (message.protection !== undefined) {
+ obj.protection = SchemaDesign_Protection.toJSON(message.protection);
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.updater !== "") {
+ obj.updater = message.updater;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
return obj;
},
create(base?: DeepPartial<SchemaDesign>): SchemaDesign {
return SchemaDesign.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaDesign>): SchemaDesign {
const message = createBaseSchemaDesign();
message.name = object.name ?? "";
@@ -617,19 +646,20 @@ export const SchemaDesign_Protection = {
},
fromJSON(object: any): SchemaDesign_Protection {
- return { allowForcePushes: isSet(object.allowForcePushes) ? Boolean(object.allowForcePushes) : false };
+ return { allowForcePushes: isSet(object.allowForcePushes) ? globalThis.Boolean(object.allowForcePushes) : false };
},
toJSON(message: SchemaDesign_Protection): unknown {
const obj: any = {};
- message.allowForcePushes !== undefined && (obj.allowForcePushes = message.allowForcePushes);
+ if (message.allowForcePushes === true) {
+ obj.allowForcePushes = message.allowForcePushes;
+ }
return obj;
},
create(base?: DeepPartial<SchemaDesign_Protection>): SchemaDesign_Protection {
return SchemaDesign_Protection.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaDesign_Protection>): SchemaDesign_Protection {
const message = createBaseSchemaDesign_Protection();
message.allowForcePushes = object.allowForcePushes ?? false;
@@ -673,19 +703,20 @@ export const GetSchemaDesignRequest = {
},
fromJSON(object: any): GetSchemaDesignRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetSchemaDesignRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {
return GetSchemaDesignRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {
const message = createBaseGetSchemaDesignRequest();
message.name = object.name ?? "";
@@ -770,28 +801,37 @@ export const ListSchemaDesignsRequest = {
fromJSON(object: any): ListSchemaDesignsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
view: isSet(object.view) ? schemaDesignViewFromJSON(object.view) : 0,
};
},
toJSON(message: ListSchemaDesignsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.filter !== undefined && (obj.filter = message.filter);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
- message.view !== undefined && (obj.view = schemaDesignViewToJSON(message.view));
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
+ if (message.view !== 0) {
+ obj.view = schemaDesignViewToJSON(message.view);
+ }
return obj;
},
create(base?: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
return ListSchemaDesignsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
const message = createBaseListSchemaDesignsRequest();
message.parent = object.parent ?? "";
@@ -850,28 +890,27 @@ export const ListSchemaDesignsResponse = {
fromJSON(object: any): ListSchemaDesignsResponse {
return {
- schemaDesigns: Array.isArray(object?.schemaDesigns)
+ schemaDesigns: globalThis.Array.isArray(object?.schemaDesigns)
? object.schemaDesigns.map((e: any) => SchemaDesign.fromJSON(e))
: [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListSchemaDesignsResponse): unknown {
const obj: any = {};
- if (message.schemaDesigns) {
- obj.schemaDesigns = message.schemaDesigns.map((e) => e ? SchemaDesign.toJSON(e) : undefined);
- } else {
- obj.schemaDesigns = [];
+ if (message.schemaDesigns?.length) {
+ obj.schemaDesigns = message.schemaDesigns.map((e) => SchemaDesign.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {
return ListSchemaDesignsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {
const message = createBaseListSchemaDesignsResponse();
message.schemaDesigns = object.schemaDesigns?.map((e) => SchemaDesign.fromPartial(e)) || [];
@@ -927,23 +966,25 @@ export const CreateSchemaDesignRequest = {
fromJSON(object: any): CreateSchemaDesignRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
schemaDesign: isSet(object.schemaDesign) ? SchemaDesign.fromJSON(object.schemaDesign) : undefined,
};
},
toJSON(message: CreateSchemaDesignRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.schemaDesign !== undefined &&
- (obj.schemaDesign = message.schemaDesign ? SchemaDesign.toJSON(message.schemaDesign) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.schemaDesign !== undefined) {
+ obj.schemaDesign = SchemaDesign.toJSON(message.schemaDesign);
+ }
return obj;
},
create(base?: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {
return CreateSchemaDesignRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {
const message = createBaseCreateSchemaDesignRequest();
message.parent = object.parent ?? "";
@@ -1008,16 +1049,18 @@ export const UpdateSchemaDesignRequest = {
toJSON(message: UpdateSchemaDesignRequest): unknown {
const obj: any = {};
- message.schemaDesign !== undefined &&
- (obj.schemaDesign = message.schemaDesign ? SchemaDesign.toJSON(message.schemaDesign) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.schemaDesign !== undefined) {
+ obj.schemaDesign = SchemaDesign.toJSON(message.schemaDesign);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {
return UpdateSchemaDesignRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {
const message = createBaseUpdateSchemaDesignRequest();
message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)
@@ -1075,22 +1118,25 @@ export const MergeSchemaDesignRequest = {
fromJSON(object: any): MergeSchemaDesignRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- targetName: isSet(object.targetName) ? String(object.targetName) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ targetName: isSet(object.targetName) ? globalThis.String(object.targetName) : "",
};
},
toJSON(message: MergeSchemaDesignRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.targetName !== undefined && (obj.targetName = message.targetName);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.targetName !== "") {
+ obj.targetName = message.targetName;
+ }
return obj;
},
create(base?: DeepPartial<MergeSchemaDesignRequest>): MergeSchemaDesignRequest {
return MergeSchemaDesignRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MergeSchemaDesignRequest>): MergeSchemaDesignRequest {
const message = createBaseMergeSchemaDesignRequest();
message.name = object.name ?? "";
@@ -1146,22 +1192,25 @@ export const ParseSchemaStringRequest = {
fromJSON(object: any): ParseSchemaStringRequest {
return {
- schemaString: isSet(object.schemaString) ? String(object.schemaString) : "",
+ schemaString: isSet(object.schemaString) ? globalThis.String(object.schemaString) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
};
},
toJSON(message: ParseSchemaStringRequest): unknown {
const obj: any = {};
- message.schemaString !== undefined && (obj.schemaString = message.schemaString);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
+ if (message.schemaString !== "") {
+ obj.schemaString = message.schemaString;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
return obj;
},
create(base?: DeepPartial<ParseSchemaStringRequest>): ParseSchemaStringRequest {
return ParseSchemaStringRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ParseSchemaStringRequest>): ParseSchemaStringRequest {
const message = createBaseParseSchemaStringRequest();
message.schemaString = object.schemaString ?? "";
@@ -1213,15 +1262,15 @@ export const ParseSchemaStringResponse = {
toJSON(message: ParseSchemaStringResponse): unknown {
const obj: any = {};
- message.schemaMetadata !== undefined &&
- (obj.schemaMetadata = message.schemaMetadata ? DatabaseMetadata.toJSON(message.schemaMetadata) : undefined);
+ if (message.schemaMetadata !== undefined) {
+ obj.schemaMetadata = DatabaseMetadata.toJSON(message.schemaMetadata);
+ }
return obj;
},
create(base?: DeepPartial<ParseSchemaStringResponse>): ParseSchemaStringResponse {
return ParseSchemaStringResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ParseSchemaStringResponse>): ParseSchemaStringResponse {
const message = createBaseParseSchemaStringResponse();
message.schemaMetadata = (object.schemaMetadata !== undefined && object.schemaMetadata !== null)
@@ -1267,19 +1316,20 @@ export const DeleteSchemaDesignRequest = {
},
fromJSON(object: any): DeleteSchemaDesignRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteSchemaDesignRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {
return DeleteSchemaDesignRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {
const message = createBaseDeleteSchemaDesignRequest();
message.name = object.name ?? "";
@@ -1352,18 +1402,21 @@ export const DiffMetadataRequest = {
toJSON(message: DiffMetadataRequest): unknown {
const obj: any = {};
- message.sourceMetadata !== undefined &&
- (obj.sourceMetadata = message.sourceMetadata ? DatabaseMetadata.toJSON(message.sourceMetadata) : undefined);
- message.targetMetadata !== undefined &&
- (obj.targetMetadata = message.targetMetadata ? DatabaseMetadata.toJSON(message.targetMetadata) : undefined);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
+ if (message.sourceMetadata !== undefined) {
+ obj.sourceMetadata = DatabaseMetadata.toJSON(message.sourceMetadata);
+ }
+ if (message.targetMetadata !== undefined) {
+ obj.targetMetadata = DatabaseMetadata.toJSON(message.targetMetadata);
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
return obj;
},
create(base?: DeepPartial<DiffMetadataRequest>): DiffMetadataRequest {
return DiffMetadataRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DiffMetadataRequest>): DiffMetadataRequest {
const message = createBaseDiffMetadataRequest();
message.sourceMetadata = (object.sourceMetadata !== undefined && object.sourceMetadata !== null)
@@ -1413,19 +1466,20 @@ export const DiffMetadataResponse = {
},
fromJSON(object: any): DiffMetadataResponse {
- return { diff: isSet(object.diff) ? String(object.diff) : "" };
+ return { diff: isSet(object.diff) ? globalThis.String(object.diff) : "" };
},
toJSON(message: DiffMetadataResponse): unknown {
const obj: any = {};
- message.diff !== undefined && (obj.diff = message.diff);
+ if (message.diff !== "") {
+ obj.diff = message.diff;
+ }
return obj;
},
create(base?: DeepPartial<DiffMetadataResponse>): DiffMetadataResponse {
return DiffMetadataResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DiffMetadataResponse>): DiffMetadataResponse {
const message = createBaseDiffMetadataResponse();
message.diff = object.diff ?? "";
@@ -1987,7 +2041,7 @@ export const SchemaDesignServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -2001,14 +2055,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.ts
index 873081278f..81a7af5c0b 100644
--- a/frontend/src/types/proto/v1/setting_service.ts
+++ b/frontend/src/types/proto/v1/setting_service.ts
@@ -572,22 +572,25 @@ export const ListSettingsRequest = {
fromJSON(object: any): ListSettingsRequest {
return {
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: ListSettingsRequest): unknown {
const obj: any = {};
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<ListSettingsRequest>): ListSettingsRequest {
return ListSettingsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSettingsRequest>): ListSettingsRequest {
const message = createBaseListSettingsRequest();
message.pageSize = object.pageSize ?? 0;
@@ -643,26 +646,25 @@ export const ListSettingsResponse = {
fromJSON(object: any): ListSettingsResponse {
return {
- settings: Array.isArray(object?.settings) ? object.settings.map((e: any) => Setting.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ settings: globalThis.Array.isArray(object?.settings) ? object.settings.map((e: any) => Setting.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: ListSettingsResponse): unknown {
const obj: any = {};
- if (message.settings) {
- obj.settings = message.settings.map((e) => e ? Setting.toJSON(e) : undefined);
- } else {
- obj.settings = [];
+ if (message.settings?.length) {
+ obj.settings = message.settings.map((e) => Setting.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<ListSettingsResponse>): ListSettingsResponse {
return ListSettingsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSettingsResponse>): ListSettingsResponse {
const message = createBaseListSettingsResponse();
message.settings = object.settings?.map((e) => Setting.fromPartial(e)) || [];
@@ -707,19 +709,20 @@ export const GetSettingRequest = {
},
fromJSON(object: any): GetSettingRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: GetSettingRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetSettingRequest>): GetSettingRequest {
return GetSettingRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetSettingRequest>): GetSettingRequest {
const message = createBaseGetSettingRequest();
message.name = object.name ?? "";
@@ -768,14 +771,15 @@ export const GetSettingResponse = {
toJSON(message: GetSettingResponse): unknown {
const obj: any = {};
- message.setting !== undefined && (obj.setting = message.setting ? Setting.toJSON(message.setting) : undefined);
+ if (message.setting !== undefined) {
+ obj.setting = Setting.toJSON(message.setting);
+ }
return obj;
},
create(base?: DeepPartial<GetSettingResponse>): GetSettingResponse {
return GetSettingResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetSettingResponse>): GetSettingResponse {
const message = createBaseGetSettingResponse();
message.setting = (object.setting !== undefined && object.setting !== null)
@@ -833,21 +837,24 @@ export const SetSettingRequest = {
fromJSON(object: any): SetSettingRequest {
return {
setting: isSet(object.setting) ? Setting.fromJSON(object.setting) : undefined,
- validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,
+ validateOnly: isSet(object.validateOnly) ? globalThis.Boolean(object.validateOnly) : false,
};
},
toJSON(message: SetSettingRequest): unknown {
const obj: any = {};
- message.setting !== undefined && (obj.setting = message.setting ? Setting.toJSON(message.setting) : undefined);
- message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);
+ if (message.setting !== undefined) {
+ obj.setting = Setting.toJSON(message.setting);
+ }
+ if (message.validateOnly === true) {
+ obj.validateOnly = message.validateOnly;
+ }
return obj;
},
create(base?: DeepPartial<SetSettingRequest>): SetSettingRequest {
return SetSettingRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SetSettingRequest>): SetSettingRequest {
const message = createBaseSetSettingRequest();
message.setting = (object.setting !== undefined && object.setting !== null)
@@ -905,22 +912,25 @@ export const Setting = {
fromJSON(object: any): Setting {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
value: isSet(object.value) ? Value.fromJSON(object.value) : undefined,
};
},
toJSON(message: Setting): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.value !== undefined && (obj.value = message.value ? Value.toJSON(message.value) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.value !== undefined) {
+ obj.value = Value.toJSON(message.value);
+ }
return obj;
},
create(base?: DeepPartial<Setting>): Setting {
return Setting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Setting>): Setting {
const message = createBaseSetting();
message.name = object.name ?? "";
@@ -1089,7 +1099,7 @@ export const Value = {
fromJSON(object: any): Value {
return {
- stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined,
+ stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
smtpMailDeliverySettingValue: isSet(object.smtpMailDeliverySettingValue)
? SMTPMailDeliverySettingValue.fromJSON(object.smtpMailDeliverySettingValue)
: undefined,
@@ -1126,54 +1136,48 @@ export const Value = {
toJSON(message: Value): unknown {
const obj: any = {};
- message.stringValue !== undefined && (obj.stringValue = message.stringValue);
- message.smtpMailDeliverySettingValue !== undefined &&
- (obj.smtpMailDeliverySettingValue = message.smtpMailDeliverySettingValue
- ? SMTPMailDeliverySettingValue.toJSON(message.smtpMailDeliverySettingValue)
- : undefined);
- message.appImSettingValue !== undefined &&
- (obj.appImSettingValue = message.appImSettingValue ? AppIMSetting.toJSON(message.appImSettingValue) : undefined);
- message.agentPluginSettingValue !== undefined && (obj.agentPluginSettingValue = message.agentPluginSettingValue
- ? AgentPluginSetting.toJSON(message.agentPluginSettingValue)
- : undefined);
- message.workspaceProfileSettingValue !== undefined &&
- (obj.workspaceProfileSettingValue = message.workspaceProfileSettingValue
- ? WorkspaceProfileSetting.toJSON(message.workspaceProfileSettingValue)
- : undefined);
- message.workspaceApprovalSettingValue !== undefined &&
- (obj.workspaceApprovalSettingValue = message.workspaceApprovalSettingValue
- ? WorkspaceApprovalSetting.toJSON(message.workspaceApprovalSettingValue)
- : undefined);
- message.workspaceTrialSettingValue !== undefined &&
- (obj.workspaceTrialSettingValue = message.workspaceTrialSettingValue
- ? WorkspaceTrialSetting.toJSON(message.workspaceTrialSettingValue)
- : undefined);
- message.externalApprovalSettingValue !== undefined &&
- (obj.externalApprovalSettingValue = message.externalApprovalSettingValue
- ? ExternalApprovalSetting.toJSON(message.externalApprovalSettingValue)
- : undefined);
- message.schemaTemplateSettingValue !== undefined &&
- (obj.schemaTemplateSettingValue = message.schemaTemplateSettingValue
- ? SchemaTemplateSetting.toJSON(message.schemaTemplateSettingValue)
- : undefined);
- message.dataClassificationSettingValue !== undefined &&
- (obj.dataClassificationSettingValue = message.dataClassificationSettingValue
- ? DataClassificationSetting.toJSON(message.dataClassificationSettingValue)
- : undefined);
- message.semanticTypeSettingValue !== undefined && (obj.semanticTypeSettingValue = message.semanticTypeSettingValue
- ? SemanticTypeSetting.toJSON(message.semanticTypeSettingValue)
- : undefined);
- message.maskingAlgorithmSettingValue !== undefined &&
- (obj.maskingAlgorithmSettingValue = message.maskingAlgorithmSettingValue
- ? MaskingAlgorithmSetting.toJSON(message.maskingAlgorithmSettingValue)
- : undefined);
+ if (message.stringValue !== undefined) {
+ obj.stringValue = message.stringValue;
+ }
+ if (message.smtpMailDeliverySettingValue !== undefined) {
+ obj.smtpMailDeliverySettingValue = SMTPMailDeliverySettingValue.toJSON(message.smtpMailDeliverySettingValue);
+ }
+ if (message.appImSettingValue !== undefined) {
+ obj.appImSettingValue = AppIMSetting.toJSON(message.appImSettingValue);
+ }
+ if (message.agentPluginSettingValue !== undefined) {
+ obj.agentPluginSettingValue = AgentPluginSetting.toJSON(message.agentPluginSettingValue);
+ }
+ if (message.workspaceProfileSettingValue !== undefined) {
+ obj.workspaceProfileSettingValue = WorkspaceProfileSetting.toJSON(message.workspaceProfileSettingValue);
+ }
+ if (message.workspaceApprovalSettingValue !== undefined) {
+ obj.workspaceApprovalSettingValue = WorkspaceApprovalSetting.toJSON(message.workspaceApprovalSettingValue);
+ }
+ if (message.workspaceTrialSettingValue !== undefined) {
+ obj.workspaceTrialSettingValue = WorkspaceTrialSetting.toJSON(message.workspaceTrialSettingValue);
+ }
+ if (message.externalApprovalSettingValue !== undefined) {
+ obj.externalApprovalSettingValue = ExternalApprovalSetting.toJSON(message.externalApprovalSettingValue);
+ }
+ if (message.schemaTemplateSettingValue !== undefined) {
+ obj.schemaTemplateSettingValue = SchemaTemplateSetting.toJSON(message.schemaTemplateSettingValue);
+ }
+ if (message.dataClassificationSettingValue !== undefined) {
+ obj.dataClassificationSettingValue = DataClassificationSetting.toJSON(message.dataClassificationSettingValue);
+ }
+ if (message.semanticTypeSettingValue !== undefined) {
+ obj.semanticTypeSettingValue = SemanticTypeSetting.toJSON(message.semanticTypeSettingValue);
+ }
+ if (message.maskingAlgorithmSettingValue !== undefined) {
+ obj.maskingAlgorithmSettingValue = MaskingAlgorithmSetting.toJSON(message.maskingAlgorithmSettingValue);
+ }
return obj;
},
create(base?: DeepPartial<Value>): Value {
return Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Value>): Value {
const message = createBaseValue();
message.stringValue = object.stringValue ?? undefined;
@@ -1373,44 +1377,63 @@ export const SMTPMailDeliverySettingValue = {
fromJSON(object: any): SMTPMailDeliverySettingValue {
return {
- server: isSet(object.server) ? String(object.server) : "",
- port: isSet(object.port) ? Number(object.port) : 0,
+ server: isSet(object.server) ? globalThis.String(object.server) : "",
+ port: isSet(object.port) ? globalThis.Number(object.port) : 0,
encryption: isSet(object.encryption) ? sMTPMailDeliverySettingValue_EncryptionFromJSON(object.encryption) : 0,
- ca: isSet(object.ca) ? String(object.ca) : undefined,
- key: isSet(object.key) ? String(object.key) : undefined,
- cert: isSet(object.cert) ? String(object.cert) : undefined,
+ ca: isSet(object.ca) ? globalThis.String(object.ca) : undefined,
+ key: isSet(object.key) ? globalThis.String(object.key) : undefined,
+ cert: isSet(object.cert) ? globalThis.String(object.cert) : undefined,
authentication: isSet(object.authentication)
? sMTPMailDeliverySettingValue_AuthenticationFromJSON(object.authentication)
: 0,
- username: isSet(object.username) ? String(object.username) : "",
- password: isSet(object.password) ? String(object.password) : undefined,
- from: isSet(object.from) ? String(object.from) : "",
- to: isSet(object.to) ? String(object.to) : "",
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
+ password: isSet(object.password) ? globalThis.String(object.password) : undefined,
+ from: isSet(object.from) ? globalThis.String(object.from) : "",
+ to: isSet(object.to) ? globalThis.String(object.to) : "",
};
},
toJSON(message: SMTPMailDeliverySettingValue): unknown {
const obj: any = {};
- message.server !== undefined && (obj.server = message.server);
- message.port !== undefined && (obj.port = Math.round(message.port));
- message.encryption !== undefined &&
- (obj.encryption = sMTPMailDeliverySettingValue_EncryptionToJSON(message.encryption));
- message.ca !== undefined && (obj.ca = message.ca);
- message.key !== undefined && (obj.key = message.key);
- message.cert !== undefined && (obj.cert = message.cert);
- message.authentication !== undefined &&
- (obj.authentication = sMTPMailDeliverySettingValue_AuthenticationToJSON(message.authentication));
- message.username !== undefined && (obj.username = message.username);
- message.password !== undefined && (obj.password = message.password);
- message.from !== undefined && (obj.from = message.from);
- message.to !== undefined && (obj.to = message.to);
+ if (message.server !== "") {
+ obj.server = message.server;
+ }
+ if (message.port !== 0) {
+ obj.port = Math.round(message.port);
+ }
+ if (message.encryption !== 0) {
+ obj.encryption = sMTPMailDeliverySettingValue_EncryptionToJSON(message.encryption);
+ }
+ if (message.ca !== undefined) {
+ obj.ca = message.ca;
+ }
+ if (message.key !== undefined) {
+ obj.key = message.key;
+ }
+ if (message.cert !== undefined) {
+ obj.cert = message.cert;
+ }
+ if (message.authentication !== 0) {
+ obj.authentication = sMTPMailDeliverySettingValue_AuthenticationToJSON(message.authentication);
+ }
+ if (message.username !== "") {
+ obj.username = message.username;
+ }
+ if (message.password !== undefined) {
+ obj.password = message.password;
+ }
+ if (message.from !== "") {
+ obj.from = message.from;
+ }
+ if (message.to !== "") {
+ obj.to = message.to;
+ }
return obj;
},
create(base?: DeepPartial<SMTPMailDeliverySettingValue>): SMTPMailDeliverySettingValue {
return SMTPMailDeliverySettingValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SMTPMailDeliverySettingValue>): SMTPMailDeliverySettingValue {
const message = createBaseSMTPMailDeliverySettingValue();
message.server = object.server ?? "";
@@ -1496,8 +1519,8 @@ export const AppIMSetting = {
fromJSON(object: any): AppIMSetting {
return {
imType: isSet(object.imType) ? appIMSetting_IMTypeFromJSON(object.imType) : 0,
- appId: isSet(object.appId) ? String(object.appId) : "",
- appSecret: isSet(object.appSecret) ? String(object.appSecret) : "",
+ appId: isSet(object.appId) ? globalThis.String(object.appId) : "",
+ appSecret: isSet(object.appSecret) ? globalThis.String(object.appSecret) : "",
externalApproval: isSet(object.externalApproval)
? AppIMSetting_ExternalApproval.fromJSON(object.externalApproval)
: undefined,
@@ -1506,19 +1529,24 @@ export const AppIMSetting = {
toJSON(message: AppIMSetting): unknown {
const obj: any = {};
- message.imType !== undefined && (obj.imType = appIMSetting_IMTypeToJSON(message.imType));
- message.appId !== undefined && (obj.appId = message.appId);
- message.appSecret !== undefined && (obj.appSecret = message.appSecret);
- message.externalApproval !== undefined && (obj.externalApproval = message.externalApproval
- ? AppIMSetting_ExternalApproval.toJSON(message.externalApproval)
- : undefined);
+ if (message.imType !== 0) {
+ obj.imType = appIMSetting_IMTypeToJSON(message.imType);
+ }
+ if (message.appId !== "") {
+ obj.appId = message.appId;
+ }
+ if (message.appSecret !== "") {
+ obj.appSecret = message.appSecret;
+ }
+ if (message.externalApproval !== undefined) {
+ obj.externalApproval = AppIMSetting_ExternalApproval.toJSON(message.externalApproval);
+ }
return obj;
},
create(base?: DeepPartial<AppIMSetting>): AppIMSetting {
return AppIMSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AppIMSetting>): AppIMSetting {
const message = createBaseAppIMSetting();
message.imType = object.imType ?? 0;
@@ -1578,22 +1606,25 @@ export const AppIMSetting_ExternalApproval = {
fromJSON(object: any): AppIMSetting_ExternalApproval {
return {
- enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
- approvalDefinitionId: isSet(object.approvalDefinitionId) ? String(object.approvalDefinitionId) : "",
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
+ approvalDefinitionId: isSet(object.approvalDefinitionId) ? globalThis.String(object.approvalDefinitionId) : "",
};
},
toJSON(message: AppIMSetting_ExternalApproval): unknown {
const obj: any = {};
- message.enabled !== undefined && (obj.enabled = message.enabled);
- message.approvalDefinitionId !== undefined && (obj.approvalDefinitionId = message.approvalDefinitionId);
+ if (message.enabled === true) {
+ obj.enabled = message.enabled;
+ }
+ if (message.approvalDefinitionId !== "") {
+ obj.approvalDefinitionId = message.approvalDefinitionId;
+ }
return obj;
},
create(base?: DeepPartial<AppIMSetting_ExternalApproval>): AppIMSetting_ExternalApproval {
return AppIMSetting_ExternalApproval.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AppIMSetting_ExternalApproval>): AppIMSetting_ExternalApproval {
const message = createBaseAppIMSetting_ExternalApproval();
message.enabled = object.enabled ?? false;
@@ -1648,20 +1679,26 @@ export const AgentPluginSetting = {
},
fromJSON(object: any): AgentPluginSetting {
- return { url: isSet(object.url) ? String(object.url) : "", token: isSet(object.token) ? String(object.token) : "" };
+ return {
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ token: isSet(object.token) ? globalThis.String(object.token) : "",
+ };
},
toJSON(message: AgentPluginSetting): unknown {
const obj: any = {};
- message.url !== undefined && (obj.url = message.url);
- message.token !== undefined && (obj.token = message.token);
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.token !== "") {
+ obj.token = message.token;
+ }
return obj;
},
create(base?: DeepPartial<AgentPluginSetting>): AgentPluginSetting {
return AgentPluginSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AgentPluginSetting>): AgentPluginSetting {
const message = createBaseAgentPluginSetting();
message.url = object.url ?? "";
@@ -1775,11 +1812,13 @@ export const WorkspaceProfileSetting = {
fromJSON(object: any): WorkspaceProfileSetting {
return {
- externalUrl: isSet(object.externalUrl) ? String(object.externalUrl) : "",
- disallowSignup: isSet(object.disallowSignup) ? Boolean(object.disallowSignup) : false,
- require2fa: isSet(object.require2fa) ? Boolean(object.require2fa) : false,
- outboundIpList: Array.isArray(object?.outboundIpList) ? object.outboundIpList.map((e: any) => String(e)) : [],
- gitopsWebhookUrl: isSet(object.gitopsWebhookUrl) ? String(object.gitopsWebhookUrl) : "",
+ externalUrl: isSet(object.externalUrl) ? globalThis.String(object.externalUrl) : "",
+ disallowSignup: isSet(object.disallowSignup) ? globalThis.Boolean(object.disallowSignup) : false,
+ require2fa: isSet(object.require2fa) ? globalThis.Boolean(object.require2fa) : false,
+ outboundIpList: globalThis.Array.isArray(object?.outboundIpList)
+ ? object.outboundIpList.map((e: any) => globalThis.String(e))
+ : [],
+ gitopsWebhookUrl: isSet(object.gitopsWebhookUrl) ? globalThis.String(object.gitopsWebhookUrl) : "",
tokenDuration: isSet(object.tokenDuration) ? Duration.fromJSON(object.tokenDuration) : undefined,
announcement: isSet(object.announcement) ? Announcement.fromJSON(object.announcement) : undefined,
};
@@ -1787,26 +1826,33 @@ export const WorkspaceProfileSetting = {
toJSON(message: WorkspaceProfileSetting): unknown {
const obj: any = {};
- message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);
- message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);
- message.require2fa !== undefined && (obj.require2fa = message.require2fa);
- if (message.outboundIpList) {
- obj.outboundIpList = message.outboundIpList.map((e) => e);
- } else {
- obj.outboundIpList = [];
- }
- message.gitopsWebhookUrl !== undefined && (obj.gitopsWebhookUrl = message.gitopsWebhookUrl);
- message.tokenDuration !== undefined &&
- (obj.tokenDuration = message.tokenDuration ? Duration.toJSON(message.tokenDuration) : undefined);
- message.announcement !== undefined &&
- (obj.announcement = message.announcement ? Announcement.toJSON(message.announcement) : undefined);
+ if (message.externalUrl !== "") {
+ obj.externalUrl = message.externalUrl;
+ }
+ if (message.disallowSignup === true) {
+ obj.disallowSignup = message.disallowSignup;
+ }
+ if (message.require2fa === true) {
+ obj.require2fa = message.require2fa;
+ }
+ if (message.outboundIpList?.length) {
+ obj.outboundIpList = message.outboundIpList;
+ }
+ if (message.gitopsWebhookUrl !== "") {
+ obj.gitopsWebhookUrl = message.gitopsWebhookUrl;
+ }
+ if (message.tokenDuration !== undefined) {
+ obj.tokenDuration = Duration.toJSON(message.tokenDuration);
+ }
+ if (message.announcement !== undefined) {
+ obj.announcement = Announcement.toJSON(message.announcement);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
return WorkspaceProfileSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
const message = createBaseWorkspaceProfileSetting();
message.externalUrl = object.externalUrl ?? "";
@@ -1882,23 +1928,28 @@ export const Announcement = {
fromJSON(object: any): Announcement {
return {
level: isSet(object.level) ? announcement_AlertLevelFromJSON(object.level) : 0,
- text: isSet(object.text) ? String(object.text) : "",
- link: isSet(object.link) ? String(object.link) : "",
+ text: isSet(object.text) ? globalThis.String(object.text) : "",
+ link: isSet(object.link) ? globalThis.String(object.link) : "",
};
},
toJSON(message: Announcement): unknown {
const obj: any = {};
- message.level !== undefined && (obj.level = announcement_AlertLevelToJSON(message.level));
- message.text !== undefined && (obj.text = message.text);
- message.link !== undefined && (obj.link = message.link);
+ if (message.level !== 0) {
+ obj.level = announcement_AlertLevelToJSON(message.level);
+ }
+ if (message.text !== "") {
+ obj.text = message.text;
+ }
+ if (message.link !== "") {
+ obj.link = message.link;
+ }
return obj;
},
create(base?: DeepPartial<Announcement>): Announcement {
return Announcement.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Announcement>): Announcement {
const message = createBaseAnnouncement();
message.level = object.level ?? 0;
@@ -1945,7 +1996,7 @@ export const WorkspaceApprovalSetting = {
fromJSON(object: any): WorkspaceApprovalSetting {
return {
- rules: Array.isArray(object?.rules)
+ rules: globalThis.Array.isArray(object?.rules)
? object.rules.map((e: any) => WorkspaceApprovalSetting_Rule.fromJSON(e))
: [],
};
@@ -1953,10 +2004,8 @@ export const WorkspaceApprovalSetting = {
toJSON(message: WorkspaceApprovalSetting): unknown {
const obj: any = {};
- if (message.rules) {
- obj.rules = message.rules.map((e) => e ? WorkspaceApprovalSetting_Rule.toJSON(e) : undefined);
- } else {
- obj.rules = [];
+ if (message.rules?.length) {
+ obj.rules = message.rules.map((e) => WorkspaceApprovalSetting_Rule.toJSON(e));
}
return obj;
},
@@ -1964,7 +2013,6 @@ export const WorkspaceApprovalSetting = {
create(base?: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {
return WorkspaceApprovalSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {
const message = createBaseWorkspaceApprovalSetting();
message.rules = object.rules?.map((e) => WorkspaceApprovalSetting_Rule.fromPartial(e)) || [];
@@ -2026,16 +2074,18 @@ export const WorkspaceApprovalSetting_Rule = {
toJSON(message: WorkspaceApprovalSetting_Rule): unknown {
const obj: any = {};
- message.template !== undefined &&
- (obj.template = message.template ? ApprovalTemplate.toJSON(message.template) : undefined);
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
+ if (message.template !== undefined) {
+ obj.template = ApprovalTemplate.toJSON(message.template);
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {
return WorkspaceApprovalSetting_Rule.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {
const message = createBaseWorkspaceApprovalSetting_Rule();
message.template = (object.template !== undefined && object.template !== null)
@@ -2085,16 +2135,16 @@ export const ExternalApprovalSetting = {
fromJSON(object: any): ExternalApprovalSetting {
return {
- nodes: Array.isArray(object?.nodes) ? object.nodes.map((e: any) => ExternalApprovalSetting_Node.fromJSON(e)) : [],
+ nodes: globalThis.Array.isArray(object?.nodes)
+ ? object.nodes.map((e: any) => ExternalApprovalSetting_Node.fromJSON(e))
+ : [],
};
},
toJSON(message: ExternalApprovalSetting): unknown {
const obj: any = {};
- if (message.nodes) {
- obj.nodes = message.nodes.map((e) => e ? ExternalApprovalSetting_Node.toJSON(e) : undefined);
- } else {
- obj.nodes = [];
+ if (message.nodes?.length) {
+ obj.nodes = message.nodes.map((e) => ExternalApprovalSetting_Node.toJSON(e));
}
return obj;
},
@@ -2102,7 +2152,6 @@ export const ExternalApprovalSetting = {
create(base?: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {
return ExternalApprovalSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {
const message = createBaseExternalApprovalSetting();
message.nodes = object.nodes?.map((e) => ExternalApprovalSetting_Node.fromPartial(e)) || [];
@@ -2167,24 +2216,29 @@ export const ExternalApprovalSetting_Node = {
fromJSON(object: any): ExternalApprovalSetting_Node {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- endpoint: isSet(object.endpoint) ? String(object.endpoint) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : "",
};
},
toJSON(message: ExternalApprovalSetting_Node): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.endpoint !== undefined && (obj.endpoint = message.endpoint);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.endpoint !== "") {
+ obj.endpoint = message.endpoint;
+ }
return obj;
},
create(base?: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {
return ExternalApprovalSetting_Node.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {
const message = createBaseExternalApprovalSetting_Node();
message.id = object.id ?? "";
@@ -2251,13 +2305,13 @@ export const SchemaTemplateSetting = {
fromJSON(object: any): SchemaTemplateSetting {
return {
- fieldTemplates: Array.isArray(object?.fieldTemplates)
+ fieldTemplates: globalThis.Array.isArray(object?.fieldTemplates)
? object.fieldTemplates.map((e: any) => SchemaTemplateSetting_FieldTemplate.fromJSON(e))
: [],
- columnTypes: Array.isArray(object?.columnTypes)
+ columnTypes: globalThis.Array.isArray(object?.columnTypes)
? object.columnTypes.map((e: any) => SchemaTemplateSetting_ColumnType.fromJSON(e))
: [],
- tableTemplates: Array.isArray(object?.tableTemplates)
+ tableTemplates: globalThis.Array.isArray(object?.tableTemplates)
? object.tableTemplates.map((e: any) => SchemaTemplateSetting_TableTemplate.fromJSON(e))
: [],
};
@@ -2265,24 +2319,14 @@ export const SchemaTemplateSetting = {
toJSON(message: SchemaTemplateSetting): unknown {
const obj: any = {};
- if (message.fieldTemplates) {
- obj.fieldTemplates = message.fieldTemplates.map((e) =>
- e ? SchemaTemplateSetting_FieldTemplate.toJSON(e) : undefined
- );
- } else {
- obj.fieldTemplates = [];
- }
- if (message.columnTypes) {
- obj.columnTypes = message.columnTypes.map((e) => e ? SchemaTemplateSetting_ColumnType.toJSON(e) : undefined);
- } else {
- obj.columnTypes = [];
- }
- if (message.tableTemplates) {
- obj.tableTemplates = message.tableTemplates.map((e) =>
- e ? SchemaTemplateSetting_TableTemplate.toJSON(e) : undefined
- );
- } else {
- obj.tableTemplates = [];
+ if (message.fieldTemplates?.length) {
+ obj.fieldTemplates = message.fieldTemplates.map((e) => SchemaTemplateSetting_FieldTemplate.toJSON(e));
+ }
+ if (message.columnTypes?.length) {
+ obj.columnTypes = message.columnTypes.map((e) => SchemaTemplateSetting_ColumnType.toJSON(e));
+ }
+ if (message.tableTemplates?.length) {
+ obj.tableTemplates = message.tableTemplates.map((e) => SchemaTemplateSetting_TableTemplate.toJSON(e));
}
return obj;
},
@@ -2290,7 +2334,6 @@ export const SchemaTemplateSetting = {
create(base?: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {
return SchemaTemplateSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {
const message = createBaseSchemaTemplateSetting();
message.fieldTemplates = object.fieldTemplates?.map((e) => SchemaTemplateSetting_FieldTemplate.fromPartial(e)) ||
@@ -2379,9 +2422,9 @@ export const SchemaTemplateSetting_FieldTemplate = {
fromJSON(object: any): SchemaTemplateSetting_FieldTemplate {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- category: isSet(object.category) ? String(object.category) : "",
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
column: isSet(object.column) ? ColumnMetadata.fromJSON(object.column) : undefined,
config: isSet(object.config) ? ColumnConfig.fromJSON(object.config) : undefined,
};
@@ -2389,18 +2432,27 @@ export const SchemaTemplateSetting_FieldTemplate = {
toJSON(message: SchemaTemplateSetting_FieldTemplate): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.category !== undefined && (obj.category = message.category);
- message.column !== undefined && (obj.column = message.column ? ColumnMetadata.toJSON(message.column) : undefined);
- message.config !== undefined && (obj.config = message.config ? ColumnConfig.toJSON(message.config) : undefined);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.category !== "") {
+ obj.category = message.category;
+ }
+ if (message.column !== undefined) {
+ obj.column = ColumnMetadata.toJSON(message.column);
+ }
+ if (message.config !== undefined) {
+ obj.config = ColumnConfig.toJSON(message.config);
+ }
return obj;
},
create(base?: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {
return SchemaTemplateSetting_FieldTemplate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {
const message = createBaseSchemaTemplateSetting_FieldTemplate();
message.id = object.id ?? "";
@@ -2474,19 +2526,21 @@ export const SchemaTemplateSetting_ColumnType = {
fromJSON(object: any): SchemaTemplateSetting_ColumnType {
return {
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
- types: Array.isArray(object?.types) ? object.types.map((e: any) => String(e)) : [],
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
+ types: globalThis.Array.isArray(object?.types) ? object.types.map((e: any) => globalThis.String(e)) : [],
};
},
toJSON(message: SchemaTemplateSetting_ColumnType): unknown {
const obj: any = {};
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.enabled !== undefined && (obj.enabled = message.enabled);
- if (message.types) {
- obj.types = message.types.map((e) => e);
- } else {
- obj.types = [];
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.enabled === true) {
+ obj.enabled = message.enabled;
+ }
+ if (message.types?.length) {
+ obj.types = message.types;
}
return obj;
},
@@ -2494,7 +2548,6 @@ export const SchemaTemplateSetting_ColumnType = {
create(base?: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {
return SchemaTemplateSetting_ColumnType.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {
const message = createBaseSchemaTemplateSetting_ColumnType();
message.engine = object.engine ?? 0;
@@ -2581,9 +2634,9 @@ export const SchemaTemplateSetting_TableTemplate = {
fromJSON(object: any): SchemaTemplateSetting_TableTemplate {
return {
- id: isSet(object.id) ? String(object.id) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- category: isSet(object.category) ? String(object.category) : "",
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
table: isSet(object.table) ? TableMetadata.fromJSON(object.table) : undefined,
config: isSet(object.config) ? TableConfig.fromJSON(object.config) : undefined,
};
@@ -2591,18 +2644,27 @@ export const SchemaTemplateSetting_TableTemplate = {
toJSON(message: SchemaTemplateSetting_TableTemplate): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.category !== undefined && (obj.category = message.category);
- message.table !== undefined && (obj.table = message.table ? TableMetadata.toJSON(message.table) : undefined);
- message.config !== undefined && (obj.config = message.config ? TableConfig.toJSON(message.config) : undefined);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.category !== "") {
+ obj.category = message.category;
+ }
+ if (message.table !== undefined) {
+ obj.table = TableMetadata.toJSON(message.table);
+ }
+ if (message.config !== undefined) {
+ obj.config = TableConfig.toJSON(message.config);
+ }
return obj;
},
create(base?: DeepPartial<SchemaTemplateSetting_TableTemplate>): SchemaTemplateSetting_TableTemplate {
return SchemaTemplateSetting_TableTemplate.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SchemaTemplateSetting_TableTemplate>): SchemaTemplateSetting_TableTemplate {
const message = createBaseSchemaTemplateSetting_TableTemplate();
message.id = object.id ?? "";
@@ -2705,30 +2767,41 @@ export const WorkspaceTrialSetting = {
fromJSON(object: any): WorkspaceTrialSetting {
return {
- instanceCount: isSet(object.instanceCount) ? Number(object.instanceCount) : 0,
+ instanceCount: isSet(object.instanceCount) ? globalThis.Number(object.instanceCount) : 0,
expireTime: isSet(object.expireTime) ? fromJsonTimestamp(object.expireTime) : undefined,
issuedTime: isSet(object.issuedTime) ? fromJsonTimestamp(object.issuedTime) : undefined,
- subject: isSet(object.subject) ? String(object.subject) : "",
- orgName: isSet(object.orgName) ? String(object.orgName) : "",
+ subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
+ orgName: isSet(object.orgName) ? globalThis.String(object.orgName) : "",
plan: isSet(object.plan) ? planTypeFromJSON(object.plan) : 0,
};
},
toJSON(message: WorkspaceTrialSetting): unknown {
const obj: any = {};
- message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));
- message.expireTime !== undefined && (obj.expireTime = message.expireTime.toISOString());
- message.issuedTime !== undefined && (obj.issuedTime = message.issuedTime.toISOString());
- message.subject !== undefined && (obj.subject = message.subject);
- message.orgName !== undefined && (obj.orgName = message.orgName);
- message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));
+ if (message.instanceCount !== 0) {
+ obj.instanceCount = Math.round(message.instanceCount);
+ }
+ if (message.expireTime !== undefined) {
+ obj.expireTime = message.expireTime.toISOString();
+ }
+ if (message.issuedTime !== undefined) {
+ obj.issuedTime = message.issuedTime.toISOString();
+ }
+ if (message.subject !== "") {
+ obj.subject = message.subject;
+ }
+ if (message.orgName !== "") {
+ obj.orgName = message.orgName;
+ }
+ if (message.plan !== 0) {
+ obj.plan = planTypeToJSON(message.plan);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceTrialSetting>): WorkspaceTrialSetting {
return WorkspaceTrialSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceTrialSetting>): WorkspaceTrialSetting {
const message = createBaseWorkspaceTrialSetting();
message.instanceCount = object.instanceCount ?? 0;
@@ -2778,7 +2851,7 @@ export const DataClassificationSetting = {
fromJSON(object: any): DataClassificationSetting {
return {
- configs: Array.isArray(object?.configs)
+ configs: globalThis.Array.isArray(object?.configs)
? object.configs.map((e: any) => DataClassificationSetting_DataClassificationConfig.fromJSON(e))
: [],
};
@@ -2786,12 +2859,8 @@ export const DataClassificationSetting = {
toJSON(message: DataClassificationSetting): unknown {
const obj: any = {};
- if (message.configs) {
- obj.configs = message.configs.map((e) =>
- e ? DataClassificationSetting_DataClassificationConfig.toJSON(e) : undefined
- );
- } else {
- obj.configs = [];
+ if (message.configs?.length) {
+ obj.configs = message.configs.map((e) => DataClassificationSetting_DataClassificationConfig.toJSON(e));
}
return obj;
},
@@ -2799,7 +2868,6 @@ export const DataClassificationSetting = {
create(base?: DeepPartial<DataClassificationSetting>): DataClassificationSetting {
return DataClassificationSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DataClassificationSetting>): DataClassificationSetting {
const message = createBaseDataClassificationSetting();
message.configs = object.configs?.map((e) => DataClassificationSetting_DataClassificationConfig.fromPartial(e)) ||
@@ -2887,9 +2955,9 @@ export const DataClassificationSetting_DataClassificationConfig = {
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- levels: Array.isArray(object?.levels)
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ levels: globalThis.Array.isArray(object?.levels)
? object.levels.map((e: any) => DataClassificationSetting_DataClassificationConfig_Level.fromJSON(e))
: [],
classification: isObject(object.classification)
@@ -2905,20 +2973,23 @@ export const DataClassificationSetting_DataClassificationConfig = {
toJSON(message: DataClassificationSetting_DataClassificationConfig): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- if (message.levels) {
- obj.levels = message.levels.map((e) =>
- e ? DataClassificationSetting_DataClassificationConfig_Level.toJSON(e) : undefined
- );
- } else {
- obj.levels = [];
- }
- obj.classification = {};
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.levels?.length) {
+ obj.levels = message.levels.map((e) => DataClassificationSetting_DataClassificationConfig_Level.toJSON(e));
+ }
if (message.classification) {
- Object.entries(message.classification).forEach(([k, v]) => {
- obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);
- });
+ const entries = Object.entries(message.classification);
+ if (entries.length > 0) {
+ obj.classification = {};
+ entries.forEach(([k, v]) => {
+ obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);
+ });
+ }
}
return obj;
},
@@ -2928,7 +2999,6 @@ export const DataClassificationSetting_DataClassificationConfig = {
): DataClassificationSetting_DataClassificationConfig {
return DataClassificationSetting_DataClassificationConfig.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig>,
): DataClassificationSetting_DataClassificationConfig {
@@ -3009,17 +3079,23 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig_Level {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
};
},
toJSON(message: DataClassificationSetting_DataClassificationConfig_Level): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
return obj;
},
@@ -3028,7 +3104,6 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
): DataClassificationSetting_DataClassificationConfig_Level {
return DataClassificationSetting_DataClassificationConfig_Level.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_Level>,
): DataClassificationSetting_DataClassificationConfig_Level {
@@ -3113,19 +3188,27 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig_DataClassification {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- levelId: isSet(object.levelId) ? String(object.levelId) : undefined,
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ levelId: isSet(object.levelId) ? globalThis.String(object.levelId) : undefined,
};
},
toJSON(message: DataClassificationSetting_DataClassificationConfig_DataClassification): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.levelId !== undefined && (obj.levelId = message.levelId);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.levelId !== undefined) {
+ obj.levelId = message.levelId;
+ }
return obj;
},
@@ -3134,7 +3217,6 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
): DataClassificationSetting_DataClassificationConfig_DataClassification {
return DataClassificationSetting_DataClassificationConfig_DataClassification.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_DataClassification>,
): DataClassificationSetting_DataClassificationConfig_DataClassification {
@@ -3206,7 +3288,7 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
fromJSON(object: any): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
return {
- key: isSet(object.key) ? String(object.key) : "",
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
value: isSet(object.value)
? DataClassificationSetting_DataClassificationConfig_DataClassification.fromJSON(object.value)
: undefined,
@@ -3215,10 +3297,12 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
toJSON(message: DataClassificationSetting_DataClassificationConfig_ClassificationEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value
- ? DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value)
- : undefined);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value !== undefined) {
+ obj.value = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value);
+ }
return obj;
},
@@ -3227,7 +3311,6 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
return DataClassificationSetting_DataClassificationConfig_ClassificationEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_ClassificationEntry>,
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
@@ -3277,7 +3360,7 @@ export const SemanticTypeSetting = {
fromJSON(object: any): SemanticTypeSetting {
return {
- types: Array.isArray(object?.types)
+ types: globalThis.Array.isArray(object?.types)
? object.types.map((e: any) => SemanticTypeSetting_SemanticType.fromJSON(e))
: [],
};
@@ -3285,10 +3368,8 @@ export const SemanticTypeSetting = {
toJSON(message: SemanticTypeSetting): unknown {
const obj: any = {};
- if (message.types) {
- obj.types = message.types.map((e) => e ? SemanticTypeSetting_SemanticType.toJSON(e) : undefined);
- } else {
- obj.types = [];
+ if (message.types?.length) {
+ obj.types = message.types.map((e) => SemanticTypeSetting_SemanticType.toJSON(e));
}
return obj;
},
@@ -3296,7 +3377,6 @@ export const SemanticTypeSetting = {
create(base?: DeepPartial<SemanticTypeSetting>): SemanticTypeSetting {
return SemanticTypeSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticTypeSetting>): SemanticTypeSetting {
const message = createBaseSemanticTypeSetting();
message.types = object.types?.map((e) => SemanticTypeSetting_SemanticType.fromPartial(e)) || [];
@@ -3381,28 +3461,39 @@ export const SemanticTypeSetting_SemanticType = {
fromJSON(object: any): SemanticTypeSetting_SemanticType {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- partialMaskAlgorithmId: isSet(object.partialMaskAlgorithmId) ? String(object.partialMaskAlgorithmId) : "",
- fullMaskAlgorithmId: isSet(object.fullMaskAlgorithmId) ? String(object.fullMaskAlgorithmId) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ partialMaskAlgorithmId: isSet(object.partialMaskAlgorithmId)
+ ? globalThis.String(object.partialMaskAlgorithmId)
+ : "",
+ fullMaskAlgorithmId: isSet(object.fullMaskAlgorithmId) ? globalThis.String(object.fullMaskAlgorithmId) : "",
};
},
toJSON(message: SemanticTypeSetting_SemanticType): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.partialMaskAlgorithmId !== undefined && (obj.partialMaskAlgorithmId = message.partialMaskAlgorithmId);
- message.fullMaskAlgorithmId !== undefined && (obj.fullMaskAlgorithmId = message.fullMaskAlgorithmId);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.partialMaskAlgorithmId !== "") {
+ obj.partialMaskAlgorithmId = message.partialMaskAlgorithmId;
+ }
+ if (message.fullMaskAlgorithmId !== "") {
+ obj.fullMaskAlgorithmId = message.fullMaskAlgorithmId;
+ }
return obj;
},
create(base?: DeepPartial<SemanticTypeSetting_SemanticType>): SemanticTypeSetting_SemanticType {
return SemanticTypeSetting_SemanticType.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticTypeSetting_SemanticType>): SemanticTypeSetting_SemanticType {
const message = createBaseSemanticTypeSetting_SemanticType();
message.id = object.id ?? "";
@@ -3451,7 +3542,7 @@ export const MaskingAlgorithmSetting = {
fromJSON(object: any): MaskingAlgorithmSetting {
return {
- algorithms: Array.isArray(object?.algorithms)
+ algorithms: globalThis.Array.isArray(object?.algorithms)
? object.algorithms.map((e: any) => MaskingAlgorithmSetting_Algorithm.fromJSON(e))
: [],
};
@@ -3459,10 +3550,8 @@ export const MaskingAlgorithmSetting = {
toJSON(message: MaskingAlgorithmSetting): unknown {
const obj: any = {};
- if (message.algorithms) {
- obj.algorithms = message.algorithms.map((e) => e ? MaskingAlgorithmSetting_Algorithm.toJSON(e) : undefined);
- } else {
- obj.algorithms = [];
+ if (message.algorithms?.length) {
+ obj.algorithms = message.algorithms.map((e) => MaskingAlgorithmSetting_Algorithm.toJSON(e));
}
return obj;
},
@@ -3470,7 +3559,6 @@ export const MaskingAlgorithmSetting = {
create(base?: DeepPartial<MaskingAlgorithmSetting>): MaskingAlgorithmSetting {
return MaskingAlgorithmSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingAlgorithmSetting>): MaskingAlgorithmSetting {
const message = createBaseMaskingAlgorithmSetting();
message.algorithms = object.algorithms?.map((e) => MaskingAlgorithmSetting_Algorithm.fromPartial(e)) || [];
@@ -3583,10 +3671,10 @@ export const MaskingAlgorithmSetting_Algorithm = {
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- description: isSet(object.description) ? String(object.description) : "",
- category: isSet(object.category) ? String(object.category) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
fullMask: isSet(object.fullMask)
? MaskingAlgorithmSetting_Algorithm_FullMask.fromJSON(object.fullMask)
: undefined,
@@ -3599,26 +3687,33 @@ export const MaskingAlgorithmSetting_Algorithm = {
toJSON(message: MaskingAlgorithmSetting_Algorithm): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.description !== undefined && (obj.description = message.description);
- message.category !== undefined && (obj.category = message.category);
- message.fullMask !== undefined &&
- (obj.fullMask = message.fullMask
- ? MaskingAlgorithmSetting_Algorithm_FullMask.toJSON(message.fullMask)
- : undefined);
- message.rangeMask !== undefined && (obj.rangeMask = message.rangeMask
- ? MaskingAlgorithmSetting_Algorithm_RangeMask.toJSON(message.rangeMask)
- : undefined);
- message.md5Mask !== undefined &&
- (obj.md5Mask = message.md5Mask ? MaskingAlgorithmSetting_Algorithm_MD5Mask.toJSON(message.md5Mask) : undefined);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.category !== "") {
+ obj.category = message.category;
+ }
+ if (message.fullMask !== undefined) {
+ obj.fullMask = MaskingAlgorithmSetting_Algorithm_FullMask.toJSON(message.fullMask);
+ }
+ if (message.rangeMask !== undefined) {
+ obj.rangeMask = MaskingAlgorithmSetting_Algorithm_RangeMask.toJSON(message.rangeMask);
+ }
+ if (message.md5Mask !== undefined) {
+ obj.md5Mask = MaskingAlgorithmSetting_Algorithm_MD5Mask.toJSON(message.md5Mask);
+ }
return obj;
},
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm>): MaskingAlgorithmSetting_Algorithm {
return MaskingAlgorithmSetting_Algorithm.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingAlgorithmSetting_Algorithm>): MaskingAlgorithmSetting_Algorithm {
const message = createBaseMaskingAlgorithmSetting_Algorithm();
message.id = object.id ?? "";
@@ -3674,19 +3769,20 @@ export const MaskingAlgorithmSetting_Algorithm_FullMask = {
},
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_FullMask {
- return { substitution: isSet(object.substitution) ? String(object.substitution) : "" };
+ return { substitution: isSet(object.substitution) ? globalThis.String(object.substitution) : "" };
},
toJSON(message: MaskingAlgorithmSetting_Algorithm_FullMask): unknown {
const obj: any = {};
- message.substitution !== undefined && (obj.substitution = message.substitution);
+ if (message.substitution !== "") {
+ obj.substitution = message.substitution;
+ }
return obj;
},
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm_FullMask>): MaskingAlgorithmSetting_Algorithm_FullMask {
return MaskingAlgorithmSetting_Algorithm_FullMask.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_FullMask>,
): MaskingAlgorithmSetting_Algorithm_FullMask {
@@ -3733,7 +3829,7 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask = {
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_RangeMask {
return {
- slices: Array.isArray(object?.slices)
+ slices: globalThis.Array.isArray(object?.slices)
? object.slices.map((e: any) => MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.fromJSON(e))
: [],
};
@@ -3741,12 +3837,8 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask = {
toJSON(message: MaskingAlgorithmSetting_Algorithm_RangeMask): unknown {
const obj: any = {};
- if (message.slices) {
- obj.slices = message.slices.map((e) =>
- e ? MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.toJSON(e) : undefined
- );
- } else {
- obj.slices = [];
+ if (message.slices?.length) {
+ obj.slices = message.slices.map((e) => MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.toJSON(e));
}
return obj;
},
@@ -3754,7 +3846,6 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask = {
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm_RangeMask>): MaskingAlgorithmSetting_Algorithm_RangeMask {
return MaskingAlgorithmSetting_Algorithm_RangeMask.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_RangeMask>,
): MaskingAlgorithmSetting_Algorithm_RangeMask {
@@ -3824,17 +3915,23 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask_Slice = {
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_RangeMask_Slice {
return {
- start: isSet(object.start) ? Number(object.start) : 0,
- end: isSet(object.end) ? Number(object.end) : 0,
- substitution: isSet(object.substitution) ? String(object.substitution) : "",
+ start: isSet(object.start) ? globalThis.Number(object.start) : 0,
+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,
+ substitution: isSet(object.substitution) ? globalThis.String(object.substitution) : "",
};
},
toJSON(message: MaskingAlgorithmSetting_Algorithm_RangeMask_Slice): unknown {
const obj: any = {};
- message.start !== undefined && (obj.start = Math.round(message.start));
- message.end !== undefined && (obj.end = Math.round(message.end));
- message.substitution !== undefined && (obj.substitution = message.substitution);
+ if (message.start !== 0) {
+ obj.start = Math.round(message.start);
+ }
+ if (message.end !== 0) {
+ obj.end = Math.round(message.end);
+ }
+ if (message.substitution !== "") {
+ obj.substitution = message.substitution;
+ }
return obj;
},
@@ -3843,7 +3940,6 @@ export const MaskingAlgorithmSetting_Algorithm_RangeMask_Slice = {
): MaskingAlgorithmSetting_Algorithm_RangeMask_Slice {
return MaskingAlgorithmSetting_Algorithm_RangeMask_Slice.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_RangeMask_Slice>,
): MaskingAlgorithmSetting_Algorithm_RangeMask_Slice {
@@ -3891,19 +3987,20 @@ export const MaskingAlgorithmSetting_Algorithm_MD5Mask = {
},
fromJSON(object: any): MaskingAlgorithmSetting_Algorithm_MD5Mask {
- return { salt: isSet(object.salt) ? String(object.salt) : "" };
+ return { salt: isSet(object.salt) ? globalThis.String(object.salt) : "" };
},
toJSON(message: MaskingAlgorithmSetting_Algorithm_MD5Mask): unknown {
const obj: any = {};
- message.salt !== undefined && (obj.salt = message.salt);
+ if (message.salt !== "") {
+ obj.salt = message.salt;
+ }
return obj;
},
create(base?: DeepPartial<MaskingAlgorithmSetting_Algorithm_MD5Mask>): MaskingAlgorithmSetting_Algorithm_MD5Mask {
return MaskingAlgorithmSetting_Algorithm_MD5Mask.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<MaskingAlgorithmSetting_Algorithm_MD5Mask>,
): MaskingAlgorithmSetting_Algorithm_MD5Mask {
@@ -4033,7 +4130,7 @@ export const SettingServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -4047,14 +4144,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.ts
index f22947e257..03bcca7320 100644
--- a/frontend/src/types/proto/v1/sheet_service.ts
+++ b/frontend/src/types/proto/v1/sheet_service.ts
@@ -393,22 +393,25 @@ export const CreateSheetRequest = {
fromJSON(object: any): CreateSheetRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
sheet: isSet(object.sheet) ? Sheet.fromJSON(object.sheet) : undefined,
};
},
toJSON(message: CreateSheetRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.sheet !== undefined && (obj.sheet = message.sheet ? Sheet.toJSON(message.sheet) : undefined);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.sheet !== undefined) {
+ obj.sheet = Sheet.toJSON(message.sheet);
+ }
return obj;
},
create(base?: DeepPartial<CreateSheetRequest>): CreateSheetRequest {
return CreateSheetRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateSheetRequest>): CreateSheetRequest {
const message = createBaseCreateSheetRequest();
message.parent = object.parent ?? "";
@@ -464,22 +467,25 @@ export const GetSheetRequest = {
fromJSON(object: any): GetSheetRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- raw: isSet(object.raw) ? Boolean(object.raw) : false,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ raw: isSet(object.raw) ? globalThis.Boolean(object.raw) : false,
};
},
toJSON(message: GetSheetRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.raw !== undefined && (obj.raw = message.raw);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.raw === true) {
+ obj.raw = message.raw;
+ }
return obj;
},
create(base?: DeepPartial<GetSheetRequest>): GetSheetRequest {
return GetSheetRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetSheetRequest>): GetSheetRequest {
const message = createBaseGetSheetRequest();
message.name = object.name ?? "";
@@ -542,15 +548,18 @@ export const UpdateSheetRequest = {
toJSON(message: UpdateSheetRequest): unknown {
const obj: any = {};
- message.sheet !== undefined && (obj.sheet = message.sheet ? Sheet.toJSON(message.sheet) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.sheet !== undefined) {
+ obj.sheet = Sheet.toJSON(message.sheet);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateSheetRequest>): UpdateSheetRequest {
return UpdateSheetRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateSheetRequest>): UpdateSheetRequest {
const message = createBaseUpdateSheetRequest();
message.sheet = (object.sheet !== undefined && object.sheet !== null) ? Sheet.fromPartial(object.sheet) : undefined;
@@ -613,16 +622,18 @@ export const UpdateSheetOrganizerRequest = {
toJSON(message: UpdateSheetOrganizerRequest): unknown {
const obj: any = {};
- message.organizer !== undefined &&
- (obj.organizer = message.organizer ? SheetOrganizer.toJSON(message.organizer) : undefined);
- message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ if (message.organizer !== undefined) {
+ obj.organizer = SheetOrganizer.toJSON(message.organizer);
+ }
+ if (message.updateMask !== undefined) {
+ obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));
+ }
return obj;
},
create(base?: DeepPartial<UpdateSheetOrganizerRequest>): UpdateSheetOrganizerRequest {
return UpdateSheetOrganizerRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateSheetOrganizerRequest>): UpdateSheetOrganizerRequest {
const message = createBaseUpdateSheetOrganizerRequest();
message.organizer = (object.organizer !== undefined && object.organizer !== null)
@@ -690,24 +701,29 @@ export const SheetOrganizer = {
fromJSON(object: any): SheetOrganizer {
return {
- sheet: isSet(object.sheet) ? String(object.sheet) : "",
- starred: isSet(object.starred) ? Boolean(object.starred) : false,
- pinned: isSet(object.pinned) ? Boolean(object.pinned) : false,
+ sheet: isSet(object.sheet) ? globalThis.String(object.sheet) : "",
+ starred: isSet(object.starred) ? globalThis.Boolean(object.starred) : false,
+ pinned: isSet(object.pinned) ? globalThis.Boolean(object.pinned) : false,
};
},
toJSON(message: SheetOrganizer): unknown {
const obj: any = {};
- message.sheet !== undefined && (obj.sheet = message.sheet);
- message.starred !== undefined && (obj.starred = message.starred);
- message.pinned !== undefined && (obj.pinned = message.pinned);
+ if (message.sheet !== "") {
+ obj.sheet = message.sheet;
+ }
+ if (message.starred === true) {
+ obj.starred = message.starred;
+ }
+ if (message.pinned === true) {
+ obj.pinned = message.pinned;
+ }
return obj;
},
create(base?: DeepPartial<SheetOrganizer>): SheetOrganizer {
return SheetOrganizer.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetOrganizer>): SheetOrganizer {
const message = createBaseSheetOrganizer();
message.sheet = object.sheet ?? "";
@@ -753,19 +769,20 @@ export const DeleteSheetRequest = {
},
fromJSON(object: any): DeleteSheetRequest {
- return { name: isSet(object.name) ? String(object.name) : "" };
+ return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
},
toJSON(message: DeleteSheetRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DeleteSheetRequest>): DeleteSheetRequest {
return DeleteSheetRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeleteSheetRequest>): DeleteSheetRequest {
const message = createBaseDeleteSheetRequest();
message.name = object.name ?? "";
@@ -840,26 +857,33 @@ export const SearchSheetsRequest = {
fromJSON(object: any): SearchSheetsRequest {
return {
- parent: isSet(object.parent) ? String(object.parent) : "",
- filter: isSet(object.filter) ? String(object.filter) : "",
- pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
- pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
+ filter: isSet(object.filter) ? globalThis.String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? globalThis.String(object.pageToken) : "",
};
},
toJSON(message: SearchSheetsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- message.filter !== undefined && (obj.filter = message.filter);
- message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
- message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.filter !== "") {
+ obj.filter = message.filter;
+ }
+ if (message.pageSize !== 0) {
+ obj.pageSize = Math.round(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ obj.pageToken = message.pageToken;
+ }
return obj;
},
create(base?: DeepPartial<SearchSheetsRequest>): SearchSheetsRequest {
return SearchSheetsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchSheetsRequest>): SearchSheetsRequest {
const message = createBaseSearchSheetsRequest();
message.parent = object.parent ?? "";
@@ -917,26 +941,25 @@ export const SearchSheetsResponse = {
fromJSON(object: any): SearchSheetsResponse {
return {
- sheets: Array.isArray(object?.sheets) ? object.sheets.map((e: any) => Sheet.fromJSON(e)) : [],
- nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ sheets: globalThis.Array.isArray(object?.sheets) ? object.sheets.map((e: any) => Sheet.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? globalThis.String(object.nextPageToken) : "",
};
},
toJSON(message: SearchSheetsResponse): unknown {
const obj: any = {};
- if (message.sheets) {
- obj.sheets = message.sheets.map((e) => e ? Sheet.toJSON(e) : undefined);
- } else {
- obj.sheets = [];
+ if (message.sheets?.length) {
+ obj.sheets = message.sheets.map((e) => Sheet.toJSON(e));
+ }
+ if (message.nextPageToken !== "") {
+ obj.nextPageToken = message.nextPageToken;
}
- message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
return obj;
},
create(base?: DeepPartial<SearchSheetsResponse>): SearchSheetsResponse {
return SearchSheetsResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SearchSheetsResponse>): SearchSheetsResponse {
const message = createBaseSearchSheetsResponse();
message.sheets = object.sheets?.map((e) => Sheet.fromPartial(e)) || [];
@@ -1127,10 +1150,10 @@ export const Sheet = {
fromJSON(object: any): Sheet {
return {
- name: isSet(object.name) ? String(object.name) : "",
- database: isSet(object.database) ? String(object.database) : "",
- title: isSet(object.title) ? String(object.title) : "",
- creator: isSet(object.creator) ? String(object.creator) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0),
@@ -1138,7 +1161,7 @@ export const Sheet = {
visibility: isSet(object.visibility) ? sheet_VisibilityFromJSON(object.visibility) : 0,
source: isSet(object.source) ? sheet_SourceFromJSON(object.source) : 0,
type: isSet(object.type) ? sheet_TypeFromJSON(object.type) : 0,
- starred: isSet(object.starred) ? Boolean(object.starred) : false,
+ starred: isSet(object.starred) ? globalThis.Boolean(object.starred) : false,
payload: isSet(object.payload) ? SheetPayload.fromJSON(object.payload) : undefined,
pushEvent: isSet(object.pushEvent) ? PushEvent.fromJSON(object.pushEvent) : undefined,
};
@@ -1146,29 +1169,54 @@ export const Sheet = {
toJSON(message: Sheet): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.database !== undefined && (obj.database = message.database);
- message.title !== undefined && (obj.title = message.title);
- message.creator !== undefined && (obj.creator = message.creator);
- message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
- message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
- message.content !== undefined &&
- (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array(0)));
- message.contentSize !== undefined && (obj.contentSize = (message.contentSize || Long.ZERO).toString());
- message.visibility !== undefined && (obj.visibility = sheet_VisibilityToJSON(message.visibility));
- message.source !== undefined && (obj.source = sheet_SourceToJSON(message.source));
- message.type !== undefined && (obj.type = sheet_TypeToJSON(message.type));
- message.starred !== undefined && (obj.starred = message.starred);
- message.payload !== undefined && (obj.payload = message.payload ? SheetPayload.toJSON(message.payload) : undefined);
- message.pushEvent !== undefined &&
- (obj.pushEvent = message.pushEvent ? PushEvent.toJSON(message.pushEvent) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.creator !== "") {
+ obj.creator = message.creator;
+ }
+ if (message.createTime !== undefined) {
+ obj.createTime = message.createTime.toISOString();
+ }
+ if (message.updateTime !== undefined) {
+ obj.updateTime = message.updateTime.toISOString();
+ }
+ if (message.content.length !== 0) {
+ obj.content = base64FromBytes(message.content);
+ }
+ if (!message.contentSize.isZero()) {
+ obj.contentSize = (message.contentSize || Long.ZERO).toString();
+ }
+ if (message.visibility !== 0) {
+ obj.visibility = sheet_VisibilityToJSON(message.visibility);
+ }
+ if (message.source !== 0) {
+ obj.source = sheet_SourceToJSON(message.source);
+ }
+ if (message.type !== 0) {
+ obj.type = sheet_TypeToJSON(message.type);
+ }
+ if (message.starred === true) {
+ obj.starred = message.starred;
+ }
+ if (message.payload !== undefined) {
+ obj.payload = SheetPayload.toJSON(message.payload);
+ }
+ if (message.pushEvent !== undefined) {
+ obj.pushEvent = PushEvent.toJSON(message.pushEvent);
+ }
return obj;
},
create(base?: DeepPartial<Sheet>): Sheet {
return Sheet.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Sheet>): Sheet {
const message = createBaseSheet();
message.name = object.name ?? "";
@@ -1262,19 +1310,21 @@ export const SheetPayload = {
toJSON(message: SheetPayload): unknown {
const obj: any = {};
- message.type !== undefined && (obj.type = sheetPayload_TypeToJSON(message.type));
- message.databaseConfig !== undefined &&
- (obj.databaseConfig = message.databaseConfig ? DatabaseConfig.toJSON(message.databaseConfig) : undefined);
- message.baselineDatabaseConfig !== undefined && (obj.baselineDatabaseConfig = message.baselineDatabaseConfig
- ? DatabaseConfig.toJSON(message.baselineDatabaseConfig)
- : undefined);
+ if (message.type !== 0) {
+ obj.type = sheetPayload_TypeToJSON(message.type);
+ }
+ if (message.databaseConfig !== undefined) {
+ obj.databaseConfig = DatabaseConfig.toJSON(message.databaseConfig);
+ }
+ if (message.baselineDatabaseConfig !== undefined) {
+ obj.baselineDatabaseConfig = DatabaseConfig.toJSON(message.baselineDatabaseConfig);
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload>): SheetPayload {
return SheetPayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload>): SheetPayload {
const message = createBaseSheetPayload();
message.type = object.type ?? 0;
@@ -1674,30 +1724,11 @@ export const SheetServiceDefinition = {
},
} as const;
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
function bytesFromBase64(b64: string): Uint8Array {
- if (tsProtoGlobalThis.Buffer) {
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
- const bin = tsProtoGlobalThis.atob(b64);
+ const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
@@ -1707,21 +1738,21 @@ function bytesFromBase64(b64: string): Uint8Array {
}
function base64FromBytes(arr: Uint8Array): string {
- if (tsProtoGlobalThis.Buffer) {
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
- bin.push(String.fromCharCode(byte));
+ bin.push(globalThis.String.fromCharCode(byte));
});
- return tsProtoGlobalThis.btoa(bin.join(""));
+ return globalThis.btoa(bin.join(""));
}
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -1735,14 +1766,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index 6d89520c8b..f253b44319 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -297,24 +297,28 @@ export const DifferPreviewRequest = {
fromJSON(object: any): DifferPreviewRequest {
return {
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- oldSchema: isSet(object.oldSchema) ? String(object.oldSchema) : "",
+ oldSchema: isSet(object.oldSchema) ? globalThis.String(object.oldSchema) : "",
newMetadata: isSet(object.newMetadata) ? DatabaseMetadata.fromJSON(object.newMetadata) : undefined,
};
},
toJSON(message: DifferPreviewRequest): unknown {
const obj: any = {};
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.oldSchema !== undefined && (obj.oldSchema = message.oldSchema);
- message.newMetadata !== undefined &&
- (obj.newMetadata = message.newMetadata ? DatabaseMetadata.toJSON(message.newMetadata) : undefined);
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.oldSchema !== "") {
+ obj.oldSchema = message.oldSchema;
+ }
+ if (message.newMetadata !== undefined) {
+ obj.newMetadata = DatabaseMetadata.toJSON(message.newMetadata);
+ }
return obj;
},
create(base?: DeepPartial<DifferPreviewRequest>): DifferPreviewRequest {
return DifferPreviewRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DifferPreviewRequest>): DifferPreviewRequest {
const message = createBaseDifferPreviewRequest();
message.engine = object.engine ?? 0;
@@ -362,19 +366,20 @@ export const DifferPreviewResponse = {
},
fromJSON(object: any): DifferPreviewResponse {
- return { schema: isSet(object.schema) ? String(object.schema) : "" };
+ return { schema: isSet(object.schema) ? globalThis.String(object.schema) : "" };
},
toJSON(message: DifferPreviewResponse): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
return obj;
},
create(base?: DeepPartial<DifferPreviewResponse>): DifferPreviewResponse {
return DifferPreviewResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DifferPreviewResponse>): DifferPreviewResponse {
const message = createBaseDifferPreviewResponse();
message.schema = object.schema ?? "";
@@ -459,28 +464,37 @@ export const AdminExecuteRequest = {
fromJSON(object: any): AdminExecuteRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- connectionDatabase: isSet(object.connectionDatabase) ? String(object.connectionDatabase) : "",
- statement: isSet(object.statement) ? String(object.statement) : "",
- limit: isSet(object.limit) ? Number(object.limit) : 0,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ connectionDatabase: isSet(object.connectionDatabase) ? globalThis.String(object.connectionDatabase) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
timeout: isSet(object.timeout) ? Duration.fromJSON(object.timeout) : undefined,
};
},
toJSON(message: AdminExecuteRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);
- message.statement !== undefined && (obj.statement = message.statement);
- message.limit !== undefined && (obj.limit = Math.round(message.limit));
- message.timeout !== undefined && (obj.timeout = message.timeout ? Duration.toJSON(message.timeout) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.connectionDatabase !== "") {
+ obj.connectionDatabase = message.connectionDatabase;
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
+ if (message.limit !== 0) {
+ obj.limit = Math.round(message.limit);
+ }
+ if (message.timeout !== undefined) {
+ obj.timeout = Duration.toJSON(message.timeout);
+ }
return obj;
},
create(base?: DeepPartial<AdminExecuteRequest>): AdminExecuteRequest {
return AdminExecuteRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AdminExecuteRequest>): AdminExecuteRequest {
const message = createBaseAdminExecuteRequest();
message.name = object.name ?? "";
@@ -530,15 +544,15 @@ export const AdminExecuteResponse = {
},
fromJSON(object: any): AdminExecuteResponse {
- return { results: Array.isArray(object?.results) ? object.results.map((e: any) => QueryResult.fromJSON(e)) : [] };
+ return {
+ results: globalThis.Array.isArray(object?.results) ? object.results.map((e: any) => QueryResult.fromJSON(e)) : [],
+ };
},
toJSON(message: AdminExecuteResponse): unknown {
const obj: any = {};
- if (message.results) {
- obj.results = message.results.map((e) => e ? QueryResult.toJSON(e) : undefined);
- } else {
- obj.results = [];
+ if (message.results?.length) {
+ obj.results = message.results.map((e) => QueryResult.toJSON(e));
}
return obj;
},
@@ -546,7 +560,6 @@ export const AdminExecuteResponse = {
create(base?: DeepPartial<AdminExecuteResponse>): AdminExecuteResponse {
return AdminExecuteResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AdminExecuteResponse>): AdminExecuteResponse {
const message = createBaseAdminExecuteResponse();
message.results = object.results?.map((e) => QueryResult.fromPartial(e)) || [];
@@ -641,30 +654,41 @@ export const ExportRequest = {
fromJSON(object: any): ExportRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- connectionDatabase: isSet(object.connectionDatabase) ? String(object.connectionDatabase) : "",
- statement: isSet(object.statement) ? String(object.statement) : "",
- limit: isSet(object.limit) ? Number(object.limit) : 0,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ connectionDatabase: isSet(object.connectionDatabase) ? globalThis.String(object.connectionDatabase) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
format: isSet(object.format) ? exportFormatFromJSON(object.format) : 0,
- admin: isSet(object.admin) ? Boolean(object.admin) : false,
+ admin: isSet(object.admin) ? globalThis.Boolean(object.admin) : false,
};
},
toJSON(message: ExportRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);
- message.statement !== undefined && (obj.statement = message.statement);
- message.limit !== undefined && (obj.limit = Math.round(message.limit));
- message.format !== undefined && (obj.format = exportFormatToJSON(message.format));
- message.admin !== undefined && (obj.admin = message.admin);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.connectionDatabase !== "") {
+ obj.connectionDatabase = message.connectionDatabase;
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
+ if (message.limit !== 0) {
+ obj.limit = Math.round(message.limit);
+ }
+ if (message.format !== 0) {
+ obj.format = exportFormatToJSON(message.format);
+ }
+ if (message.admin === true) {
+ obj.admin = message.admin;
+ }
return obj;
},
create(base?: DeepPartial<ExportRequest>): ExportRequest {
return ExportRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExportRequest>): ExportRequest {
const message = createBaseExportRequest();
message.name = object.name ?? "";
@@ -718,15 +742,15 @@ export const ExportResponse = {
toJSON(message: ExportResponse): unknown {
const obj: any = {};
- message.content !== undefined &&
- (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array(0)));
+ if (message.content.length !== 0) {
+ obj.content = base64FromBytes(message.content);
+ }
return obj;
},
create(base?: DeepPartial<ExportResponse>): ExportResponse {
return ExportResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ExportResponse>): ExportResponse {
const message = createBaseExportResponse();
message.content = object.content ?? new Uint8Array(0);
@@ -811,28 +835,37 @@ export const QueryRequest = {
fromJSON(object: any): QueryRequest {
return {
- name: isSet(object.name) ? String(object.name) : "",
- connectionDatabase: isSet(object.connectionDatabase) ? String(object.connectionDatabase) : "",
- statement: isSet(object.statement) ? String(object.statement) : "",
- limit: isSet(object.limit) ? Number(object.limit) : 0,
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
+ connectionDatabase: isSet(object.connectionDatabase) ? globalThis.String(object.connectionDatabase) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
timeout: isSet(object.timeout) ? Duration.fromJSON(object.timeout) : undefined,
};
},
toJSON(message: QueryRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);
- message.statement !== undefined && (obj.statement = message.statement);
- message.limit !== undefined && (obj.limit = Math.round(message.limit));
- message.timeout !== undefined && (obj.timeout = message.timeout ? Duration.toJSON(message.timeout) : undefined);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.connectionDatabase !== "") {
+ obj.connectionDatabase = message.connectionDatabase;
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
+ if (message.limit !== 0) {
+ obj.limit = Math.round(message.limit);
+ }
+ if (message.timeout !== undefined) {
+ obj.timeout = Duration.toJSON(message.timeout);
+ }
return obj;
},
create(base?: DeepPartial<QueryRequest>): QueryRequest {
return QueryRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<QueryRequest>): QueryRequest {
const message = createBaseQueryRequest();
message.name = object.name ?? "";
@@ -903,32 +936,29 @@ export const QueryResponse = {
fromJSON(object: any): QueryResponse {
return {
- results: Array.isArray(object?.results) ? object.results.map((e: any) => QueryResult.fromJSON(e)) : [],
- advices: Array.isArray(object?.advices) ? object.advices.map((e: any) => Advice.fromJSON(e)) : [],
- allowExport: isSet(object.allowExport) ? Boolean(object.allowExport) : false,
+ results: globalThis.Array.isArray(object?.results) ? object.results.map((e: any) => QueryResult.fromJSON(e)) : [],
+ advices: globalThis.Array.isArray(object?.advices) ? object.advices.map((e: any) => Advice.fromJSON(e)) : [],
+ allowExport: isSet(object.allowExport) ? globalThis.Boolean(object.allowExport) : false,
};
},
toJSON(message: QueryResponse): unknown {
const obj: any = {};
- if (message.results) {
- obj.results = message.results.map((e) => e ? QueryResult.toJSON(e) : undefined);
- } else {
- obj.results = [];
+ if (message.results?.length) {
+ obj.results = message.results.map((e) => QueryResult.toJSON(e));
+ }
+ if (message.advices?.length) {
+ obj.advices = message.advices.map((e) => Advice.toJSON(e));
}
- if (message.advices) {
- obj.advices = message.advices.map((e) => e ? Advice.toJSON(e) : undefined);
- } else {
- obj.advices = [];
+ if (message.allowExport === true) {
+ obj.allowExport = message.allowExport;
}
- message.allowExport !== undefined && (obj.allowExport = message.allowExport);
return obj;
},
create(base?: DeepPartial<QueryResponse>): QueryResponse {
return QueryResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<QueryResponse>): QueryResponse {
const message = createBaseQueryResponse();
message.results = object.results?.map((e) => QueryResult.fromPartial(e)) || [];
@@ -1078,54 +1108,55 @@ export const QueryResult = {
fromJSON(object: any): QueryResult {
return {
- columnNames: Array.isArray(object?.columnNames) ? object.columnNames.map((e: any) => String(e)) : [],
- columnTypeNames: Array.isArray(object?.columnTypeNames) ? object.columnTypeNames.map((e: any) => String(e)) : [],
- rows: Array.isArray(object?.rows) ? object.rows.map((e: any) => QueryRow.fromJSON(e)) : [],
- masked: Array.isArray(object?.masked) ? object.masked.map((e: any) => Boolean(e)) : [],
- sensitive: Array.isArray(object?.sensitive) ? object.sensitive.map((e: any) => Boolean(e)) : [],
- error: isSet(object.error) ? String(object.error) : "",
+ columnNames: globalThis.Array.isArray(object?.columnNames)
+ ? object.columnNames.map((e: any) => globalThis.String(e))
+ : [],
+ columnTypeNames: globalThis.Array.isArray(object?.columnTypeNames)
+ ? object.columnTypeNames.map((e: any) => globalThis.String(e))
+ : [],
+ rows: globalThis.Array.isArray(object?.rows) ? object.rows.map((e: any) => QueryRow.fromJSON(e)) : [],
+ masked: globalThis.Array.isArray(object?.masked) ? object.masked.map((e: any) => globalThis.Boolean(e)) : [],
+ sensitive: globalThis.Array.isArray(object?.sensitive)
+ ? object.sensitive.map((e: any) => globalThis.Boolean(e))
+ : [],
+ error: isSet(object.error) ? globalThis.String(object.error) : "",
latency: isSet(object.latency) ? Duration.fromJSON(object.latency) : undefined,
- statement: isSet(object.statement) ? String(object.statement) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
};
},
toJSON(message: QueryResult): unknown {
const obj: any = {};
- if (message.columnNames) {
- obj.columnNames = message.columnNames.map((e) => e);
- } else {
- obj.columnNames = [];
- }
- if (message.columnTypeNames) {
- obj.columnTypeNames = message.columnTypeNames.map((e) => e);
- } else {
- obj.columnTypeNames = [];
- }
- if (message.rows) {
- obj.rows = message.rows.map((e) => e ? QueryRow.toJSON(e) : undefined);
- } else {
- obj.rows = [];
- }
- if (message.masked) {
- obj.masked = message.masked.map((e) => e);
- } else {
- obj.masked = [];
- }
- if (message.sensitive) {
- obj.sensitive = message.sensitive.map((e) => e);
- } else {
- obj.sensitive = [];
- }
- message.error !== undefined && (obj.error = message.error);
- message.latency !== undefined && (obj.latency = message.latency ? Duration.toJSON(message.latency) : undefined);
- message.statement !== undefined && (obj.statement = message.statement);
+ if (message.columnNames?.length) {
+ obj.columnNames = message.columnNames;
+ }
+ if (message.columnTypeNames?.length) {
+ obj.columnTypeNames = message.columnTypeNames;
+ }
+ if (message.rows?.length) {
+ obj.rows = message.rows.map((e) => QueryRow.toJSON(e));
+ }
+ if (message.masked?.length) {
+ obj.masked = message.masked;
+ }
+ if (message.sensitive?.length) {
+ obj.sensitive = message.sensitive;
+ }
+ if (message.error !== "") {
+ obj.error = message.error;
+ }
+ if (message.latency !== undefined) {
+ obj.latency = Duration.toJSON(message.latency);
+ }
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
return obj;
},
create(base?: DeepPartial<QueryResult>): QueryResult {
return QueryResult.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<QueryResult>): QueryResult {
const message = createBaseQueryResult();
message.columnNames = object.columnNames?.map((e) => e) || [];
@@ -1178,15 +1209,15 @@ export const QueryRow = {
},
fromJSON(object: any): QueryRow {
- return { values: Array.isArray(object?.values) ? object.values.map((e: any) => RowValue.fromJSON(e)) : [] };
+ return {
+ values: globalThis.Array.isArray(object?.values) ? object.values.map((e: any) => RowValue.fromJSON(e)) : [],
+ };
},
toJSON(message: QueryRow): unknown {
const obj: any = {};
- if (message.values) {
- obj.values = message.values.map((e) => e ? RowValue.toJSON(e) : undefined);
- } else {
- obj.values = [];
+ if (message.values?.length) {
+ obj.values = message.values.map((e) => RowValue.toJSON(e));
}
return obj;
},
@@ -1194,7 +1225,6 @@ export const QueryRow = {
create(base?: DeepPartial<QueryRow>): QueryRow {
return QueryRow.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<QueryRow>): QueryRow {
const message = createBaseQueryRow();
message.values = object.values?.map((e) => RowValue.fromPartial(e)) || [];
@@ -1352,14 +1382,14 @@ export const RowValue = {
fromJSON(object: any): RowValue {
return {
nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined,
- boolValue: isSet(object.boolValue) ? Boolean(object.boolValue) : undefined,
+ boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined,
bytesValue: isSet(object.bytesValue) ? bytesFromBase64(object.bytesValue) : undefined,
- doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : undefined,
- floatValue: isSet(object.floatValue) ? Number(object.floatValue) : undefined,
- int32Value: isSet(object.int32Value) ? Number(object.int32Value) : undefined,
+ doubleValue: isSet(object.doubleValue) ? globalThis.Number(object.doubleValue) : undefined,
+ floatValue: isSet(object.floatValue) ? globalThis.Number(object.floatValue) : undefined,
+ int32Value: isSet(object.int32Value) ? globalThis.Number(object.int32Value) : undefined,
int64Value: isSet(object.int64Value) ? Long.fromValue(object.int64Value) : undefined,
- stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined,
- uint32Value: isSet(object.uint32Value) ? Number(object.uint32Value) : undefined,
+ stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
+ uint32Value: isSet(object.uint32Value) ? globalThis.Number(object.uint32Value) : undefined,
uint64Value: isSet(object.uint64Value) ? Long.fromValue(object.uint64Value) : undefined,
valueValue: isSet(object?.valueValue) ? object.valueValue : undefined,
};
@@ -1367,26 +1397,45 @@ export const RowValue = {
toJSON(message: RowValue): unknown {
const obj: any = {};
- message.nullValue !== undefined &&
- (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);
- message.boolValue !== undefined && (obj.boolValue = message.boolValue);
- message.bytesValue !== undefined &&
- (obj.bytesValue = message.bytesValue !== undefined ? base64FromBytes(message.bytesValue) : undefined);
- message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);
- message.floatValue !== undefined && (obj.floatValue = message.floatValue);
- message.int32Value !== undefined && (obj.int32Value = Math.round(message.int32Value));
- message.int64Value !== undefined && (obj.int64Value = (message.int64Value || undefined).toString());
- message.stringValue !== undefined && (obj.stringValue = message.stringValue);
- message.uint32Value !== undefined && (obj.uint32Value = Math.round(message.uint32Value));
- message.uint64Value !== undefined && (obj.uint64Value = (message.uint64Value || undefined).toString());
- message.valueValue !== undefined && (obj.valueValue = message.valueValue);
+ if (message.nullValue !== undefined) {
+ obj.nullValue = nullValueToJSON(message.nullValue);
+ }
+ if (message.boolValue !== undefined) {
+ obj.boolValue = message.boolValue;
+ }
+ if (message.bytesValue !== undefined) {
+ obj.bytesValue = base64FromBytes(message.bytesValue);
+ }
+ if (message.doubleValue !== undefined) {
+ obj.doubleValue = message.doubleValue;
+ }
+ if (message.floatValue !== undefined) {
+ obj.floatValue = message.floatValue;
+ }
+ if (message.int32Value !== undefined) {
+ obj.int32Value = Math.round(message.int32Value);
+ }
+ if (message.int64Value !== undefined) {
+ obj.int64Value = (message.int64Value || Long.ZERO).toString();
+ }
+ if (message.stringValue !== undefined) {
+ obj.stringValue = message.stringValue;
+ }
+ if (message.uint32Value !== undefined) {
+ obj.uint32Value = Math.round(message.uint32Value);
+ }
+ if (message.uint64Value !== undefined) {
+ obj.uint64Value = (message.uint64Value || Long.UZERO).toString();
+ }
+ if (message.valueValue !== undefined) {
+ obj.valueValue = message.valueValue;
+ }
return obj;
},
create(base?: DeepPartial<RowValue>): RowValue {
return RowValue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RowValue>): RowValue {
const message = createBaseRowValue();
message.nullValue = object.nullValue ?? undefined;
@@ -1506,31 +1555,44 @@ export const Advice = {
fromJSON(object: any): Advice {
return {
status: isSet(object.status) ? advice_StatusFromJSON(object.status) : 0,
- code: isSet(object.code) ? Number(object.code) : 0,
- title: isSet(object.title) ? String(object.title) : "",
- content: isSet(object.content) ? String(object.content) : "",
- line: isSet(object.line) ? Number(object.line) : 0,
- column: isSet(object.column) ? Number(object.column) : 0,
- detail: isSet(object.detail) ? String(object.detail) : "",
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
+ line: isSet(object.line) ? globalThis.Number(object.line) : 0,
+ column: isSet(object.column) ? globalThis.Number(object.column) : 0,
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
};
},
toJSON(message: Advice): unknown {
const obj: any = {};
- message.status !== undefined && (obj.status = advice_StatusToJSON(message.status));
- message.code !== undefined && (obj.code = Math.round(message.code));
- message.title !== undefined && (obj.title = message.title);
- message.content !== undefined && (obj.content = message.content);
- message.line !== undefined && (obj.line = Math.round(message.line));
- message.column !== undefined && (obj.column = Math.round(message.column));
- message.detail !== undefined && (obj.detail = message.detail);
+ if (message.status !== 0) {
+ obj.status = advice_StatusToJSON(message.status);
+ }
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.content !== "") {
+ obj.content = message.content;
+ }
+ if (message.line !== 0) {
+ obj.line = Math.round(message.line);
+ }
+ if (message.column !== 0) {
+ obj.column = Math.round(message.column);
+ }
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
return obj;
},
create(base?: DeepPartial<Advice>): Advice {
return Advice.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Advice>): Advice {
const message = createBaseAdvice();
message.status = object.status ?? 0;
@@ -1602,23 +1664,28 @@ export const PrettyRequest = {
fromJSON(object: any): PrettyRequest {
return {
engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
- currentSchema: isSet(object.currentSchema) ? String(object.currentSchema) : "",
- expectedSchema: isSet(object.expectedSchema) ? String(object.expectedSchema) : "",
+ currentSchema: isSet(object.currentSchema) ? globalThis.String(object.currentSchema) : "",
+ expectedSchema: isSet(object.expectedSchema) ? globalThis.String(object.expectedSchema) : "",
};
},
toJSON(message: PrettyRequest): unknown {
const obj: any = {};
- message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
- message.currentSchema !== undefined && (obj.currentSchema = message.currentSchema);
- message.expectedSchema !== undefined && (obj.expectedSchema = message.expectedSchema);
+ if (message.engine !== 0) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.currentSchema !== "") {
+ obj.currentSchema = message.currentSchema;
+ }
+ if (message.expectedSchema !== "") {
+ obj.expectedSchema = message.expectedSchema;
+ }
return obj;
},
create(base?: DeepPartial<PrettyRequest>): PrettyRequest {
return PrettyRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PrettyRequest>): PrettyRequest {
const message = createBasePrettyRequest();
message.engine = object.engine ?? 0;
@@ -1675,22 +1742,25 @@ export const PrettyResponse = {
fromJSON(object: any): PrettyResponse {
return {
- currentSchema: isSet(object.currentSchema) ? String(object.currentSchema) : "",
- expectedSchema: isSet(object.expectedSchema) ? String(object.expectedSchema) : "",
+ currentSchema: isSet(object.currentSchema) ? globalThis.String(object.currentSchema) : "",
+ expectedSchema: isSet(object.expectedSchema) ? globalThis.String(object.expectedSchema) : "",
};
},
toJSON(message: PrettyResponse): unknown {
const obj: any = {};
- message.currentSchema !== undefined && (obj.currentSchema = message.currentSchema);
- message.expectedSchema !== undefined && (obj.expectedSchema = message.expectedSchema);
+ if (message.currentSchema !== "") {
+ obj.currentSchema = message.currentSchema;
+ }
+ if (message.expectedSchema !== "") {
+ obj.expectedSchema = message.expectedSchema;
+ }
return obj;
},
create(base?: DeepPartial<PrettyResponse>): PrettyResponse {
return PrettyResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PrettyResponse>): PrettyResponse {
const message = createBasePrettyResponse();
message.currentSchema = object.currentSchema ?? "";
@@ -1746,22 +1816,25 @@ export const CheckRequest = {
fromJSON(object: any): CheckRequest {
return {
- statement: isSet(object.statement) ? String(object.statement) : "",
- database: isSet(object.database) ? String(object.database) : "",
+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
+ database: isSet(object.database) ? globalThis.String(object.database) : "",
};
},
toJSON(message: CheckRequest): unknown {
const obj: any = {};
- message.statement !== undefined && (obj.statement = message.statement);
- message.database !== undefined && (obj.database = message.database);
+ if (message.statement !== "") {
+ obj.statement = message.statement;
+ }
+ if (message.database !== "") {
+ obj.database = message.database;
+ }
return obj;
},
create(base?: DeepPartial<CheckRequest>): CheckRequest {
return CheckRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CheckRequest>): CheckRequest {
const message = createBaseCheckRequest();
message.statement = object.statement ?? "";
@@ -1806,15 +1879,15 @@ export const CheckResponse = {
},
fromJSON(object: any): CheckResponse {
- return { advices: Array.isArray(object?.advices) ? object.advices.map((e: any) => Advice.fromJSON(e)) : [] };
+ return {
+ advices: globalThis.Array.isArray(object?.advices) ? object.advices.map((e: any) => Advice.fromJSON(e)) : [],
+ };
},
toJSON(message: CheckResponse): unknown {
const obj: any = {};
- if (message.advices) {
- obj.advices = message.advices.map((e) => e ? Advice.toJSON(e) : undefined);
- } else {
- obj.advices = [];
+ if (message.advices?.length) {
+ obj.advices = message.advices.map((e) => Advice.toJSON(e));
}
return obj;
},
@@ -1822,7 +1895,6 @@ export const CheckResponse = {
create(base?: DeepPartial<CheckResponse>): CheckResponse {
return CheckResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CheckResponse>): CheckResponse {
const message = createBaseCheckResponse();
message.advices = object.advices?.map((e) => Advice.fromPartial(e)) || [];
@@ -2021,30 +2093,11 @@ export const SQLServiceDefinition = {
},
} as const;
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
function bytesFromBase64(b64: string): Uint8Array {
- if (tsProtoGlobalThis.Buffer) {
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
+ if (globalThis.Buffer) {
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
- const bin = tsProtoGlobalThis.atob(b64);
+ const bin = globalThis.atob(b64);
const arr = new Uint8Array(bin.length);
for (let i = 0; i < bin.length; ++i) {
arr[i] = bin.charCodeAt(i);
@@ -2054,21 +2107,21 @@ function bytesFromBase64(b64: string): Uint8Array {
}
function base64FromBytes(arr: Uint8Array): string {
- if (tsProtoGlobalThis.Buffer) {
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
+ if (globalThis.Buffer) {
+ return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
arr.forEach((byte) => {
- bin.push(String.fromCharCode(byte));
+ bin.push(globalThis.String.fromCharCode(byte));
});
- return tsProtoGlobalThis.btoa(bin.join(""));
+ return globalThis.btoa(bin.join(""));
}
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
diff --git a/frontend/src/types/proto/v1/subscription_service.ts b/frontend/src/types/proto/v1/subscription_service.ts
index a859d745d1..ba772d5e86 100644
--- a/frontend/src/types/proto/v1/subscription_service.ts
+++ b/frontend/src/types/proto/v1/subscription_service.ts
@@ -137,7 +137,6 @@ export const GetSubscriptionRequest = {
create(base?: DeepPartial<GetSubscriptionRequest>): GetSubscriptionRequest {
return GetSubscriptionRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<GetSubscriptionRequest>): GetSubscriptionRequest {
const message = createBaseGetSubscriptionRequest();
return message;
@@ -181,7 +180,6 @@ export const GetFeatureMatrixRequest = {
create(base?: DeepPartial<GetFeatureMatrixRequest>): GetFeatureMatrixRequest {
return GetFeatureMatrixRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<GetFeatureMatrixRequest>): GetFeatureMatrixRequest {
const message = createBaseGetFeatureMatrixRequest();
return message;
@@ -229,14 +227,15 @@ export const UpdateSubscriptionRequest = {
toJSON(message: UpdateSubscriptionRequest): unknown {
const obj: any = {};
- message.patch !== undefined && (obj.patch = message.patch ? PatchSubscription.toJSON(message.patch) : undefined);
+ if (message.patch !== undefined) {
+ obj.patch = PatchSubscription.toJSON(message.patch);
+ }
return obj;
},
create(base?: DeepPartial<UpdateSubscriptionRequest>): UpdateSubscriptionRequest {
return UpdateSubscriptionRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UpdateSubscriptionRequest>): UpdateSubscriptionRequest {
const message = createBaseUpdateSubscriptionRequest();
message.patch = (object.patch !== undefined && object.patch !== null)
@@ -287,14 +286,15 @@ export const TrialSubscriptionRequest = {
toJSON(message: TrialSubscriptionRequest): unknown {
const obj: any = {};
- message.trial !== undefined && (obj.trial = message.trial ? TrialSubscription.toJSON(message.trial) : undefined);
+ if (message.trial !== undefined) {
+ obj.trial = TrialSubscription.toJSON(message.trial);
+ }
return obj;
},
create(base?: DeepPartial<TrialSubscriptionRequest>): TrialSubscriptionRequest {
return TrialSubscriptionRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TrialSubscriptionRequest>): TrialSubscriptionRequest {
const message = createBaseTrialSubscriptionRequest();
message.trial = (object.trial !== undefined && object.trial !== null)
@@ -340,19 +340,20 @@ export const PatchSubscription = {
},
fromJSON(object: any): PatchSubscription {
- return { license: isSet(object.license) ? String(object.license) : "" };
+ return { license: isSet(object.license) ? globalThis.String(object.license) : "" };
},
toJSON(message: PatchSubscription): unknown {
const obj: any = {};
- message.license !== undefined && (obj.license = message.license);
+ if (message.license !== "") {
+ obj.license = message.license;
+ }
return obj;
},
create(base?: DeepPartial<PatchSubscription>): PatchSubscription {
return PatchSubscription.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PatchSubscription>): PatchSubscription {
const message = createBasePatchSubscription();
message.license = object.license ?? "";
@@ -418,23 +419,28 @@ export const TrialSubscription = {
fromJSON(object: any): TrialSubscription {
return {
plan: isSet(object.plan) ? planTypeFromJSON(object.plan) : 0,
- days: isSet(object.days) ? Number(object.days) : 0,
- instanceCount: isSet(object.instanceCount) ? Number(object.instanceCount) : 0,
+ days: isSet(object.days) ? globalThis.Number(object.days) : 0,
+ instanceCount: isSet(object.instanceCount) ? globalThis.Number(object.instanceCount) : 0,
};
},
toJSON(message: TrialSubscription): unknown {
const obj: any = {};
- message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));
- message.days !== undefined && (obj.days = Math.round(message.days));
- message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));
+ if (message.plan !== 0) {
+ obj.plan = planTypeToJSON(message.plan);
+ }
+ if (message.days !== 0) {
+ obj.days = Math.round(message.days);
+ }
+ if (message.instanceCount !== 0) {
+ obj.instanceCount = Math.round(message.instanceCount);
+ }
return obj;
},
create(base?: DeepPartial<TrialSubscription>): TrialSubscription {
return TrialSubscription.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TrialSubscription>): TrialSubscription {
const message = createBaseTrialSubscription();
message.plan = object.plan ?? 0;
@@ -549,32 +555,45 @@ export const Subscription = {
fromJSON(object: any): Subscription {
return {
- instanceCount: isSet(object.instanceCount) ? Number(object.instanceCount) : 0,
+ instanceCount: isSet(object.instanceCount) ? globalThis.Number(object.instanceCount) : 0,
expiresTime: isSet(object.expiresTime) ? fromJsonTimestamp(object.expiresTime) : undefined,
startedTime: isSet(object.startedTime) ? fromJsonTimestamp(object.startedTime) : undefined,
plan: isSet(object.plan) ? planTypeFromJSON(object.plan) : 0,
- trialing: isSet(object.trialing) ? Boolean(object.trialing) : false,
- orgId: isSet(object.orgId) ? String(object.orgId) : "",
- orgName: isSet(object.orgName) ? String(object.orgName) : "",
+ trialing: isSet(object.trialing) ? globalThis.Boolean(object.trialing) : false,
+ orgId: isSet(object.orgId) ? globalThis.String(object.orgId) : "",
+ orgName: isSet(object.orgName) ? globalThis.String(object.orgName) : "",
};
},
toJSON(message: Subscription): unknown {
const obj: any = {};
- message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));
- message.expiresTime !== undefined && (obj.expiresTime = message.expiresTime.toISOString());
- message.startedTime !== undefined && (obj.startedTime = message.startedTime.toISOString());
- message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));
- message.trialing !== undefined && (obj.trialing = message.trialing);
- message.orgId !== undefined && (obj.orgId = message.orgId);
- message.orgName !== undefined && (obj.orgName = message.orgName);
+ if (message.instanceCount !== 0) {
+ obj.instanceCount = Math.round(message.instanceCount);
+ }
+ if (message.expiresTime !== undefined) {
+ obj.expiresTime = message.expiresTime.toISOString();
+ }
+ if (message.startedTime !== undefined) {
+ obj.startedTime = message.startedTime.toISOString();
+ }
+ if (message.plan !== 0) {
+ obj.plan = planTypeToJSON(message.plan);
+ }
+ if (message.trialing === true) {
+ obj.trialing = message.trialing;
+ }
+ if (message.orgId !== "") {
+ obj.orgId = message.orgId;
+ }
+ if (message.orgName !== "") {
+ obj.orgName = message.orgName;
+ }
return obj;
},
create(base?: DeepPartial<Subscription>): Subscription {
return Subscription.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Subscription>): Subscription {
const message = createBaseSubscription();
message.instanceCount = object.instanceCount ?? 0;
@@ -624,15 +643,15 @@ export const FeatureMatrix = {
},
fromJSON(object: any): FeatureMatrix {
- return { features: Array.isArray(object?.features) ? object.features.map((e: any) => Feature.fromJSON(e)) : [] };
+ return {
+ features: globalThis.Array.isArray(object?.features) ? object.features.map((e: any) => Feature.fromJSON(e)) : [],
+ };
},
toJSON(message: FeatureMatrix): unknown {
const obj: any = {};
- if (message.features) {
- obj.features = message.features.map((e) => e ? Feature.toJSON(e) : undefined);
- } else {
- obj.features = [];
+ if (message.features?.length) {
+ obj.features = message.features.map((e) => Feature.toJSON(e));
}
return obj;
},
@@ -640,7 +659,6 @@ export const FeatureMatrix = {
create(base?: DeepPartial<FeatureMatrix>): FeatureMatrix {
return FeatureMatrix.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FeatureMatrix>): FeatureMatrix {
const message = createBaseFeatureMatrix();
message.features = object.features?.map((e) => Feature.fromPartial(e)) || [];
@@ -698,7 +716,7 @@ export const Feature = {
fromJSON(object: any): Feature {
return {
- name: isSet(object.name) ? String(object.name) : "",
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
matrix: isObject(object.matrix)
? Object.entries(object.matrix).reduce<{ [key: string]: boolean }>((acc, [key, value]) => {
acc[key] = Boolean(value);
@@ -710,12 +728,17 @@ export const Feature = {
toJSON(message: Feature): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- obj.matrix = {};
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
if (message.matrix) {
- Object.entries(message.matrix).forEach(([k, v]) => {
- obj.matrix[k] = v;
- });
+ const entries = Object.entries(message.matrix);
+ if (entries.length > 0) {
+ obj.matrix = {};
+ entries.forEach(([k, v]) => {
+ obj.matrix[k] = v;
+ });
+ }
}
return obj;
},
@@ -723,13 +746,12 @@ export const Feature = {
create(base?: DeepPartial<Feature>): Feature {
return Feature.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Feature>): Feature {
const message = createBaseFeature();
message.name = object.name ?? "";
message.matrix = Object.entries(object.matrix ?? {}).reduce<{ [key: string]: boolean }>((acc, [key, value]) => {
if (value !== undefined) {
- acc[key] = Boolean(value);
+ acc[key] = globalThis.Boolean(value);
}
return acc;
}, {});
@@ -784,22 +806,25 @@ export const Feature_MatrixEntry = {
fromJSON(object: any): Feature_MatrixEntry {
return {
- key: isSet(object.key) ? String(object.key) : "",
- value: isSet(object.value) ? Boolean(object.value) : false,
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
+ value: isSet(object.value) ? globalThis.Boolean(object.value) : false,
};
},
toJSON(message: Feature_MatrixEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = message.key);
- message.value !== undefined && (obj.value = message.value);
+ if (message.key !== "") {
+ obj.key = message.key;
+ }
+ if (message.value === true) {
+ obj.value = message.value;
+ }
return obj;
},
create(base?: DeepPartial<Feature_MatrixEntry>): Feature_MatrixEntry {
return Feature_MatrixEntry.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Feature_MatrixEntry>): Feature_MatrixEntry {
const message = createBaseFeature_MatrixEntry();
message.key = object.key ?? "";
@@ -937,7 +962,7 @@ export const SubscriptionServiceDefinition = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -951,14 +976,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/frontend/src/types/proto/v1/vcs.ts b/frontend/src/types/proto/v1/vcs.ts
index e75d3c9a6c..ea1e38da09 100644
--- a/frontend/src/types/proto/v1/vcs.ts
+++ b/frontend/src/types/proto/v1/vcs.ts
@@ -237,44 +237,60 @@ export const PushEvent = {
fromJSON(object: any): PushEvent {
return {
vcsType: isSet(object.vcsType) ? vcsTypeFromJSON(object.vcsType) : 0,
- baseDir: isSet(object.baseDir) ? String(object.baseDir) : "",
- ref: isSet(object.ref) ? String(object.ref) : "",
- before: isSet(object.before) ? String(object.before) : "",
- after: isSet(object.after) ? String(object.after) : "",
- repositoryId: isSet(object.repositoryId) ? String(object.repositoryId) : "",
- repositoryUrl: isSet(object.repositoryUrl) ? String(object.repositoryUrl) : "",
- repositoryFullPath: isSet(object.repositoryFullPath) ? String(object.repositoryFullPath) : "",
- authorName: isSet(object.authorName) ? String(object.authorName) : "",
- commits: Array.isArray(object?.commits) ? object.commits.map((e: any) => Commit.fromJSON(e)) : [],
+ baseDir: isSet(object.baseDir) ? globalThis.String(object.baseDir) : "",
+ ref: isSet(object.ref) ? globalThis.String(object.ref) : "",
+ before: isSet(object.before) ? globalThis.String(object.before) : "",
+ after: isSet(object.after) ? globalThis.String(object.after) : "",
+ repositoryId: isSet(object.repositoryId) ? globalThis.String(object.repositoryId) : "",
+ repositoryUrl: isSet(object.repositoryUrl) ? globalThis.String(object.repositoryUrl) : "",
+ repositoryFullPath: isSet(object.repositoryFullPath) ? globalThis.String(object.repositoryFullPath) : "",
+ authorName: isSet(object.authorName) ? globalThis.String(object.authorName) : "",
+ commits: globalThis.Array.isArray(object?.commits) ? object.commits.map((e: any) => Commit.fromJSON(e)) : [],
fileCommit: isSet(object.fileCommit) ? FileCommit.fromJSON(object.fileCommit) : undefined,
};
},
toJSON(message: PushEvent): unknown {
const obj: any = {};
- message.vcsType !== undefined && (obj.vcsType = vcsTypeToJSON(message.vcsType));
- message.baseDir !== undefined && (obj.baseDir = message.baseDir);
- message.ref !== undefined && (obj.ref = message.ref);
- message.before !== undefined && (obj.before = message.before);
- message.after !== undefined && (obj.after = message.after);
- message.repositoryId !== undefined && (obj.repositoryId = message.repositoryId);
- message.repositoryUrl !== undefined && (obj.repositoryUrl = message.repositoryUrl);
- message.repositoryFullPath !== undefined && (obj.repositoryFullPath = message.repositoryFullPath);
- message.authorName !== undefined && (obj.authorName = message.authorName);
- if (message.commits) {
- obj.commits = message.commits.map((e) => e ? Commit.toJSON(e) : undefined);
- } else {
- obj.commits = [];
- }
- message.fileCommit !== undefined &&
- (obj.fileCommit = message.fileCommit ? FileCommit.toJSON(message.fileCommit) : undefined);
+ if (message.vcsType !== 0) {
+ obj.vcsType = vcsTypeToJSON(message.vcsType);
+ }
+ if (message.baseDir !== "") {
+ obj.baseDir = message.baseDir;
+ }
+ if (message.ref !== "") {
+ obj.ref = message.ref;
+ }
+ if (message.before !== "") {
+ obj.before = message.before;
+ }
+ if (message.after !== "") {
+ obj.after = message.after;
+ }
+ if (message.repositoryId !== "") {
+ obj.repositoryId = message.repositoryId;
+ }
+ if (message.repositoryUrl !== "") {
+ obj.repositoryUrl = message.repositoryUrl;
+ }
+ if (message.repositoryFullPath !== "") {
+ obj.repositoryFullPath = message.repositoryFullPath;
+ }
+ if (message.authorName !== "") {
+ obj.authorName = message.authorName;
+ }
+ if (message.commits?.length) {
+ obj.commits = message.commits.map((e) => Commit.toJSON(e));
+ }
+ if (message.fileCommit !== undefined) {
+ obj.fileCommit = FileCommit.toJSON(message.fileCommit);
+ }
return obj;
},
create(base?: DeepPartial<PushEvent>): PushEvent {
return PushEvent.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PushEvent>): PushEvent {
const message = createBasePushEvent();
message.vcsType = object.vcsType ?? 0;
@@ -421,36 +437,50 @@ export const Commit = {
fromJSON(object: any): Commit {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- message: isSet(object.message) ? String(object.message) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
createdTime: isSet(object.createdTime) ? fromJsonTimestamp(object.createdTime) : undefined,
- url: isSet(object.url) ? String(object.url) : "",
- authorName: isSet(object.authorName) ? String(object.authorName) : "",
- authorEmail: isSet(object.authorEmail) ? String(object.authorEmail) : "",
- addedList: Array.isArray(object?.addedList) ? object.addedList.map((e: any) => String(e)) : [],
- modifiedList: Array.isArray(object?.modifiedList) ? object.modifiedList.map((e: any) => String(e)) : [],
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ authorName: isSet(object.authorName) ? globalThis.String(object.authorName) : "",
+ authorEmail: isSet(object.authorEmail) ? globalThis.String(object.authorEmail) : "",
+ addedList: globalThis.Array.isArray(object?.addedList)
+ ? object.addedList.map((e: any) => globalThis.String(e))
+ : [],
+ modifiedList: globalThis.Array.isArray(object?.modifiedList)
+ ? object.modifiedList.map((e: any) => globalThis.String(e))
+ : [],
};
},
toJSON(message: Commit): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.message !== undefined && (obj.message = message.message);
- message.createdTime !== undefined && (obj.createdTime = message.createdTime.toISOString());
- message.url !== undefined && (obj.url = message.url);
- message.authorName !== undefined && (obj.authorName = message.authorName);
- message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);
- if (message.addedList) {
- obj.addedList = message.addedList.map((e) => e);
- } else {
- obj.addedList = [];
- }
- if (message.modifiedList) {
- obj.modifiedList = message.modifiedList.map((e) => e);
- } else {
- obj.modifiedList = [];
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.message !== "") {
+ obj.message = message.message;
+ }
+ if (message.createdTime !== undefined) {
+ obj.createdTime = message.createdTime.toISOString();
+ }
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.authorName !== "") {
+ obj.authorName = message.authorName;
+ }
+ if (message.authorEmail !== "") {
+ obj.authorEmail = message.authorEmail;
+ }
+ if (message.addedList?.length) {
+ obj.addedList = message.addedList;
+ }
+ if (message.modifiedList?.length) {
+ obj.modifiedList = message.modifiedList;
}
return obj;
},
@@ -458,7 +488,6 @@ export const Commit = {
create(base?: DeepPartial<Commit>): Commit {
return Commit.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Commit>): Commit {
const message = createBaseCommit();
message.id = object.id ?? "";
@@ -590,34 +619,49 @@ export const FileCommit = {
fromJSON(object: any): FileCommit {
return {
- id: isSet(object.id) ? String(object.id) : "",
- title: isSet(object.title) ? String(object.title) : "",
- message: isSet(object.message) ? String(object.message) : "",
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
createdTime: isSet(object.createdTime) ? fromJsonTimestamp(object.createdTime) : undefined,
- url: isSet(object.url) ? String(object.url) : "",
- authorName: isSet(object.authorName) ? String(object.authorName) : "",
- authorEmail: isSet(object.authorEmail) ? String(object.authorEmail) : "",
- added: isSet(object.added) ? String(object.added) : "",
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
+ authorName: isSet(object.authorName) ? globalThis.String(object.authorName) : "",
+ authorEmail: isSet(object.authorEmail) ? globalThis.String(object.authorEmail) : "",
+ added: isSet(object.added) ? globalThis.String(object.added) : "",
};
},
toJSON(message: FileCommit): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = message.id);
- message.title !== undefined && (obj.title = message.title);
- message.message !== undefined && (obj.message = message.message);
- message.createdTime !== undefined && (obj.createdTime = message.createdTime.toISOString());
- message.url !== undefined && (obj.url = message.url);
- message.authorName !== undefined && (obj.authorName = message.authorName);
- message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);
- message.added !== undefined && (obj.added = message.added);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.message !== "") {
+ obj.message = message.message;
+ }
+ if (message.createdTime !== undefined) {
+ obj.createdTime = message.createdTime.toISOString();
+ }
+ if (message.url !== "") {
+ obj.url = message.url;
+ }
+ if (message.authorName !== "") {
+ obj.authorName = message.authorName;
+ }
+ if (message.authorEmail !== "") {
+ obj.authorEmail = message.authorEmail;
+ }
+ if (message.added !== "") {
+ obj.added = message.added;
+ }
return obj;
},
create(base?: DeepPartial<FileCommit>): FileCommit {
return FileCommit.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<FileCommit>): FileCommit {
const message = createBaseFileCommit();
message.id = object.id ?? "";
@@ -635,7 +679,7 @@ export const FileCommit = {
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>>
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
@@ -649,14 +693,14 @@ function toTimestamp(date: Date): Timestamp {
function fromTimestamp(t: Timestamp): Date {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
- return new Date(millis);
+ return new globalThis.Date(millis);
}
function fromJsonTimestamp(o: any): Date {
- if (o instanceof Date) {
+ if (o instanceof globalThis.Date) {
return o;
} else if (typeof o === "string") {
- return new Date(o);
+ return new globalThis.Date(o);
} else {
return fromTimestamp(Timestamp.fromJSON(o));
}
diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml
index 7b5e0fe267..65778b1041 100644
--- a/proto/buf.gen.yaml
+++ b/proto/buf.gen.yaml
@@ -11,7 +11,7 @@ plugins:
out: generated-go
opt:
- paths=source_relative
- - plugin: buf.build/community/stephenh-ts-proto:v1.152.1
+ - plugin: buf.build/community/stephenh-ts-proto:v1.163.0
out: ../frontend/src/types/proto
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
opt: