Skip to content

Commit

Permalink
Automated DCL import.
Browse files Browse the repository at this point in the history
  - 6e050a71b5c25e55d791c40976e9226edc4a1ea4 Automatic import from cloud_mmv2_dcl_20240826_0931_RC00 by DCL Team <no-reply@google.com>

GitOrigin-RevId: 6e050a71b5c25e55d791c40976e9226edc4a1ea4
  • Loading branch information
DCL Team authored and copybara-github committed Aug 26, 2024
1 parent 8f44670 commit ca151f7
Show file tree
Hide file tree
Showing 31 changed files with 395 additions and 73 deletions.
35 changes: 20 additions & 15 deletions python/proto/assuredworkloads/alpha/workload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ enum AssuredworkloadsAlphaWorkloadComplianceRegimeEnum {
AssuredworkloadsAlphaWorkloadComplianceRegimeEnumIL5 = 17;
AssuredworkloadsAlphaWorkloadComplianceRegimeEnumIL2 = 18;
AssuredworkloadsAlphaWorkloadComplianceRegimeEnumJP_REGIONS_AND_SUPPORT = 19;
AssuredworkloadsAlphaWorkloadComplianceRegimeEnumKSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS = 20;
AssuredworkloadsAlphaWorkloadComplianceRegimeEnumREGIONAL_CONTROLS = 21;
}

