Skip to content

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

feat(proto): add sensitive data policy in store proto (#7716)

h3n4l4c44f9428772
diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.go
index 9141c3c4bd..51d367d774 100644
--- a/backend/api/v1/org_policy_service.go
+++ b/backend/api/v1/org_policy_service.go
@@ -526,7 +526,7 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(policy *v1pb.Policy) (st
if err := s.licenseService.IsFeatureEnabled(api.FeatureSensitiveData); err != nil {
return "", status.Errorf(codes.PermissionDenied, err.Error())
}
- payload, err := convertToSensitiveDataPolicyPayload(policy.GetSensitiveDataPolicy())
+ payload, err := convertToSensitiveDataPolicyPayload(policy.GetMaskingPolicy())
if err != nil {
return "", status.Errorf(codes.InvalidArgument, err.Error())
}
@@ -761,19 +761,19 @@ func convertToSQLReviewPolicyPayload(policy *v1pb.SQLReviewPolicy) (*advisor.SQL
}, nil
}
-func convertToV1PBSensitiveDataPolicy(payloadStr string) (*v1pb.Policy_SensitiveDataPolicy, error) {
+func convertToV1PBSensitiveDataPolicy(payloadStr string) (*v1pb.Policy_MaskingPolicy, error) {
payload, err := api.UnmarshalSensitiveDataPolicy(payloadStr)
if err != nil {
return nil, err
}
- var sensitiveDataList []*v1pb.SensitiveData
+ var maskDataList []*v1pb.MaskData
for _, data := range payload.SensitiveDataList {
maskType := v1pb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED
if data.Type == api.SensitiveDataMaskTypeDefault {
maskType = v1pb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED
}
- sensitiveDataList = append(sensitiveDataList, &v1pb.SensitiveData{
+ maskDataList = append(maskDataList, &v1pb.MaskData{
Schema: data.Schema,
Table: data.Table,
Column: data.Column,
@@ -782,16 +782,16 @@ func convertToV1PBSensitiveDataPolicy(payloadStr string) (*v1pb.Policy_Sensitive
})
}
- return &v1pb.Policy_SensitiveDataPolicy{
- SensitiveDataPolicy: &v1pb.SensitiveDataPolicy{
- SensitiveData: sensitiveDataList,
+ return &v1pb.Policy_MaskingPolicy{
+ MaskingPolicy: &v1pb.MaskingPolicy{
+ MaskData: maskDataList,
},
}, nil
}
-func convertToSensitiveDataPolicyPayload(policy *v1pb.SensitiveDataPolicy) (*api.SensitiveDataPolicy, error) {
+func convertToSensitiveDataPolicyPayload(policy *v1pb.MaskingPolicy) (*api.SensitiveDataPolicy, error) {
var sensitiveDataList []api.SensitiveData
- for _, data := range policy.SensitiveData {
+ for _, data := range policy.MaskData {
if data.MaskingLevel != v1pb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED {
return nil, errors.Errorf("invalid sensitive data mask type %v", data.MaskingLevel)
}
diff --git a/backend/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.go
index 16489b8591..e55b575979 100644
--- a/backend/tests/sensitive_data_test.go
+++ b/backend/tests/sensitive_data_test.go
@@ -210,9 +210,9 @@ func TestSensitiveData(t *testing.T) {
Parent: database.Name,
Policy: &v1pb.Policy{
Type: v1pb.PolicyType_SENSITIVE_DATA,
- Policy: &v1pb.Policy_SensitiveDataPolicy{
- SensitiveDataPolicy: &v1pb.SensitiveDataPolicy{
- SensitiveData: []*v1pb.SensitiveData{
+ Policy: &v1pb.Policy_MaskingPolicy{
+ MaskingPolicy: &v1pb.MaskingPolicy{
+ MaskData: []*v1pb.MaskData{
{
Table: tableName,
Column: "id",
diff --git a/frontend/src/components/ColumnTable.vue b/frontend/src/components/ColumnTable.vue
index a49e5feb68..cda7822e47 100644
--- a/frontend/src/components/ColumnTable.vue
+++ b/frontend/src/components/ColumnTable.vue
@@ -96,7 +96,7 @@ import { usePolicyV1Store } from "@/store/modules/v1/policy";
import { ComposedDatabase } from "@/types";
import { ColumnMetadata, TableMetadata } from "@/types/proto/store/database";
import { Engine, MaskingLevel } from "@/types/proto/v1/common";
-import { PolicyType, SensitiveData } from "@/types/proto/v1/org_policy_service";
+import { PolicyType, MaskData } from "@/types/proto/v1/org_policy_service";
import { DataClassificationSetting_DataClassificationConfig } from "@/types/proto/v1/setting_service";
import { hasWorkspacePermissionV1 } from "@/utils";
@@ -121,9 +121,9 @@ const props = defineProps({
required: true,
type: Object as PropType<ColumnMetadata[]>,
},
- sensitiveDataList: {
+ maskDataList: {
required: true,
- type: Array as PropType<SensitiveData[]>,
+ type: Array as PropType<MaskData[]>,
},
classificationConfig: {
required: false,
@@ -293,7 +293,7 @@ const columnNameList = computed(() => {
const isSensitiveColumn = (column: ColumnMetadata) => {
return (
- props.sensitiveDataList.findIndex((sensitiveData) => {
+ props.maskDataList.findIndex((sensitiveData) => {
return (
sensitiveData.table === props.table.name &&
sensitiveData.column === column.name
@@ -317,16 +317,16 @@ const toggleSensitiveColumn = (
return;
}
- const index = props.sensitiveDataList.findIndex((sensitiveData) => {
+ const index = props.maskDataList.findIndex((sensitiveData) => {
return (
sensitiveData.table === props.table.name &&
sensitiveData.column === column.name
);
});
- const sensitiveDataList = cloneDeep(props.sensitiveDataList);
+ const maskDataList = cloneDeep(props.maskDataList);
if (on && index < 0) {
// Turn on sensitive
- sensitiveDataList.push({
+ maskDataList.push({
schema: props.schema,
table: props.table.name,
column: column.name,
@@ -334,15 +334,15 @@ const toggleSensitiveColumn = (
maskingLevel: MaskingLevel.MASKING_LEVEL_UNSPECIFIED,
});
} else if (!on && index >= 0) {
- sensitiveDataList.splice(index, 1);
+ maskDataList.splice(index, 1);
}
usePolicyV1Store().upsertPolicy({
parentPath: props.database.name,
policy: {
type: PolicyType.SENSITIVE_DATA,
- sensitiveDataPolicy: {
- sensitiveData: sensitiveDataList,
+ maskingPolicy: {
+ maskData: maskDataList,
},
},
updateMask: ["payload"],
diff --git a/frontend/src/components/TableDetailDrawer.vue b/frontend/src/components/TableDetailDrawer.vue
index a2de0ba0ba..1985c83837 100644
--- a/frontend/src/components/TableDetailDrawer.vue
+++ b/frontend/src/components/TableDetailDrawer.vue
@@ -178,7 +178,7 @@
:schema="schemaName"
:table="table"
:column-list="table.columns"
- :sensitive-data-list="sensitiveDataList"
+ :mask-data-list="sensitiveDataList"
:classification-config="classificationConfig"
/>
</div>
diff --git a/frontend/src/types/proto/google/api/client.ts b/frontend/src/types/proto/google/api/client.ts
index e38085148f..caf22438cf 100644
--- a/frontend/src/types/proto/google/api/client.ts
+++ b/frontend/src/types/proto/google/api/client.ts
@@ -512,11 +512,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;
},
@@ -524,7 +524,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 ?? "";
@@ -698,32 +697,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 ?? "";
@@ -918,36 +930,42 @@ export const Publishing = {
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)) || [];
@@ -1037,22 +1055,27 @@ 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 ?? "";
@@ -1123,15 +1146,18 @@ export const JavaSettings_ServiceClassNamesEntry = {
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 ?? "";
@@ -1181,15 +1207,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)
@@ -1240,15 +1266,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)
@@ -1299,15 +1325,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)
@@ -1358,15 +1384,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)
@@ -1503,34 +1529,35 @@ export const DotnetSettings = {
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;
},
@@ -1538,7 +1565,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)
@@ -1620,15 +1646,18 @@ export const DotnetSettings_RenamedServicesEntry = {
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 ?? "";
@@ -1688,15 +1717,18 @@ export const DotnetSettings_RenamedResourcesEntry = {
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 ?? "";
@@ -1746,15 +1778,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)
@@ -1805,15 +1837,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)
@@ -1877,16 +1909,18 @@ export const MethodSettings = {
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 ?? "";
@@ -1973,20 +2007,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)
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 9d02bb8e58..aeea8d48b5 100644
--- a/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts
+++ b/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts
@@ -1,9 +1,9 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
import { Duration } from "../../../protobuf/duration";
import { NullValue, nullValueFromJSON, nullValueToJSON } from "../../../protobuf/struct";
import { Timestamp } from "../../../protobuf/timestamp";
+import Long = require("long");
export const protobufPackage = "google.api.expr.v1alpha1";
@@ -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 = Math.round(message.id));
- 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 !== 0) {
+ obj.id = Math.round(message.id);
+ }
+ 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 ?? 0;
@@ -686,14 +695,15 @@ export const Expr_Ident = {
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 ?? "";
@@ -766,16 +776,21 @@ export const Expr_Select = {
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)
@@ -852,12 +867,14 @@ export const Expr_Call = {
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)
@@ -943,15 +959,11 @@ export const Expr_CreateList = {
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 +971,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)) || [];
@@ -1024,11 +1035,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 +1047,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 ?? "";
@@ -1132,18 +1142,27 @@ export const Expr_CreateStruct_Entry = {
toJSON(message: Expr_CreateStruct_Entry): unknown {
const obj: any = {};
- message.id !== undefined && (obj.id = Math.round(message.id));
- 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 !== 0) {
+ obj.id = Math.round(message.id);
+ }
+ 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 ?? 0;
@@ -1274,21 +1293,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 ?? "";
@@ -1453,25 +1484,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 = Math.round(message.int64Value));
- message.uint64Value !== undefined && (obj.uint64Value = Math.round(message.uint64Value));
- 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 = Math.round(message.int64Value);
+ }
+ if (message.uint64Value !== undefined) {
+ obj.uint64Value = Math.round(message.uint64Value);
+ }
+ 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;
@@ -1604,24 +1649,32 @@ export const SourceInfo = {
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);
- });
+ const entries = Object.entries(message.positions);
+ if (entries.length > 0) {
+ obj.positions = {};
+ entries.forEach(([k, v]) => {
+ obj.positions[k] = Math.round(v);
+ });
+ }
}
- obj.macroCalls = {};
if (message.macroCalls) {
- Object.entries(message.macroCalls).forEach(([k, v]) => {
- obj.macroCalls[k] = Expr.toJSON(v);
- });
+ const entries = Object.entries(message.macroCalls);
+ if (entries.length > 0) {
+ obj.macroCalls = {};
+ entries.forEach(([k, v]) => {
+ obj.macroCalls[k] = Expr.toJSON(v);
+ });
+ }
}
return obj;
},
@@ -1629,7 +1682,6 @@ export const SourceInfo = {
create(base?: DeepPartial<SourceInfo>): SourceInfo {
return SourceInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SourceInfo>): SourceInfo {
const message = createBaseSourceInfo();
message.syntaxVersion = object.syntaxVersion ?? "";
@@ -1708,15 +1760,18 @@ export const SourceInfo_PositionsEntry = {
toJSON(message: SourceInfo_PositionsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = Math.round(message.key));
- message.value !== undefined && (obj.value = Math.round(message.value));
+ if (message.key !== 0) {
+ obj.key = Math.round(message.key);
+ }
+ 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 ?? 0;
@@ -1779,15 +1834,18 @@ export const SourceInfo_MacroCallsEntry = {
toJSON(message: SourceInfo_MacroCallsEntry): unknown {
const obj: any = {};
- message.key !== undefined && (obj.key = Math.round(message.key));
- message.value !== undefined && (obj.value = message.value ? Expr.toJSON(message.value) : undefined);
+ if (message.key !== 0) {
+ obj.key = Math.round(message.key);
+ }
+ 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 ?? 0;
@@ -1872,17 +1930,24 @@ export const SourcePosition = {
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 ?? "";
@@ -1973,8 +2038,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
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 ac0479a972..ca7d167d07 100644
--- a/frontend/src/types/proto/google/api/http.ts
+++ b/frontend/src/types/proto/google/api/http.ts
@@ -429,20 +429,18 @@ export const Http = {
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)) || [];
@@ -606,20 +604,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;
},
@@ -627,7 +640,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 ?? "";
@@ -697,15 +709,18 @@ export const CustomHttpPattern = {
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 ?? "";
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 5fa56442ad..28a704a6b9 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -1,6 +1,6 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
+import Long = require("long");
export const protobufPackage = "google.protobuf";
@@ -1391,10 +1391,8 @@ export const FileDescriptorSet = {
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 +1400,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)) || [];
@@ -1629,55 +1626,51 @@ export const FileDescriptorProto = {
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 ?? "";
@@ -1864,48 +1857,35 @@ export const DescriptorProto = {
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 +1893,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 ?? "";
@@ -1997,17 +1976,21 @@ export const DescriptorProto_ExtensionRange = {
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;
@@ -2070,15 +2053,18 @@ export const DescriptorProto_ReservedRange = {
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;
@@ -2132,10 +2118,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 +2127,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)) || [];
@@ -2316,24 +2299,45 @@ export const FieldDescriptorProto = {
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 ?? "";
@@ -2407,15 +2411,18 @@ export const OneofDescriptorProto = {
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 ?? "";
@@ -2515,24 +2522,20 @@ export const EnumDescriptorProto = {
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 +2543,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 ?? "";
@@ -2606,15 +2608,18 @@ export const EnumDescriptorProto_EnumReservedRange = {
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;
@@ -2688,17 +2693,21 @@ export const EnumValueDescriptorProto = {
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 ?? "";
@@ -2775,21 +2784,21 @@ export const ServiceDescriptorProto = {
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 ?? "";
@@ -2906,20 +2915,30 @@ export const MethodDescriptorProto = {
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 ?? "";
@@ -3223,31 +3242,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 +3311,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 ?? "";
@@ -3394,17 +3449,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 +3473,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;
@@ -3592,20 +3652,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 +3691,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;
@@ -3676,10 +3753,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 +3762,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)) || [];
@@ -3775,14 +3849,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 +3867,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;
@@ -3857,11 +3933,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 +3945,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;
@@ -3934,11 +4009,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 +4021,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;
@@ -4024,13 +4098,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 +4113,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;
@@ -4165,25 +4239,33 @@ export const UninterpretedOption = {
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 = Math.round(message.positiveIntValue));
- message.negativeIntValue !== undefined && (obj.negativeIntValue = Math.round(message.negativeIntValue));
- 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 !== 0) {
+ obj.positiveIntValue = Math.round(message.positiveIntValue);
+ }
+ if (message.negativeIntValue !== 0) {
+ obj.negativeIntValue = Math.round(message.negativeIntValue);
+ }
+ 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)) || [];
@@ -4251,15 +4333,18 @@ export const UninterpretedOption_NamePart = {
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 ?? "";
@@ -4313,10 +4398,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;
},
@@ -4324,7 +4407,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)) || [];
@@ -4445,22 +4527,20 @@ export const SourceCodeInfo_Location = {
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;
},
@@ -4468,7 +4548,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) || [];
@@ -4525,10 +4604,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;
},
@@ -4536,7 +4613,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)) || [];
@@ -4643,22 +4719,27 @@ export const GeneratedCodeInfo_Annotation = {
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) || [];
@@ -4728,8 +4809,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/google/protobuf/duration.ts b/frontend/src/types/proto/google/protobuf/duration.ts
index f7854f6b36..74aaf597dc 100644
--- a/frontend/src/types/proto/google/protobuf/duration.ts
+++ b/frontend/src/types/proto/google/protobuf/duration.ts
@@ -1,6 +1,6 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
+import Long = require("long");
export const protobufPackage = "google.protobuf";
@@ -136,15 +136,18 @@ export const Duration = {
toJSON(message: Duration): unknown {
const obj: any = {};
- message.seconds !== undefined && (obj.seconds = Math.round(message.seconds));
- message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
+ if (message.seconds !== 0) {
+ obj.seconds = Math.round(message.seconds);
+ }
+ 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 ?? 0;
@@ -186,8 +189,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/google/protobuf/empty.ts b/frontend/src/types/proto/google/protobuf/empty.ts
index e69a5509e2..e0281e48b1 100644
--- a/frontend/src/types/proto/google/protobuf/empty.ts
+++ b/frontend/src/types/proto/google/protobuf/empty.ts
@@ -52,7 +52,6 @@ export const Empty = {
create(base?: DeepPartial<Empty>): Empty {
return Empty.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<Empty>): Empty {
const message = createBaseEmpty();
return message;
diff --git a/frontend/src/types/proto/google/protobuf/field_mask.ts b/frontend/src/types/proto/google/protobuf/field_mask.ts
index d4bb0c27df..ce686e871d 100644
--- a/frontend/src/types/proto/google/protobuf/field_mask.ts
+++ b/frontend/src/types/proto/google/protobuf/field_mask.ts
@@ -260,7 +260,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) || [];
diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.ts
index 3425fd7e3f..89ba0cdf8c 100644
--- a/frontend/src/types/proto/google/protobuf/struct.ts
+++ b/frontend/src/types/proto/google/protobuf/struct.ts
@@ -153,11 +153,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;
},
@@ -165,7 +168,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 }>(
@@ -252,15 +254,18 @@ export const Struct_FieldsEntry = {
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 ?? "";
@@ -374,20 +379,30 @@ export const Value = {
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;
@@ -478,10 +493,8 @@ export const ListValue = {
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;
},
@@ -489,7 +502,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) || [];
diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.ts
index 4dea0b96ec..bb9e014d2f 100644
--- a/frontend/src/types/proto/google/protobuf/timestamp.ts
+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts
@@ -1,6 +1,6 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
+import Long = require("long");
export const protobufPackage = "google.protobuf";
@@ -165,15 +165,18 @@ export const Timestamp = {
toJSON(message: Timestamp): unknown {
const obj: any = {};
- message.seconds !== undefined && (obj.seconds = Math.round(message.seconds));
- message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
+ if (message.seconds !== 0) {
+ obj.seconds = Math.round(message.seconds);
+ }
+ 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 ?? 0;
@@ -215,8 +218,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/google/protobuf/wrappers.ts b/frontend/src/types/proto/google/protobuf/wrappers.ts
index c1ea99fa46..4cffaaa4e1 100644
--- a/frontend/src/types/proto/google/protobuf/wrappers.ts
+++ b/frontend/src/types/proto/google/protobuf/wrappers.ts
@@ -1,6 +1,6 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
+import Long = require("long");
export const protobufPackage = "google.protobuf";
@@ -135,14 +135,15 @@ export const DoubleValue = {
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;
@@ -191,14 +192,15 @@ export const FloatValue = {
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 = Math.round(message.value));
+ if (message.value !== 0) {
+ obj.value = Math.round(message.value);
+ }
return obj;
},
create(base?: DeepPartial<Int64Value>): Int64Value {
return Int64Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Int64Value>): Int64Value {
const message = createBaseInt64Value();
message.value = object.value ?? 0;
@@ -303,14 +306,15 @@ export const UInt64Value = {
toJSON(message: UInt64Value): 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<UInt64Value>): UInt64Value {
return UInt64Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<UInt64Value>): UInt64Value {
const message = createBaseUInt64Value();
message.value = object.value ?? 0;
@@ -359,14 +363,15 @@ export const Int32Value = {
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;
@@ -415,14 +420,15 @@ export const UInt32Value = {
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;
@@ -471,14 +477,15 @@ export const BoolValue = {
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;
@@ -527,14 +534,15 @@ export const StringValue = {
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);
@@ -657,8 +665,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/google/type/expr.ts b/frontend/src/types/proto/google/type/expr.ts
index bb597d8bd3..031f52f277 100644
--- a/frontend/src/types/proto/google/type/expr.ts
+++ b/frontend/src/types/proto/google/type/expr.ts
@@ -136,17 +136,24 @@ export const Expr = {
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 ?? "";
diff --git a/frontend/src/types/proto/store/activity.ts b/frontend/src/types/proto/store/activity.ts
index 485209b351..5b69b9c7a1 100644
--- a/frontend/src/types/proto/store/activity.ts
+++ b/frontend/src/types/proto/store/activity.ts
@@ -1,7 +1,7 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
import { ApprovalStep } from "./approval";
+import Long = require("long");
export const protobufPackage = "bytebase.store";
@@ -224,14 +224,15 @@ export const ActivityIssueCreatePayload = {
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 ?? "";
@@ -328,23 +329,26 @@ export const ActivityIssueCommentCreatePayload = {
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,10 +445,18 @@ export const ActivityIssueCommentCreatePayload_TaskRollbackBy = {
toJSON(message: ActivityIssueCommentCreatePayload_TaskRollbackBy): unknown {
const obj: any = {};
- message.issueId !== undefined && (obj.issueId = Math.round(message.issueId));
- message.taskId !== undefined && (obj.taskId = Math.round(message.taskId));
- message.rollbackByIssueId !== undefined && (obj.rollbackByIssueId = Math.round(message.rollbackByIssueId));
- message.rollbackByTaskId !== undefined && (obj.rollbackByTaskId = Math.round(message.rollbackByTaskId));
+ if (message.issueId !== 0) {
+ obj.issueId = Math.round(message.issueId);
+ }
+ if (message.taskId !== 0) {
+ obj.taskId = Math.round(message.taskId);
+ }
+ if (message.rollbackByIssueId !== 0) {
+ obj.rollbackByIssueId = Math.round(message.rollbackByIssueId);
+ }
+ if (message.rollbackByTaskId !== 0) {
+ obj.rollbackByTaskId = Math.round(message.rollbackByTaskId);
+ }
return obj;
},
@@ -453,7 +465,6 @@ export const ActivityIssueCommentCreatePayload_TaskRollbackBy = {
): ActivityIssueCommentCreatePayload_TaskRollbackBy {
return ActivityIssueCommentCreatePayload_TaskRollbackBy.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<ActivityIssueCommentCreatePayload_TaskRollbackBy>,
): ActivityIssueCommentCreatePayload_TaskRollbackBy {
@@ -536,11 +547,15 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {
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;
},
@@ -549,7 +564,6 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {
): ActivityIssueCommentCreatePayload_ExternalApprovalEvent {
return ActivityIssueCommentCreatePayload_ExternalApprovalEvent.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<ActivityIssueCommentCreatePayload_ExternalApprovalEvent>,
): ActivityIssueCommentCreatePayload_ExternalApprovalEvent {
@@ -607,8 +621,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;
},
@@ -617,7 +632,6 @@ export const ActivityIssueCommentCreatePayload_ApprovalEvent = {
): ActivityIssueCommentCreatePayload_ApprovalEvent {
return ActivityIssueCommentCreatePayload_ApprovalEvent.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<ActivityIssueCommentCreatePayload_ApprovalEvent>,
): ActivityIssueCommentCreatePayload_ApprovalEvent {
@@ -668,15 +682,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)
@@ -719,8 +733,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/store/approval.ts b/frontend/src/types/proto/store/approval.ts
index 9ea5a69f72..f12a3838e2 100644
--- a/frontend/src/types/proto/store/approval.ts
+++ b/frontend/src/types/proto/store/approval.ts
@@ -317,25 +317,24 @@ export const IssuePayloadApproval = {
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)) || [];
@@ -400,15 +399,18 @@ export const IssuePayloadApproval_Approver = {
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;
@@ -493,17 +495,24 @@ export const ApprovalTemplate = {
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)
@@ -557,10 +566,8 @@ export const ApprovalFlow = {
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;
},
@@ -568,7 +575,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)) || [];
@@ -630,11 +636,11 @@ export const ApprovalStep = {
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;
},
@@ -642,7 +648,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;
@@ -727,20 +732,24 @@ export const ApprovalNode = {
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;
diff --git a/frontend/src/types/proto/store/common.ts b/frontend/src/types/proto/store/common.ts
index 9ce5b8a713..a7e19709fb 100644
--- a/frontend/src/types/proto/store/common.ts
+++ b/frontend/src/types/proto/store/common.ts
@@ -120,6 +120,51 @@ export function engineToJSON(object: Engine): string {
}
}
+export enum MaskingLevel {
+ MASKING_LEVEL_UNSPECIFIED = 0,
+ NONE = 1,
+ PARTIAL = 2,
+ FULL = 3,
+ UNRECOGNIZED = -1,
+}
+
+export function maskingLevelFromJSON(object: any): MaskingLevel {
+ switch (object) {
+ case 0:
+ case "MASKING_LEVEL_UNSPECIFIED":
+ return MaskingLevel.MASKING_LEVEL_UNSPECIFIED;
+ case 1:
+ case "NONE":
+ return MaskingLevel.NONE;
+ case 2:
+ case "PARTIAL":
+ return MaskingLevel.PARTIAL;
+ case 3:
+ case "FULL":
+ return MaskingLevel.FULL;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return MaskingLevel.UNRECOGNIZED;
+ }
+}
+
+export function maskingLevelToJSON(object: MaskingLevel): string {
+ switch (object) {
+ case MaskingLevel.MASKING_LEVEL_UNSPECIFIED:
+ return "MASKING_LEVEL_UNSPECIFIED";
+ case MaskingLevel.NONE:
+ return "NONE";
+ case MaskingLevel.PARTIAL:
+ return "PARTIAL";
+ case MaskingLevel.FULL:
+ return "FULL";
+ case MaskingLevel.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
/** Used internally for obfuscating the page token. */
export interface PageToken {
limit: number;
@@ -180,15 +225,18 @@ export const PageToken = {
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;
diff --git a/frontend/src/types/proto/store/data_source.ts b/frontend/src/types/proto/store/data_source.ts
index 0fce9e72b6..214b880244 100644
--- a/frontend/src/types/proto/store/data_source.ts
+++ b/frontend/src/types/proto/store/data_source.ts
@@ -167,22 +167,39 @@ export const DataSourceOptions = {
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;
diff --git a/frontend/src/types/proto/store/database.ts b/frontend/src/types/proto/store/database.ts
index 1085f5344f..a0df273e45 100644
--- a/frontend/src/types/proto/store/database.ts
+++ b/frontend/src/types/proto/store/database.ts
@@ -1,7 +1,7 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
import { StringValue } from "../google/protobuf/wrappers";
+import Long = require("long");
export const protobufPackage = "bytebase.store";
@@ -443,11 +443,14 @@ 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;
+ });
+ }
}
return obj;
},
@@ -455,7 +458,6 @@ export const DatabaseMetadata = {
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]) => {
@@ -519,15 +521,18 @@ export const DatabaseMetadata_LabelsEntry = {
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 ?? "";
@@ -647,28 +652,33 @@ export const DatabaseSchemaMetadata = {
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 ?? "";
@@ -780,31 +790,23 @@ export const SchemaMetadata = {
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;
},
@@ -812,7 +814,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 ?? "";
@@ -978,27 +979,42 @@ export const TaskMetadata = {
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 ?? "";
@@ -1135,21 +1151,36 @@ export const StreamMetadata = {
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 ?? "";
@@ -1367,31 +1398,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 = Math.round(message.rowCount));
- message.dataSize !== undefined && (obj.dataSize = Math.round(message.dataSize));
- message.indexSize !== undefined && (obj.indexSize = Math.round(message.indexSize));
- message.dataFree !== undefined && (obj.dataFree = Math.round(message.dataFree));
- 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 !== 0) {
+ obj.rowCount = Math.round(message.rowCount);
+ }
+ if (message.dataSize !== 0) {
+ obj.dataSize = Math.round(message.dataSize);
+ }
+ if (message.indexSize !== 0) {
+ obj.indexSize = Math.round(message.indexSize);
+ }
+ if (message.dataFree !== 0) {
+ obj.dataFree = Math.round(message.dataFree);
+ }
+ 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;
},
@@ -1399,7 +1446,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 ?? "";
@@ -1573,23 +1619,42 @@ 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.default !== undefined && (obj.default = message.default);
- 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.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 ?? "";
@@ -1684,13 +1749,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;
},
@@ -1698,7 +1767,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 ?? "";
@@ -1774,16 +1842,21 @@ export const DependentColumn = {
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 ?? "";
@@ -1847,15 +1920,18 @@ export const FunctionMetadata = {
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 ?? "";
@@ -1973,24 +2049,33 @@ export const IndexMetadata = {
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 ?? "";
@@ -2080,17 +2165,24 @@ export const ExtensionMetadata = {
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 ?? "";
@@ -2232,29 +2324,36 @@ export const ForeignKeyMetadata = {
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 ?? "";
@@ -2323,15 +2422,18 @@ export const InstanceRoleMetadata = {
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 ?? "";
@@ -2381,10 +2483,8 @@ export const Secrets = {
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;
},
@@ -2392,7 +2492,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)) || [];
@@ -2465,16 +2564,21 @@ export const SecretItem = {
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 ?? "";
@@ -2517,8 +2621,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/store/idp.ts b/frontend/src/types/proto/store/idp.ts
index f3fb775e64..6e59c7604f 100644
--- a/frontend/src/types/proto/store/idp.ts
+++ b/frontend/src/types/proto/store/idp.ts
@@ -260,19 +260,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)
@@ -429,27 +431,39 @@ export const OAuth2IdentityProviderConfig = {
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 ?? "";
@@ -565,20 +579,30 @@ export const OIDCIdentityProviderConfig = {
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 ?? "";
@@ -734,23 +758,39 @@ export const LDAPIdentityProviderConfig = {
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 ?? "";
@@ -844,17 +884,24 @@ export const FieldMapping = {
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 ?? "";
@@ -941,17 +988,24 @@ export const IdentityProviderUserInfo = {
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 ?? "";
diff --git a/frontend/src/types/proto/store/instance.ts b/frontend/src/types/proto/store/instance.ts
index 53460293cc..fe5986c1d9 100644
--- a/frontend/src/types/proto/store/instance.ts
+++ b/frontend/src/types/proto/store/instance.ts
@@ -62,14 +62,15 @@ export const InstanceOptions = {
toJSON(message: InstanceOptions): unknown {
const obj: any = {};
- message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);
+ if (message.schemaTenantMode === true) {
+ obj.schemaTenantMode = message.schemaTenantMode;
+ }
return obj;
},
create(base?: DeepPartial<InstanceOptions>): InstanceOptions {
return InstanceOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {
const message = createBaseInstanceOptions();
message.schemaTenantMode = object.schemaTenantMode ?? false;
@@ -120,15 +121,15 @@ export const InstanceMetadata = {
toJSON(message: InstanceMetadata): unknown {
const obj: any = {};
- message.mysqlLowerCaseTableNames !== undefined &&
- (obj.mysqlLowerCaseTableNames = Math.round(message.mysqlLowerCaseTableNames));
+ if (message.mysqlLowerCaseTableNames !== 0) {
+ obj.mysqlLowerCaseTableNames = Math.round(message.mysqlLowerCaseTableNames);
+ }
return obj;
},
create(base?: DeepPartial<InstanceMetadata>): InstanceMetadata {
return InstanceMetadata.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceMetadata>): InstanceMetadata {
const message = createBaseInstanceMetadata();
message.mysqlLowerCaseTableNames = object.mysqlLowerCaseTableNames ?? 0;
diff --git a/frontend/src/types/proto/store/instance_change_history.ts b/frontend/src/types/proto/store/instance_change_history.ts
index f881e87225..3760fd19bf 100644
--- a/frontend/src/types/proto/store/instance_change_history.ts
+++ b/frontend/src/types/proto/store/instance_change_history.ts
@@ -81,17 +81,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)
@@ -149,10 +150,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;
},
@@ -160,7 +159,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)) || [];
@@ -222,11 +220,11 @@ export const ChangedResourceDatabase = {
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;
},
@@ -234,7 +232,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 ?? "";
@@ -297,11 +294,11 @@ export const ChangedResourceSchema = {
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;
},
@@ -309,7 +306,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 ?? "";
@@ -359,14 +355,15 @@ export const ChangedResourceTable = {
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 ?? "";
diff --git a/frontend/src/types/proto/store/issue.ts b/frontend/src/types/proto/store/issue.ts
index ee8ef1bb3c..ce47001a8b 100644
--- a/frontend/src/types/proto/store/issue.ts
+++ b/frontend/src/types/proto/store/issue.ts
@@ -91,18 +91,21 @@ 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);
- message.grouping !== undefined && (obj.grouping = message.grouping ? Grouping.toJSON(message.grouping) : undefined);
+ if (message.approval !== undefined) {
+ obj.approval = IssuePayloadApproval.toJSON(message.approval);
+ }
+ if (message.grantRequest !== undefined) {
+ obj.grantRequest = GrantRequest.toJSON(message.grantRequest);
+ }
+ if (message.grouping !== undefined) {
+ obj.grouping = Grouping.toJSON(message.grouping);
+ }
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)
@@ -159,14 +162,15 @@ export const Grouping = {
toJSON(message: Grouping): unknown {
const obj: any = {};
- message.databaseGroupName !== undefined && (obj.databaseGroupName = message.databaseGroupName);
+ if (message.databaseGroupName !== "") {
+ obj.databaseGroupName = message.databaseGroupName;
+ }
return obj;
},
create(base?: DeepPartial<Grouping>): Grouping {
return Grouping.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Grouping>): Grouping {
const message = createBaseGrouping();
message.databaseGroupName = object.databaseGroupName ?? "";
@@ -250,18 +254,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 ?? "";
diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.ts
index dd8b968c4e..46c5f49797 100644
--- a/frontend/src/types/proto/store/plan.ts
+++ b/frontend/src/types/proto/store/plan.ts
@@ -227,10 +227,8 @@ export const PlanConfig = {
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;
},
@@ -238,7 +236,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)) || [];
@@ -287,10 +284,8 @@ export const PlanConfig_Step = {
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;
},
@@ -298,7 +293,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)) || [];
@@ -407,24 +401,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;
@@ -592,19 +589,38 @@ 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);
- 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.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;
},
@@ -612,7 +628,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 ?? "";
@@ -684,15 +699,18 @@ export const PlanConfig_CreateDatabaseConfig_LabelsEntry = {
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 {
@@ -803,21 +821,30 @@ 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);
+ 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);
+ }
return obj;
},
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 ?? "";
@@ -889,8 +916,12 @@ export const PlanConfig_ChangeDatabaseConfig_RollbackDetail = {
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;
},
@@ -899,7 +930,6 @@ export const PlanConfig_ChangeDatabaseConfig_RollbackDetail = {
): PlanConfig_ChangeDatabaseConfig_RollbackDetail {
return PlanConfig_ChangeDatabaseConfig_RollbackDetail.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<PlanConfig_ChangeDatabaseConfig_RollbackDetail>,
): PlanConfig_ChangeDatabaseConfig_RollbackDetail {
@@ -988,19 +1018,24 @@ export const PlanConfig_RestoreDatabaseConfig = {
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 ?? "";
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index 98822171cc..a224bf05bf 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -1,7 +1,7 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
import { ChangedResources } from "./instance_change_history";
+import Long = require("long");
export const protobufPackage = "bytebase.store";
@@ -223,22 +223,24 @@ 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.databaseTarget !== undefined && (obj.databaseTarget = message.databaseTarget
- ? PlanCheckRunConfig_DatabaseTarget.toJSON(message.databaseTarget)
- : undefined);
- message.databaseGroupTarget !== undefined && (obj.databaseGroupTarget = message.databaseGroupTarget
- ? PlanCheckRunConfig_DatabaseGroupTarget.toJSON(message.databaseGroupTarget)
- : undefined);
+ if (message.sheetUid !== 0) {
+ obj.sheetUid = Math.round(message.sheetUid);
+ }
+ if (message.changeDatabaseType !== 0) {
+ obj.changeDatabaseType = planCheckRunConfig_ChangeDatabaseTypeToJSON(message.changeDatabaseType);
+ }
+ if (message.databaseTarget !== undefined) {
+ obj.databaseTarget = PlanCheckRunConfig_DatabaseTarget.toJSON(message.databaseTarget);
+ }
+ if (message.databaseGroupTarget !== undefined) {
+ obj.databaseGroupTarget = PlanCheckRunConfig_DatabaseGroupTarget.toJSON(message.databaseGroupTarget);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {
return PlanCheckRunConfig.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {
const message = createBasePlanCheckRunConfig();
message.sheetUid = object.sheetUid ?? 0;
@@ -307,15 +309,18 @@ export const PlanCheckRunConfig_DatabaseTarget = {
toJSON(message: PlanCheckRunConfig_DatabaseTarget): unknown {
const obj: any = {};
- message.instanceUid !== undefined && (obj.instanceUid = Math.round(message.instanceUid));
- message.databaseName !== undefined && (obj.databaseName = message.databaseName);
+ if (message.instanceUid !== 0) {
+ obj.instanceUid = Math.round(message.instanceUid);
+ }
+ if (message.databaseName !== "") {
+ obj.databaseName = message.databaseName;
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunConfig_DatabaseTarget>): PlanCheckRunConfig_DatabaseTarget {
return PlanCheckRunConfig_DatabaseTarget.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunConfig_DatabaseTarget>): PlanCheckRunConfig_DatabaseTarget {
const message = createBasePlanCheckRunConfig_DatabaseTarget();
message.instanceUid = object.instanceUid ?? 0;
@@ -365,14 +370,15 @@ export const PlanCheckRunConfig_DatabaseGroupTarget = {
toJSON(message: PlanCheckRunConfig_DatabaseGroupTarget): unknown {
const obj: any = {};
- message.databaseGroupUid !== undefined && (obj.databaseGroupUid = Math.round(message.databaseGroupUid));
+ if (message.databaseGroupUid !== 0) {
+ obj.databaseGroupUid = Math.round(message.databaseGroupUid);
+ }
return obj;
},
create(base?: DeepPartial<PlanCheckRunConfig_DatabaseGroupTarget>): PlanCheckRunConfig_DatabaseGroupTarget {
return PlanCheckRunConfig_DatabaseGroupTarget.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<PlanCheckRunConfig_DatabaseGroupTarget>): PlanCheckRunConfig_DatabaseGroupTarget {
const message = createBasePlanCheckRunConfig_DatabaseGroupTarget();
message.databaseGroupUid = object.databaseGroupUid ?? 0;
@@ -436,19 +442,18 @@ export const PlanCheckRunResult = {
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)) || [];
@@ -559,23 +564,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;
@@ -668,22 +680,24 @@ export const PlanCheckRunResult_Result_SqlSummaryReport = {
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 {
@@ -774,17 +788,24 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
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 {
@@ -830,8 +851,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/store/policy.ts b/frontend/src/types/proto/store/policy.ts
index 29064a81a0..9478664a41 100644
--- a/frontend/src/types/proto/store/policy.ts
+++ b/frontend/src/types/proto/store/policy.ts
@@ -1,6 +1,7 @@
/* eslint-disable */
import * as _m0 from "protobufjs/minimal";
import { Expr } from "../google/type/expr";
+import { MaskingLevel, maskingLevelFromJSON, maskingLevelToJSON } from "./common";
export const protobufPackage = "bytebase.store";
@@ -32,6 +33,18 @@ export interface Binding {
condition?: Expr | undefined;
}
+export interface MaskingPolicy {
+ maskData: MaskData[];
+}
+
+export interface MaskData {
+ schema: string;
+ table: string;
+ column: string;
+ semanticCategoryId: string;
+ maskingLevel: MaskingLevel;
+}
+
function createBaseIamPolicy(): IamPolicy {
return { bindings: [] };
}
@@ -73,10 +86,8 @@ export const IamPolicy = {
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;
},
@@ -84,7 +95,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)) || [];
@@ -157,20 +167,21 @@ 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);
}
- 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 ?? "";
@@ -182,6 +193,182 @@ export const Binding = {
},
};
+function createBaseMaskingPolicy(): MaskingPolicy {
+ return { maskData: [] };
+}
+
+export const MaskingPolicy = {
+ encode(message: MaskingPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.maskData) {
+ MaskData.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): MaskingPolicy {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMaskingPolicy();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.maskData.push(MaskData.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): MaskingPolicy {
+ return { maskData: Array.isArray(object?.maskData) ? object.maskData.map((e: any) => MaskData.fromJSON(e)) : [] };
+ },
+
+ toJSON(message: MaskingPolicy): unknown {
+ const obj: any = {};
+ if (message.maskData?.length) {
+ obj.maskData = message.maskData.map((e) => MaskData.toJSON(e));
+ }
+ return obj;
+ },
+
+ 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)) || [];
+ return message;
+ },
+};
+
+function createBaseMaskData(): MaskData {
+ return { schema: "", table: "", column: "", semanticCategoryId: "", maskingLevel: 0 };
+}
+
+export const MaskData = {
+ encode(message: MaskData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.schema !== "") {
+ writer.uint32(10).string(message.schema);
+ }
+ if (message.table !== "") {
+ writer.uint32(18).string(message.table);
+ }
+ if (message.column !== "") {
+ writer.uint32(26).string(message.column);
+ }
+ if (message.semanticCategoryId !== "") {
+ writer.uint32(34).string(message.semanticCategoryId);
+ }
+ if (message.maskingLevel !== 0) {
+ writer.uint32(40).int32(message.maskingLevel);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): MaskData {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMaskData();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.schema = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.table = reader.string();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.column = reader.string();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.semanticCategoryId = reader.string();
+ continue;
+ case 5:
+ if (tag !== 40) {
+ break;
+ }
+
+ message.maskingLevel = reader.int32() as any;
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ 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) : "",
+ semanticCategoryId: isSet(object.semanticCategoryId) ? String(object.semanticCategoryId) : "",
+ maskingLevel: isSet(object.maskingLevel) ? maskingLevelFromJSON(object.maskingLevel) : 0,
+ };
+ },
+
+ toJSON(message: MaskData): unknown {
+ const obj: any = {};
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
+ if (message.semanticCategoryId !== "") {
+ obj.semanticCategoryId = message.semanticCategoryId;
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<MaskData>): MaskData {
+ return MaskData.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<MaskData>): MaskData {
+ const message = createBaseMaskData();
+ message.schema = object.schema ?? "";
+ message.table = object.table ?? "";
+ message.column = object.column ?? "";
+ message.semanticCategoryId = object.semanticCategoryId ?? "";
+ message.maskingLevel = object.maskingLevel ?? 0;
+ return message;
+ },
+};
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.ts
index b7c0efd281..8f3a08cb95 100644
--- a/frontend/src/types/proto/store/setting.ts
+++ b/frontend/src/types/proto/store/setting.ts
@@ -360,25 +360,30 @@ 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.refreshTokenDuration !== undefined && (obj.refreshTokenDuration = message.refreshTokenDuration
- ? Duration.toJSON(message.refreshTokenDuration)
- : 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.refreshTokenDuration !== undefined) {
+ obj.refreshTokenDuration = Duration.toJSON(message.refreshTokenDuration);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
return WorkspaceProfileSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
const message = createBaseWorkspaceProfileSetting();
message.externalUrl = object.externalUrl ?? "";
@@ -444,15 +449,18 @@ export const AgentPluginSetting = {
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 ?? "";
@@ -506,10 +514,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;
},
@@ -517,7 +523,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)) || [];
@@ -590,18 +595,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)
@@ -660,10 +668,8 @@ export const ExternalApprovalSetting = {
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;
},
@@ -671,7 +677,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)) || [];
@@ -744,16 +749,21 @@ export const ExternalApprovalSetting_Node = {
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 ?? "";
@@ -918,24 +928,42 @@ export const SMTPMailDeliverySetting = {
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 ?? "";
@@ -1010,17 +1038,11 @@ 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.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));
}
return obj;
},
@@ -1028,7 +1050,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)) ||
@@ -1114,17 +1135,24 @@ 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);
+ 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);
+ }
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 ?? "";
@@ -1202,12 +1230,14 @@ export const SchemaTemplateSetting_ColumnType = {
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;
},
@@ -1215,7 +1245,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;
@@ -1270,12 +1299,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;
},
@@ -1283,7 +1308,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)) ||
@@ -1389,20 +1413,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;
},
@@ -1412,7 +1439,6 @@ export const DataClassificationSetting_DataClassificationConfig = {
): DataClassificationSetting_DataClassificationConfig {
return DataClassificationSetting_DataClassificationConfig.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig>,
): DataClassificationSetting_DataClassificationConfig {
@@ -1512,10 +1538,18 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
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);
- message.sensitive !== undefined && (obj.sensitive = message.sensitive);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.sensitive === true) {
+ obj.sensitive = message.sensitive;
+ }
return obj;
},
@@ -1524,7 +1558,6 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
): DataClassificationSetting_DataClassificationConfig_Level {
return DataClassificationSetting_DataClassificationConfig_Level.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_Level>,
): DataClassificationSetting_DataClassificationConfig_Level {
@@ -1619,10 +1652,18 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
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;
},
@@ -1631,7 +1672,6 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
): DataClassificationSetting_DataClassificationConfig_DataClassification {
return DataClassificationSetting_DataClassificationConfig_DataClassification.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_DataClassification>,
): DataClassificationSetting_DataClassificationConfig_DataClassification {
@@ -1712,10 +1752,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;
},
@@ -1724,7 +1766,6 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
return DataClassificationSetting_DataClassificationConfig_ClassificationEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_ClassificationEntry>,
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
@@ -1782,12 +1823,8 @@ export const SemanticCategorySetting = {
toJSON(message: SemanticCategorySetting): unknown {
const obj: any = {};
- if (message.categories) {
- obj.categories = message.categories.map((e) =>
- e ? SemanticCategorySetting_SemanticCategory.toJSON(e) : undefined
- );
- } else {
- obj.categories = [];
+ if (message.categories?.length) {
+ obj.categories = message.categories.map((e) => SemanticCategorySetting_SemanticCategory.toJSON(e));
}
return obj;
},
@@ -1795,7 +1832,6 @@ export const SemanticCategorySetting = {
create(base?: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {
return SemanticCategorySetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {
const message = createBaseSemanticCategorySetting();
message.categories = object.categories?.map((e) => SemanticCategorySetting_SemanticCategory.fromPartial(e)) || [];
@@ -1868,16 +1904,21 @@ export const SemanticCategorySetting_SemanticCategory = {
toJSON(message: SemanticCategorySetting_SemanticCategory): 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;
},
create(base?: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {
return SemanticCategorySetting_SemanticCategory.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {
const message = createBaseSemanticCategorySetting_SemanticCategory();
message.id = object.id ?? "";
diff --git a/frontend/src/types/proto/store/sheet.ts b/frontend/src/types/proto/store/sheet.ts
index b51b6361b8..8c518c2f6b 100644
--- a/frontend/src/types/proto/store/sheet.ts
+++ b/frontend/src/types/proto/store/sheet.ts
@@ -1,7 +1,7 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
import { Engine, engineFromJSON, engineToJSON } from "./common";
+import Long = require("long");
export const protobufPackage = "bytebase.store";
@@ -193,23 +193,24 @@ 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);
- if (message.usedByIssues) {
- obj.usedByIssues = message.usedByIssues.map((e) => e ? SheetPayload_UsedByIssue.toJSON(e) : undefined);
- } else {
- obj.usedByIssues = [];
- }
- message.schemaDesign !== undefined &&
- (obj.schemaDesign = message.schemaDesign ? SheetPayload_SchemaDesign.toJSON(message.schemaDesign) : undefined);
+ if (message.type !== 0) {
+ obj.type = sheetPayload_TypeToJSON(message.type);
+ }
+ if (message.vcsPayload !== undefined) {
+ obj.vcsPayload = SheetPayload_VCSPayload.toJSON(message.vcsPayload);
+ }
+ if (message.usedByIssues?.length) {
+ obj.usedByIssues = message.usedByIssues.map((e) => SheetPayload_UsedByIssue.toJSON(e));
+ }
+ if (message.schemaDesign !== undefined) {
+ obj.schemaDesign = SheetPayload_SchemaDesign.toJSON(message.schemaDesign);
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload>): SheetPayload {
return SheetPayload.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload>): SheetPayload {
const message = createBaseSheetPayload();
message.type = object.type ?? 0;
@@ -322,19 +323,30 @@ 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 = Math.round(message.size));
- message.author !== undefined && (obj.author = message.author);
- message.lastCommitId !== undefined && (obj.lastCommitId = message.lastCommitId);
- message.lastSyncTs !== undefined && (obj.lastSyncTs = Math.round(message.lastSyncTs));
+ if (message.fileName !== "") {
+ obj.fileName = message.fileName;
+ }
+ if (message.filePath !== "") {
+ obj.filePath = message.filePath;
+ }
+ if (message.size !== 0) {
+ obj.size = Math.round(message.size);
+ }
+ if (message.author !== "") {
+ obj.author = message.author;
+ }
+ if (message.lastCommitId !== "") {
+ obj.lastCommitId = message.lastCommitId;
+ }
+ if (message.lastSyncTs !== 0) {
+ obj.lastSyncTs = Math.round(message.lastSyncTs);
+ }
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 ?? "";
@@ -401,15 +413,18 @@ export const SheetPayload_UsedByIssue = {
toJSON(message: SheetPayload_UsedByIssue): unknown {
const obj: any = {};
- message.issueId !== undefined && (obj.issueId = Math.round(message.issueId));
- message.issueTitle !== undefined && (obj.issueTitle = message.issueTitle);
+ if (message.issueId !== 0) {
+ obj.issueId = Math.round(message.issueId);
+ }
+ if (message.issueTitle !== "") {
+ obj.issueTitle = message.issueTitle;
+ }
return obj;
},
create(base?: DeepPartial<SheetPayload_UsedByIssue>): SheetPayload_UsedByIssue {
return SheetPayload_UsedByIssue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SheetPayload_UsedByIssue>): SheetPayload_UsedByIssue {
const message = createBaseSheetPayload_UsedByIssue();
message.issueId = object.issueId ?? 0;
@@ -494,17 +509,24 @@ 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);
+ 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;
+ }
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;
@@ -548,8 +570,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/store/slow_query.ts b/frontend/src/types/proto/store/slow_query.ts
index 1d3942c937..652a986bfe 100644
--- a/frontend/src/types/proto/store/slow_query.ts
+++ b/frontend/src/types/proto/store/slow_query.ts
@@ -1,8 +1,8 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
import { Duration } from "../google/protobuf/duration";
import { Timestamp } from "../google/protobuf/timestamp";
+import Long = require("long");
export const protobufPackage = "bytebase.store";
@@ -107,10 +107,8 @@ export const SlowQueryStatistics = {
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 +116,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)) || [];
@@ -279,21 +276,35 @@ export const SlowQueryStatisticsItem = {
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 +312,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 ?? "";
@@ -420,20 +430,30 @@ export const SlowQueryDetails = {
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;
@@ -505,8 +525,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/store/task_run.ts b/frontend/src/types/proto/store/task_run.ts
index a84f8206f9..1e99114c8a 100644
--- a/frontend/src/types/proto/store/task_run.ts
+++ b/frontend/src/types/proto/store/task_run.ts
@@ -75,16 +75,21 @@ export const TaskRunResult = {
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 ?? "";
diff --git a/frontend/src/types/proto/store/user.ts b/frontend/src/types/proto/store/user.ts
index 7a639bbcb4..bdb9539359 100644
--- a/frontend/src/types/proto/store/user.ts
+++ b/frontend/src/types/proto/store/user.ts
@@ -93,17 +93,17 @@ export const MFAConfig = {
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.tempRecoveryCodes) {
- obj.tempRecoveryCodes = message.tempRecoveryCodes.map((e) => e);
- } else {
- obj.tempRecoveryCodes = [];
+ if (message.recoveryCodes?.length) {
+ obj.recoveryCodes = message.recoveryCodes;
+ }
+ if (message.tempRecoveryCodes?.length) {
+ obj.tempRecoveryCodes = message.tempRecoveryCodes;
}
return obj;
},
@@ -111,7 +111,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 ?? "";
diff --git a/frontend/src/types/proto/store/vcs.ts b/frontend/src/types/proto/store/vcs.ts
index fcb21b72c9..36cc9d0412 100644
--- a/frontend/src/types/proto/store/vcs.ts
+++ b/frontend/src/types/proto/store/vcs.ts
@@ -1,6 +1,6 @@
/* eslint-disable */
-import * as Long from "long";
import * as _m0 from "protobufjs/minimal";
+import Long = require("long");
export const protobufPackage = "bytebase.store";
@@ -251,29 +251,45 @@ export const PushEvent = {
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;
@@ -434,22 +450,32 @@ export const Commit = {
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 = Math.round(message.createdTs));
- 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 !== 0) {
+ obj.createdTs = Math.round(message.createdTs);
+ }
+ 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;
},
@@ -457,7 +483,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 ?? "";
@@ -593,21 +618,36 @@ export const FileCommit = {
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 = Math.round(message.createdTs));
- 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 !== 0) {
+ obj.createdTs = Math.round(message.createdTs);
+ }
+ 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 ?? "";
@@ -655,8 +695,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/v1/actuator_service.ts b/frontend/src/types/proto/v1/actuator_service.ts
index c8d62b9629..e7d6836d25 100644
--- a/frontend/src/types/proto/v1/actuator_service.ts
+++ b/frontend/src/types/proto/v1/actuator_service.ts
@@ -140,7 +140,6 @@ export const GetActuatorInfoRequest = {
create(base?: DeepPartial<GetActuatorInfoRequest>): GetActuatorInfoRequest {
return GetActuatorInfoRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<GetActuatorInfoRequest>): GetActuatorInfoRequest {
const message = createBaseGetActuatorInfoRequest();
return message;
@@ -201,16 +200,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)
@@ -275,15 +276,18 @@ export const ListDebugLogRequest = {
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;
@@ -346,19 +350,18 @@ export const ListDebugLogResponse = {
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)) || [];
@@ -454,18 +457,27 @@ export const DebugLog = {
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;
@@ -514,7 +526,6 @@ export const DeleteCacheRequest = {
create(base?: DeepPartial<DeleteCacheRequest>): DeleteCacheRequest {
return DeleteCacheRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<DeleteCacheRequest>): DeleteCacheRequest {
const message = createBaseDeleteCacheRequest();
return message;
@@ -748,30 +759,60 @@ export const ActuatorInfo = {
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);
- message.developmentUseV2Scheduler !== undefined &&
- (obj.developmentUseV2Scheduler = message.developmentUseV2Scheduler);
+ 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;
+ }
+ if (message.developmentUseV2Scheduler === true) {
+ obj.developmentUseV2Scheduler = message.developmentUseV2Scheduler;
+ }
return obj;
},
create(base?: DeepPartial<ActuatorInfo>): ActuatorInfo {
return ActuatorInfo.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ActuatorInfo>): ActuatorInfo {
const message = createBaseActuatorInfo();
message.version = object.version ?? "";
diff --git a/frontend/src/types/proto/v1/anomaly_service.ts b/frontend/src/types/proto/v1/anomaly_service.ts
index efdcaddbb3..c1a4eaf3ce 100644
--- a/frontend/src/types/proto/v1/anomaly_service.ts
+++ b/frontend/src/types/proto/v1/anomaly_service.ts
@@ -313,16 +313,21 @@ export const SearchAnomaliesRequest = {
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 ?? "";
@@ -386,19 +391,18 @@ export const SearchAnomaliesResponse = {
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)) || [];
@@ -577,36 +581,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 ?? "";
@@ -679,14 +691,15 @@ export const Anomaly_InstanceConnectionDetail = {
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 ?? "";
@@ -735,14 +748,15 @@ export const Anomaly_DatabaseConnectionDetail = {
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 ?? "";
@@ -815,17 +829,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 +909,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;
@@ -974,16 +994,21 @@ export const Anomaly_DatabaseSchemaDriftDetail = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/auth_service.ts b/frontend/src/types/proto/v1/auth_service.ts
index 89d7600899..e7be817b27 100644
--- a/frontend/src/types/proto/v1/auth_service.ts
+++ b/frontend/src/types/proto/v1/auth_service.ts
@@ -297,14 +297,15 @@ export const GetUserRequest = {
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 ?? "";
@@ -377,16 +378,21 @@ export const ListUsersRequest = {
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;
@@ -450,19 +456,18 @@ export const ListUsersResponse = {
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;
@@ -620,18 +626,27 @@ export const UpdateUserRequest = {
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;
@@ -684,14 +699,15 @@ export const DeleteUserRequest = {
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 ?? "";
@@ -740,14 +756,15 @@ export const UndeleteUserRequest = {
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 ?? "";
@@ -884,22 +901,36 @@ export const LoginRequest = {
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 +1003,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)
@@ -1037,14 +1068,15 @@ export const OAuth2IdentityProviderContext = {
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 +1121,6 @@ export const OIDCIdentityProviderContext = {
create(base?: DeepPartial<OIDCIdentityProviderContext>): OIDCIdentityProviderContext {
return OIDCIdentityProviderContext.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<OIDCIdentityProviderContext>): OIDCIdentityProviderContext {
const message = createBaseOIDCIdentityProviderContext();
return message;
@@ -1150,15 +1181,18 @@ export const LoginResponse = {
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 +1238,6 @@ export const LogoutRequest = {
create(base?: DeepPartial<LogoutRequest>): LogoutRequest {
return LogoutRequest.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<LogoutRequest>): LogoutRequest {
const message = createBaseLogoutRequest();
return message;
@@ -1388,29 +1421,48 @@ export const User = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/bookmark_service.ts b/frontend/src/types/proto/v1/bookmark_service.ts
index 6a785ea209..bc3e508fd7 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)
@@ -162,14 +163,15 @@ export const DeleteBookmarkRequest = {
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 ?? "";
@@ -231,15 +233,18 @@ export const ListBookmarksRequest = {
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;
@@ -302,19 +307,18 @@ export const ListBookmarksResponse = {
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)) || [];
@@ -388,16 +392,21 @@ export const Bookmark = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/cel_service.ts b/frontend/src/types/proto/v1/cel_service.ts
index 8b8d546fff..86f898d628 100644
--- a/frontend/src/types/proto/v1/cel_service.ts
+++ b/frontend/src/types/proto/v1/cel_service.ts
@@ -62,14 +62,15 @@ export const ParseRequest = {
toJSON(message: ParseRequest): unknown {
const obj: any = {};
- message.expression !== undefined && (obj.expression = message.expression);
+ if (message.expression !== "") {
+ obj.expression = message.expression;
+ }
return obj;
},
create(base?: DeepPartial<ParseRequest>): ParseRequest {
return ParseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ParseRequest>): ParseRequest {
const message = createBaseParseRequest();
message.expression = object.expression ?? "";
@@ -118,15 +119,15 @@ export const ParseResponse = {
toJSON(message: ParseResponse): unknown {
const obj: any = {};
- message.expression !== undefined &&
- (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);
+ if (message.expression !== undefined) {
+ obj.expression = ParsedExpr.toJSON(message.expression);
+ }
return obj;
},
create(base?: DeepPartial<ParseResponse>): ParseResponse {
return ParseResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ParseResponse>): ParseResponse {
const message = createBaseParseResponse();
message.expression = (object.expression !== undefined && object.expression !== null)
@@ -177,15 +178,15 @@ export const DeparseRequest = {
toJSON(message: DeparseRequest): unknown {
const obj: any = {};
- message.expression !== undefined &&
- (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);
+ if (message.expression !== undefined) {
+ obj.expression = ParsedExpr.toJSON(message.expression);
+ }
return obj;
},
create(base?: DeepPartial<DeparseRequest>): DeparseRequest {
return DeparseRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeparseRequest>): DeparseRequest {
const message = createBaseDeparseRequest();
message.expression = (object.expression !== undefined && object.expression !== null)
@@ -236,14 +237,15 @@ export const DeparseResponse = {
toJSON(message: DeparseResponse): unknown {
const obj: any = {};
- message.expression !== undefined && (obj.expression = message.expression);
+ if (message.expression !== "") {
+ obj.expression = message.expression;
+ }
return obj;
},
create(base?: DeepPartial<DeparseResponse>): DeparseResponse {
return DeparseResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DeparseResponse>): DeparseResponse {
const message = createBaseDeparseResponse();
message.expression = object.expression ?? "";
diff --git a/frontend/src/types/proto/v1/database_edit.ts b/frontend/src/types/proto/v1/database_edit.ts
index c67e70f87d..0ce904ec12 100644
--- a/frontend/src/types/proto/v1/database_edit.ts
+++ b/frontend/src/types/proto/v1/database_edit.ts
@@ -284,40 +284,26 @@ export const DatabaseEdit = {
toJSON(message: DatabaseEdit): unknown {
const obj: any = {};
- if (message.createSchemaContexts) {
- obj.createSchemaContexts = message.createSchemaContexts.map((e) => e ? CreateSchemaContext.toJSON(e) : undefined);
- } else {
- obj.createSchemaContexts = [];
- }
- if (message.renameSchemaContexts) {
- obj.renameSchemaContexts = message.renameSchemaContexts.map((e) => e ? RenameSchemaContext.toJSON(e) : undefined);
- } else {
- obj.renameSchemaContexts = [];
- }
- if (message.dropSchemaContexts) {
- obj.dropSchemaContexts = message.dropSchemaContexts.map((e) => e ? DropSchemaContext.toJSON(e) : undefined);
- } else {
- obj.dropSchemaContexts = [];
- }
- if (message.createTableContexts) {
- obj.createTableContexts = message.createTableContexts.map((e) => e ? CreateTableContext.toJSON(e) : undefined);
- } else {
- obj.createTableContexts = [];
- }
- if (message.alterTableContexts) {
- obj.alterTableContexts = message.alterTableContexts.map((e) => e ? AlterTableContext.toJSON(e) : undefined);
- } else {
- obj.alterTableContexts = [];
- }
- if (message.renameTableContexts) {
- obj.renameTableContexts = message.renameTableContexts.map((e) => e ? RenameTableContext.toJSON(e) : undefined);
- } else {
- obj.renameTableContexts = [];
- }
- if (message.dropTableContexts) {
- obj.dropTableContexts = message.dropTableContexts.map((e) => e ? DropTableContext.toJSON(e) : undefined);
- } else {
- obj.dropTableContexts = [];
+ if (message.createSchemaContexts?.length) {
+ obj.createSchemaContexts = message.createSchemaContexts.map((e) => CreateSchemaContext.toJSON(e));
+ }
+ if (message.renameSchemaContexts?.length) {
+ obj.renameSchemaContexts = message.renameSchemaContexts.map((e) => RenameSchemaContext.toJSON(e));
+ }
+ if (message.dropSchemaContexts?.length) {
+ obj.dropSchemaContexts = message.dropSchemaContexts.map((e) => DropSchemaContext.toJSON(e));
+ }
+ if (message.createTableContexts?.length) {
+ obj.createTableContexts = message.createTableContexts.map((e) => CreateTableContext.toJSON(e));
+ }
+ if (message.alterTableContexts?.length) {
+ obj.alterTableContexts = message.alterTableContexts.map((e) => AlterTableContext.toJSON(e));
+ }
+ if (message.renameTableContexts?.length) {
+ obj.renameTableContexts = message.renameTableContexts.map((e) => RenameTableContext.toJSON(e));
+ }
+ if (message.dropTableContexts?.length) {
+ obj.dropTableContexts = message.dropTableContexts.map((e) => DropTableContext.toJSON(e));
}
return obj;
},
@@ -325,7 +311,6 @@ export const DatabaseEdit = {
create(base?: DeepPartial<DatabaseEdit>): DatabaseEdit {
return DatabaseEdit.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DatabaseEdit>): DatabaseEdit {
const message = createBaseDatabaseEdit();
message.createSchemaContexts = object.createSchemaContexts?.map((e) => CreateSchemaContext.fromPartial(e)) || [];
@@ -380,14 +365,15 @@ export const CreateSchemaContext = {
toJSON(message: CreateSchemaContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<CreateSchemaContext>): CreateSchemaContext {
return CreateSchemaContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateSchemaContext>): CreateSchemaContext {
const message = createBaseCreateSchemaContext();
message.name = object.name ?? "";
@@ -449,15 +435,18 @@ export const RenameSchemaContext = {
toJSON(message: RenameSchemaContext): unknown {
const obj: any = {};
- message.oldName !== undefined && (obj.oldName = message.oldName);
- message.newName !== undefined && (obj.newName = message.newName);
+ if (message.oldName !== "") {
+ obj.oldName = message.oldName;
+ }
+ if (message.newName !== "") {
+ obj.newName = message.newName;
+ }
return obj;
},
create(base?: DeepPartial<RenameSchemaContext>): RenameSchemaContext {
return RenameSchemaContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RenameSchemaContext>): RenameSchemaContext {
const message = createBaseRenameSchemaContext();
message.oldName = object.oldName ?? "";
@@ -507,14 +496,15 @@ export const DropSchemaContext = {
toJSON(message: DropSchemaContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DropSchemaContext>): DropSchemaContext {
return DropSchemaContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DropSchemaContext>): DropSchemaContext {
const message = createBaseDropSchemaContext();
message.name = object.name ?? "";
@@ -679,29 +669,35 @@ export const CreateTableContext = {
toJSON(message: CreateTableContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.schema !== undefined && (obj.schema = message.schema);
- message.type !== undefined && (obj.type = message.type);
- message.engine !== undefined && (obj.engine = message.engine);
- message.characterSet !== undefined && (obj.characterSet = message.characterSet);
- message.collation !== undefined && (obj.collation = message.collation);
- message.comment !== undefined && (obj.comment = message.comment);
- if (message.addColumnContexts) {
- obj.addColumnContexts = message.addColumnContexts.map((e) => e ? AddColumnContext.toJSON(e) : undefined);
- } else {
- obj.addColumnContexts = [];
- }
- if (message.primaryKeys) {
- obj.primaryKeys = message.primaryKeys.map((e) => e);
- } else {
- obj.primaryKeys = [];
- }
- if (message.addForeignKeyContexts) {
- obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) =>
- e ? AddForeignKeyContext.toJSON(e) : undefined
- );
- } else {
- obj.addForeignKeyContexts = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.type !== "") {
+ obj.type = message.type;
+ }
+ if (message.engine !== "") {
+ obj.engine = message.engine;
+ }
+ if (message.characterSet !== "") {
+ obj.characterSet = message.characterSet;
+ }
+ if (message.collation !== "") {
+ obj.collation = message.collation;
+ }
+ if (message.comment !== "") {
+ obj.comment = message.comment;
+ }
+ if (message.addColumnContexts?.length) {
+ obj.addColumnContexts = message.addColumnContexts.map((e) => AddColumnContext.toJSON(e));
+ }
+ if (message.primaryKeys?.length) {
+ obj.primaryKeys = message.primaryKeys;
+ }
+ if (message.addForeignKeyContexts?.length) {
+ obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) => AddForeignKeyContext.toJSON(e));
}
return obj;
},
@@ -709,7 +705,6 @@ export const CreateTableContext = {
create(base?: DeepPartial<CreateTableContext>): CreateTableContext {
return CreateTableContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<CreateTableContext>): CreateTableContext {
const message = createBaseCreateTableContext();
message.name = object.name ?? "";
@@ -875,44 +870,32 @@ export const AlterTableContext = {
toJSON(message: AlterTableContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.schema !== undefined && (obj.schema = message.schema);
- if (message.addColumnContexts) {
- obj.addColumnContexts = message.addColumnContexts.map((e) => e ? AddColumnContext.toJSON(e) : undefined);
- } else {
- obj.addColumnContexts = [];
- }
- if (message.alterColumnContexts) {
- obj.alterColumnContexts = message.alterColumnContexts.map((e) => e ? AlterColumnContext.toJSON(e) : undefined);
- } else {
- obj.alterColumnContexts = [];
- }
- if (message.dropColumnContexts) {
- obj.dropColumnContexts = message.dropColumnContexts.map((e) => e ? DropColumnContext.toJSON(e) : undefined);
- } else {
- obj.dropColumnContexts = [];
- }
- if (message.dropPrimaryKeys) {
- obj.dropPrimaryKeys = message.dropPrimaryKeys.map((e) => e);
- } else {
- obj.dropPrimaryKeys = [];
- }
- if (message.primaryKeys) {
- obj.primaryKeys = message.primaryKeys.map((e) => e);
- } else {
- obj.primaryKeys = [];
- }
- if (message.dropForeignKeys) {
- obj.dropForeignKeys = message.dropForeignKeys.map((e) => e);
- } else {
- obj.dropForeignKeys = [];
- }
- if (message.addForeignKeyContexts) {
- obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) =>
- e ? AddForeignKeyContext.toJSON(e) : undefined
- );
- } else {
- obj.addForeignKeyContexts = [];
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.addColumnContexts?.length) {
+ obj.addColumnContexts = message.addColumnContexts.map((e) => AddColumnContext.toJSON(e));
+ }
+ if (message.alterColumnContexts?.length) {
+ obj.alterColumnContexts = message.alterColumnContexts.map((e) => AlterColumnContext.toJSON(e));
+ }
+ if (message.dropColumnContexts?.length) {
+ obj.dropColumnContexts = message.dropColumnContexts.map((e) => DropColumnContext.toJSON(e));
+ }
+ if (message.dropPrimaryKeys?.length) {
+ obj.dropPrimaryKeys = message.dropPrimaryKeys;
+ }
+ if (message.primaryKeys?.length) {
+ obj.primaryKeys = message.primaryKeys;
+ }
+ if (message.dropForeignKeys?.length) {
+ obj.dropForeignKeys = message.dropForeignKeys;
+ }
+ if (message.addForeignKeyContexts?.length) {
+ obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) => AddForeignKeyContext.toJSON(e));
}
return obj;
},
@@ -920,7 +903,6 @@ export const AlterTableContext = {
create(base?: DeepPartial<AlterTableContext>): AlterTableContext {
return AlterTableContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AlterTableContext>): AlterTableContext {
const message = createBaseAlterTableContext();
message.name = object.name ?? "";
@@ -1001,16 +983,21 @@ export const RenameTableContext = {
toJSON(message: RenameTableContext): unknown {
const obj: any = {};
- message.schema !== undefined && (obj.schema = message.schema);
- message.oldName !== undefined && (obj.oldName = message.oldName);
- message.newName !== undefined && (obj.newName = message.newName);
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.oldName !== "") {
+ obj.oldName = message.oldName;
+ }
+ if (message.newName !== "") {
+ obj.newName = message.newName;
+ }
return obj;
},
create(base?: DeepPartial<RenameTableContext>): RenameTableContext {
return RenameTableContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<RenameTableContext>): RenameTableContext {
const message = createBaseRenameTableContext();
message.schema = object.schema ?? "";
@@ -1074,15 +1061,18 @@ export const DropTableContext = {
toJSON(message: DropTableContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- message.schema !== undefined && (obj.schema = message.schema);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
return obj;
},
create(base?: DeepPartial<DropTableContext>): DropTableContext {
return DropTableContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DropTableContext>): DropTableContext {
const message = createBaseDropTableContext();
message.name = object.name ?? "";
@@ -1220,21 +1210,36 @@ export const AddColumnContext = {
toJSON(message: AddColumnContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
- 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.nullable !== undefined && (obj.nullable = message.nullable);
- message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);
- message.hasDefaultValue !== undefined && (obj.hasDefaultValue = message.hasDefaultValue);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
+ 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.nullable === true) {
+ obj.nullable = message.nullable;
+ }
+ if (message.defaultValue !== "") {
+ obj.defaultValue = message.defaultValue;
+ }
+ if (message.hasDefaultValue === true) {
+ obj.hasDefaultValue = message.hasDefaultValue;
+ }
return obj;
},
create(base?: DeepPartial<AddColumnContext>): AddColumnContext {
return AddColumnContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AddColumnContext>): AddColumnContext {
const message = createBaseAddColumnContext();
message.name = object.name ?? "";
@@ -1390,22 +1395,39 @@ export const AlterColumnContext = {
toJSON(message: AlterColumnContext): unknown {
const obj: any = {};
- message.oldName !== undefined && (obj.oldName = message.oldName);
- message.newName !== undefined && (obj.newName = message.newName);
- 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.nullable !== undefined && (obj.nullable = message.nullable);
- message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);
- message.isDefaultValueChanged !== undefined && (obj.isDefaultValueChanged = message.isDefaultValueChanged);
+ if (message.oldName !== "") {
+ obj.oldName = message.oldName;
+ }
+ if (message.newName !== "") {
+ obj.newName = message.newName;
+ }
+ 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.nullable === true) {
+ obj.nullable = message.nullable;
+ }
+ if (message.defaultValue !== "") {
+ obj.defaultValue = message.defaultValue;
+ }
+ if (message.isDefaultValueChanged === true) {
+ obj.isDefaultValueChanged = message.isDefaultValueChanged;
+ }
return obj;
},
create(base?: DeepPartial<AlterColumnContext>): AlterColumnContext {
return AlterColumnContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AlterColumnContext>): AlterColumnContext {
const message = createBaseAlterColumnContext();
message.oldName = object.oldName ?? "";
@@ -1462,14 +1484,15 @@ export const DropColumnContext = {
toJSON(message: DropColumnContext): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<DropColumnContext>): DropColumnContext {
return DropColumnContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<DropColumnContext>): DropColumnContext {
const message = createBaseDropColumnContext();
message.name = object.name ?? "";
@@ -1553,17 +1576,24 @@ export const AddForeignKeyContext = {
toJSON(message: AddForeignKeyContext): unknown {
const obj: any = {};
- message.column !== undefined && (obj.column = message.column);
- message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);
- message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);
- message.referencedColumn !== undefined && (obj.referencedColumn = message.referencedColumn);
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
+ if (message.referencedSchema !== "") {
+ obj.referencedSchema = message.referencedSchema;
+ }
+ if (message.referencedTable !== "") {
+ obj.referencedTable = message.referencedTable;
+ }
+ if (message.referencedColumn !== "") {
+ obj.referencedColumn = message.referencedColumn;
+ }
return obj;
},
create(base?: DeepPartial<AddForeignKeyContext>): AddForeignKeyContext {
return AddForeignKeyContext.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<AddForeignKeyContext>): AddForeignKeyContext {
const message = createBaseAddForeignKeyContext();
message.column = object.column ?? "";
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index b5c2c6e249..fdcc6a58ee 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -1,5 +1,4 @@
/* eslint-disable */
-import * as Long from "long";
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { Duration } from "../google/protobuf/duration";
@@ -9,6 +8,7 @@ import { Timestamp } from "../google/protobuf/timestamp";
import { StringValue } from "../google/protobuf/wrappers";
import { State, stateFromJSON, stateToJSON } from "./common";
import { PushEvent } from "./vcs";
+import Long = require("long");
export const protobufPackage = "bytebase.v1";
@@ -1322,14 +1322,15 @@ export const GetDatabaseRequest = {
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 ?? "";
@@ -1413,17 +1414,24 @@ export const ListDatabasesRequest = {
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 ?? "";
@@ -1488,19 +1496,18 @@ export const ListDatabasesResponse = {
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)) || [];
@@ -1585,17 +1592,24 @@ export const SearchDatabasesRequest = {
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 ?? "";
@@ -1660,19 +1674,18 @@ export const SearchDatabasesResponse = {
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)) || [];
@@ -1735,15 +1748,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)
@@ -1810,11 +1826,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;
},
@@ -1822,7 +1838,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 ?? "";
@@ -1874,10 +1889,8 @@ export const BatchUpdateDatabasesResponse = {
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;
},
@@ -1885,7 +1898,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)) || [];
@@ -1934,14 +1946,15 @@ export const SyncDatabaseRequest = {
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 ?? "";
@@ -1986,7 +1999,6 @@ export const SyncDatabaseResponse = {
create(base?: DeepPartial<SyncDatabaseResponse>): SyncDatabaseResponse {
return SyncDatabaseResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<SyncDatabaseResponse>): SyncDatabaseResponse {
const message = createBaseSyncDatabaseResponse();
return message;
@@ -2034,14 +2046,15 @@ export const GetDatabaseMetadataRequest = {
toJSON(message: GetDatabaseMetadataRequest): unknown {
const obj: any = {};
- message.name !== undefined && (obj.name = message.name);
+ if (message.name !== "") {
+ obj.name = message.name;
+ }
return obj;
},
create(base?: DeepPartial<GetDatabaseMetadataRequest>): GetDatabaseMetadataRequest {
return GetDatabaseMetadataRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<GetDatabaseMetadataRequest>): GetDatabaseMetadataRequest {
const message = createBaseGetDatabaseMetadataRequest();
message.name = object.name ?? "";
@@ -2103,15 +2116,18 @@ export const GetDatabaseSchemaRequest = {
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 ?? "";
@@ -2161,14 +2177,15 @@ export const GetBackupSettingRequest = {
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 ?? "";
@@ -2217,15 +2234,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)
@@ -2289,15 +2306,18 @@ export const CreateBackupRequest = {
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 ?? "";
@@ -2373,16 +2393,21 @@ export const ListBackupsRequest = {
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 ?? "";
@@ -2446,19 +2471,18 @@ export const ListBackupsResponse = {
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)) || [];
@@ -2616,19 +2640,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;
},
@@ -2636,7 +2679,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 ?? "";
@@ -2708,15 +2750,18 @@ export const Database_LabelsEntry = {
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 ?? "";
@@ -2814,18 +2859,20 @@ 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.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));
}
return obj;
},
@@ -2833,7 +2880,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 ?? "";
@@ -2943,31 +2989,23 @@ export const SchemaMetadata = {
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;
},
@@ -2975,7 +3013,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 ?? "";
@@ -3191,31 +3228,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 = Math.round(message.rowCount));
- message.dataSize !== undefined && (obj.dataSize = Math.round(message.dataSize));
- message.indexSize !== undefined && (obj.indexSize = Math.round(message.indexSize));
- message.dataFree !== undefined && (obj.dataFree = Math.round(message.dataFree));
- 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 !== 0) {
+ obj.rowCount = Math.round(message.rowCount);
+ }
+ if (message.dataSize !== 0) {
+ obj.dataSize = Math.round(message.dataSize);
+ }
+ if (message.indexSize !== 0) {
+ obj.indexSize = Math.round(message.indexSize);
+ }
+ if (message.dataFree !== 0) {
+ obj.dataFree = Math.round(message.dataFree);
+ }
+ 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;
},
@@ -3223,7 +3276,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 ?? "";
@@ -3397,23 +3449,42 @@ 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.default !== undefined && (obj.default = message.default);
- 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.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 ?? "";
@@ -3508,13 +3579,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;
},
@@ -3522,7 +3597,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 ?? "";
@@ -3598,16 +3672,21 @@ export const DependentColumn = {
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 ?? "";
@@ -3671,15 +3750,18 @@ export const FunctionMetadata = {
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 ?? "";
@@ -3841,27 +3923,42 @@ export const TaskMetadata = {
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 ?? "";
@@ -3998,21 +4095,36 @@ export const StreamMetadata = {
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 ?? "";
@@ -4136,24 +4248,33 @@ export const IndexMetadata = {
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 ?? "";
@@ -4243,17 +4364,24 @@ export const ExtensionMetadata = {
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 ?? "";
@@ -4395,29 +4523,36 @@ export const ForeignKeyMetadata = {
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 ?? "";
@@ -4473,14 +4608,15 @@ export const DatabaseSchema = {
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 ?? "";
@@ -4566,19 +4702,24 @@ export const BackupSetting = {
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 ?? "";
@@ -4700,20 +4841,33 @@ export const Backup = {
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 ?? "";
@@ -4792,16 +4946,21 @@ export const ListSlowQueriesRequest = {
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 ?? "";
@@ -4856,10 +5015,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;
},
@@ -4867,7 +5024,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)) || [];
@@ -4940,17 +5096,21 @@ export const SlowQueryLog = {
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 ?? "";
@@ -5139,23 +5299,41 @@ export const SlowQueryStatistics = {
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;
},
@@ -5163,7 +5341,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 ?? "";
@@ -5284,20 +5461,30 @@ export const SlowQueryDetails = {
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;
@@ -5379,16 +5566,21 @@ export const ListSecretsRequest = {
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 ?? "";
@@ -5452,19 +5644,18 @@ export const ListSecretsResponse = {
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)) || [];
@@ -5538,16 +5729,21 @@ export const UpdateSecretRequest = {
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)
@@ -5600,14 +5796,15 @@ export const DeleteSecretRequest = {
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 ?? "";
@@ -5702,18 +5899,27 @@ export const Secret = {
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 ?? "";
@@ -5779,15 +5985,18 @@ export const AdviseIndexRequest = {
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 ?? "";
@@ -5861,16 +6070,21 @@ export const AdviseIndexResponse = {
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 ?? "";
@@ -6141,35 +6355,69 @@ 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.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.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 ?? "";
@@ -6246,10 +6494,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;
},
@@ -6257,7 +6503,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)) || [];
@@ -6319,11 +6564,11 @@ export const ChangedResourceDatabase = {
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;
},
@@ -6331,7 +6576,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 ?? "";
@@ -6394,11 +6638,11 @@ export const ChangedResourceSchema = {
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;
},
@@ -6406,7 +6650,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 ?? "";
@@ -6456,14 +6699,15 @@ export const ChangedResourceTable = {
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 ?? "";
@@ -6558,18 +6802,27 @@ export const ListChangeHistoriesRequest = {
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 ?? "";
@@ -6637,19 +6890,18 @@ export const ListChangeHistoriesResponse = {
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)) || [];
@@ -6723,16 +6975,21 @@ export const GetChangeHistoryRequest = {
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 ?? "";
@@ -8208,8 +8465,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/v1/environment_service.ts b/frontend/src/types/proto/v1/environment_service.ts
index 39fb0df27f..d7191e4f54 100644
--- a/frontend/src/types/proto/v1/environment_service.ts
+++ b/frontend/src/types/proto/v1/environment_service.ts
@@ -198,14 +198,15 @@ export const GetEnvironmentRequest = {
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 ?? "";
@@ -278,16 +279,21 @@ export const ListEnvironmentsRequest = {
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;
@@ -353,19 +359,18 @@ export const ListEnvironmentsResponse = {
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)) || [];
@@ -428,16 +433,18 @@ export const CreateEnvironmentRequest = {
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)
@@ -563,14 +572,15 @@ export const DeleteEnvironmentRequest = {
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 ?? "";
@@ -619,14 +629,15 @@ export const UndeleteEnvironmentRequest = {
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 ?? "";
@@ -732,19 +743,30 @@ export const Environment = {
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)
@@ -870,15 +892,18 @@ export const EnvironmentBackupSetting = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/externalvs_service.ts b/frontend/src/types/proto/v1/externalvs_service.ts
index 3ee8b32b69..148e20f946 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 =
@@ -351,14 +350,15 @@ export const GetExternalVersionControlRequest = {
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 ?? "";
@@ -420,15 +420,18 @@ export const ListExternalVersionControlsRequest = {
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;
@@ -493,21 +496,18 @@ export const ListExternalVersionControlsResponse = {
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 =
@@ -636,14 +637,15 @@ export const DeleteExternalVersionControlRequest = {
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 ?? "";
@@ -716,16 +718,21 @@ export const SearchExternalVersionControlProjectsRequest = {
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 {
@@ -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 {
@@ -887,10 +889,18 @@ export const SearchExternalVersionControlProjectsResponse_Project = {
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 {
@@ -953,14 +962,15 @@ export const ListProjectGitOpsInfoRequest = {
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 ?? "";
@@ -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)) || [];
@@ -1141,20 +1148,33 @@ export const ExternalVersionControl = {
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 ?? "";
@@ -1393,29 +1413,60 @@ export const ProjectGitOpsInfo = {
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)
@@ -1595,19 +1646,30 @@ export const ExchangeToken = {
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 ?? "";
@@ -1685,16 +1747,21 @@ export const OAuthToken = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/iam_policy.ts b/frontend/src/types/proto/v1/iam_policy.ts
index 4c1c0895b5..b69824cd9d 100644
--- a/frontend/src/types/proto/v1/iam_policy.ts
+++ b/frontend/src/types/proto/v1/iam_policy.ts
@@ -74,10 +74,8 @@ export const IamPolicy = {
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;
},
@@ -85,7 +83,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)) || [];
@@ -169,22 +166,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 ?? "";
diff --git a/frontend/src/types/proto/v1/idp_service.ts b/frontend/src/types/proto/v1/idp_service.ts
index 6de3936442..170222f51e 100644
--- a/frontend/src/types/proto/v1/idp_service.ts
+++ b/frontend/src/types/proto/v1/idp_service.ts
@@ -338,14 +338,15 @@ export const GetIdentityProviderRequest = {
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 ?? "";
@@ -418,16 +419,21 @@ export const ListIdentityProvidersRequest = {
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;
@@ -493,19 +499,18 @@ export const ListIdentityProvidersResponse = {
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)) || [];
@@ -568,16 +573,18 @@ export const CreateIdentityProviderRequest = {
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)
@@ -703,14 +712,15 @@ export const DeleteIdentityProviderRequest = {
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 ?? "";
@@ -759,14 +769,15 @@ export const UndeleteIdentityProviderRequest = {
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)
@@ -895,14 +906,15 @@ export const OAuth2IdentityProviderTestRequestContext = {
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;
@@ -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)
@@ -1327,27 +1352,39 @@ export const OAuth2IdentityProviderConfig = {
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 ?? "";
@@ -1482,25 +1519,33 @@ export const OIDCIdentityProviderConfig = {
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 ?? "";
@@ -1657,23 +1702,39 @@ export const LDAPIdentityProviderConfig = {
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 ?? "";
@@ -1767,17 +1828,24 @@ export const FieldMapping = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/inbox_service.ts b/frontend/src/types/proto/v1/inbox_service.ts
index 7281dfea17..c28c82da66 100644
--- a/frontend/src/types/proto/v1/inbox_service.ts
+++ b/frontend/src/types/proto/v1/inbox_service.ts
@@ -169,16 +169,21 @@ export const ListInboxRequest = {
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 ?? "";
@@ -244,19 +249,18 @@ export const ListInboxResponse = {
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)
@@ -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 ?? "";
@@ -537,15 +548,18 @@ export const InboxSummary = {
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;
diff --git a/frontend/src/types/proto/v1/instance_role_service.ts b/frontend/src/types/proto/v1/instance_role_service.ts
index e905f6efa3..2fbf6d76b2 100644
--- a/frontend/src/types/proto/v1/instance_role_service.ts
+++ b/frontend/src/types/proto/v1/instance_role_service.ts
@@ -161,14 +161,15 @@ export const GetInstanceRoleRequest = {
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 ?? "";
@@ -252,17 +253,24 @@ export const ListInstanceRolesRequest = {
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 ?? "";
@@ -327,19 +335,18 @@ export const ListInstanceRolesResponse = {
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)) || [];
@@ -402,15 +409,18 @@ export const CreateInstanceRoleRequest = {
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)
@@ -535,14 +548,15 @@ export const DeleteInstanceRoleRequest = {
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 ?? "";
@@ -591,14 +605,15 @@ export const UndeleteInstanceRoleRequest = {
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 ?? "";
@@ -711,19 +726,30 @@ export const InstanceRole = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.ts
index 486d3c96e0..45ae7f09ab 100644
--- a/frontend/src/types/proto/v1/instance_service.ts
+++ b/frontend/src/types/proto/v1/instance_service.ts
@@ -313,14 +313,15 @@ export const GetInstanceRequest = {
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 ?? "";
@@ -393,16 +394,21 @@ export const ListInstancesRequest = {
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;
@@ -466,19 +472,18 @@ export const ListInstancesResponse = {
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)) || [];
@@ -552,16 +557,21 @@ export const CreateInstanceRequest = {
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)
@@ -627,15 +637,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)
@@ -700,15 +713,18 @@ export const DeleteInstanceRequest = {
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 ?? "";
@@ -758,14 +774,15 @@ export const UndeleteInstanceRequest = {
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 ?? "";
@@ -814,14 +831,15 @@ export const SyncInstanceRequest = {
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 ?? "";
@@ -866,7 +884,6 @@ export const SyncInstanceResponse = {
create(base?: DeepPartial<SyncInstanceResponse>): SyncInstanceResponse {
return SyncInstanceResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<SyncInstanceResponse>): SyncInstanceResponse {
const message = createBaseSyncInstanceResponse();
return message;
@@ -938,17 +955,21 @@ export const AddDataSourceRequest = {
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 ?? "";
@@ -1014,16 +1035,18 @@ export const RemoveDataSourceRequest = {
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 ?? "";
@@ -1110,18 +1133,24 @@ export const UpdateDataSourceRequest = {
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 ?? "";
@@ -1175,14 +1204,15 @@ export const SyncSlowQueriesRequest = {
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 ?? "";
@@ -1231,14 +1261,15 @@ export const InstanceOptions = {
toJSON(message: InstanceOptions): unknown {
const obj: any = {};
- message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);
+ if (message.schemaTenantMode === true) {
+ obj.schemaTenantMode = message.schemaTenantMode;
+ }
return obj;
},
create(base?: DeepPartial<InstanceOptions>): InstanceOptions {
return InstanceOptions.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {
const message = createBaseInstanceOptions();
message.schemaTenantMode = object.schemaTenantMode ?? false;
@@ -1411,29 +1442,45 @@ export const Instance = {
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 ?? "";
@@ -1714,32 +1761,69 @@ export const DataSource = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/issue_service.ts b/frontend/src/types/proto/v1/issue_service.ts
index c804235edf..b3e6dd84bd 100644
--- a/frontend/src/types/proto/v1/issue_service.ts
+++ b/frontend/src/types/proto/v1/issue_service.ts
@@ -600,15 +600,18 @@ export const GetIssueRequest = {
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 ?? "";
@@ -671,15 +674,18 @@ export const CreateIssueRequest = {
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 ?? "";
@@ -764,17 +770,24 @@ export const ListIssuesRequest = {
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 ?? "";
@@ -839,19 +852,18 @@ export const ListIssuesResponse = {
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)) || [];
@@ -914,15 +926,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;
@@ -1018,18 +1033,27 @@ export const SearchIssuesRequest = {
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 ?? "";
@@ -1095,19 +1119,18 @@ export const SearchIssuesResponse = {
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)) || [];
@@ -1170,11 +1193,11 @@ export const BatchUpdateIssuesRequest = {
toJSON(message: BatchUpdateIssuesRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
- if (message.requests) {
- obj.requests = message.requests.map((e) => e ? UpdateIssueRequest.toJSON(e) : undefined);
- } else {
- obj.requests = [];
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
+ if (message.requests?.length) {
+ obj.requests = message.requests.map((e) => UpdateIssueRequest.toJSON(e));
}
return obj;
},
@@ -1182,7 +1205,6 @@ export const BatchUpdateIssuesRequest = {
create(base?: DeepPartial<BatchUpdateIssuesRequest>): BatchUpdateIssuesRequest {
return BatchUpdateIssuesRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchUpdateIssuesRequest>): BatchUpdateIssuesRequest {
const message = createBaseBatchUpdateIssuesRequest();
message.parent = object.parent ?? "";
@@ -1232,10 +1254,8 @@ export const BatchUpdateIssuesResponse = {
toJSON(message: BatchUpdateIssuesResponse): 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));
}
return obj;
},
@@ -1243,7 +1263,6 @@ export const BatchUpdateIssuesResponse = {
create(base?: DeepPartial<BatchUpdateIssuesResponse>): BatchUpdateIssuesResponse {
return BatchUpdateIssuesResponse.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchUpdateIssuesResponse>): BatchUpdateIssuesResponse {
const message = createBaseBatchUpdateIssuesResponse();
message.issues = object.issues?.map((e) => Issue.fromPartial(e)) || [];
@@ -1305,15 +1324,18 @@ export const ApproveIssueRequest = {
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 ?? "";
@@ -1376,15 +1398,18 @@ export const RejectIssueRequest = {
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 ?? "";
@@ -1447,15 +1472,18 @@ export const RequestIssueRequest = {
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 ?? "";
@@ -1715,43 +1743,66 @@ export const Issue = {
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);
+ 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;
+ }
return obj;
},
create(base?: DeepPartial<Issue>): Issue {
return Issue.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Issue>): Issue {
const message = createBaseIssue();
message.name = object.name ?? "";
@@ -1830,15 +1881,18 @@ export const Issue_Approver = {
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;
@@ -1923,17 +1977,24 @@ export const ApprovalTemplate = {
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)
@@ -1987,10 +2048,8 @@ export const ApprovalFlow = {
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;
},
@@ -1998,7 +2057,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)) || [];
@@ -2060,11 +2118,11 @@ export const ApprovalStep = {
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;
},
@@ -2072,7 +2130,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;
@@ -2157,20 +2214,24 @@ export const ApprovalNode = {
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;
@@ -2235,16 +2296,18 @@ export const CreateIssueCommentRequest = {
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 ?? "";
@@ -2320,17 +2383,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 ?? "";
@@ -2429,18 +2496,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 ?? "";
diff --git a/frontend/src/types/proto/v1/logging_service.ts b/frontend/src/types/proto/v1/logging_service.ts
index 6889c02185..ca1ccafa32 100644
--- a/frontend/src/types/proto/v1/logging_service.ts
+++ b/frontend/src/types/proto/v1/logging_service.ts
@@ -426,17 +426,24 @@ export const ListLogsRequest = {
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 ?? "";
@@ -501,19 +508,18 @@ export const ListLogsResponse = {
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)) || [];
@@ -563,14 +569,15 @@ export const GetLogRequest = {
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 ?? "";
@@ -719,22 +726,39 @@ export const LogEntity = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/org_policy_service.ts b/frontend/src/types/proto/v1/org_policy_service.ts
index 7df1a9ae53..2210d6c9ed 100644
--- a/frontend/src/types/proto/v1/org_policy_service.ts
+++ b/frontend/src/types/proto/v1/org_policy_service.ts
@@ -419,7 +419,7 @@ export interface Policy {
workspaceIamPolicy?: IamPolicy | undefined;
deploymentApprovalPolicy?: DeploymentApprovalPolicy | undefined;
backupPlanPolicy?: BackupPlanPolicy | undefined;
- sensitiveDataPolicy?: SensitiveDataPolicy | undefined;
+ maskingPolicy?: MaskingPolicy | undefined;
sqlReviewPolicy?: SQLReviewPolicy | undefined;
slowQueryPolicy?: SlowQueryPolicy | undefined;
disableCopyDataPolicy?: DisableCopyDataPolicy | undefined;
@@ -456,11 +456,11 @@ export interface DisableCopyDataPolicy {
active: boolean;
}
-export interface SensitiveDataPolicy {
- sensitiveData: SensitiveData[];
+export interface MaskingPolicy {
+ maskData: MaskData[];
}
-export interface SensitiveData {
+export interface MaskData {
schema: string;
table: string;
column: string;
@@ -618,16 +618,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 ?? "";
@@ -704,16 +709,21 @@ export const UpdatePolicyRequest = {
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)
@@ -766,14 +776,15 @@ export const DeletePolicyRequest = {
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 ?? "";
@@ -822,14 +833,15 @@ export const GetPolicyRequest = {
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 ?? "";
@@ -924,19 +936,27 @@ export const ListPoliciesRequest = {
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 ?? "";
@@ -1002,19 +1022,18 @@ export const ListPoliciesResponse = {
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)) || [];
@@ -1032,7 +1051,7 @@ function createBasePolicy(): Policy {
workspaceIamPolicy: undefined,
deploymentApprovalPolicy: undefined,
backupPlanPolicy: undefined,
- sensitiveDataPolicy: undefined,
+ maskingPolicy: undefined,
sqlReviewPolicy: undefined,
slowQueryPolicy: undefined,
disableCopyDataPolicy: undefined,
@@ -1067,8 +1086,8 @@ export const Policy = {
if (message.backupPlanPolicy !== undefined) {
BackupPlanPolicy.encode(message.backupPlanPolicy, writer.uint32(66).fork()).ldelim();
}
- if (message.sensitiveDataPolicy !== undefined) {
- SensitiveDataPolicy.encode(message.sensitiveDataPolicy, writer.uint32(74).fork()).ldelim();
+ if (message.maskingPolicy !== undefined) {
+ MaskingPolicy.encode(message.maskingPolicy, writer.uint32(74).fork()).ldelim();
}
if (message.sqlReviewPolicy !== undefined) {
SQLReviewPolicy.encode(message.sqlReviewPolicy, writer.uint32(90).fork()).ldelim();
@@ -1158,7 +1177,7 @@ export const Policy = {
break;
}
- message.sensitiveDataPolicy = SensitiveDataPolicy.decode(reader, reader.uint32());
+ message.maskingPolicy = MaskingPolicy.decode(reader, reader.uint32());
continue;
case 11:
if (tag !== 90) {
@@ -1236,9 +1255,7 @@ export const Policy = {
? DeploymentApprovalPolicy.fromJSON(object.deploymentApprovalPolicy)
: undefined,
backupPlanPolicy: isSet(object.backupPlanPolicy) ? BackupPlanPolicy.fromJSON(object.backupPlanPolicy) : undefined,
- sensitiveDataPolicy: isSet(object.sensitiveDataPolicy)
- ? SensitiveDataPolicy.fromJSON(object.sensitiveDataPolicy)
- : undefined,
+ maskingPolicy: isSet(object.maskingPolicy) ? MaskingPolicy.fromJSON(object.maskingPolicy) : undefined,
sqlReviewPolicy: isSet(object.sqlReviewPolicy) ? SQLReviewPolicy.fromJSON(object.sqlReviewPolicy) : undefined,
slowQueryPolicy: isSet(object.slowQueryPolicy) ? SlowQueryPolicy.fromJSON(object.slowQueryPolicy) : undefined,
disableCopyDataPolicy: isSet(object.disableCopyDataPolicy)
@@ -1258,43 +1275,60 @@ export const Policy = {
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.backupPlanPolicy !== undefined &&
- (obj.backupPlanPolicy = message.backupPlanPolicy ? BackupPlanPolicy.toJSON(message.backupPlanPolicy) : undefined);
- message.sensitiveDataPolicy !== undefined && (obj.sensitiveDataPolicy = message.sensitiveDataPolicy
- ? SensitiveDataPolicy.toJSON(message.sensitiveDataPolicy)
- : 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.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 ?? "";
@@ -1311,8 +1345,8 @@ export const Policy = {
message.backupPlanPolicy = (object.backupPlanPolicy !== undefined && object.backupPlanPolicy !== null)
? BackupPlanPolicy.fromPartial(object.backupPlanPolicy)
: undefined;
- message.sensitiveDataPolicy = (object.sensitiveDataPolicy !== undefined && object.sensitiveDataPolicy !== null)
- ? SensitiveDataPolicy.fromPartial(object.sensitiveDataPolicy)
+ message.maskingPolicy = (object.maskingPolicy !== undefined && object.maskingPolicy !== null)
+ ? MaskingPolicy.fromPartial(object.maskingPolicy)
: undefined;
message.sqlReviewPolicy = (object.sqlReviewPolicy !== undefined && object.sqlReviewPolicy !== null)
? SQLReviewPolicy.fromPartial(object.sqlReviewPolicy)
@@ -1394,13 +1428,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;
},
@@ -1408,7 +1442,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;
@@ -1483,16 +1516,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;
@@ -1556,16 +1594,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;
@@ -1617,14 +1657,15 @@ export const SlowQueryPolicy = {
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;
@@ -1673,14 +1714,15 @@ export const DisableCopyDataPolicy = {
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;
@@ -1688,22 +1730,22 @@ export const DisableCopyDataPolicy = {
},
};
-function createBaseSensitiveDataPolicy(): SensitiveDataPolicy {
- return { sensitiveData: [] };
+function createBaseMaskingPolicy(): MaskingPolicy {
+ return { maskData: [] };
}
-export const SensitiveDataPolicy = {
- encode(message: SensitiveDataPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- for (const v of message.sensitiveData) {
- SensitiveData.encode(v!, writer.uint32(10).fork()).ldelim();
+export const MaskingPolicy = {
+ encode(message: MaskingPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.maskData) {
+ MaskData.encode(v!, writer.uint32(10).fork()).ldelim();
}
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): SensitiveDataPolicy {
+ decode(input: _m0.Reader | Uint8Array, length?: number): MaskingPolicy {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseSensitiveDataPolicy();
+ const message = createBaseMaskingPolicy();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -1712,7 +1754,7 @@ export const SensitiveDataPolicy = {
break;
}
- message.sensitiveData.push(SensitiveData.decode(reader, reader.uint32()));
+ message.maskData.push(MaskData.decode(reader, reader.uint32()));
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -1723,41 +1765,34 @@ export const SensitiveDataPolicy = {
return message;
},
- fromJSON(object: any): SensitiveDataPolicy {
- return {
- sensitiveData: Array.isArray(object?.sensitiveData)
- ? object.sensitiveData.map((e: any) => SensitiveData.fromJSON(e))
- : [],
- };
+ fromJSON(object: any): MaskingPolicy {
+ return { maskData: Array.isArray(object?.maskData) ? object.maskData.map((e: any) => MaskData.fromJSON(e)) : [] };
},
- toJSON(message: SensitiveDataPolicy): unknown {
+ toJSON(message: MaskingPolicy): unknown {
const obj: any = {};
- if (message.sensitiveData) {
- obj.sensitiveData = message.sensitiveData.map((e) => e ? SensitiveData.toJSON(e) : undefined);
- } else {
- obj.sensitiveData = [];
+ if (message.maskData?.length) {
+ obj.maskData = message.maskData.map((e) => MaskData.toJSON(e));
}
return obj;
},
- create(base?: DeepPartial<SensitiveDataPolicy>): SensitiveDataPolicy {
- return SensitiveDataPolicy.fromPartial(base ?? {});
+ create(base?: DeepPartial<MaskingPolicy>): MaskingPolicy {
+ return MaskingPolicy.fromPartial(base ?? {});
},
-
- fromPartial(object: DeepPartial<SensitiveDataPolicy>): SensitiveDataPolicy {
- const message = createBaseSensitiveDataPolicy();
- message.sensitiveData = object.sensitiveData?.map((e) => SensitiveData.fromPartial(e)) || [];
+ fromPartial(object: DeepPartial<MaskingPolicy>): MaskingPolicy {
+ const message = createBaseMaskingPolicy();
+ message.maskData = object.maskData?.map((e) => MaskData.fromPartial(e)) || [];
return message;
},
};
-function createBaseSensitiveData(): SensitiveData {
+function createBaseMaskData(): MaskData {
return { schema: "", table: "", column: "", semanticCategoryId: "", maskingLevel: 0 };
}
-export const SensitiveData = {
- encode(message: SensitiveData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+export const MaskData = {
+ encode(message: MaskData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.schema !== "") {
writer.uint32(10).string(message.schema);
}
@@ -1776,10 +1811,10 @@ export const SensitiveData = {
return writer;
},
- decode(input: _m0.Reader | Uint8Array, length?: number): SensitiveData {
+ decode(input: _m0.Reader | Uint8Array, length?: number): MaskData {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseSensitiveData();
+ const message = createBaseMaskData();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -1827,7 +1862,7 @@ export const SensitiveData = {
return message;
},
- fromJSON(object: any): SensitiveData {
+ fromJSON(object: any): MaskData {
return {
schema: isSet(object.schema) ? String(object.schema) : "",
table: isSet(object.table) ? String(object.table) : "",
@@ -1837,22 +1872,31 @@ export const SensitiveData = {
};
},
- toJSON(message: SensitiveData): unknown {
+ 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.semanticCategoryId !== undefined && (obj.semanticCategoryId = message.semanticCategoryId);
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
+ if (message.schema !== "") {
+ obj.schema = message.schema;
+ }
+ if (message.table !== "") {
+ obj.table = message.table;
+ }
+ if (message.column !== "") {
+ obj.column = message.column;
+ }
+ if (message.semanticCategoryId !== "") {
+ obj.semanticCategoryId = message.semanticCategoryId;
+ }
+ if (message.maskingLevel !== 0) {
+ obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);
+ }
return obj;
},
- create(base?: DeepPartial<SensitiveData>): SensitiveData {
- return SensitiveData.fromPartial(base ?? {});
+ create(base?: DeepPartial<MaskData>): MaskData {
+ return MaskData.fromPartial(base ?? {});
},
-
- fromPartial(object: DeepPartial<SensitiveData>): SensitiveData {
- const message = createBaseSensitiveData();
+ fromPartial(object: DeepPartial<MaskData>): MaskData {
+ const message = createBaseMaskData();
message.schema = object.schema ?? "";
message.table = object.table ?? "";
message.column = object.column ?? "";
@@ -1916,11 +1960,11 @@ export const SQLReviewPolicy = {
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;
},
@@ -1928,7 +1972,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 ?? "";
@@ -2024,18 +2067,27 @@ export const SQLReviewRule = {
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 ?? "";
@@ -2092,12 +2144,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;
},
@@ -2105,7 +2153,6 @@ export const MaskingExceptionPolicy = {
create(base?: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {
return MaskingExceptionPolicy.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {
const message = createBaseMaskingExceptionPolicy();
message.maskingExceptions =
@@ -2190,21 +2237,24 @@ export const MaskingExceptionPolicy_MaskingException = {
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));
- if (message.members) {
- obj.members = message.members.map((e) => e);
- } else {
- obj.members = [];
- }
- 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.members?.length) {
+ obj.members = message.members;
+ }
+ 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;
@@ -2262,10 +2312,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;
},
@@ -2273,7 +2321,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)) || [];
@@ -2335,15 +2382,18 @@ export const MaskingRulePolicy_MaskingRule = {
toJSON(message: MaskingRulePolicy_MaskingRule): unknown {
const obj: any = {};
- message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);
- message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));
+ 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.condition = (object.condition !== undefined && object.condition !== null)
diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.ts
index 27e01e12ff..5a68b3ae51 100644
--- a/frontend/src/types/proto/v1/project_service.ts
+++ b/frontend/src/types/proto/v1/project_service.ts
@@ -1209,14 +1209,15 @@ export const GetProjectRequest = {
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 ?? "";
@@ -1289,16 +1290,21 @@ export const ListProjectsRequest = {
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;
@@ -1362,19 +1368,18 @@ export const ListProjectsResponse = {
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)) || [];
@@ -1448,16 +1453,21 @@ export const SearchProjectsRequest = {
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;
@@ -1521,19 +1531,18 @@ export const SearchProjectsResponse = {
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)) || [];
@@ -1596,15 +1605,18 @@ export const CreateProjectRequest = {
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)
@@ -1669,15 +1681,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)
@@ -1742,15 +1757,18 @@ export const DeleteProjectRequest = {
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 ?? "";
@@ -1800,14 +1818,15 @@ export const UndeleteProjectRequest = {
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 ?? "";
@@ -1856,14 +1875,15 @@ export const GetIamPolicyRequest = {
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 ?? "";
@@ -1925,11 +1945,11 @@ export const BatchGetIamPolicyRequest = {
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;
},
@@ -1937,7 +1957,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 ?? "";
@@ -1991,12 +2010,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;
},
@@ -2004,7 +2019,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)) ||
@@ -2067,15 +2081,18 @@ export const BatchGetIamPolicyResponse_PolicyResult = {
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 ?? "";
@@ -2140,15 +2157,18 @@ export const SetIamPolicyRequest = {
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 ?? "";
@@ -2200,14 +2220,15 @@ export const GetDeploymentConfigRequest = {
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 ?? "";
@@ -2256,14 +2277,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)
@@ -2340,18 +2362,21 @@ export const UpdateProjectGitOpsInfoRequest = {
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)
@@ -2404,14 +2429,15 @@ export const UnsetProjectGitOpsInfoRequest = {
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 ?? "";
@@ -2460,14 +2486,15 @@ export const GetProjectGitOpsInfoRequest = {
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 ?? "";
@@ -2516,14 +2543,15 @@ export const SetupSQLReviewCIRequest = {
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 ?? "";
@@ -2572,14 +2600,15 @@ export const SetupSQLReviewCIResponse = {
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 ?? "";
@@ -2766,30 +2795,48 @@ export const Project = {
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 ?? "";
@@ -2862,15 +2909,18 @@ export const AddWebhookRequest = {
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 ?? "";
@@ -2935,15 +2985,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)
@@ -2995,14 +3048,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)
@@ -3066,15 +3120,18 @@ export const TestWebhookRequest = {
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 ?? "";
@@ -3126,14 +3183,15 @@ export const TestWebhookResponse = {
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 ?? "";
@@ -3242,14 +3300,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;
},
@@ -3257,7 +3321,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 ?? "";
@@ -3334,16 +3397,21 @@ export const DeploymentConfig = {
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 ?? "";
@@ -3400,10 +3468,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;
},
@@ -3411,7 +3477,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)) || [];
@@ -3473,15 +3538,18 @@ export const ScheduleDeployment = {
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 ?? "";
@@ -3533,15 +3601,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)
@@ -3596,10 +3664,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;
},
@@ -3607,7 +3673,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)) || [];
@@ -3680,12 +3745,14 @@ export const LabelSelectorRequirement = {
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;
},
@@ -3693,7 +3760,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 ?? "";
@@ -3740,7 +3806,6 @@ export const Activity = {
create(base?: DeepPartial<Activity>): Activity {
return Activity.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<Activity>): Activity {
const message = createBaseActivity();
return message;
@@ -3812,16 +3877,21 @@ export const ListDatabaseGroupsRequest = {
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 ?? "";
@@ -3887,19 +3957,18 @@ export const ListDatabaseGroupsResponse = {
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)) || [];
@@ -3962,15 +4031,18 @@ export const GetDatabaseGroupRequest = {
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 ?? "";
@@ -4055,18 +4127,24 @@ export const CreateDatabaseGroupRequest = {
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 ?? "";
@@ -4133,16 +4211,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)
@@ -4194,14 +4274,15 @@ export const DeleteDatabaseGroupRequest = {
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 ?? "";
@@ -4300,19 +4381,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;
},
@@ -4320,7 +4402,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 ?? "";
@@ -4375,14 +4456,15 @@ export const DatabaseGroup_Database = {
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 ?? "";
@@ -4466,18 +4548,24 @@ export const CreateSchemaGroupRequest = {
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 ?? "";
@@ -4544,16 +4632,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)
@@ -4605,14 +4695,15 @@ export const DeleteSchemaGroupRequest = {
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 ?? "";
@@ -4685,16 +4776,21 @@ export const ListSchemaGroupsRequest = {
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 ?? "";
@@ -4760,19 +4856,18 @@ export const ListSchemaGroupsResponse = {
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)) || [];
@@ -4835,15 +4930,18 @@ export const GetSchemaGroupRequest = {
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 ?? "";
@@ -4943,18 +5041,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;
},
@@ -4962,7 +5062,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 ?? "";
@@ -5041,16 +5140,21 @@ export const SchemaGroup_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 ?? "";
diff --git a/frontend/src/types/proto/v1/risk_service.ts b/frontend/src/types/proto/v1/risk_service.ts
index 73d7ce7a42..c2e42b5130 100644
--- a/frontend/src/types/proto/v1/risk_service.ts
+++ b/frontend/src/types/proto/v1/risk_service.ts
@@ -1,10 +1,10 @@
/* eslint-disable */
-import * as Long from "long";
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { Empty } from "../google/protobuf/empty";
import { FieldMask } from "../google/protobuf/field_mask";
import { Expr } from "../google/type/expr";
+import Long = require("long");
export const protobufPackage = "bytebase.v1";
@@ -185,15 +185,18 @@ export const ListRisksRequest = {
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;
@@ -256,19 +259,18 @@ export const ListRisksResponse = {
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)) || [];
@@ -318,14 +320,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;
@@ -387,15 +390,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;
@@ -445,14 +451,15 @@ export const DeleteRiskRequest = {
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 ?? "";
@@ -569,20 +576,33 @@ export const Risk = {
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 ?? "";
@@ -763,8 +783,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/v1/role_service.ts b/frontend/src/types/proto/v1/role_service.ts
index 0aabe1d545..4367d8ad21 100644
--- a/frontend/src/types/proto/v1/role_service.ts
+++ b/frontend/src/types/proto/v1/role_service.ts
@@ -118,15 +118,18 @@ export const ListRolesRequest = {
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;
@@ -189,19 +192,18 @@ export const ListRolesResponse = {
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)) || [];
@@ -264,15 +266,18 @@ export const CreateRoleRequest = {
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;
@@ -393,14 +401,15 @@ export const DeleteRoleRequest = {
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 ?? "";
@@ -473,16 +482,21 @@ export const Role = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.ts
index b581a3cdd1..88cdf7aef1 100644
--- a/frontend/src/types/proto/v1/rollout_service.ts
+++ b/frontend/src/types/proto/v1/rollout_service.ts
@@ -1,10 +1,10 @@
/* eslint-disable */
-import * as Long from "long";
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { FieldMask } from "../google/protobuf/field_mask";
import { Timestamp } from "../google/protobuf/timestamp";
import { ChangedResources } from "./database_service";
+import Long = require("long");
export const protobufPackage = "bytebase.v1";
@@ -1133,14 +1133,15 @@ export const GetPlanRequest = {
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 ?? "";
@@ -1213,16 +1214,21 @@ export const ListPlansRequest = {
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 ?? "";
@@ -1286,19 +1292,18 @@ export const ListPlansResponse = {
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)) || [];
@@ -1361,15 +1366,18 @@ export const CreatePlanRequest = {
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 ?? "";
@@ -1432,15 +1440,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;
@@ -1547,15 +1558,23 @@ export const Plan = {
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;
},
@@ -1563,7 +1582,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 ?? "";
@@ -1617,10 +1635,8 @@ export const Plan_Step = {
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;
},
@@ -1628,7 +1644,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)) || [];
@@ -1737,24 +1752,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;
@@ -1922,19 +1940,38 @@ 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);
- 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.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;
},
@@ -1942,7 +1979,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 ?? "";
@@ -2014,15 +2050,18 @@ export const Plan_CreateDatabaseConfig_LabelsEntry = {
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 ?? "";
@@ -2131,21 +2170,30 @@ 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);
+ 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);
+ }
return obj;
},
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 ?? "";
@@ -2214,15 +2262,18 @@ export const Plan_ChangeDatabaseConfig_RollbackDetail = {
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 ?? "";
@@ -2309,19 +2360,24 @@ export const Plan_RestoreDatabaseConfig = {
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 ?? "";
@@ -2399,16 +2455,21 @@ export const ListPlanCheckRunsRequest = {
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 ?? "";
@@ -2474,19 +2535,18 @@ export const ListPlanCheckRunsResponse = {
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)) || [];
@@ -2536,14 +2596,15 @@ export const RunPlanChecksRequest = {
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 ?? "";
@@ -2588,7 +2649,6 @@ export const RunPlanChecksResponse = {
create(base?: DeepPartial<RunPlanChecksResponse>): RunPlanChecksResponse {
return RunPlanChecksResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<RunPlanChecksResponse>): RunPlanChecksResponse {
const message = createBaseRunPlanChecksResponse();
return message;
@@ -2660,11 +2720,11 @@ export const BatchRunTasksRequest = {
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;
}
message.reason !== undefined && (obj.reason = message.reason);
return obj;
@@ -2673,7 +2733,6 @@ export const BatchRunTasksRequest = {
create(base?: DeepPartial<BatchRunTasksRequest>): BatchRunTasksRequest {
return BatchRunTasksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchRunTasksRequest>): BatchRunTasksRequest {
const message = createBaseBatchRunTasksRequest();
message.parent = object.parent ?? "";
@@ -2720,7 +2779,6 @@ export const BatchRunTasksResponse = {
create(base?: DeepPartial<BatchRunTasksResponse>): BatchRunTasksResponse {
return BatchRunTasksResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchRunTasksResponse>): BatchRunTasksResponse {
const message = createBaseBatchRunTasksResponse();
return message;
@@ -2792,11 +2850,11 @@ export const BatchSkipTasksRequest = {
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;
}
message.reason !== undefined && (obj.reason = message.reason);
return obj;
@@ -2805,7 +2863,6 @@ export const BatchSkipTasksRequest = {
create(base?: DeepPartial<BatchSkipTasksRequest>): BatchSkipTasksRequest {
return BatchSkipTasksRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchSkipTasksRequest>): BatchSkipTasksRequest {
const message = createBaseBatchSkipTasksRequest();
message.parent = object.parent ?? "";
@@ -2852,7 +2909,6 @@ export const BatchSkipTasksResponse = {
create(base?: DeepPartial<BatchSkipTasksResponse>): BatchSkipTasksResponse {
return BatchSkipTasksResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchSkipTasksResponse>): BatchSkipTasksResponse {
const message = createBaseBatchSkipTasksResponse();
return message;
@@ -2924,11 +2980,11 @@ export const BatchCancelTaskRunsRequest = {
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;
}
message.reason !== undefined && (obj.reason = message.reason);
return obj;
@@ -2937,7 +2993,6 @@ export const BatchCancelTaskRunsRequest = {
create(base?: DeepPartial<BatchCancelTaskRunsRequest>): BatchCancelTaskRunsRequest {
return BatchCancelTaskRunsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<BatchCancelTaskRunsRequest>): BatchCancelTaskRunsRequest {
const message = createBaseBatchCancelTaskRunsRequest();
message.parent = object.parent ?? "";
@@ -2984,7 +3039,6 @@ export const BatchCancelTaskRunsResponse = {
create(base?: DeepPartial<BatchCancelTaskRunsResponse>): BatchCancelTaskRunsResponse {
return BatchCancelTaskRunsResponse.fromPartial(base ?? {});
},
-
fromPartial(_: DeepPartial<BatchCancelTaskRunsResponse>): BatchCancelTaskRunsResponse {
const message = createBaseBatchCancelTaskRunsResponse();
return message;
@@ -3132,26 +3186,39 @@ export const PlanCheckRun = {
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 ?? "";
@@ -3269,23 +3336,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;
@@ -3378,22 +3452,24 @@ export const PlanCheckRun_Result_SqlSummaryReport = {
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;
@@ -3482,17 +3558,24 @@ export const PlanCheckRun_Result_SqlReviewReport = {
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;
@@ -3544,14 +3627,15 @@ export const GetRolloutRequest = {
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 ?? "";
@@ -3613,15 +3697,18 @@ export const CreateRolloutRequest = {
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 ?? "";
@@ -3684,15 +3771,18 @@ export const PreviewRolloutRequest = {
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 ?? "";
@@ -3766,16 +3856,21 @@ export const ListTaskRunsRequest = {
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 ?? "";
@@ -3839,19 +3934,18 @@ export const ListTaskRunsResponse = {
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)) || [];
@@ -3947,14 +4041,20 @@ export const Rollout = {
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;
},
@@ -3962,7 +4062,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 ?? "";
@@ -4061,14 +4160,20 @@ export const Stage = {
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;
},
@@ -4076,7 +4181,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 ?? "";
@@ -4309,42 +4413,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 ?? "";
@@ -4497,17 +4616,32 @@ 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);
- 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.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;
},
@@ -4515,7 +4649,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 ?? "";
@@ -4585,15 +4718,18 @@ export const Task_DatabaseCreate_LabelsEntry = {
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 ?? "";
@@ -4643,14 +4779,15 @@ export const Task_DatabaseSchemaBaseline = {
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 ?? "";
@@ -4712,15 +4849,18 @@ export const Task_DatabaseSchemaUpdate = {
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 ?? "";
@@ -4860,22 +5000,36 @@ export const Task_DatabaseDataUpdate = {
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 ?? "";
@@ -4931,14 +5085,15 @@ export const Task_DatabaseBackup = {
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 ?? "";
@@ -5011,16 +5166,21 @@ export const Task_DatabaseRestoreRestore = {
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 ?? "";
@@ -5195,24 +5355,45 @@ 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);
+ 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;
+ }
return obj;
},
create(base?: DeepPartial<TaskRun>): TaskRun {
return TaskRun.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<TaskRun>): TaskRun {
const message = createBaseTaskRun();
message.name = object.name ?? "";
@@ -6202,8 +6383,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/v1/schema_design_service.ts b/frontend/src/types/proto/v1/schema_design_service.ts
index 33e8531668..a10e6c896a 100644
--- a/frontend/src/types/proto/v1/schema_design_service.ts
+++ b/frontend/src/types/proto/v1/schema_design_service.ts
@@ -419,31 +419,57 @@ 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.type !== undefined && (obj.type = schemaDesign_TypeToJSON(message.type));
- message.etag !== undefined && (obj.etag = message.etag);
- 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.type !== 0) {
+ obj.type = schemaDesign_TypeToJSON(message.type);
+ }
+ if (message.etag !== "") {
+ obj.etag = message.etag;
+ }
+ 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 ?? "";
@@ -511,14 +537,15 @@ export const GetSchemaDesignRequest = {
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 ?? "";
@@ -602,17 +629,24 @@ export const ListSchemaDesignsRequest = {
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);
+ 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<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
return ListSchemaDesignsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
const message = createBaseListSchemaDesignsRequest();
message.parent = object.parent ?? "";
@@ -679,19 +713,18 @@ export const ListSchemaDesignsResponse = {
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)) || [];
@@ -754,16 +787,18 @@ export const CreateSchemaDesignRequest = {
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 ?? "";
@@ -828,16 +863,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)
@@ -902,15 +939,18 @@ export const MergeSchemaDesignRequest = {
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 ?? "";
@@ -973,15 +1013,18 @@ export const ParseSchemaStringRequest = {
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 ?? "";
@@ -1033,15 +1076,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)
@@ -1092,14 +1135,15 @@ export const DeleteSchemaDesignRequest = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.ts
index e7820cba49..d7ae82991e 100644
--- a/frontend/src/types/proto/v1/setting_service.ts
+++ b/frontend/src/types/proto/v1/setting_service.ts
@@ -455,15 +455,18 @@ export const ListSettingsRequest = {
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;
@@ -526,19 +529,18 @@ export const ListSettingsResponse = {
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)) || [];
@@ -588,14 +590,15 @@ export const GetSettingRequest = {
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 ?? "";
@@ -644,14 +647,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)
@@ -715,15 +719,18 @@ export const SetSettingRequest = {
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)
@@ -788,15 +795,18 @@ export const Setting = {
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 ?? "";
@@ -988,51 +998,45 @@ 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.semanticCategorySettingValue !== undefined &&
- (obj.semanticCategorySettingValue = message.semanticCategorySettingValue
- ? SemanticCategorySetting.toJSON(message.semanticCategorySettingValue)
- : 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.semanticCategorySettingValue !== undefined) {
+ obj.semanticCategorySettingValue = SemanticCategorySetting.toJSON(message.semanticCategorySettingValue);
+ }
return obj;
},
create(base?: DeepPartial<Value>): Value {
return Value.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Value>): Value {
const message = createBaseValue();
message.stringValue = object.stringValue ?? undefined;
@@ -1246,26 +1250,45 @@ export const SMTPMailDeliverySettingValue = {
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 ?? "";
@@ -1361,19 +1384,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;
@@ -1440,15 +1468,18 @@ export const AppIMSetting_ExternalApproval = {
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;
@@ -1508,15 +1539,18 @@ export const AgentPluginSetting = {
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 ?? "";
@@ -1632,25 +1666,30 @@ 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.refreshTokenDuration !== undefined && (obj.refreshTokenDuration = message.refreshTokenDuration
- ? Duration.toJSON(message.refreshTokenDuration)
- : 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.refreshTokenDuration !== undefined) {
+ obj.refreshTokenDuration = Duration.toJSON(message.refreshTokenDuration);
+ }
return obj;
},
create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
return WorkspaceProfileSetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {
const message = createBaseWorkspaceProfileSetting();
message.externalUrl = object.externalUrl ?? "";
@@ -1710,10 +1749,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;
},
@@ -1721,7 +1758,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)) || [];
@@ -1783,16 +1819,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)
@@ -1848,10 +1886,8 @@ export const ExternalApprovalSetting = {
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;
},
@@ -1859,7 +1895,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)) || [];
@@ -1932,16 +1967,21 @@ export const ExternalApprovalSetting_Node = {
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 ?? "";
@@ -2009,17 +2049,11 @@ 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.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));
}
return obj;
},
@@ -2027,7 +2061,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)) ||
@@ -2113,17 +2146,24 @@ 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);
+ 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);
+ }
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 ?? "";
@@ -2201,12 +2241,14 @@ export const SchemaTemplateSetting_ColumnType = {
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;
},
@@ -2214,7 +2256,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;
@@ -2322,19 +2363,30 @@ export const WorkspaceTrialSetting = {
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;
@@ -2392,12 +2444,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;
},
@@ -2405,7 +2453,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)) ||
@@ -2511,20 +2558,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;
},
@@ -2534,7 +2584,6 @@ export const DataClassificationSetting_DataClassificationConfig = {
): DataClassificationSetting_DataClassificationConfig {
return DataClassificationSetting_DataClassificationConfig.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig>,
): DataClassificationSetting_DataClassificationConfig {
@@ -2634,10 +2683,18 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
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);
- message.sensitive !== undefined && (obj.sensitive = message.sensitive);
+ if (message.id !== "") {
+ obj.id = message.id;
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.description !== "") {
+ obj.description = message.description;
+ }
+ if (message.sensitive === true) {
+ obj.sensitive = message.sensitive;
+ }
return obj;
},
@@ -2646,7 +2703,6 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {
): DataClassificationSetting_DataClassificationConfig_Level {
return DataClassificationSetting_DataClassificationConfig_Level.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_Level>,
): DataClassificationSetting_DataClassificationConfig_Level {
@@ -2741,10 +2797,18 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
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;
},
@@ -2753,7 +2817,6 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati
): DataClassificationSetting_DataClassificationConfig_DataClassification {
return DataClassificationSetting_DataClassificationConfig_DataClassification.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_DataClassification>,
): DataClassificationSetting_DataClassificationConfig_DataClassification {
@@ -2834,10 +2897,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;
},
@@ -2846,7 +2911,6 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
return DataClassificationSetting_DataClassificationConfig_ClassificationEntry.fromPartial(base ?? {});
},
-
fromPartial(
object: DeepPartial<DataClassificationSetting_DataClassificationConfig_ClassificationEntry>,
): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {
@@ -2904,12 +2968,8 @@ export const SemanticCategorySetting = {
toJSON(message: SemanticCategorySetting): unknown {
const obj: any = {};
- if (message.categories) {
- obj.categories = message.categories.map((e) =>
- e ? SemanticCategorySetting_SemanticCategory.toJSON(e) : undefined
- );
- } else {
- obj.categories = [];
+ if (message.categories?.length) {
+ obj.categories = message.categories.map((e) => SemanticCategorySetting_SemanticCategory.toJSON(e));
}
return obj;
},
@@ -2917,7 +2977,6 @@ export const SemanticCategorySetting = {
create(base?: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {
return SemanticCategorySetting.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {
const message = createBaseSemanticCategorySetting();
message.categories = object.categories?.map((e) => SemanticCategorySetting_SemanticCategory.fromPartial(e)) || [];
@@ -2990,16 +3049,21 @@ export const SemanticCategorySetting_SemanticCategory = {
toJSON(message: SemanticCategorySetting_SemanticCategory): 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;
},
create(base?: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {
return SemanticCategorySetting_SemanticCategory.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {
const message = createBaseSemanticCategorySetting_SemanticCategory();
message.id = object.id ?? "";
diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.ts
index 1fb833dfea..253b69a5ec 100644
--- a/frontend/src/types/proto/v1/sheet_service.ts
+++ b/frontend/src/types/proto/v1/sheet_service.ts
@@ -1,10 +1,10 @@
/* eslint-disable */
-import * as Long from "long";
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { Empty } from "../google/protobuf/empty";
import { FieldMask } from "../google/protobuf/field_mask";
import { Timestamp } from "../google/protobuf/timestamp";
+import Long = require("long");
export const protobufPackage = "bytebase.v1";
@@ -385,15 +385,18 @@ export const CreateSheetRequest = {
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 ?? "";
@@ -456,15 +459,18 @@ export const GetSheetRequest = {
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 ?? "";
@@ -527,15 +533,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;
@@ -598,16 +607,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)
@@ -683,16 +694,21 @@ export const SheetOrganizer = {
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 ?? "";
@@ -743,14 +759,15 @@ export const DeleteSheetRequest = {
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 ?? "";
@@ -834,17 +851,24 @@ export const SearchSheetsRequest = {
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 ?? "";
@@ -909,19 +933,18 @@ export const SearchSheetsResponse = {
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)) || [];
@@ -971,14 +994,15 @@ export const SyncSheetsRequest = {
toJSON(message: SyncSheetsRequest): unknown {
const obj: any = {};
- message.parent !== undefined && (obj.parent = message.parent);
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
return obj;
},
create(base?: DeepPartial<SyncSheetsRequest>): SyncSheetsRequest {
return SyncSheetsRequest.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<SyncSheetsRequest>): SyncSheetsRequest {
const message = createBaseSyncSheetsRequest();
message.parent = object.parent ?? "";
@@ -1175,27 +1199,51 @@ 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 = Math.round(message.contentSize));
- 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);
+ 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 !== 0) {
+ obj.contentSize = Math.round(message.contentSize);
+ }
+ 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 !== "") {
+ obj.payload = message.payload;
+ }
return obj;
},
create(base?: DeepPartial<Sheet>): Sheet {
return Sheet.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Sheet>): Sheet {
const message = createBaseSheet();
message.name = object.name ?? "";
@@ -1766,8 +1814,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index a4a97abed9..f244baeffb 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -1,11 +1,11 @@
/* eslint-disable */
-import * as Long from "long";
import type { CallContext, CallOptions } from "nice-grpc-common";
import * as _m0 from "protobufjs/minimal";
import { Duration } from "../google/protobuf/duration";
import { NullValue, nullValueFromJSON, nullValueToJSON, Value } from "../google/protobuf/struct";
import { Engine, engineFromJSON, engineToJSON } from "./common";
import { DatabaseMetadata } from "./database_service";
+import Long = require("long");
export const protobufPackage = "bytebase.v1";
@@ -344,17 +344,21 @@ export const DifferPreviewRequest = {
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;
@@ -407,14 +411,15 @@ export const DifferPreviewResponse = {
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 ?? "";
@@ -509,18 +514,27 @@ export const AdminExecuteRequest = {
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 ?? "";
@@ -575,10 +589,8 @@ export const AdminExecuteResponse = {
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;
},
@@ -586,7 +598,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)) || [];
@@ -692,19 +703,30 @@ export const ExportRequest = {
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 = exportRequest_FormatToJSON(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 = exportRequest_FormatToJSON(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 ?? "";
@@ -758,15 +780,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);
@@ -861,18 +883,27 @@ export const QueryRequest = {
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 ?? "";
@@ -951,24 +982,21 @@ export const QueryResponse = {
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)) || [];
@@ -1131,41 +1159,36 @@ export const QueryResult = {
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) || [];
@@ -1223,10 +1246,8 @@ export const QueryRow = {
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;
},
@@ -1234,7 +1255,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)) || [];
@@ -1407,26 +1427,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 = Math.round(message.int64Value));
- message.stringValue !== undefined && (obj.stringValue = message.stringValue);
- message.uint32Value !== undefined && (obj.uint32Value = Math.round(message.uint32Value));
- message.uint64Value !== undefined && (obj.uint64Value = Math.round(message.uint64Value));
- 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 = Math.round(message.int64Value);
+ }
+ if (message.stringValue !== undefined) {
+ obj.stringValue = message.stringValue;
+ }
+ if (message.uint32Value !== undefined) {
+ obj.uint32Value = Math.round(message.uint32Value);
+ }
+ if (message.uint64Value !== undefined) {
+ obj.uint64Value = Math.round(message.uint64Value);
+ }
+ 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;
@@ -1542,19 +1581,30 @@ export const Advice = {
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.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.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;
@@ -1632,16 +1682,21 @@ export const PrettyRequest = {
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;
@@ -1705,15 +1760,18 @@ export const PrettyResponse = {
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 ?? "";
@@ -1985,8 +2043,6 @@ function longToNumber(long: Long): number {
return long.toNumber();
}
-// If you get a compile-error about 'Constructor<Long> and ... have no overlap',
-// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long as any;
_m0.configure();
diff --git a/frontend/src/types/proto/v1/subscription_service.ts b/frontend/src/types/proto/v1/subscription_service.ts
index 219bb6c2af..8ebbbe583a 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)
@@ -345,14 +345,15 @@ export const PatchSubscription = {
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 ?? "";
@@ -425,16 +426,21 @@ export const TrialSubscription = {
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;
@@ -561,20 +567,33 @@ export const Subscription = {
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;
@@ -629,10 +648,8 @@ export const FeatureMatrix = {
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 +657,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)) || [];
@@ -710,12 +726,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,7 +744,6 @@ export const Feature = {
create(base?: DeepPartial<Feature>): Feature {
return Feature.fromPartial(base ?? {});
},
-
fromPartial(object: DeepPartial<Feature>): Feature {
const message = createBaseFeature();
message.name = object.name ?? "";
@@ -791,15 +811,18 @@ export const Feature_MatrixEntry = {
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 ?? "";
diff --git a/frontend/src/types/proto/v1/vcs.ts b/frontend/src/types/proto/v1/vcs.ts
index 49a2376923..11616e9982 100644
--- a/frontend/src/types/proto/v1/vcs.ts
+++ b/frontend/src/types/proto/v1/vcs.ts
@@ -251,29 +251,45 @@ export const PushEvent = {
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;
@@ -434,22 +450,32 @@ export const Commit = {
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;
},
@@ -457,7 +483,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 ?? "";
@@ -602,21 +627,36 @@ export const FileCommit = {
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 ?? "";
diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml
index b8473a45cd..75624680a2 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.156.7
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: env=browser,useOptionals=messages,outputServices=nice-grpc,outputServices=generic-definitions,useExactTypes=false
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index c74f39c1db..009fa7db6e 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -32,6 +32,7 @@
- [PageToken](#bytebase-store-PageToken)
- [Engine](#bytebase-store-Engine)
+ - [MaskingLevel](#bytebase-store-MaskingLevel)
- [store/data_source.proto](#store_data_source-proto)
- [DataSourceOptions](#bytebase-store-DataSourceOptions)
@@ -120,6 +121,8 @@
- [store/policy.proto](#store_policy-proto)
- [Binding](#bytebase-store-Binding)
- [IamPolicy](#bytebase-store-IamPolicy)
+ - [MaskData](#bytebase-store-MaskData)
+ - [MaskingPolicy](#bytebase-store-MaskingPolicy)
- [store/setting.proto](#store_setting-proto)
- [AgentPluginSetting](#bytebase-store-AgentPluginSetting)
@@ -556,6 +559,20 @@ Used internally for obfuscating the page token.
| DM | 15 | |
+
+<a name="bytebase-store-MaskingLevel"></a>
+
+### MaskingLevel
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MASKING_LEVEL_UNSPECIFIED | 0 | |
+| NONE | 1 | |
+| PARTIAL | 2 | |
+| FULL | 3 | |
+
+
@@ -1846,6 +1863,40 @@ Reference: https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#bind
+
+<a name="bytebase-store-MaskData"></a>
+
+### MaskData
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| schema | [string](#string) | | |
+| table | [string](#string) | | |
+| column | [string](#string) | | |
+| semantic_category_id | [string](#string) | | |
+| masking_level | [MaskingLevel](#bytebase-store-MaskingLevel) | | |
+
+
+
+
+
+
+<a name="bytebase-store-MaskingPolicy"></a>
+
+### MaskingPolicy
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| mask_data | [MaskData](#bytebase-store-MaskData) | repeated | |
+
+
+
+
+
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 21e3d8da22..10eab010d2 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -36,15 +36,15 @@
- [GetPolicyRequest](#bytebase-v1-GetPolicyRequest)
- [ListPoliciesRequest](#bytebase-v1-ListPoliciesRequest)
- [ListPoliciesResponse](#bytebase-v1-ListPoliciesResponse)
+ - [MaskData](#bytebase-v1-MaskData)
- [MaskingExceptionPolicy](#bytebase-v1-MaskingExceptionPolicy)
- [MaskingExceptionPolicy.MaskingException](#bytebase-v1-MaskingExceptionPolicy-MaskingException)
+ - [MaskingPolicy](#bytebase-v1-MaskingPolicy)
- [MaskingRulePolicy](#bytebase-v1-MaskingRulePolicy)
- [MaskingRulePolicy.MaskingRule](#bytebase-v1-MaskingRulePolicy-MaskingRule)
- [Policy](#bytebase-v1-Policy)
- [SQLReviewPolicy](#bytebase-v1-SQLReviewPolicy)
- [SQLReviewRule](#bytebase-v1-SQLReviewRule)
- - [SensitiveData](#bytebase-v1-SensitiveData)
- - [SensitiveDataPolicy](#bytebase-v1-SensitiveDataPolicy)
- [SlowQueryPolicy](#bytebase-v1-SlowQueryPolicy)
- [UpdatePolicyRequest](#bytebase-v1-UpdatePolicyRequest)
@@ -1059,6 +1059,25 @@ When paginating, all other parameters provided to `GetPolicies` must match the c
+<a name="bytebase-v1-MaskData"></a>
+
+### MaskData
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| schema | [string](#string) | | |
+| table | [string](#string) | | |
+| column | [string](#string) | | |
+| semantic_category_id | [string](#string) | | |
+| masking_level | [MaskingLevel](#bytebase-v1-MaskingLevel) | | |
+
+
+
+
+
+
<a name="bytebase-v1-MaskingExceptionPolicy"></a>
### MaskingExceptionPolicy
@@ -1094,6 +1113,21 @@ MaskingExceptionPolicy is the allowlist of users who can access sensitive data.
+<a name="bytebase-v1-MaskingPolicy"></a>
+
+### MaskingPolicy
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| mask_data | [MaskData](#bytebase-v1-MaskData) | repeated | |
+
+
+
+
+
+
<a name="bytebase-v1-MaskingRulePolicy"></a>
### MaskingRulePolicy
@@ -1140,7 +1174,7 @@ MaskingExceptionPolicy is the allowlist of users who can access sensitive data.
| workspace_iam_policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |
| deployment_approval_policy | [DeploymentApprovalPolicy](#bytebase-v1-DeploymentApprovalPolicy) | | |
| backup_plan_policy | [BackupPlanPolicy](#bytebase-v1-BackupPlanPolicy) | | |
-| sensitive_data_policy | [SensitiveDataPolicy](#bytebase-v1-SensitiveDataPolicy) | | |
+| masking_policy | [MaskingPolicy](#bytebase-v1-MaskingPolicy) | | |
| sql_review_policy | [SQLReviewPolicy](#bytebase-v1-SQLReviewPolicy) | | |
| slow_query_policy | [SlowQueryPolicy](#bytebase-v1-SlowQueryPolicy) | | |
| disable_copy_data_policy | [DisableCopyDataPolicy](#bytebase-v1-DisableCopyDataPolicy) | | |
@@ -1190,40 +1224,6 @@ MaskingExceptionPolicy is the allowlist of users who can access sensitive data.
-<a name="bytebase-v1-SensitiveData"></a>
-
-### SensitiveData
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | |
-| table | [string](#string) | | |
-| column | [string](#string) | | |
-| semantic_category_id | [string](#string) | | |
-| masking_level | [MaskingLevel](#bytebase-v1-MaskingLevel) | | |
-
-
-
-
-
-
-<a name="bytebase-v1-SensitiveDataPolicy"></a>
-
-### SensitiveDataPolicy
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| sensitive_data | [SensitiveData](#bytebase-v1-SensitiveData) | repeated | |
-
-
-
-
-
-
<a name="bytebase-v1-SlowQueryPolicy"></a>
### SlowQueryPolicy
diff --git a/proto/generated-go/store/common.pb.go b/proto/generated-go/store/common.pb.go
index 418b4f8091..a50f0f8d9a 100644
--- a/proto/generated-go/store/common.pb.go
+++ b/proto/generated-go/store/common.pb.go
@@ -108,6 +108,58 @@ func (Engine) EnumDescriptor() ([]byte, []int) {
return file_store_common_proto_rawDescGZIP(), []int{0}
}
+type MaskingLevel int32
+
+const (
+ MaskingLevel_MASKING_LEVEL_UNSPECIFIED MaskingLevel = 0
+ MaskingLevel_NONE MaskingLevel = 1
+ MaskingLevel_PARTIAL MaskingLevel = 2
+ MaskingLevel_FULL MaskingLevel = 3
+)
+
+// Enum value maps for MaskingLevel.
+var (
+ MaskingLevel_name = map[int32]string{
+ 0: "MASKING_LEVEL_UNSPECIFIED",
+ 1: "NONE",
+ 2: "PARTIAL",
+ 3: "FULL",
+ }
+ MaskingLevel_value = map[string]int32{
+ "MASKING_LEVEL_UNSPECIFIED": 0,
+ "NONE": 1,
+ "PARTIAL": 2,
+ "FULL": 3,
+ }
+)
+
+func (x MaskingLevel) Enum() *MaskingLevel {
+ p := new(MaskingLevel)
+ *p = x
+ return p
+}
+
+func (x MaskingLevel) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (MaskingLevel) Descriptor() protoreflect.EnumDescriptor {
+ return file_store_common_proto_enumTypes[1].Descriptor()
+}
+
+func (MaskingLevel) Type() protoreflect.EnumType {
+ return &file_store_common_proto_enumTypes[1]
+}
+
+func (x MaskingLevel) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use MaskingLevel.Descriptor instead.
+func (MaskingLevel) EnumDescriptor() ([]byte, []int) {
+ return file_store_common_proto_rawDescGZIP(), []int{1}
+}
+
// Used internally for obfuscating the page token.
type PageToken struct {
state protoimpl.MessageState
@@ -186,7 +238,12 @@ var file_store_common_proto_rawDesc = []byte{
0x0a, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x53, 0x53, 0x51, 0x4c, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08,
0x52, 0x45, 0x44, 0x53, 0x48, 0x49, 0x46, 0x54, 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x41,
0x52, 0x49, 0x41, 0x44, 0x42, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x43, 0x45, 0x41, 0x4e,
- 0x42, 0x41, 0x53, 0x45, 0x10, 0x0e, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x4d, 0x10, 0x0f, 0x42, 0x14,
+ 0x42, 0x41, 0x53, 0x45, 0x10, 0x0e, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x4d, 0x10, 0x0f, 0x2a, 0x4e,
+ 0x0a, 0x0c, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d,
+ 0x0a, 0x19, 0x4d, 0x41, 0x53, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a,
+ 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x52, 0x54, 0x49,
+ 0x41, 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x03, 0x42, 0x14,
0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
@@ -203,11 +260,12 @@ func file_store_common_proto_rawDescGZIP() []byte {
return file_store_common_proto_rawDescData
}
-var file_store_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_store_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_store_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_store_common_proto_goTypes = []interface{}{
(Engine)(0), // 0: bytebase.store.Engine
- (*PageToken)(nil), // 1: bytebase.store.PageToken
+ (MaskingLevel)(0), // 1: bytebase.store.MaskingLevel
+ (*PageToken)(nil), // 2: bytebase.store.PageToken
}
var file_store_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@@ -241,7 +299,7 @@ func file_store_common_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_common_proto_rawDesc,
- NumEnums: 1,
+ NumEnums: 2,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
diff --git a/proto/generated-go/store/policy.pb.go b/proto/generated-go/store/policy.pb.go
index b2429adc7c..127502ec71 100644
--- a/proto/generated-go/store/policy.pb.go
+++ b/proto/generated-go/store/policy.pb.go
@@ -143,26 +143,170 @@ func (x *Binding) GetCondition() *expr.Expr {
return nil
}
+type MaskingPolicy struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MaskData []*MaskData `protobuf:"bytes,1,rep,name=mask_data,json=maskData,proto3" json:"mask_data,omitempty"`
+}
+
+func (x *MaskingPolicy) Reset() {
+ *x = MaskingPolicy{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_policy_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MaskingPolicy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MaskingPolicy) ProtoMessage() {}
+
+func (x *MaskingPolicy) ProtoReflect() protoreflect.Message {
+ mi := &file_store_policy_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MaskingPolicy.ProtoReflect.Descriptor instead.
+func (*MaskingPolicy) Descriptor() ([]byte, []int) {
+ return file_store_policy_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *MaskingPolicy) GetMaskData() []*MaskData {
+ if x != nil {
+ return x.MaskData
+ }
+ return nil
+}
+
+type MaskData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
+ Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
+ Column string `protobuf:"bytes,3,opt,name=column,proto3" json:"column,omitempty"`
+ SemanticCategoryId string `protobuf:"bytes,4,opt,name=semantic_category_id,json=semanticCategoryId,proto3" json:"semantic_category_id,omitempty"`
+ MaskingLevel MaskingLevel `protobuf:"varint,5,opt,name=masking_level,json=maskingLevel,proto3,enum=bytebase.store.MaskingLevel" json:"masking_level,omitempty"`
+}
+
+func (x *MaskData) Reset() {
+ *x = MaskData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_policy_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MaskData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MaskData) ProtoMessage() {}
+
+func (x *MaskData) ProtoReflect() protoreflect.Message {
+ mi := &file_store_policy_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MaskData.ProtoReflect.Descriptor instead.
+func (*MaskData) Descriptor() ([]byte, []int) {
+ return file_store_policy_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *MaskData) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+func (x *MaskData) GetTable() string {
+ if x != nil {
+ return x.Table
+ }
+ return ""
+}
+
+func (x *MaskData) GetColumn() string {
+ if x != nil {
+ return x.Column
+ }
+ return ""
+}
+
+func (x *MaskData) GetSemanticCategoryId() string {
+ if x != nil {
+ return x.SemanticCategoryId
+ }
+ return ""
+}
+
+func (x *MaskData) GetMaskingLevel() MaskingLevel {
+ if x != nil {
+ return x.MaskingLevel
+ }
+ return MaskingLevel_MASKING_LEVEL_UNSPECIFIED
+}
+
var File_store_policy_proto protoreflect.FileDescriptor
var file_store_policy_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
0x74, 0x6f, 0x72, 0x65, 0x1a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70,
- 0x65, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x09,
- 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x0a, 0x08, 0x62, 0x69, 0x6e,
- 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e,
- 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x68,
- 0x0a, 0x07, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a,
- 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
- 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x09, 0x63,
- 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65,
- 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x40, 0x0a, 0x09, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x0a,
+ 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
+ 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e,
+ 0x67, 0x73, 0x22, 0x68, 0x0a, 0x07, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a,
+ 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c,
+ 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x63,
+ 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x70,
+ 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x0d,
+ 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x35, 0x0a,
+ 0x09, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x61, 0x73, 0x6b,
+ 0x44, 0x61, 0x74, 0x61, 0x22, 0xc5, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74,
+ 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12,
+ 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x6d, 0x61, 0x6e,
+ 0x74, 0x69, 0x63, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43,
+ 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0d, 0x6d, 0x61, 0x73,
+ 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c,
+ 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x14, 0x5a, 0x12,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -177,20 +321,25 @@ func file_store_policy_proto_rawDescGZIP() []byte {
return file_store_policy_proto_rawDescData
}
-var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_store_policy_proto_goTypes = []interface{}{
- (*IamPolicy)(nil), // 0: bytebase.store.IamPolicy
- (*Binding)(nil), // 1: bytebase.store.Binding
- (*expr.Expr)(nil), // 2: google.type.Expr
+ (*IamPolicy)(nil), // 0: bytebase.store.IamPolicy
+ (*Binding)(nil), // 1: bytebase.store.Binding
+ (*MaskingPolicy)(nil), // 2: bytebase.store.MaskingPolicy
+ (*MaskData)(nil), // 3: bytebase.store.MaskData
+ (*expr.Expr)(nil), // 4: google.type.Expr
+ (MaskingLevel)(0), // 5: bytebase.store.MaskingLevel
}
var file_store_policy_proto_depIdxs = []int32{
1, // 0: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding
- 2, // 1: bytebase.store.Binding.condition:type_name -> google.type.Expr
- 2, // [2:2] is the sub-list for method output_type
- 2, // [2:2] is the sub-list for method input_type
- 2, // [2:2] is the sub-list for extension type_name
- 2, // [2:2] is the sub-list for extension extendee
- 0, // [0:2] is the sub-list for field type_name
+ 4, // 1: bytebase.store.Binding.condition:type_name -> google.type.Expr
+ 3, // 2: bytebase.store.MaskingPolicy.mask_data:type_name -> bytebase.store.MaskData
+ 5, // 3: bytebase.store.MaskData.masking_level:type_name -> bytebase.store.MaskingLevel
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
}
func init() { file_store_policy_proto_init() }
@@ -198,6 +347,7 @@ func file_store_policy_proto_init() {
if File_store_policy_proto != nil {
return
}
+ file_store_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_store_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IamPolicy); i {
@@ -223,6 +373,30 @@ func file_store_policy_proto_init() {
return nil
}
}
+ file_store_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MaskingPolicy); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_store_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MaskData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -230,7 +404,7 @@ func file_store_policy_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_policy_proto_rawDesc,
NumEnums: 0,
- NumMessages: 2,
+ NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/generated-go/v1/org_policy_service.pb.go b/proto/generated-go/v1/org_policy_service.pb.go
index 5747ed1f5d..1d66951055 100644
--- a/proto/generated-go/v1/org_policy_service.pb.go
+++ b/proto/generated-go/v1/org_policy_service.pb.go
@@ -813,7 +813,7 @@ type Policy struct {
// *Policy_WorkspaceIamPolicy
// *Policy_DeploymentApprovalPolicy
// *Policy_BackupPlanPolicy
- // *Policy_SensitiveDataPolicy
+ // *Policy_MaskingPolicy
// *Policy_SqlReviewPolicy
// *Policy_SlowQueryPolicy
// *Policy_DisableCopyDataPolicy
@@ -915,9 +915,9 @@ func (x *Policy) GetBackupPlanPolicy() *BackupPlanPolicy {
return nil
}
-func (x *Policy) GetSensitiveDataPolicy() *SensitiveDataPolicy {
- if x, ok := x.GetPolicy().(*Policy_SensitiveDataPolicy); ok {
- return x.SensitiveDataPolicy
+func (x *Policy) GetMaskingPolicy() *MaskingPolicy {
+ if x, ok := x.GetPolicy().(*Policy_MaskingPolicy); ok {
+ return x.MaskingPolicy
}
return nil
}
@@ -994,8 +994,8 @@ type Policy_BackupPlanPolicy struct {
BackupPlanPolicy *BackupPlanPolicy `protobuf:"bytes,8,opt,name=backup_plan_policy,json=backupPlanPolicy,proto3,oneof"`
}
-type Policy_SensitiveDataPolicy struct {
- SensitiveDataPolicy *SensitiveDataPolicy `protobuf:"bytes,9,opt,name=sensitive_data_policy,json=sensitiveDataPolicy,proto3,oneof"`
+type Policy_MaskingPolicy struct {
+ MaskingPolicy *MaskingPolicy `protobuf:"bytes,9,opt,name=masking_policy,json=maskingPolicy,proto3,oneof"`
}
type Policy_SqlReviewPolicy struct {
@@ -1024,7 +1024,7 @@ func (*Policy_DeploymentApprovalPolicy) isPolicy_Policy() {}
func (*Policy_BackupPlanPolicy) isPolicy_Policy() {}
-func (*Policy_SensitiveDataPolicy) isPolicy_Policy() {}
+func (*Policy_MaskingPolicy) isPolicy_Policy() {}
func (*Policy_SqlReviewPolicy) isPolicy_Policy() {}
@@ -1303,16 +1303,16 @@ func (x *DisableCopyDataPolicy) GetActive() bool {
return false
}
-type SensitiveDataPolicy struct {
+type MaskingPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- SensitiveData []*SensitiveData `protobuf:"bytes,1,rep,name=sensitive_data,json=sensitiveData,proto3" json:"sensitive_data,omitempty"`
+ MaskData []*MaskData `protobuf:"bytes,1,rep,name=mask_data,json=maskData,proto3" json:"mask_data,omitempty"`
}
-func (x *SensitiveDataPolicy) Reset() {
- *x = SensitiveDataPolicy{}
+func (x *MaskingPolicy) Reset() {
+ *x = MaskingPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_v1_org_policy_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1320,13 +1320,13 @@ func (x *SensitiveDataPolicy) Reset() {
}
}
-func (x *SensitiveDataPolicy) String() string {
+func (x *MaskingPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SensitiveDataPolicy) ProtoMessage() {}
+func (*MaskingPolicy) ProtoMessage() {}
-func (x *SensitiveDataPolicy) ProtoReflect() protoreflect.Message {
+func (x *MaskingPolicy) ProtoReflect() protoreflect.Message {
mi := &file_v1_org_policy_service_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1338,19 +1338,19 @@ func (x *SensitiveDataPolicy) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SensitiveDataPolicy.ProtoReflect.Descriptor instead.
-func (*SensitiveDataPolicy) Descriptor() ([]byte, []int) {
+// Deprecated: Use MaskingPolicy.ProtoReflect.Descriptor instead.
+func (*MaskingPolicy) Descriptor() ([]byte, []int) {
return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12}
}
-func (x *SensitiveDataPolicy) GetSensitiveData() []*SensitiveData {
+func (x *MaskingPolicy) GetMaskData() []*MaskData {
if x != nil {
- return x.SensitiveData
+ return x.MaskData
}
return nil
}
-type SensitiveData struct {
+type MaskData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -1362,8 +1362,8 @@ type SensitiveData struct {
MaskingLevel MaskingLevel `protobuf:"varint,5,opt,name=masking_level,json=maskingLevel,proto3,enum=bytebase.v1.MaskingLevel" json:"masking_level,omitempty"`
}
-func (x *SensitiveData) Reset() {
- *x = SensitiveData{}
+func (x *MaskData) Reset() {
+ *x = MaskData{}
if protoimpl.UnsafeEnabled {
mi := &file_v1_org_policy_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1371,13 +1371,13 @@ func (x *SensitiveData) Reset() {
}
}
-func (x *SensitiveData) String() string {
+func (x *MaskData) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SensitiveData) ProtoMessage() {}
+func (*MaskData) ProtoMessage() {}
-func (x *SensitiveData) ProtoReflect() protoreflect.Message {
+func (x *MaskData) ProtoReflect() protoreflect.Message {
mi := &file_v1_org_policy_service_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1389,40 +1389,40 @@ func (x *SensitiveData) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SensitiveData.ProtoReflect.Descriptor instead.
-func (*SensitiveData) Descriptor() ([]byte, []int) {
+// Deprecated: Use MaskData.ProtoReflect.Descriptor instead.
+func (*MaskData) Descriptor() ([]byte, []int) {
return file_v1_org_policy_service_proto_rawDescGZIP(), []int{13}
}
-func (x *SensitiveData) GetSchema() string {
+func (x *MaskData) GetSchema() string {
if x != nil {
return x.Schema
}
return ""
}
-func (x *SensitiveData) GetTable() string {
+func (x *MaskData) GetTable() string {
if x != nil {
return x.Table
}
return ""
}
-func (x *SensitiveData) GetColumn() string {
+func (x *MaskData) GetColumn() string {
if x != nil {
return x.Column
}
return ""
}
-func (x *SensitiveData) GetSemanticCategoryId() string {
+func (x *MaskData) GetSemanticCategoryId() string {
if x != nil {
return x.SemanticCategoryId
}
return ""
}
-func (x *SensitiveData) GetMaskingLevel() MaskingLevel {
+func (x *MaskData) GetMaskingLevel() MaskingLevel {
if x != nil {
return x.MaskingLevel
}
@@ -1859,7 +1859,7 @@ var file_v1_org_policy_service_proto_rawDesc = []byte{
0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a,
0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65,
- 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb1, 0x08, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9e, 0x08, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x69,
@@ -1884,307 +1884,305 @@ var file_v1_org_policy_service_proto_rawDesc = []byte{
0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6c, 0x61, 0x6e,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x10, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70,
- 0x50, 0x6c, 0x61, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x56, 0x0a, 0x15, 0x73, 0x65,
- 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x6c,
- 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76,
- 0x65, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x13, 0x73,
- 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
- 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x51, 0x4c, 0x52,
- 0x65, 0x76, 0x69, 0x65, 0x77, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x73,
- 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4a,
- 0x0a, 0x11, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c,
- 0x69, 0x63, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72,
- 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x51,
- 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5d, 0x0a, 0x18, 0x64, 0x69,
- 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f,
- 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62,
+ 0x50, 0x6c, 0x61, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x43, 0x0a, 0x0e, 0x6d, 0x61,
+ 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00,
+ 0x52, 0x0d, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
+ 0x4a, 0x0a, 0x11, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x70, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69,
+ 0x65, 0x77, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52,
+ 0x65, 0x76, 0x69, 0x65, 0x77, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x73,
+ 0x6c, 0x6f, 0x77, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72,
+ 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5d, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62,
+ 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43,
+ 0x6f, 0x70, 0x79, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52,
+ 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x44, 0x61, 0x74, 0x61,
+ 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x13, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e,
+ 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x75,
+ 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x6d, 0x61, 0x73, 0x6b,
+ 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67,
+ 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48,
+ 0x00, 0x52, 0x16, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x66,
+ 0x6f, 0x72, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x66, 0x6f,
+ 0x72, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03,
+ 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26,
+ 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x0f,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x55, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0xd3, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x70, 0x6c, 0x6f,
+ 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x12, 0x48, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73,
+ 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x72,
+ 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0f, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x6d, 0x0a,
+ 0x1e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x70, 0x72,
+ 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70,
+ 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x1c,
+ 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76,
+ 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, 0x65, 0x73, 0x22, 0xf1, 0x01, 0x0a,
+ 0x1a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f,
+ 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x44, 0x0a, 0x0f, 0x64,
+ 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
+ 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
+ 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70,
+ 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x10,
+ 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
+ 0x22, 0x99, 0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6c, 0x61, 0x6e, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6c, 0x61, 0x6e,
+ 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
+ 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x74, 0x65, 0x6e,
+ 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x0f,
+ 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
+ 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x2f, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, 0x62,
0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x48, 0x00, 0x52, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x44,
- 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x13, 0x6d, 0x61, 0x73,
- 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65,
- 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e,
- 0x67, 0x52, 0x75, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x18, 0x6d,
- 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b,
- 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63,
- 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07,
- 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65,
- 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03,
- 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
- 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x69,
- 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x6f, 0x6c,
- 0x69, 0x63, 0x79, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0xd3, 0x01, 0x0a, 0x18, 0x44, 0x65,
- 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
- 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x48, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
- 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41,
- 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52,
- 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
- 0x12, 0x6d, 0x0a, 0x1e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61,
- 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69,
- 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e,
- 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67,
- 0x79, 0x52, 0x1c, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x70,
- 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x69, 0x65, 0x73, 0x22,
- 0xf1, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x70,
- 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x44,
- 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74,
- 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74,
- 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
- 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f,
- 0x76, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76,
- 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x72, 0x6f,
- 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67,
- 0x79, 0x52, 0x10, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74,
- 0x65, 0x67, 0x79, 0x22, 0x99, 0x01, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6c,
- 0x61, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65,
- 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50,
- 0x6c, 0x61, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x73, 0x63, 0x68,
- 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69,
- 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65,
- 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
- 0x29, 0x0a, 0x0f, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x2f, 0x0a, 0x15, 0x44, 0x69,
- 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c,
- 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x58, 0x0a, 0x13, 0x53,
- 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x12, 0x41, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f,
- 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69,
- 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76,
- 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc7, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74,
- 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
- 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
- 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x30, 0x0a,
- 0x14, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f,
- 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x65, 0x6d,
- 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12,
+ 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x43, 0x0a, 0x0d, 0x4d, 0x61, 0x73, 0x6b,
+ 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x6d, 0x61, 0x73,
+ 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x44,
+ 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x22, 0xc2, 0x01,
+ 0x0a, 0x08, 0x4d, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75,
+ 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
+ 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x61, 0x74,
+ 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12,
+ 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
+ 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65,
+ 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c,
+ 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76,
+ 0x65, 0x6c, 0x22, 0x57, 0x0a, 0x0f, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c,
+ 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77,
+ 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x0d,
+ 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a,
+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x12, 0x35, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
+ 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65,
+ 0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c,
+ 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f,
+ 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12,
+ 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xab, 0x03, 0x0a, 0x16, 0x4d, 0x61,
+ 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x12, 0x63, 0x0a, 0x12, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f,
+ 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
+ 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63,
+ 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45,
+ 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xab, 0x02, 0x0a, 0x10, 0x4d, 0x61,
+ 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53,
+ 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73,
+ 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6c,
+ 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67,
+ 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65,
+ 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03,
+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a,
+ 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x45,
+ 0x78, 0x70, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x37,
+ 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45,
+ 0x58, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x73, 0x6b,
+ 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x40, 0x0a,
+ 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69,
+ 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4d, 0x61, 0x73,
+ 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x1a,
+ 0x7e, 0x0a, 0x0b, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x2f,
+ 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x45, 0x78, 0x70, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x3e, 0x0a, 0x0d, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65,
- 0x6c, 0x52, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22,
- 0x57, 0x0a, 0x0f, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18,
- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c,
- 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x51, 0x4c,
- 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x35,
- 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x51, 0x4c, 0x52,
- 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05,
- 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,
- 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
- 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e,
- 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07,
- 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
- 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xab, 0x03, 0x0a, 0x16, 0x4d, 0x61, 0x73, 0x6b, 0x69,
- 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x12, 0x63, 0x0a, 0x12, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x63,
- 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b,
- 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xab, 0x02, 0x0a, 0x10, 0x4d, 0x61, 0x73, 0x6b, 0x69,
- 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x06, 0x61,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e,
- 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x3e, 0x0a, 0x0d, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65,
- 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76,
- 0x65, 0x6c, 0x52, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
- 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
- 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x6f,
- 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x72,
- 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x37, 0x0a, 0x06, 0x41,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,
- 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x50, 0x4f,
- 0x52, 0x54, 0x10, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67,
- 0x52, 0x75, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x72, 0x75,
- 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x52,
- 0x75, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e,
- 0x67, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x7e, 0x0a, 0x0b,
- 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63,
- 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x70,
- 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d,
- 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0c,
- 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x2a, 0xb7, 0x01, 0x0a,
- 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x50,
- 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
- 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x57, 0x4f, 0x52, 0x4b,
- 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x41, 0x4d, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x44,
- 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56,
- 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x5f, 0x50,
- 0x4c, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x5f, 0x52, 0x45, 0x56,
- 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49,
- 0x56, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x4c, 0x4f,
- 0x57, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x53,
- 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x08,
- 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x7c, 0x0a, 0x12, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19,
- 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
- 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x57,
- 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x4e,
- 0x56, 0x49, 0x52, 0x4f, 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50,
- 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x53, 0x54,
- 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,
- 0x53, 0x45, 0x10, 0x05, 0x2a, 0x69, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c,
- 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45,
- 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41,
- 0x4c, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x44, 0x42, 0x41, 0x10, 0x01, 0x12, 0x20, 0x0a,
- 0x1c, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f,
- 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x02, 0x2a,
- 0x50, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74,
- 0x65, 0x67, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f,
- 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x41,
- 0x54, 0x49, 0x43, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x10,
- 0x02, 0x2a, 0x50, 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6c, 0x61, 0x6e, 0x53,
- 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x43, 0x48, 0x45, 0x44,
- 0x55, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
- 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05,
- 0x44, 0x41, 0x49, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x45, 0x45, 0x4b, 0x4c,
- 0x59, 0x10, 0x03, 0x2a, 0x51, 0x0a, 0x12, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77,
- 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x45, 0x56,
- 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
- 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57,
- 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41,
- 0x42, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0xeb, 0x0b, 0x0a, 0x10, 0x4f, 0x72, 0x67, 0x50, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x89, 0x02, 0x0a, 0x09,
- 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xc7, 0x01,
+ 0x6c, 0x52, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x2a,
+ 0xb7, 0x01, 0x0a, 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b,
+ 0x0a, 0x17, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x57,
+ 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x41, 0x4d, 0x10, 0x01, 0x12, 0x17,
+ 0x0a, 0x13, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50,
+ 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x41, 0x43, 0x4b, 0x55,
+ 0x50, 0x5f, 0x50, 0x4c, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x5f,
+ 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x4e, 0x53,
+ 0x49, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a,
+ 0x53, 0x4c, 0x4f, 0x57, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11,
+ 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x50, 0x59, 0x5f, 0x44, 0x41, 0x54,
+ 0x41, 0x10, 0x08, 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x7c, 0x0a, 0x12, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d,
+ 0x0a, 0x09, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a,
+ 0x0b, 0x45, 0x4e, 0x56, 0x49, 0x52, 0x4f, 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x0b,
+ 0x0a, 0x07, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x49,
+ 0x4e, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54,
+ 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x05, 0x2a, 0x69, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x72, 0x6f,
+ 0x76, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x53, 0x53, 0x49,
+ 0x47, 0x4e, 0x45, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x50, 0x50, 0x52,
+ 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x44, 0x42, 0x41, 0x10, 0x01,
+ 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x41, 0x4c, 0x5f, 0x47, 0x52, 0x4f,
+ 0x55, 0x50, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52,
+ 0x10, 0x02, 0x2a, 0x50, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x53, 0x74,
+ 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56,
+ 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54,
+ 0x4f, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x4e, 0x55,
+ 0x41, 0x4c, 0x10, 0x02, 0x2a, 0x50, 0x0a, 0x12, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x6c,
+ 0x61, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x43,
+ 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12,
+ 0x09, 0x0a, 0x05, 0x44, 0x41, 0x49, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x57, 0x45,
+ 0x45, 0x4b, 0x4c, 0x59, 0x10, 0x03, 0x2a, 0x51, 0x0a, 0x12, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x76,
+ 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x15, 0x0a, 0x11,
+ 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
+ 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b,
+ 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44,
+ 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0xeb, 0x0b, 0x0a, 0x10, 0x4f, 0x72,
+ 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x89,
+ 0x02, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1d, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x22, 0xc7, 0x01, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb9,
+ 0x01, 0x5a, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69,
+ 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x23, 0x12,
+ 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x5a, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61,
+ 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
+ 0x2f, 0x2a, 0x7d, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x90, 0x02, 0x0a, 0x0c, 0x4c,
+ 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0xba, 0x01, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb0, 0x01, 0x5a, 0x22, 0x12,
+ 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x5a, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5a, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31,
+ 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5a, 0x2f,
+ 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12,
+ 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0xb7, 0x02,
+ 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xef, 0x01, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xd8, 0x01, 0x3a,
+ 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5a, 0x2a, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x79, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x69, 0x65, 0x73, 0x5a, 0x2e, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x24, 0x2f,
+ 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72,
+ 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x69, 0x65, 0x73, 0x5a, 0x2b, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x21, 0x2f,
+ 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61,
+ 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
+ 0x5a, 0x37, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0xe8, 0x02, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22,
+ 0xa0, 0x02, 0xda, 0x41, 0x12, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x84, 0x02, 0x3a, 0x06,
+ 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5a, 0x31, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f,
+ 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x35, 0x3a, 0x06, 0x70, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x32, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x5a, 0x32, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x32, 0x28, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,
+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x3e, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x32, 0x34,
+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65,
+ 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x32, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x12, 0x92, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xc7, 0x01,
0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb9, 0x01, 0x5a, 0x22,
- 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
+ 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f,
- 0x2a, 0x7d, 0x5a, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x2a, 0x7d, 0x5a, 0x26, 0x2a, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x23, 0x12, 0x21, 0x2f, 0x76,
+ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x23, 0x2a, 0x21, 0x2f, 0x76,
0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a,
- 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,
+ 0x2f, 0x2a, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d,
- 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x6f, 0x6c, 0x69,
- 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x90, 0x02, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
- 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c,
- 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x01,
- 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb0, 0x01, 0x5a, 0x22, 0x12, 0x20, 0x2f, 0x76,
- 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5a, 0x26,
- 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e,
- 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f,
- 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5a, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,
- 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5a, 0x2f, 0x12, 0x2d, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61,
- 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73,
- 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x0c, 0x2f, 0x76,
- 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0xb7, 0x02, 0x0a, 0x0c, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x22, 0xef, 0x01, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xd8, 0x01, 0x3a, 0x06, 0x70, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x5a, 0x2a, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x20,
- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
- 0x5a, 0x2e, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
- 0x5a, 0x2b, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x5a, 0x37, 0x3a,
- 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,
- 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f,
- 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69,
- 0x63, 0x69, 0x65, 0x73, 0x12, 0xe8, 0x02, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xa0, 0x02, 0xda,
- 0x41, 0x12, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x84, 0x02, 0x3a, 0x06, 0x70, 0x6f, 0x6c,
- 0x69, 0x63, 0x79, 0x5a, 0x31, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x32, 0x27, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
- 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x35, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x32, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,
- 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x32, 0x3a,
- 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x32, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a,
- 0x7d, 0x5a, 0x3e, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x32, 0x34, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
- 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a,
- 0x7d, 0x32, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e,
- 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
- 0x92, 0x02, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xc7, 0x01, 0xda, 0x41, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb9, 0x01, 0x5a, 0x22, 0x2a, 0x20, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a,
- 0x26, 0x2a, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76,
- 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69,
- 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x23, 0x2a, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,
- 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x2f, 0x2a, 0x2d,
- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f,
- 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2a, 0x15, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
- 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
- 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2a, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
}
var (
@@ -2221,8 +2219,8 @@ var file_v1_org_policy_service_proto_goTypes = []interface{}{
(*BackupPlanPolicy)(nil), // 16: bytebase.v1.BackupPlanPolicy
(*SlowQueryPolicy)(nil), // 17: bytebase.v1.SlowQueryPolicy
(*DisableCopyDataPolicy)(nil), // 18: bytebase.v1.DisableCopyDataPolicy
- (*SensitiveDataPolicy)(nil), // 19: bytebase.v1.SensitiveDataPolicy
- (*SensitiveData)(nil), // 20: bytebase.v1.SensitiveData
+ (*MaskingPolicy)(nil), // 19: bytebase.v1.MaskingPolicy
+ (*MaskData)(nil), // 20: bytebase.v1.MaskData
(*SQLReviewPolicy)(nil), // 21: bytebase.v1.SQLReviewPolicy
(*SQLReviewRule)(nil), // 22: bytebase.v1.SQLReviewRule
(*MaskingExceptionPolicy)(nil), // 23: bytebase.v1.MaskingExceptionPolicy
@@ -2249,7 +2247,7 @@ var file_v1_org_policy_service_proto_depIdxs = []int32{
28, // 7: bytebase.v1.Policy.workspace_iam_policy:type_name -> bytebase.v1.IamPolicy
14, // 8: bytebase.v1.Policy.deployment_approval_policy:type_name -> bytebase.v1.DeploymentApprovalPolicy
16, // 9: bytebase.v1.Policy.backup_plan_policy:type_name -> bytebase.v1.BackupPlanPolicy
- 19, // 10: bytebase.v1.Policy.sensitive_data_policy:type_name -> bytebase.v1.SensitiveDataPolicy
+ 19, // 10: bytebase.v1.Policy.masking_policy:type_name -> bytebase.v1.MaskingPolicy
21, // 11: bytebase.v1.Policy.sql_review_policy:type_name -> bytebase.v1.SQLReviewPolicy
17, // 12: bytebase.v1.Policy.slow_query_policy:type_name -> bytebase.v1.SlowQueryPolicy
18, // 13: bytebase.v1.Policy.disable_copy_data_policy:type_name -> bytebase.v1.DisableCopyDataPolicy
@@ -2263,8 +2261,8 @@ var file_v1_org_policy_service_proto_depIdxs = []int32{
3, // 21: bytebase.v1.DeploymentApprovalStrategy.approval_strategy:type_name -> bytebase.v1.ApprovalStrategy
4, // 22: bytebase.v1.BackupPlanPolicy.schedule:type_name -> bytebase.v1.BackupPlanSchedule
30, // 23: bytebase.v1.BackupPlanPolicy.retention_duration:type_name -> google.protobuf.Duration
- 20, // 24: bytebase.v1.SensitiveDataPolicy.sensitive_data:type_name -> bytebase.v1.SensitiveData
- 31, // 25: bytebase.v1.SensitiveData.masking_level:type_name -> bytebase.v1.MaskingLevel
+ 20, // 24: bytebase.v1.MaskingPolicy.mask_data:type_name -> bytebase.v1.MaskData
+ 31, // 25: bytebase.v1.MaskData.masking_level:type_name -> bytebase.v1.MaskingLevel
22, // 26: bytebase.v1.SQLReviewPolicy.rules:type_name -> bytebase.v1.SQLReviewRule
5, // 27: bytebase.v1.SQLReviewRule.level:type_name -> bytebase.v1.SQLReviewRuleLevel
32, // 28: bytebase.v1.SQLReviewRule.engine:type_name -> bytebase.v1.Engine
@@ -2446,7 +2444,7 @@ func file_v1_org_policy_service_proto_init() {
}
}
file_v1_org_policy_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SensitiveDataPolicy); i {
+ switch v := v.(*MaskingPolicy); i {
case 0:
return &v.state
case 1:
@@ -2458,7 +2456,7 @@ func file_v1_org_policy_service_proto_init() {
}
}
file_v1_org_policy_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SensitiveData); i {
+ switch v := v.(*MaskData); i {
case 0:
return &v.state
case 1:
@@ -2547,7 +2545,7 @@ func file_v1_org_policy_service_proto_init() {
(*Policy_WorkspaceIamPolicy)(nil),
(*Policy_DeploymentApprovalPolicy)(nil),
(*Policy_BackupPlanPolicy)(nil),
- (*Policy_SensitiveDataPolicy)(nil),
+ (*Policy_MaskingPolicy)(nil),
(*Policy_SqlReviewPolicy)(nil),
(*Policy_SlowQueryPolicy)(nil),
(*Policy_DisableCopyDataPolicy)(nil),
diff --git a/proto/store/common.proto b/proto/store/common.proto
index 2083a60df9..989fe6c750 100644
--- a/proto/store/common.proto
+++ b/proto/store/common.proto
@@ -28,3 +28,10 @@ enum Engine {
OCEANBASE = 14;
DM = 15;
}
+
+enum MaskingLevel {
+ MASKING_LEVEL_UNSPECIFIED = 0;
+ NONE = 1;
+ PARTIAL = 2;
+ FULL = 3;
+}
diff --git a/proto/store/policy.proto b/proto/store/policy.proto
index c195b07d85..edb3ec064c 100644
--- a/proto/store/policy.proto
+++ b/proto/store/policy.proto
@@ -3,6 +3,7 @@ syntax = "proto3";
package bytebase.store;
import "google/type/expr.proto";
+import "store/common.proto";
option go_package = "generated-go/store";
@@ -29,3 +30,15 @@ message Binding {
// If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.
google.type.Expr condition = 3;
}
+
+message MaskingPolicy {
+ repeated MaskData mask_data = 1;
+}
+
+message MaskData {
+ string schema = 1;
+ string table = 2;
+ string column = 3;
+ string semantic_category_id = 4;
+ MaskingLevel masking_level = 5;
+}
diff --git a/proto/v1/org_policy_service.proto b/proto/v1/org_policy_service.proto
index cb2550bafc..fe0c53bdc1 100644
--- a/proto/v1/org_policy_service.proto
+++ b/proto/v1/org_policy_service.proto
@@ -207,7 +207,7 @@ message Policy {
IamPolicy workspace_iam_policy = 6;
DeploymentApprovalPolicy deployment_approval_policy = 7;
BackupPlanPolicy backup_plan_policy = 8;
- SensitiveDataPolicy sensitive_data_policy = 9;
+ MaskingPolicy masking_policy = 9;
SQLReviewPolicy sql_review_policy = 11;
SlowQueryPolicy slow_query_policy = 12;
DisableCopyDataPolicy disable_copy_data_policy = 16;
@@ -289,11 +289,11 @@ enum BackupPlanSchedule {
WEEKLY = 3;
}
-message SensitiveDataPolicy {
- repeated SensitiveData sensitive_data = 1;
+message MaskingPolicy {
+ repeated MaskData mask_data = 1;
}
-message SensitiveData {
+message MaskData {
string schema = 1;
string table = 2;
string column = 3;