diff --git a/google/cloud/channel/__init__.py b/google/cloud/channel/__init__.py index 8eeb214..aaa54f1 100644 --- a/google/cloud/channel/__init__.py +++ b/google/cloud/channel/__init__.py @@ -96,11 +96,14 @@ ) from google.cloud.channel_v1.types.repricing import ( ChannelPartnerRepricingConfig, + ConditionalOverride, CustomerRepricingConfig, PercentageAdjustment, RebillingBasis, RepricingAdjustment, + RepricingCondition, RepricingConfig, + SkuGroupCondition, ) from google.cloud.channel_v1.types.service import ( ActivateEntitlementRequest, @@ -235,10 +238,13 @@ "RunReportJobRequest", "RunReportJobResponse", "ChannelPartnerRepricingConfig", + "ConditionalOverride", "CustomerRepricingConfig", "PercentageAdjustment", "RepricingAdjustment", + "RepricingCondition", "RepricingConfig", + "SkuGroupCondition", "RebillingBasis", "ActivateEntitlementRequest", "CancelEntitlementRequest", diff --git a/google/cloud/channel_v1/__init__.py b/google/cloud/channel_v1/__init__.py index 862c0d5..918b540 100644 --- a/google/cloud/channel_v1/__init__.py +++ b/google/cloud/channel_v1/__init__.py @@ -81,11 +81,14 @@ ) from .types.repricing import ( ChannelPartnerRepricingConfig, + ConditionalOverride, CustomerRepricingConfig, PercentageAdjustment, RebillingBasis, RepricingAdjustment, + RepricingCondition, RepricingConfig, + SkuGroupCondition, ) from .types.service import ( ActivateEntitlementRequest, @@ -179,6 +182,7 @@ "CloudIdentityInfo", "Column", "CommitmentSettings", + "ConditionalOverride", "Constraints", "ContactInfo", "CreateChannelPartnerLinkRequest", @@ -267,12 +271,14 @@ "ReportStatus", "ReportValue", "RepricingAdjustment", + "RepricingCondition", "RepricingConfig", "ResourceType", "Row", "RunReportJobRequest", "RunReportJobResponse", "Sku", + "SkuGroupCondition", "StartPaidServiceRequest", "SubscriberEvent", "SuspendEntitlementRequest", diff --git a/google/cloud/channel_v1/services/cloud_channel_reports_service/async_client.py b/google/cloud/channel_v1/services/cloud_channel_reports_service/async_client.py index 6783417..4da3c25 100644 --- a/google/cloud/channel_v1/services/cloud_channel_reports_service/async_client.py +++ b/google/cloud/channel_v1/services/cloud_channel_reports_service/async_client.py @@ -312,10 +312,8 @@ async def sample_run_report_job(): google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be - :class:`google.cloud.channel_v1.types.RunReportJobResponse` - Response message for - [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. + The result type for the operation will be :class:`google.cloud.channel_v1.types.RunReportJobResponse` Response message for + [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. """ # Create or coerce a protobuf request object. @@ -416,7 +414,8 @@ async def sample_fetch_report_results(): Returns: google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.FetchReportResultsAsyncPager: - Response message for [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults]. + Response message for + [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults]. Contains a tabular representation of the report results. @@ -538,7 +537,7 @@ async def sample_list_reports(): Returns: google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.ListReportsAsyncPager: Response message for - [CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports]. + [CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports]. Iterating over this object will yield results and resolve additional pages automatically. diff --git a/google/cloud/channel_v1/services/cloud_channel_reports_service/client.py b/google/cloud/channel_v1/services/cloud_channel_reports_service/client.py index a33d0c3..ad4cd3b 100644 --- a/google/cloud/channel_v1/services/cloud_channel_reports_service/client.py +++ b/google/cloud/channel_v1/services/cloud_channel_reports_service/client.py @@ -542,10 +542,8 @@ def sample_run_report_job(): google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be - :class:`google.cloud.channel_v1.types.RunReportJobResponse` - Response message for - [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. + The result type for the operation will be :class:`google.cloud.channel_v1.types.RunReportJobResponse` Response message for + [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. """ # Create or coerce a protobuf request object. @@ -647,7 +645,8 @@ def sample_fetch_report_results(): Returns: google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.FetchReportResultsPager: - Response message for [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults]. + Response message for + [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults]. Contains a tabular representation of the report results. @@ -769,7 +768,7 @@ def sample_list_reports(): Returns: google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.ListReportsPager: Response message for - [CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports]. + [CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports]. Iterating over this object will yield results and resolve additional pages automatically. diff --git a/google/cloud/channel_v1/services/cloud_channel_service/async_client.py b/google/cloud/channel_v1/services/cloud_channel_service/async_client.py index 712aede..ab4d776 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/async_client.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/async_client.py @@ -80,8 +80,8 @@ class CloudChannelServiceAsyncClient: CloudChannelService exposes the following resources: - - [Customer][google.cloud.channel.v1.Customer]s: An entity—usually - an enterprise—managed by a reseller or distributor. + - [Customer][google.cloud.channel.v1.Customer]s: An entity-usually + an enterprise-managed by a reseller or distributor. - [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with the means to use a service. @@ -344,7 +344,7 @@ async def sample_list_customers(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersAsyncPager: Response message for - [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]. + [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1179,7 +1179,7 @@ async def sample_list_entitlements(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsAsyncPager: Response message for - [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]. + [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1295,7 +1295,7 @@ async def sample_list_transferable_skus(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusAsyncPager: Response message for - [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]. + [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1415,7 +1415,7 @@ async def sample_list_transferable_offers(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersAsyncPager: Response message for - [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]. + [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]. Iterating over this object will yield results and resolve additional pages automatically. @@ -2641,7 +2641,8 @@ async def sample_transfer_entitlements(): google.api_core.operation_async.AsyncOperation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements]. + The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for + [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements]. This is put in the response field of google.longrunning.Operation. @@ -2889,7 +2890,7 @@ async def sample_list_channel_partner_links(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksAsyncPager: Response message for - [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]. + [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]. Iterating over this object will yield results and resolve additional pages automatically. @@ -3455,7 +3456,7 @@ async def sample_list_customer_repricing_configs(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsAsyncPager: Response message for - [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. Iterating over this object will yield results and resolve additional pages automatically. diff --git a/google/cloud/channel_v1/services/cloud_channel_service/client.py b/google/cloud/channel_v1/services/cloud_channel_service/client.py index c05055f..ae0170b 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/client.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/client.py @@ -120,8 +120,8 @@ class CloudChannelServiceClient(metaclass=CloudChannelServiceClientMeta): CloudChannelService exposes the following resources: - - [Customer][google.cloud.channel.v1.Customer]s: An entity—usually - an enterprise—managed by a reseller or distributor. + - [Customer][google.cloud.channel.v1.Customer]s: An entity-usually + an enterprise-managed by a reseller or distributor. - [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with the means to use a service. @@ -674,7 +674,7 @@ def sample_list_customers(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersPager: Response message for - [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]. + [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1517,7 +1517,7 @@ def sample_list_entitlements(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsPager: Response message for - [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]. + [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1634,7 +1634,7 @@ def sample_list_transferable_skus(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusPager: Response message for - [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]. + [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]. Iterating over this object will yield results and resolve additional pages automatically. @@ -1755,7 +1755,7 @@ def sample_list_transferable_offers(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersPager: Response message for - [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]. + [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]. Iterating over this object will yield results and resolve additional pages automatically. @@ -2991,7 +2991,8 @@ def sample_transfer_entitlements(): google.api_core.operation.Operation: An object representing a long-running operation. - The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements]. + The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for + [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements]. This is put in the response field of google.longrunning.Operation. @@ -3243,7 +3244,7 @@ def sample_list_channel_partner_links(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksPager: Response message for - [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]. + [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]. Iterating over this object will yield results and resolve additional pages automatically. @@ -3821,7 +3822,7 @@ def sample_list_customer_repricing_configs(): Returns: google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsPager: Response message for - [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. Iterating over this object will yield results and resolve additional pages automatically. diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc.py index f95e2fa..d3b2c78 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc.py @@ -51,8 +51,8 @@ class CloudChannelServiceGrpcTransport(CloudChannelServiceTransport): CloudChannelService exposes the following resources: - - [Customer][google.cloud.channel.v1.Customer]s: An entity—usually - an enterprise—managed by a reseller or distributor. + - [Customer][google.cloud.channel.v1.Customer]s: An entity-usually + an enterprise-managed by a reseller or distributor. - [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with the means to use a service. diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc_asyncio.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc_asyncio.py index 6631906..3bf3655 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc_asyncio.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/grpc_asyncio.py @@ -52,8 +52,8 @@ class CloudChannelServiceGrpcAsyncIOTransport(CloudChannelServiceTransport): CloudChannelService exposes the following resources: - - [Customer][google.cloud.channel.v1.Customer]s: An entity—usually - an enterprise—managed by a reseller or distributor. + - [Customer][google.cloud.channel.v1.Customer]s: An entity-usually + an enterprise-managed by a reseller or distributor. - [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with the means to use a service. diff --git a/google/cloud/channel_v1/types/__init__.py b/google/cloud/channel_v1/types/__init__.py index 3dc7529..51b82f3 100644 --- a/google/cloud/channel_v1/types/__init__.py +++ b/google/cloud/channel_v1/types/__init__.py @@ -68,11 +68,14 @@ ) from .repricing import ( ChannelPartnerRepricingConfig, + ConditionalOverride, CustomerRepricingConfig, PercentageAdjustment, RebillingBasis, RepricingAdjustment, + RepricingCondition, RepricingConfig, + SkuGroupCondition, ) from .service import ( ActivateEntitlementRequest, @@ -199,10 +202,13 @@ "RunReportJobRequest", "RunReportJobResponse", "ChannelPartnerRepricingConfig", + "ConditionalOverride", "CustomerRepricingConfig", "PercentageAdjustment", "RepricingAdjustment", + "RepricingCondition", "RepricingConfig", + "SkuGroupCondition", "RebillingBasis", "ActivateEntitlementRequest", "CancelEntitlementRequest", diff --git a/google/cloud/channel_v1/types/repricing.py b/google/cloud/channel_v1/types/repricing.py index 6fe2fdc..50c37be 100644 --- a/google/cloud/channel_v1/types/repricing.py +++ b/google/cloud/channel_v1/types/repricing.py @@ -29,6 +29,9 @@ "RepricingConfig", "RepricingAdjustment", "PercentageAdjustment", + "ConditionalOverride", + "RepricingCondition", + "SkuGroupCondition", }, ) @@ -150,6 +153,12 @@ class RepricingConfig(proto.Message): [RebillingBasis][google.cloud.channel.v1.RebillingBasis] to use for this bill. Specifies the relative cost based on repricing costs you will apply. + conditional_overrides (MutableSequence[google.cloud.channel_v1.types.ConditionalOverride]): + The conditional overrides to apply for this + configuration. If you list multiple overrides, + only the first valid override is used. If you + don't list any overrides, the API uses the + normal adjustment and rebilling basis. """ class EntitlementGranularity(proto.Message): @@ -200,6 +209,11 @@ class ChannelPartnerGranularity(proto.Message): number=3, enum="RebillingBasis", ) + conditional_overrides: MutableSequence["ConditionalOverride"] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="ConditionalOverride", + ) class RepricingAdjustment(proto.Message): @@ -244,4 +258,79 @@ class PercentageAdjustment(proto.Message): ) +class ConditionalOverride(proto.Message): + r"""Specifies the override to conditionally apply. + + Attributes: + adjustment (google.cloud.channel_v1.types.RepricingAdjustment): + Required. Information about the applied + override's adjustment. + rebilling_basis (google.cloud.channel_v1.types.RebillingBasis): + Required. The + [RebillingBasis][google.cloud.channel.v1.RebillingBasis] to + use for the applied override. Shows the relative cost based + on your repricing costs. + repricing_condition (google.cloud.channel_v1.types.RepricingCondition): + Required. Specifies the condition which, if + met, will apply the override. + """ + + adjustment: "RepricingAdjustment" = proto.Field( + proto.MESSAGE, + number=1, + message="RepricingAdjustment", + ) + rebilling_basis: "RebillingBasis" = proto.Field( + proto.ENUM, + number=2, + enum="RebillingBasis", + ) + repricing_condition: "RepricingCondition" = proto.Field( + proto.MESSAGE, + number=3, + message="RepricingCondition", + ) + + +class RepricingCondition(proto.Message): + r"""Represents the various repricing conditions you can use for a + conditional override. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + sku_group_condition (google.cloud.channel_v1.types.SkuGroupCondition): + SKU Group condition for override. + + This field is a member of `oneof`_ ``condition``. + """ + + sku_group_condition: "SkuGroupCondition" = proto.Field( + proto.MESSAGE, + number=1, + oneof="condition", + message="SkuGroupCondition", + ) + + +class SkuGroupCondition(proto.Message): + r"""A condition that applies the override if a line item SKU is + found in the SKU group. + + Attributes: + sku_group (str): + Specifies a SKU group + (https://cloud.google.com/skus/sku-groups). Resource name of + SKU group. Format: accounts/{account}/skuGroups/{sku_group}. + Example: + "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". + """ + + sku_group: str = proto.Field( + proto.STRING, + number=1, + ) + + __all__ = tuple(sorted(__protobuf__.manifest))