enum AssuredworkloadsAlphaWorkloadResourceSettingsResourceTypeEnum {
Expand Down Expand Up @@ -92,6 +94,8 @@ enum AssuredworkloadsAlphaWorkloadPartnerEnum {
AssuredworkloadsAlphaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_T_SYSTEMS = 3;
AssuredworkloadsAlphaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 4;
AssuredworkloadsAlphaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_PSN = 5;
AssuredworkloadsAlphaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_CNTXT = 6;
AssuredworkloadsAlphaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7;
}

enum AssuredworkloadsAlphaWorkloadEkmProvisioningResponseEkmProvisioningStateEnum {
Expand Down Expand Up @@ -127,21 +131,22 @@ message AssuredworkloadsAlphaWorkload {
AssuredworkloadsAlphaWorkloadComplianceRegimeEnum compliance_regime = 4;
string create_time = 5;
string billing_account = 6;
map<string, string> labels = 7;
string provisioned_resources_parent = 8;
AssuredworkloadsAlphaWorkloadKmsSettings kms_settings = 9;
repeated AssuredworkloadsAlphaWorkloadResourceSettings resource_settings = 10;
AssuredworkloadsAlphaWorkloadKajEnrollmentStateEnum kaj_enrollment_state = 11;
bool enable_sovereign_controls = 12;
AssuredworkloadsAlphaWorkloadSaaEnrollmentResponse saa_enrollment_response = 13;
AssuredworkloadsAlphaWorkloadComplianceStatus compliance_status = 14;
repeated string compliant_but_disallowed_services = 15;
AssuredworkloadsAlphaWorkloadPartnerEnum partner = 16;
AssuredworkloadsAlphaWorkloadPartnerPermissions partner_permissions = 17;
AssuredworkloadsAlphaWorkloadEkmProvisioningResponse ekm_provisioning_response = 18;
bool violation_notifications_enabled = 19;
string organization = 20;
string location = 21;
string partner_services_billing_account = 7;
map<string, string> labels = 8;
string provisioned_resources_parent = 9;
AssuredworkloadsAlphaWorkloadKmsSettings kms_settings = 10;
repeated AssuredworkloadsAlphaWorkloadResourceSettings resource_settings = 11;
AssuredworkloadsAlphaWorkloadKajEnrollmentStateEnum kaj_enrollment_state = 12;
bool enable_sovereign_controls = 13;
AssuredworkloadsAlphaWorkloadSaaEnrollmentResponse saa_enrollment_response = 14;
AssuredworkloadsAlphaWorkloadComplianceStatus compliance_status = 15;
repeated string compliant_but_disallowed_services = 16;
AssuredworkloadsAlphaWorkloadPartnerEnum partner = 17;
AssuredworkloadsAlphaWorkloadPartnerPermissions partner_permissions = 18;
AssuredworkloadsAlphaWorkloadEkmProvisioningResponse ekm_provisioning_response = 19;
bool violation_notifications_enabled = 20;
string organization = 21;
string location = 22;
}

message AssuredworkloadsAlphaWorkloadResources {
Expand Down
35 changes: 20 additions & 15 deletions python/proto/assuredworkloads/beta/workload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ enum AssuredworkloadsBetaWorkloadComplianceRegimeEnum {
AssuredworkloadsBetaWorkloadComplianceRegimeEnumIL5 = 17;
AssuredworkloadsBetaWorkloadComplianceRegimeEnumIL2 = 18;
AssuredworkloadsBetaWorkloadComplianceRegimeEnumJP_REGIONS_AND_SUPPORT = 19;
AssuredworkloadsBetaWorkloadComplianceRegimeEnumKSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS = 20;
AssuredworkloadsBetaWorkloadComplianceRegimeEnumREGIONAL_CONTROLS = 21;
}

enum AssuredworkloadsBetaWorkloadResourceSettingsResourceTypeEnum {
Expand Down Expand Up @@ -92,6 +94,8 @@ enum AssuredworkloadsBetaWorkloadPartnerEnum {
AssuredworkloadsBetaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_T_SYSTEMS = 3;
AssuredworkloadsBetaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 4;
AssuredworkloadsBetaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_PSN = 5;
AssuredworkloadsBetaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_CNTXT = 6;
AssuredworkloadsBetaWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7;
}

enum AssuredworkloadsBetaWorkloadEkmProvisioningResponseEkmProvisioningStateEnum {
Expand Down Expand Up @@ -127,21 +131,22 @@ message AssuredworkloadsBetaWorkload {
AssuredworkloadsBetaWorkloadComplianceRegimeEnum compliance_regime = 4;
string create_time = 5;
string billing_account = 6;
map<string, string> labels = 7;
string provisioned_resources_parent = 8;
AssuredworkloadsBetaWorkloadKmsSettings kms_settings = 9;
repeated AssuredworkloadsBetaWorkloadResourceSettings resource_settings = 10;
AssuredworkloadsBetaWorkloadKajEnrollmentStateEnum kaj_enrollment_state = 11;
bool enable_sovereign_controls = 12;
AssuredworkloadsBetaWorkloadSaaEnrollmentResponse saa_enrollment_response = 13;
AssuredworkloadsBetaWorkloadComplianceStatus compliance_status = 14;
repeated string compliant_but_disallowed_services = 15;
AssuredworkloadsBetaWorkloadPartnerEnum partner = 16;
AssuredworkloadsBetaWorkloadPartnerPermissions partner_permissions = 17;
AssuredworkloadsBetaWorkloadEkmProvisioningResponse ekm_provisioning_response = 18;
bool violation_notifications_enabled = 19;
string organization = 20;
string location = 21;
string partner_services_billing_account = 7;
map<string, string> labels = 8;
string provisioned_resources_parent = 9;
AssuredworkloadsBetaWorkloadKmsSettings kms_settings = 10;
repeated AssuredworkloadsBetaWorkloadResourceSettings resource_settings = 11;
AssuredworkloadsBetaWorkloadKajEnrollmentStateEnum kaj_enrollment_state = 12;
bool enable_sovereign_controls = 13;
AssuredworkloadsBetaWorkloadSaaEnrollmentResponse saa_enrollment_response = 14;
AssuredworkloadsBetaWorkloadComplianceStatus compliance_status = 15;
repeated string compliant_but_disallowed_services = 16;
AssuredworkloadsBetaWorkloadPartnerEnum partner = 17;
AssuredworkloadsBetaWorkloadPartnerPermissions partner_permissions = 18;
AssuredworkloadsBetaWorkloadEkmProvisioningResponse ekm_provisioning_response = 19;
bool violation_notifications_enabled = 20;
string organization = 21;
string location = 22;
}

message AssuredworkloadsBetaWorkloadResources {
Expand Down
35 changes: 20 additions & 15 deletions python/proto/assuredworkloads/workload.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ enum AssuredworkloadsWorkloadComplianceRegimeEnum {
AssuredworkloadsWorkloadComplianceRegimeEnumIL5 = 17;
AssuredworkloadsWorkloadComplianceRegimeEnumIL2 = 18;
AssuredworkloadsWorkloadComplianceRegimeEnumJP_REGIONS_AND_SUPPORT = 19;
AssuredworkloadsWorkloadComplianceRegimeEnumKSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS = 20;
AssuredworkloadsWorkloadComplianceRegimeEnumREGIONAL_CONTROLS = 21;
}

enum AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum {
Expand Down Expand Up @@ -92,6 +94,8 @@ enum AssuredworkloadsWorkloadPartnerEnum {
AssuredworkloadsWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_T_SYSTEMS = 3;
AssuredworkloadsWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 4;
AssuredworkloadsWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_PSN = 5;
AssuredworkloadsWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_CNTXT = 6;
AssuredworkloadsWorkloadPartnerEnumSOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7;
}

enum AssuredworkloadsWorkloadEkmProvisioningResponseEkmProvisioningStateEnum {
Expand Down Expand Up @@ -127,21 +131,22 @@ message AssuredworkloadsWorkload {
AssuredworkloadsWorkloadComplianceRegimeEnum compliance_regime = 4;
string create_time = 5;
string billing_account = 6;
map<string, string> labels = 7;
string provisioned_resources_parent = 8;
AssuredworkloadsWorkloadKmsSettings kms_settings = 9;
repeated AssuredworkloadsWorkloadResourceSettings resource_settings = 10;
AssuredworkloadsWorkloadKajEnrollmentStateEnum kaj_enrollment_state = 11;
bool enable_sovereign_controls = 12;
AssuredworkloadsWorkloadSaaEnrollmentResponse saa_enrollment_response = 13;
AssuredworkloadsWorkloadComplianceStatus compliance_status = 14;
repeated string compliant_but_disallowed_services = 15;
AssuredworkloadsWorkloadPartnerEnum partner = 16;
AssuredworkloadsWorkloadPartnerPermissions partner_permissions = 17;
AssuredworkloadsWorkloadEkmProvisioningResponse ekm_provisioning_response = 18;
bool violation_notifications_enabled = 19;
string organization = 20;
string location = 21;
string partner_services_billing_account = 7;
map<string, string> labels = 8;
string provisioned_resources_parent = 9;
AssuredworkloadsWorkloadKmsSettings kms_settings = 10;
repeated AssuredworkloadsWorkloadResourceSettings resource_settings = 11;
AssuredworkloadsWorkloadKajEnrollmentStateEnum kaj_enrollment_state = 12;
bool enable_sovereign_controls = 13;
AssuredworkloadsWorkloadSaaEnrollmentResponse saa_enrollment_response = 14;
AssuredworkloadsWorkloadComplianceStatus compliance_status = 15;
repeated string compliant_but_disallowed_services = 16;
AssuredworkloadsWorkloadPartnerEnum partner = 17;
AssuredworkloadsWorkloadPartnerPermissions partner_permissions = 18;
AssuredworkloadsWorkloadEkmProvisioningResponse ekm_provisioning_response = 19;
bool violation_notifications_enabled = 20;
string organization = 21;
string location = 22;
}

message AssuredworkloadsWorkloadResources {
Expand Down
19 changes: 19 additions & 0 deletions python/services/assuredworkloads/alpha/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(
compliance_regime: str = None,
create_time: str = None,
billing_account: str = None,
partner_services_billing_account: str = None,
labels: dict = None,
provisioned_resources_parent: str = None,
kms_settings: dict = None,
Expand All @@ -52,6 +53,7 @@ def __init__(
self.display_name = display_name
self.compliance_regime = compliance_regime
self.billing_account = billing_account
self.partner_services_billing_account = partner_services_billing_account
self.labels = labels
self.provisioned_resources_parent = provisioned_resources_parent
self.kms_settings = kms_settings
Expand Down Expand Up @@ -83,6 +85,11 @@ def apply(self):
if Primitive.to_proto(self.billing_account):
request.resource.billing_account = Primitive.to_proto(self.billing_account)

if Primitive.to_proto(self.partner_services_billing_account):
request.resource.partner_services_billing_account = Primitive.to_proto(
self.partner_services_billing_account
)

if Primitive.to_proto(self.labels):
request.resource.labels = Primitive.to_proto(self.labels)

Expand Down Expand Up @@ -137,6 +144,9 @@ def apply(self):
)
self.create_time = Primitive.from_proto(response.create_time)
self.billing_account = Primitive.from_proto(response.billing_account)
self.partner_services_billing_account = Primitive.from_proto(
response.partner_services_billing_account
)
self.labels = Primitive.from_proto(response.labels)
self.provisioned_resources_parent = Primitive.from_proto(
response.provisioned_resources_parent
Expand Down Expand Up @@ -193,6 +203,11 @@ def delete(self):
if Primitive.to_proto(self.billing_account):
request.resource.billing_account = Primitive.to_proto(self.billing_account)

if Primitive.to_proto(self.partner_services_billing_account):
request.resource.partner_services_billing_account = Primitive.to_proto(
self.partner_services_billing_account
)

if Primitive.to_proto(self.labels):
request.resource.labels = Primitive.to_proto(self.labels)

Expand Down Expand Up @@ -263,6 +278,10 @@ def to_proto(self):
)
if Primitive.to_proto(self.billing_account):
resource.billing_account = Primitive.to_proto(self.billing_account)
if Primitive.to_proto(self.partner_services_billing_account):
resource.partner_services_billing_account = Primitive.to_proto(
self.partner_services_billing_account
)
if Primitive.to_proto(self.labels):
resource.labels = Primitive.to_proto(self.labels)
if Primitive.to_proto(self.provisioned_resources_parent):
Expand Down
2 changes: 2 additions & 0 deletions python/services/assuredworkloads/alpha/workload_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ func ProtoToWorkload(p *alphapb.AssuredworkloadsAlphaWorkload) *alpha.Workload {
ComplianceRegime: ProtoToAssuredworkloadsAlphaWorkloadComplianceRegimeEnum(p.GetComplianceRegime()),
CreateTime: dcl.StringOrNil(p.GetCreateTime()),
BillingAccount: dcl.StringOrNil(p.GetBillingAccount()),
PartnerServicesBillingAccount: dcl.StringOrNil(p.GetPartnerServicesBillingAccount()),
ProvisionedResourcesParent: dcl.StringOrNil(p.GetProvisionedResourcesParent()),
KmsSettings: ProtoToAssuredworkloadsAlphaWorkloadKmsSettings(p.GetKmsSettings()),
KajEnrollmentState: ProtoToAssuredworkloadsAlphaWorkloadKajEnrollmentStateEnum(p.GetKajEnrollmentState()),
Expand Down Expand Up @@ -479,6 +480,7 @@ func WorkloadToProto(resource *alpha.Workload) *alphapb.AssuredworkloadsAlphaWor
p.SetComplianceRegime(AssuredworkloadsAlphaWorkloadComplianceRegimeEnumToProto(resource.ComplianceRegime))
p.SetCreateTime(dcl.ValueOrEmptyString(resource.CreateTime))
p.SetBillingAccount(dcl.ValueOrEmptyString(resource.BillingAccount))
p.SetPartnerServicesBillingAccount(dcl.ValueOrEmptyString(resource.PartnerServicesBillingAccount))
p.SetProvisionedResourcesParent(dcl.ValueOrEmptyString(resource.ProvisionedResourcesParent))
p.SetKmsSettings(AssuredworkloadsAlphaWorkloadKmsSettingsToProto(resource.KmsSettings))
p.SetKajEnrollmentState(AssuredworkloadsAlphaWorkloadKajEnrollmentStateEnumToProto(resource.KajEnrollmentState))
Expand Down
19 changes: 19 additions & 0 deletions python/services/assuredworkloads/beta/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(
compliance_regime: str = None,
create_time: str = None,
billing_account: str = None,
partner_services_billing_account: str = None,
labels: dict = None,
provisioned_resources_parent: str = None,
kms_settings: dict = None,
Expand All @@ -52,6 +53,7 @@ def __init__(
self.display_name = display_name
self.compliance_regime = compliance_regime
self.billing_account = billing_account
self.partner_services_billing_account = partner_services_billing_account
self.labels = labels
self.provisioned_resources_parent = provisioned_resources_parent
self.kms_settings = kms_settings
Expand Down Expand Up @@ -83,6 +85,11 @@ def apply(self):
if Primitive.to_proto(self.billing_account):
request.resource.billing_account = Primitive.to_proto(self.billing_account)

if Primitive.to_proto(self.partner_services_billing_account):
request.resource.partner_services_billing_account = Primitive.to_proto(
self.partner_services_billing_account
)

if Primitive.to_proto(self.labels):
request.resource.labels = Primitive.to_proto(self.labels)

Expand Down Expand Up @@ -137,6 +144,9 @@ def apply(self):
)
self.create_time = Primitive.from_proto(response.create_time)
self.billing_account = Primitive.from_proto(response.billing_account)
self.partner_services_billing_account = Primitive.from_proto(
response.partner_services_billing_account
)
self.labels = Primitive.from_proto(response.labels)
self.provisioned_resources_parent = Primitive.from_proto(
response.provisioned_resources_parent
Expand Down Expand Up @@ -193,6 +203,11 @@ def delete(self):
if Primitive.to_proto(self.billing_account):
request.resource.billing_account = Primitive.to_proto(self.billing_account)

if Primitive.to_proto(self.partner_services_billing_account):
request.resource.partner_services_billing_account = Primitive.to_proto(
self.partner_services_billing_account
)

if Primitive.to_proto(self.labels):
request.resource.labels = Primitive.to_proto(self.labels)

Expand Down Expand Up @@ -263,6 +278,10 @@ def to_proto(self):
)
if Primitive.to_proto(self.billing_account):
resource.billing_account = Primitive.to_proto(self.billing_account)
if Primitive.to_proto(self.partner_services_billing_account):
resource.partner_services_billing_account = Primitive.to_proto(
self.partner_services_billing_account
)
if Primitive.to_proto(self.labels):
resource.labels = Primitive.to_proto(self.labels)
if Primitive.to_proto(self.provisioned_resources_parent):
Expand Down
2 changes: 2 additions & 0 deletions python/services/assuredworkloads/beta/workload_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ func ProtoToWorkload(p *betapb.AssuredworkloadsBetaWorkload) *beta.Workload {
ComplianceRegime: ProtoToAssuredworkloadsBetaWorkloadComplianceRegimeEnum(p.GetComplianceRegime()),
CreateTime: dcl.StringOrNil(p.GetCreateTime()),
BillingAccount: dcl.StringOrNil(p.GetBillingAccount()),
PartnerServicesBillingAccount: dcl.StringOrNil(p.GetPartnerServicesBillingAccount()),
ProvisionedResourcesParent: dcl.StringOrNil(p.GetProvisionedResourcesParent()),
KmsSettings: ProtoToAssuredworkloadsBetaWorkloadKmsSettings(p.GetKmsSettings()),
KajEnrollmentState: ProtoToAssuredworkloadsBetaWorkloadKajEnrollmentStateEnum(p.GetKajEnrollmentState()),
Expand Down Expand Up @@ -479,6 +480,7 @@ func WorkloadToProto(resource *beta.Workload) *betapb.AssuredworkloadsBetaWorklo
p.SetComplianceRegime(AssuredworkloadsBetaWorkloadComplianceRegimeEnumToProto(resource.ComplianceRegime))
p.SetCreateTime(dcl.ValueOrEmptyString(resource.CreateTime))
p.SetBillingAccount(dcl.ValueOrEmptyString(resource.BillingAccount))
p.SetPartnerServicesBillingAccount(dcl.ValueOrEmptyString(resource.PartnerServicesBillingAccount))
p.SetProvisionedResourcesParent(dcl.ValueOrEmptyString(resource.ProvisionedResourcesParent))
p.SetKmsSettings(AssuredworkloadsBetaWorkloadKmsSettingsToProto(resource.KmsSettings))
p.SetKajEnrollmentState(AssuredworkloadsBetaWorkloadKajEnrollmentStateEnumToProto(resource.KajEnrollmentState))
Expand Down
Loading

0 comments on commit ca151f7

Please sign in to comment.