Skip to content

Commit

Permalink
Automated DCL import.
Browse files Browse the repository at this point in the history
  - 0f82a35 Automatic import from cloud_mmv2_dcl_20220429_1231_RC00 by DCL Team <[email protected]>

GitOrigin-RevId: 0f82a35
  • Loading branch information
DCL Team authored and copybara-github committed Apr 29, 2022
1 parent 4c20a7b commit a383a34
Show file tree
Hide file tree
Showing 127 changed files with 2,121 additions and 1,266 deletions.
6 changes: 4 additions & 2 deletions python/services/assuredworkloads/alpha/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ class WorkloadResourcesResourceTypeEnum(object):
def to_proto(self, resource):
if not resource:
return resource
return workload_pb2.AssuredworkloadsAlphaWorkloadResourcesResourceTypeEnum.Value(
"AssuredworkloadsAlphaWorkloadResourcesResourceTypeEnum%s" % resource
return (
workload_pb2.AssuredworkloadsAlphaWorkloadResourcesResourceTypeEnum.Value(
"AssuredworkloadsAlphaWorkloadResourcesResourceTypeEnum%s" % resource
)
)

@classmethod
Expand Down
16 changes: 9 additions & 7 deletions python/services/assuredworkloads/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,19 +373,21 @@ class WorkloadResourceSettingsResourceTypeEnum(object):
def to_proto(self, resource):
if not resource:
return resource
return workload_pb2.AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum.Value(
"AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum%s" % resource
return (
workload_pb2.AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum.Value(
"AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum%s" % resource
)
)

@classmethod
def from_proto(self, resource):
if not resource:
return resource
return workload_pb2.AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum.Name(
resource
)[
len("AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum") :
]
return (
workload_pb2.AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum.Name(
resource
)[len("AssuredworkloadsWorkloadResourceSettingsResourceTypeEnum") :]
)


class Primitive(object):
Expand Down
6 changes: 4 additions & 2 deletions python/services/bigquery/alpha/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def apply(self):
self.last_modified_time = Primitive.from_proto(response.last_modified_time)
self.location = Primitive.from_proto(response.location)
self.published = Primitive.from_proto(response.published)
self.default_encryption_configuration = DatasetDefaultEncryptionConfiguration.from_proto(
response.default_encryption_configuration
self.default_encryption_configuration = (
DatasetDefaultEncryptionConfiguration.from_proto(
response.default_encryption_configuration
)
)

def delete(self):
Expand Down
6 changes: 4 additions & 2 deletions python/services/bigquery/beta/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def apply(self):
self.last_modified_time = Primitive.from_proto(response.last_modified_time)
self.location = Primitive.from_proto(response.location)
self.published = Primitive.from_proto(response.published)
self.default_encryption_configuration = DatasetDefaultEncryptionConfiguration.from_proto(
response.default_encryption_configuration
self.default_encryption_configuration = (
DatasetDefaultEncryptionConfiguration.from_proto(
response.default_encryption_configuration
)
)

def delete(self):
Expand Down
6 changes: 4 additions & 2 deletions python/services/bigquery/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def apply(self):
self.last_modified_time = Primitive.from_proto(response.last_modified_time)
self.location = Primitive.from_proto(response.location)
self.published = Primitive.from_proto(response.published)
self.default_encryption_configuration = DatasetDefaultEncryptionConfiguration.from_proto(
response.default_encryption_configuration
self.default_encryption_configuration = (
DatasetDefaultEncryptionConfiguration.from_proto(
response.default_encryption_configuration
)
)

def delete(self):
Expand Down
26 changes: 14 additions & 12 deletions python/services/bigqueryreservation/capacity_commitment.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,21 @@ class CapacityCommitmentPlanEnum(object):
def to_proto(self, resource):
if not resource:
return resource
return capacity_commitment_pb2.BigqueryreservationCapacityCommitmentPlanEnum.Value(
"BigqueryreservationCapacityCommitmentPlanEnum%s" % resource
return (
capacity_commitment_pb2.BigqueryreservationCapacityCommitmentPlanEnum.Value(
"BigqueryreservationCapacityCommitmentPlanEnum%s" % resource
)
)

@classmethod
def from_proto(self, resource):
if not resource:
return resource
return capacity_commitment_pb2.BigqueryreservationCapacityCommitmentPlanEnum.Name(
resource
)[
len("BigqueryreservationCapacityCommitmentPlanEnum") :
]
return (
capacity_commitment_pb2.BigqueryreservationCapacityCommitmentPlanEnum.Name(
resource
)[len("BigqueryreservationCapacityCommitmentPlanEnum") :]
)


class CapacityCommitmentStateEnum(object):
Expand All @@ -283,11 +285,11 @@ def to_proto(self, resource):
def from_proto(self, resource):
if not resource:
return resource
return capacity_commitment_pb2.BigqueryreservationCapacityCommitmentStateEnum.Name(
resource
)[
len("BigqueryreservationCapacityCommitmentStateEnum") :
]
return (
capacity_commitment_pb2.BigqueryreservationCapacityCommitmentStateEnum.Name(
resource
)[len("BigqueryreservationCapacityCommitmentStateEnum") :]
)


class CapacityCommitmentRenewalPlanEnum(object):
Expand Down
10 changes: 7 additions & 3 deletions python/services/billingbudgets/alpha/budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def to_proto(self, resource):
if BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
):
res.credit_types_treatment = BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
res.credit_types_treatment = (
BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
)
)
if Primitive.to_proto(resource.services):
res.services.extend(Primitive.to_proto(resource.services))
Expand Down Expand Up @@ -274,7 +276,9 @@ def from_proto(self, resource):
if not resource:
return None

return BudgetBudgetFilterLabels(values=Primitive.from_proto(resource.values),)
return BudgetBudgetFilterLabels(
values=Primitive.from_proto(resource.values),
)


class BudgetBudgetFilterLabelsArray(object):
Expand Down
10 changes: 7 additions & 3 deletions python/services/billingbudgets/beta/budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def to_proto(self, resource):
if BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
):
res.credit_types_treatment = BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
res.credit_types_treatment = (
BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
)
)
if Primitive.to_proto(resource.services):
res.services.extend(Primitive.to_proto(resource.services))
Expand Down Expand Up @@ -274,7 +276,9 @@ def from_proto(self, resource):
if not resource:
return None

return BudgetBudgetFilterLabels(values=Primitive.from_proto(resource.values),)
return BudgetBudgetFilterLabels(
values=Primitive.from_proto(resource.values),
)


class BudgetBudgetFilterLabelsArray(object):
Expand Down
16 changes: 11 additions & 5 deletions python/services/billingbudgets/budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def to_proto(self, resource):
if BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
):
res.credit_types_treatment = BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
res.credit_types_treatment = (
BudgetBudgetFilterCreditTypesTreatmentEnum.to_proto(
resource.credit_types_treatment
)
)
if Primitive.to_proto(resource.services):
res.services.extend(Primitive.to_proto(resource.services))
Expand Down Expand Up @@ -274,7 +276,9 @@ def from_proto(self, resource):
if not resource:
return None

return BudgetBudgetFilterLabels(values=Primitive.from_proto(resource.values),)
return BudgetBudgetFilterLabels(
values=Primitive.from_proto(resource.values),
)


class BudgetBudgetFilterLabelsArray(object):
Expand Down Expand Up @@ -667,8 +671,10 @@ class BudgetBudgetFilterCreditTypesTreatmentEnum(object):
def to_proto(self, resource):
if not resource:
return resource
return budget_pb2.BillingbudgetsBudgetBudgetFilterCreditTypesTreatmentEnum.Value(
"BillingbudgetsBudgetBudgetFilterCreditTypesTreatmentEnum%s" % resource
return (
budget_pb2.BillingbudgetsBudgetBudgetFilterCreditTypesTreatmentEnum.Value(
"BillingbudgetsBudgetBudgetFilterCreditTypesTreatmentEnum%s" % resource
)
)

@classmethod
Expand Down
Loading

0 comments on commit a383a34

Please sign in to comment.