From 1608ea9f15080283401b792f7d54a731040f836d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 11:47:33 -0600 Subject: [PATCH 01/15] chore(python): configure release-please on previous major versions (#153) Source-Link: https://github.com/googleapis/synthtool/commit/c1dd87e9287f8de99930d3046dd555c4d03384c6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/release-please.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 44c78f7..8807627 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3 + digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba diff --git a/.github/release-please.yml b/.github/release-please.yml index 466597e..6def37a 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,8 @@ releaseType: python handleGHRelease: true +# NOTE: this section is generated by synthtool.languages.python +# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py +branches: +- branch: v0 + handleGHRelease: true + releaseType: python From 7784caed6570c61f508175b097adf0b811b3b32d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 00:06:17 +0000 Subject: [PATCH 02/15] chore(python): use black==22.3.0 (#154) Source-Link: https://github.com/googleapis/synthtool/commit/6fab84af09f2cf89a031fd8671d1def6b2931b11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe --- .github/.OwlBot.lock.yaml | 2 +- docs/conf.py | 5 +- .../cloud_channel_service/async_client.py | 302 ++- .../services/cloud_channel_service/client.py | 399 +++- .../cloud_channel_service/transports/base.py | 90 +- .../cloud_channel_service/transports/grpc.py | 3 +- .../channel_v1/types/channel_partner_links.py | 42 +- google/cloud/channel_v1/types/common.py | 110 +- google/cloud/channel_v1/types/customers.py | 99 +- google/cloud/channel_v1/types/entitlements.py | 182 +- google/cloud/channel_v1/types/offers.py | 222 +- google/cloud/channel_v1/types/operations.py | 11 +- google/cloud/channel_v1/types/products.py | 68 +- google/cloud/channel_v1/types/service.py | 743 +++++-- .../channel_v1/types/subscriber_event.py | 38 +- noxfile.py | 9 +- .../channel_v1/test_cloud_channel_service.py | 1872 +++++++++++++---- 17 files changed, 3329 insertions(+), 868 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 8807627..87dd006 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba + digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe diff --git a/docs/conf.py b/docs/conf.py index ff6650e..06a95e2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -361,7 +361,10 @@ intersphinx_mapping = { "python": ("https://python.readthedocs.org/en/latest/", None), "google-auth": ("https://googleapis.dev/python/google-auth/latest/", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), + "google.api_core": ( + "https://googleapis.dev/python/google-api-core/latest/", + None, + ), "grpc": ("https://grpc.github.io/grpc/python/", None), "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), 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 eaef140..0fb9013 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 @@ -333,12 +333,20 @@ def sample_list_customers(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListCustomersAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -444,7 +452,12 @@ def sample_get_customer(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -533,7 +546,12 @@ def sample_check_cloud_identity_accounts_exist(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -620,7 +638,12 @@ def sample_create_customer(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -708,7 +731,12 @@ def sample_update_customer(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -802,7 +830,10 @@ def sample_delete_customer(): # Send the request. await rpc( - request, retry=retry, timeout=timeout, metadata=metadata, + request, + retry=retry, + timeout=timeout, + metadata=metadata, ) async def import_customer( @@ -887,7 +918,12 @@ def sample_import_customer(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -985,7 +1021,12 @@ def sample_provision_cloud_identity(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1077,12 +1118,20 @@ def sample_list_entitlements(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListEntitlementsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1179,12 +1228,20 @@ def sample_list_transferable_skus(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListTransferableSkusAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1284,12 +1341,20 @@ def sample_list_transferable_offers(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListTransferableOffersAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1371,7 +1436,12 @@ def sample_get_entitlement(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1496,7 +1566,12 @@ def sample_create_entitlement(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1605,7 +1680,12 @@ def sample_change_parameters(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1716,7 +1796,12 @@ def sample_change_renewal_settings(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1824,7 +1909,12 @@ def sample_change_offer(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -1934,7 +2024,12 @@ def sample_start_paid_service(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2041,7 +2136,12 @@ def sample_suspend_entitlement(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2162,7 +2262,12 @@ def sample_cancel_entitlement(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2276,7 +2381,12 @@ def sample_activate_entitlement(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2399,7 +2509,12 @@ def sample_transfer_entitlements(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2532,7 +2647,12 @@ def sample_transfer_entitlements_to_google(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation_async.from_gapic( @@ -2627,12 +2747,20 @@ def sample_list_channel_partner_links(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListChannelPartnerLinksAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -2718,7 +2846,12 @@ def sample_get_channel_partner_link(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -2817,7 +2950,12 @@ def sample_create_channel_partner_link(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -2916,7 +3054,12 @@ def sample_update_channel_partner_link(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3001,7 +3144,12 @@ def sample_lookup_offer(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3071,12 +3219,20 @@ def sample_list_products(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListProductsAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3154,12 +3310,20 @@ def sample_list_skus(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListSkusAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3236,12 +3400,20 @@ def sample_list_offers(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListOffersAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3329,12 +3501,20 @@ def sample_list_purchasable_skus(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListPurchasableSkusAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3422,12 +3602,20 @@ def sample_list_purchasable_offers(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListPurchasableOffersAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3516,7 +3704,12 @@ def sample_register_subscriber(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3607,7 +3800,12 @@ def sample_unregister_subscriber(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3694,12 +3892,20 @@ def sample_list_subscribers(): ) # Send the request. - response = await rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__aiter__` convenience method. response = pagers.ListSubscribersAsyncPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3714,7 +3920,9 @@ async def __aexit__(self, exc_type, exc, tb): try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution("google-cloud-channel",).version, + gapic_version=pkg_resources.get_distribution( + "google-cloud-channel", + ).version, ) except pkg_resources.DistributionNotFound: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() 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 9f36957..94f5fa3 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/client.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/client.py @@ -68,7 +68,8 @@ class CloudChannelServiceClientMeta(type): _transport_registry["grpc_asyncio"] = CloudChannelServiceGrpcAsyncIOTransport def get_transport_class( - cls, label: str = None, + cls, + label: str = None, ) -> Type[CloudChannelServiceTransport]: """Returns an appropriate transport class. @@ -197,10 +198,14 @@ def transport(self) -> CloudChannelServiceTransport: return self._transport @staticmethod - def channel_partner_link_path(account: str, channel_partner_link: str,) -> str: + def channel_partner_link_path( + account: str, + channel_partner_link: str, + ) -> str: """Returns a fully-qualified channel_partner_link string.""" return "accounts/{account}/channelPartnerLinks/{channel_partner_link}".format( - account=account, channel_partner_link=channel_partner_link, + account=account, + channel_partner_link=channel_partner_link, ) @staticmethod @@ -213,10 +218,14 @@ def parse_channel_partner_link_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def customer_path(account: str, customer: str,) -> str: + def customer_path( + account: str, + customer: str, + ) -> str: """Returns a fully-qualified customer string.""" return "accounts/{account}/customers/{customer}".format( - account=account, customer=customer, + account=account, + customer=customer, ) @staticmethod @@ -226,10 +235,18 @@ def parse_customer_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def entitlement_path(account: str, customer: str, entitlement: str,) -> str: + def entitlement_path( + account: str, + customer: str, + entitlement: str, + ) -> str: """Returns a fully-qualified entitlement string.""" - return "accounts/{account}/customers/{customer}/entitlements/{entitlement}".format( - account=account, customer=customer, entitlement=entitlement, + return ( + "accounts/{account}/customers/{customer}/entitlements/{entitlement}".format( + account=account, + customer=customer, + entitlement=entitlement, + ) ) @staticmethod @@ -242,9 +259,15 @@ def parse_entitlement_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def offer_path(account: str, offer: str,) -> str: + def offer_path( + account: str, + offer: str, + ) -> str: """Returns a fully-qualified offer string.""" - return "accounts/{account}/offers/{offer}".format(account=account, offer=offer,) + return "accounts/{account}/offers/{offer}".format( + account=account, + offer=offer, + ) @staticmethod def parse_offer_path(path: str) -> Dict[str, str]: @@ -253,9 +276,13 @@ def parse_offer_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def product_path(product: str,) -> str: + def product_path( + product: str, + ) -> str: """Returns a fully-qualified product string.""" - return "products/{product}".format(product=product,) + return "products/{product}".format( + product=product, + ) @staticmethod def parse_product_path(path: str) -> Dict[str, str]: @@ -264,9 +291,15 @@ def parse_product_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def sku_path(product: str, sku: str,) -> str: + def sku_path( + product: str, + sku: str, + ) -> str: """Returns a fully-qualified sku string.""" - return "products/{product}/skus/{sku}".format(product=product, sku=sku,) + return "products/{product}/skus/{sku}".format( + product=product, + sku=sku, + ) @staticmethod def parse_sku_path(path: str) -> Dict[str, str]: @@ -275,7 +308,9 @@ def parse_sku_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_billing_account_path(billing_account: str,) -> str: + def common_billing_account_path( + billing_account: str, + ) -> str: """Returns a fully-qualified billing_account string.""" return "billingAccounts/{billing_account}".format( billing_account=billing_account, @@ -288,9 +323,13 @@ def parse_common_billing_account_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_folder_path(folder: str,) -> str: + def common_folder_path( + folder: str, + ) -> str: """Returns a fully-qualified folder string.""" - return "folders/{folder}".format(folder=folder,) + return "folders/{folder}".format( + folder=folder, + ) @staticmethod def parse_common_folder_path(path: str) -> Dict[str, str]: @@ -299,9 +338,13 @@ def parse_common_folder_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_organization_path(organization: str,) -> str: + def common_organization_path( + organization: str, + ) -> str: """Returns a fully-qualified organization string.""" - return "organizations/{organization}".format(organization=organization,) + return "organizations/{organization}".format( + organization=organization, + ) @staticmethod def parse_common_organization_path(path: str) -> Dict[str, str]: @@ -310,9 +353,13 @@ def parse_common_organization_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_project_path(project: str,) -> str: + def common_project_path( + project: str, + ) -> str: """Returns a fully-qualified project string.""" - return "projects/{project}".format(project=project,) + return "projects/{project}".format( + project=project, + ) @staticmethod def parse_common_project_path(path: str) -> Dict[str, str]: @@ -321,10 +368,14 @@ def parse_common_project_path(path: str) -> Dict[str, str]: return m.groupdict() if m else {} @staticmethod - def common_location_path(project: str, location: str,) -> str: + def common_location_path( + project: str, + location: str, + ) -> str: """Returns a fully-qualified location string.""" return "projects/{project}/locations/{location}".format( - project=project, location=location, + project=project, + location=location, ) @staticmethod @@ -578,12 +629,20 @@ def sample_list_customers(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListCustomersPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -689,7 +748,12 @@ def sample_get_customer(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -781,7 +845,12 @@ def sample_check_cloud_identity_accounts_exist(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -869,7 +938,12 @@ def sample_create_customer(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -958,7 +1032,12 @@ def sample_update_customer(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1052,7 +1131,10 @@ def sample_delete_customer(): # Send the request. rpc( - request, retry=retry, timeout=timeout, metadata=metadata, + request, + retry=retry, + timeout=timeout, + metadata=metadata, ) def import_customer( @@ -1138,7 +1220,12 @@ def sample_import_customer(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1237,7 +1324,12 @@ def sample_provision_cloud_identity(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1330,12 +1422,20 @@ def sample_list_entitlements(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListEntitlementsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1433,12 +1533,20 @@ def sample_list_transferable_skus(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListTransferableSkusPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1539,12 +1647,20 @@ def sample_list_transferable_offers(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListTransferableOffersPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -1627,7 +1743,12 @@ def sample_get_entitlement(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -1753,7 +1874,12 @@ def sample_create_entitlement(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1863,7 +1989,12 @@ def sample_change_parameters(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -1975,7 +2106,12 @@ def sample_change_renewal_settings(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2084,7 +2220,12 @@ def sample_change_offer(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2195,7 +2336,12 @@ def sample_start_paid_service(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2303,7 +2449,12 @@ def sample_suspend_entitlement(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2425,7 +2576,12 @@ def sample_cancel_entitlement(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2540,7 +2696,12 @@ def sample_activate_entitlement(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2664,7 +2825,12 @@ def sample_transfer_entitlements(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2800,7 +2966,12 @@ def sample_transfer_entitlements_to_google(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Wrap the response in an operation future. response = operation.from_gapic( @@ -2898,12 +3069,20 @@ def sample_list_channel_partner_links(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListChannelPartnerLinksPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -2990,7 +3169,12 @@ def sample_get_channel_partner_link(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3092,7 +3276,12 @@ def sample_create_channel_partner_link(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3194,7 +3383,12 @@ def sample_update_channel_partner_link(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3280,7 +3474,12 @@ def sample_lookup_offer(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3351,12 +3550,20 @@ def sample_list_products(): rpc = self._transport._wrapped_methods[self._transport.list_products] # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListProductsPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3435,12 +3642,20 @@ def sample_list_skus(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListSkusPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3518,12 +3733,20 @@ def sample_list_offers(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListOffersPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3612,12 +3835,20 @@ def sample_list_purchasable_skus(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListPurchasableSkusPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3706,12 +3937,20 @@ def sample_list_purchasable_offers(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListPurchasableOffersPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -3801,7 +4040,12 @@ def sample_register_subscriber(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3893,7 +4137,12 @@ def sample_unregister_subscriber(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # Done; return the response. return response @@ -3981,12 +4230,20 @@ def sample_list_subscribers(): ) # Send the request. - response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) # This method is paged; wrap the response in a pager, which provides # an `__iter__` convenience method. response = pagers.ListSubscribersPager( - method=rpc, request=request, response=response, metadata=metadata, + method=rpc, + request=request, + response=response, + metadata=metadata, ) # Done; return the response. @@ -4008,7 +4265,9 @@ def __exit__(self, type, value, traceback): try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution("google-cloud-channel",).version, + gapic_version=pkg_resources.get_distribution( + "google-cloud-channel", + ).version, ) except pkg_resources.DistributionNotFound: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py index 783caf5..3473cc0 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py @@ -36,7 +36,9 @@ try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution("google-cloud-channel",).version, + gapic_version=pkg_resources.get_distribution( + "google-cloud-channel", + ).version, ) except pkg_resources.DistributionNotFound: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() @@ -126,10 +128,14 @@ def _prep_wrapped_messages(self, client_info): # Precompute the wrapped methods. self._wrapped_methods = { self.list_customers: gapic_v1.method.wrap_method( - self.list_customers, default_timeout=None, client_info=client_info, + self.list_customers, + default_timeout=None, + client_info=client_info, ), self.get_customer: gapic_v1.method.wrap_method( - self.get_customer, default_timeout=None, client_info=client_info, + self.get_customer, + default_timeout=None, + client_info=client_info, ), self.check_cloud_identity_accounts_exist: gapic_v1.method.wrap_method( self.check_cloud_identity_accounts_exist, @@ -137,16 +143,24 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.create_customer: gapic_v1.method.wrap_method( - self.create_customer, default_timeout=None, client_info=client_info, + self.create_customer, + default_timeout=None, + client_info=client_info, ), self.update_customer: gapic_v1.method.wrap_method( - self.update_customer, default_timeout=None, client_info=client_info, + self.update_customer, + default_timeout=None, + client_info=client_info, ), self.delete_customer: gapic_v1.method.wrap_method( - self.delete_customer, default_timeout=None, client_info=client_info, + self.delete_customer, + default_timeout=None, + client_info=client_info, ), self.import_customer: gapic_v1.method.wrap_method( - self.import_customer, default_timeout=None, client_info=client_info, + self.import_customer, + default_timeout=None, + client_info=client_info, ), self.provision_cloud_identity: gapic_v1.method.wrap_method( self.provision_cloud_identity, @@ -154,7 +168,9 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.list_entitlements: gapic_v1.method.wrap_method( - self.list_entitlements, default_timeout=None, client_info=client_info, + self.list_entitlements, + default_timeout=None, + client_info=client_info, ), self.list_transferable_skus: gapic_v1.method.wrap_method( self.list_transferable_skus, @@ -167,13 +183,19 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.get_entitlement: gapic_v1.method.wrap_method( - self.get_entitlement, default_timeout=None, client_info=client_info, + self.get_entitlement, + default_timeout=None, + client_info=client_info, ), self.create_entitlement: gapic_v1.method.wrap_method( - self.create_entitlement, default_timeout=60.0, client_info=client_info, + self.create_entitlement, + default_timeout=60.0, + client_info=client_info, ), self.change_parameters: gapic_v1.method.wrap_method( - self.change_parameters, default_timeout=60.0, client_info=client_info, + self.change_parameters, + default_timeout=60.0, + client_info=client_info, ), self.change_renewal_settings: gapic_v1.method.wrap_method( self.change_renewal_settings, @@ -181,16 +203,24 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.change_offer: gapic_v1.method.wrap_method( - self.change_offer, default_timeout=60.0, client_info=client_info, + self.change_offer, + default_timeout=60.0, + client_info=client_info, ), self.start_paid_service: gapic_v1.method.wrap_method( - self.start_paid_service, default_timeout=60.0, client_info=client_info, + self.start_paid_service, + default_timeout=60.0, + client_info=client_info, ), self.suspend_entitlement: gapic_v1.method.wrap_method( - self.suspend_entitlement, default_timeout=60.0, client_info=client_info, + self.suspend_entitlement, + default_timeout=60.0, + client_info=client_info, ), self.cancel_entitlement: gapic_v1.method.wrap_method( - self.cancel_entitlement, default_timeout=60.0, client_info=client_info, + self.cancel_entitlement, + default_timeout=60.0, + client_info=client_info, ), self.activate_entitlement: gapic_v1.method.wrap_method( self.activate_entitlement, @@ -228,16 +258,24 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.lookup_offer: gapic_v1.method.wrap_method( - self.lookup_offer, default_timeout=None, client_info=client_info, + self.lookup_offer, + default_timeout=None, + client_info=client_info, ), self.list_products: gapic_v1.method.wrap_method( - self.list_products, default_timeout=None, client_info=client_info, + self.list_products, + default_timeout=None, + client_info=client_info, ), self.list_skus: gapic_v1.method.wrap_method( - self.list_skus, default_timeout=None, client_info=client_info, + self.list_skus, + default_timeout=None, + client_info=client_info, ), self.list_offers: gapic_v1.method.wrap_method( - self.list_offers, default_timeout=None, client_info=client_info, + self.list_offers, + default_timeout=None, + client_info=client_info, ), self.list_purchasable_skus: gapic_v1.method.wrap_method( self.list_purchasable_skus, @@ -250,7 +288,9 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.register_subscriber: gapic_v1.method.wrap_method( - self.register_subscriber, default_timeout=None, client_info=client_info, + self.register_subscriber, + default_timeout=None, + client_info=client_info, ), self.unregister_subscriber: gapic_v1.method.wrap_method( self.unregister_subscriber, @@ -258,16 +298,18 @@ def _prep_wrapped_messages(self, client_info): client_info=client_info, ), self.list_subscribers: gapic_v1.method.wrap_method( - self.list_subscribers, default_timeout=None, client_info=client_info, + self.list_subscribers, + default_timeout=None, + client_info=client_info, ), } def close(self): """Closes resources associated with the transport. - .. warning:: - Only call this method if the transport is NOT shared - with other clients - this may cause errors in other clients! + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! """ raise NotImplementedError() 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 b1f1d0f..d9bc380 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 @@ -254,8 +254,7 @@ def create_channel( @property def grpc_channel(self) -> grpc.Channel: - """Return the channel designed to connect to this service. - """ + """Return the channel designed to connect to this service.""" return self._grpc_channel @property diff --git a/google/cloud/channel_v1/types/channel_partner_links.py b/google/cloud/channel_v1/types/channel_partner_links.py index e35872c..29fe1af 100644 --- a/google/cloud/channel_v1/types/channel_partner_links.py +++ b/google/cloud/channel_v1/types/channel_partner_links.py @@ -82,15 +82,41 @@ class ChannelPartnerLink(proto.Message): channel partner (IR). """ - name = proto.Field(proto.STRING, number=1,) - reseller_cloud_identity_id = proto.Field(proto.STRING, number=2,) - link_state = proto.Field(proto.ENUM, number=3, enum="ChannelPartnerLinkState",) - invite_link_uri = proto.Field(proto.STRING, number=4,) - create_time = proto.Field(proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp,) - public_id = proto.Field(proto.STRING, number=7,) + name = proto.Field( + proto.STRING, + number=1, + ) + reseller_cloud_identity_id = proto.Field( + proto.STRING, + number=2, + ) + link_state = proto.Field( + proto.ENUM, + number=3, + enum="ChannelPartnerLinkState", + ) + invite_link_uri = proto.Field( + proto.STRING, + number=4, + ) + create_time = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + public_id = proto.Field( + proto.STRING, + number=7, + ) channel_partner_cloud_identity_info = proto.Field( - proto.MESSAGE, number=8, message=common.CloudIdentityInfo, + proto.MESSAGE, + number=8, + message=common.CloudIdentityInfo, ) diff --git a/google/cloud/channel_v1/types/common.py b/google/cloud/channel_v1/types/common.py index e5f6282..332f611 100644 --- a/google/cloud/channel_v1/types/common.py +++ b/google/cloud/channel_v1/types/common.py @@ -20,7 +20,12 @@ __protobuf__ = proto.module( package="google.cloud.channel.v1", - manifest={"EduData", "CloudIdentityInfo", "Value", "AdminUser",}, + manifest={ + "EduData", + "CloudIdentityInfo", + "Value", + "AdminUser", + }, ) @@ -54,9 +59,20 @@ class InstituteSize(proto.Enum): SIZE_5001_10000 = 6 SIZE_10001_OR_MORE = 7 - institute_type = proto.Field(proto.ENUM, number=1, enum=InstituteType,) - institute_size = proto.Field(proto.ENUM, number=2, enum=InstituteSize,) - website = proto.Field(proto.STRING, number=3,) + institute_type = proto.Field( + proto.ENUM, + number=1, + enum=InstituteType, + ) + institute_size = proto.Field( + proto.ENUM, + number=2, + enum=InstituteSize, + ) + website = proto.Field( + proto.STRING, + number=3, + ) class CloudIdentityInfo(proto.Message): @@ -95,14 +111,40 @@ class CustomerType(proto.Enum): DOMAIN = 1 TEAM = 2 - customer_type = proto.Field(proto.ENUM, number=1, enum=CustomerType,) - primary_domain = proto.Field(proto.STRING, number=9,) - is_domain_verified = proto.Field(proto.BOOL, number=4,) - alternate_email = proto.Field(proto.STRING, number=6,) - phone_number = proto.Field(proto.STRING, number=7,) - language_code = proto.Field(proto.STRING, number=8,) - admin_console_uri = proto.Field(proto.STRING, number=10,) - edu_data = proto.Field(proto.MESSAGE, number=22, message="EduData",) + customer_type = proto.Field( + proto.ENUM, + number=1, + enum=CustomerType, + ) + primary_domain = proto.Field( + proto.STRING, + number=9, + ) + is_domain_verified = proto.Field( + proto.BOOL, + number=4, + ) + alternate_email = proto.Field( + proto.STRING, + number=6, + ) + phone_number = proto.Field( + proto.STRING, + number=7, + ) + language_code = proto.Field( + proto.STRING, + number=8, + ) + admin_console_uri = proto.Field( + proto.STRING, + number=10, + ) + edu_data = proto.Field( + proto.MESSAGE, + number=22, + message="EduData", + ) class Value(proto.Message): @@ -138,13 +180,32 @@ class Value(proto.Message): This field is a member of `oneof`_ ``kind``. """ - int64_value = proto.Field(proto.INT64, number=1, oneof="kind",) - string_value = proto.Field(proto.STRING, number=2, oneof="kind",) - double_value = proto.Field(proto.DOUBLE, number=3, oneof="kind",) + int64_value = proto.Field( + proto.INT64, + number=1, + oneof="kind", + ) + string_value = proto.Field( + proto.STRING, + number=2, + oneof="kind", + ) + double_value = proto.Field( + proto.DOUBLE, + number=3, + oneof="kind", + ) proto_value = proto.Field( - proto.MESSAGE, number=4, oneof="kind", message=any_pb2.Any, + proto.MESSAGE, + number=4, + oneof="kind", + message=any_pb2.Any, + ) + bool_value = proto.Field( + proto.BOOL, + number=5, + oneof="kind", ) - bool_value = proto.Field(proto.BOOL, number=5, oneof="kind",) class AdminUser(proto.Message): @@ -160,9 +221,18 @@ class AdminUser(proto.Message): Family name of the admin user. """ - email = proto.Field(proto.STRING, number=1,) - given_name = proto.Field(proto.STRING, number=2,) - family_name = proto.Field(proto.STRING, number=3,) + email = proto.Field( + proto.STRING, + number=1, + ) + given_name = proto.Field( + proto.STRING, + number=2, + ) + family_name = proto.Field( + proto.STRING, + number=3, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/customers.py b/google/cloud/channel_v1/types/customers.py index 7a093d7..cfc2ea4 100644 --- a/google/cloud/channel_v1/types/customers.py +++ b/google/cloud/channel_v1/types/customers.py @@ -21,7 +21,11 @@ __protobuf__ = proto.module( - package="google.cloud.channel.v1", manifest={"Customer", "ContactInfo",}, + package="google.cloud.channel.v1", + manifest={ + "Customer", + "ContactInfo", + }, ) @@ -79,22 +83,59 @@ class Customer(proto.Message): exists for this customer. """ - name = proto.Field(proto.STRING, number=1,) - org_display_name = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + org_display_name = proto.Field( + proto.STRING, + number=2, + ) org_postal_address = proto.Field( - proto.MESSAGE, number=3, message=postal_address_pb2.PostalAddress, - ) - primary_contact_info = proto.Field(proto.MESSAGE, number=4, message="ContactInfo",) - alternate_email = proto.Field(proto.STRING, number=5,) - domain = proto.Field(proto.STRING, number=6,) - create_time = proto.Field(proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp,) - cloud_identity_id = proto.Field(proto.STRING, number=9,) - language_code = proto.Field(proto.STRING, number=10,) + proto.MESSAGE, + number=3, + message=postal_address_pb2.PostalAddress, + ) + primary_contact_info = proto.Field( + proto.MESSAGE, + number=4, + message="ContactInfo", + ) + alternate_email = proto.Field( + proto.STRING, + number=5, + ) + domain = proto.Field( + proto.STRING, + number=6, + ) + create_time = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + cloud_identity_id = proto.Field( + proto.STRING, + number=9, + ) + language_code = proto.Field( + proto.STRING, + number=10, + ) cloud_identity_info = proto.Field( - proto.MESSAGE, number=12, message=common.CloudIdentityInfo, + proto.MESSAGE, + number=12, + message=common.CloudIdentityInfo, + ) + channel_partner_id = proto.Field( + proto.STRING, + number=13, ) - channel_partner_id = proto.Field(proto.STRING, number=13,) class ContactInfo(proto.Message): @@ -124,12 +165,30 @@ class ContactInfo(proto.Message): The customer account's contact phone number. """ - first_name = proto.Field(proto.STRING, number=1,) - last_name = proto.Field(proto.STRING, number=2,) - display_name = proto.Field(proto.STRING, number=4,) - email = proto.Field(proto.STRING, number=5,) - title = proto.Field(proto.STRING, number=6,) - phone = proto.Field(proto.STRING, number=7,) + first_name = proto.Field( + proto.STRING, + number=1, + ) + last_name = proto.Field( + proto.STRING, + number=2, + ) + display_name = proto.Field( + proto.STRING, + number=4, + ) + email = proto.Field( + proto.STRING, + number=5, + ) + title = proto.Field( + proto.STRING, + number=6, + ) + phone = proto.Field( + proto.STRING, + number=7, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/entitlements.py b/google/cloud/channel_v1/types/entitlements.py index 7abc45f..67fed17 100644 --- a/google/cloud/channel_v1/types/entitlements.py +++ b/google/cloud/channel_v1/types/entitlements.py @@ -115,24 +115,63 @@ class SuspensionReason(proto.Enum): PENDING_TOS_ACCEPTANCE = 4 OTHER = 100 - name = proto.Field(proto.STRING, number=1,) - create_time = proto.Field(proto.MESSAGE, number=5, message=timestamp_pb2.Timestamp,) - update_time = proto.Field(proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp,) - offer = proto.Field(proto.STRING, number=8,) + name = proto.Field( + proto.STRING, + number=1, + ) + create_time = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + update_time = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + offer = proto.Field( + proto.STRING, + number=8, + ) commitment_settings = proto.Field( - proto.MESSAGE, number=12, message="CommitmentSettings", + proto.MESSAGE, + number=12, + message="CommitmentSettings", + ) + provisioning_state = proto.Field( + proto.ENUM, + number=13, + enum=ProvisioningState, ) - provisioning_state = proto.Field(proto.ENUM, number=13, enum=ProvisioningState,) provisioned_service = proto.Field( - proto.MESSAGE, number=16, message="ProvisionedService", + proto.MESSAGE, + number=16, + message="ProvisionedService", ) suspension_reasons = proto.RepeatedField( - proto.ENUM, number=18, enum=SuspensionReason, + proto.ENUM, + number=18, + enum=SuspensionReason, + ) + purchase_order_id = proto.Field( + proto.STRING, + number=19, + ) + trial_settings = proto.Field( + proto.MESSAGE, + number=21, + message="TrialSettings", + ) + association_info = proto.Field( + proto.MESSAGE, + number=23, + message="AssociationInfo", + ) + parameters = proto.RepeatedField( + proto.MESSAGE, + number=26, + message="Parameter", ) - purchase_order_id = proto.Field(proto.STRING, number=19,) - trial_settings = proto.Field(proto.MESSAGE, number=21, message="TrialSettings",) - association_info = proto.Field(proto.MESSAGE, number=23, message="AssociationInfo",) - parameters = proto.RepeatedField(proto.MESSAGE, number=26, message="Parameter",) class Parameter(proto.Message): @@ -150,9 +189,19 @@ class Parameter(proto.Message): editable when entitlement is active. """ - name = proto.Field(proto.STRING, number=1,) - value = proto.Field(proto.MESSAGE, number=2, message=common.Value,) - editable = proto.Field(proto.BOOL, number=3,) + name = proto.Field( + proto.STRING, + number=1, + ) + value = proto.Field( + proto.MESSAGE, + number=2, + message=common.Value, + ) + editable = proto.Field( + proto.BOOL, + number=3, + ) class AssociationInfo(proto.Message): @@ -165,7 +214,10 @@ class AssociationInfo(proto.Message): this entitlement is an add-on. """ - base_entitlement = proto.Field(proto.STRING, number=1,) + base_entitlement = proto.Field( + proto.STRING, + number=1, + ) class ProvisionedService(proto.Message): @@ -186,9 +238,18 @@ class ProvisionedService(proto.Message): provisioning resource as specified in the Offer. """ - provisioning_id = proto.Field(proto.STRING, number=1,) - product_id = proto.Field(proto.STRING, number=2,) - sku_id = proto.Field(proto.STRING, number=3,) + provisioning_id = proto.Field( + proto.STRING, + number=1, + ) + product_id = proto.Field( + proto.STRING, + number=2, + ) + sku_id = proto.Field( + proto.STRING, + number=3, + ) class CommitmentSettings(proto.Message): @@ -204,9 +265,21 @@ class CommitmentSettings(proto.Message): commitment-based Offer. """ - start_time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) - end_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) - renewal_settings = proto.Field(proto.MESSAGE, number=4, message="RenewalSettings",) + start_time = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + end_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + renewal_settings = proto.Field( + proto.MESSAGE, + number=4, + message="RenewalSettings", + ) class RenewalSettings(proto.Message): @@ -227,10 +300,24 @@ class RenewalSettings(proto.Message): billed, such as once per month. """ - enable_renewal = proto.Field(proto.BOOL, number=1,) - resize_unit_count = proto.Field(proto.BOOL, number=2,) - payment_plan = proto.Field(proto.ENUM, number=5, enum=offers.PaymentPlan,) - payment_cycle = proto.Field(proto.MESSAGE, number=6, message=offers.Period,) + enable_renewal = proto.Field( + proto.BOOL, + number=1, + ) + resize_unit_count = proto.Field( + proto.BOOL, + number=2, + ) + payment_plan = proto.Field( + proto.ENUM, + number=5, + enum=offers.PaymentPlan, + ) + payment_cycle = proto.Field( + proto.MESSAGE, + number=6, + message=offers.Period, + ) class TrialSettings(proto.Message): @@ -248,8 +335,15 @@ class TrialSettings(proto.Message): converter `__. """ - trial = proto.Field(proto.BOOL, number=1,) - end_time = proto.Field(proto.MESSAGE, number=2, message=timestamp_pb2.Timestamp,) + trial = proto.Field( + proto.BOOL, + number=1, + ) + end_time = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) class TransferableSku(proto.Message): @@ -269,10 +363,20 @@ class TransferableSku(proto.Message): """ transfer_eligibility = proto.Field( - proto.MESSAGE, number=9, message="TransferEligibility", + proto.MESSAGE, + number=9, + message="TransferEligibility", + ) + sku = proto.Field( + proto.MESSAGE, + number=11, + message=products.Sku, + ) + legacy_sku = proto.Field( + proto.MESSAGE, + number=12, + message=products.Sku, ) - sku = proto.Field(proto.MESSAGE, number=11, message=products.Sku,) - legacy_sku = proto.Field(proto.MESSAGE, number=12, message=products.Sku,) class TransferEligibility(proto.Message): @@ -296,9 +400,19 @@ class Reason(proto.Enum): SKU_NOT_ELIGIBLE = 2 SKU_SUSPENDED = 3 - is_eligible = proto.Field(proto.BOOL, number=1,) - description = proto.Field(proto.STRING, number=2,) - ineligibility_reason = proto.Field(proto.ENUM, number=3, enum=Reason,) + is_eligible = proto.Field( + proto.BOOL, + number=1, + ) + description = proto.Field( + proto.STRING, + number=2, + ) + ineligibility_reason = proto.Field( + proto.ENUM, + number=3, + enum=Reason, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/offers.py b/google/cloud/channel_v1/types/offers.py index 38a314d..76b1cf4 100644 --- a/google/cloud/channel_v1/types/offers.py +++ b/google/cloud/channel_v1/types/offers.py @@ -120,20 +120,49 @@ class Offer(proto.Message): purchase. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) marketing_info = proto.Field( - proto.MESSAGE, number=2, message=products.MarketingInfo, + proto.MESSAGE, + number=2, + message=products.MarketingInfo, + ) + sku = proto.Field( + proto.MESSAGE, + number=3, + message=products.Sku, + ) + plan = proto.Field( + proto.MESSAGE, + number=4, + message="Plan", + ) + constraints = proto.Field( + proto.MESSAGE, + number=5, + message="Constraints", ) - sku = proto.Field(proto.MESSAGE, number=3, message=products.Sku,) - plan = proto.Field(proto.MESSAGE, number=4, message="Plan",) - constraints = proto.Field(proto.MESSAGE, number=5, message="Constraints",) price_by_resources = proto.RepeatedField( - proto.MESSAGE, number=6, message="PriceByResource", + proto.MESSAGE, + number=6, + message="PriceByResource", + ) + start_time = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + end_time = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, ) - start_time = proto.Field(proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp,) - end_time = proto.Field(proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp,) parameter_definitions = proto.RepeatedField( - proto.MESSAGE, number=9, message="ParameterDefinition", + proto.MESSAGE, + number=9, + message="ParameterDefinition", ) @@ -175,12 +204,34 @@ class ParameterType(proto.Enum): STRING = 2 DOUBLE = 3 - name = proto.Field(proto.STRING, number=1,) - parameter_type = proto.Field(proto.ENUM, number=2, enum=ParameterType,) - min_value = proto.Field(proto.MESSAGE, number=3, message=common.Value,) - max_value = proto.Field(proto.MESSAGE, number=4, message=common.Value,) - allowed_values = proto.RepeatedField(proto.MESSAGE, number=5, message=common.Value,) - optional = proto.Field(proto.BOOL, number=6,) + name = proto.Field( + proto.STRING, + number=1, + ) + parameter_type = proto.Field( + proto.ENUM, + number=2, + enum=ParameterType, + ) + min_value = proto.Field( + proto.MESSAGE, + number=3, + message=common.Value, + ) + max_value = proto.Field( + proto.MESSAGE, + number=4, + message=common.Value, + ) + allowed_values = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=common.Value, + ) + optional = proto.Field( + proto.BOOL, + number=6, + ) class Constraints(proto.Message): @@ -193,7 +244,9 @@ class Constraints(proto.Message): """ customer_constraints = proto.Field( - proto.MESSAGE, number=1, message="CustomerConstraints", + proto.MESSAGE, + number=1, + message="CustomerConstraints", ) @@ -211,12 +264,19 @@ class CustomerConstraints(proto.Message): Promotional offers. """ - allowed_regions = proto.RepeatedField(proto.STRING, number=1,) + allowed_regions = proto.RepeatedField( + proto.STRING, + number=1, + ) allowed_customer_types = proto.RepeatedField( - proto.ENUM, number=2, enum=common.CloudIdentityInfo.CustomerType, + proto.ENUM, + number=2, + enum=common.CloudIdentityInfo.CustomerType, ) promotional_order_types = proto.RepeatedField( - proto.ENUM, number=3, enum="PromotionalOrderType", + proto.ENUM, + number=3, + enum="PromotionalOrderType", ) @@ -247,11 +307,30 @@ class Plan(proto.Message): Platform offers. """ - payment_plan = proto.Field(proto.ENUM, number=1, enum="PaymentPlan",) - payment_type = proto.Field(proto.ENUM, number=2, enum="PaymentType",) - payment_cycle = proto.Field(proto.MESSAGE, number=3, message="Period",) - trial_period = proto.Field(proto.MESSAGE, number=4, message="Period",) - billing_account = proto.Field(proto.STRING, number=5,) + payment_plan = proto.Field( + proto.ENUM, + number=1, + enum="PaymentPlan", + ) + payment_type = proto.Field( + proto.ENUM, + number=2, + enum="PaymentType", + ) + payment_cycle = proto.Field( + proto.MESSAGE, + number=3, + message="Period", + ) + trial_period = proto.Field( + proto.MESSAGE, + number=4, + message="Period", + ) + billing_account = proto.Field( + proto.STRING, + number=5, + ) class PriceByResource(proto.Message): @@ -267,9 +346,21 @@ class PriceByResource(proto.Message): Specifies the price by time range. """ - resource_type = proto.Field(proto.ENUM, number=1, enum="ResourceType",) - price = proto.Field(proto.MESSAGE, number=2, message="Price",) - price_phases = proto.RepeatedField(proto.MESSAGE, number=3, message="PricePhase",) + resource_type = proto.Field( + proto.ENUM, + number=1, + enum="ResourceType", + ) + price = proto.Field( + proto.MESSAGE, + number=2, + message="Price", + ) + price_phases = proto.RepeatedField( + proto.MESSAGE, + number=3, + message="PricePhase", + ) class Price(proto.Message): @@ -289,10 +380,24 @@ class Price(proto.Message): Google Voice rate card. """ - base_price = proto.Field(proto.MESSAGE, number=1, message=money_pb2.Money,) - discount = proto.Field(proto.DOUBLE, number=2,) - effective_price = proto.Field(proto.MESSAGE, number=3, message=money_pb2.Money,) - external_price_uri = proto.Field(proto.STRING, number=4,) + base_price = proto.Field( + proto.MESSAGE, + number=1, + message=money_pb2.Money, + ) + discount = proto.Field( + proto.DOUBLE, + number=2, + ) + effective_price = proto.Field( + proto.MESSAGE, + number=3, + message=money_pb2.Money, + ) + external_price_uri = proto.Field( + proto.STRING, + number=4, + ) class PricePhase(proto.Message): @@ -314,11 +419,29 @@ class PricePhase(proto.Message): Price by the resource tiers. """ - period_type = proto.Field(proto.ENUM, number=1, enum="PeriodType",) - first_period = proto.Field(proto.INT32, number=2,) - last_period = proto.Field(proto.INT32, number=3,) - price = proto.Field(proto.MESSAGE, number=4, message="Price",) - price_tiers = proto.RepeatedField(proto.MESSAGE, number=5, message="PriceTier",) + period_type = proto.Field( + proto.ENUM, + number=1, + enum="PeriodType", + ) + first_period = proto.Field( + proto.INT32, + number=2, + ) + last_period = proto.Field( + proto.INT32, + number=3, + ) + price = proto.Field( + proto.MESSAGE, + number=4, + message="Price", + ) + price_tiers = proto.RepeatedField( + proto.MESSAGE, + number=5, + message="PriceTier", + ) class PriceTier(proto.Message): @@ -342,9 +465,19 @@ class PriceTier(proto.Message): Price of the tier. """ - first_resource = proto.Field(proto.INT32, number=1,) - last_resource = proto.Field(proto.INT32, number=2,) - price = proto.Field(proto.MESSAGE, number=3, message="Price",) + first_resource = proto.Field( + proto.INT32, + number=1, + ) + last_resource = proto.Field( + proto.INT32, + number=2, + ) + price = proto.Field( + proto.MESSAGE, + number=3, + message="Price", + ) class Period(proto.Message): @@ -357,8 +490,15 @@ class Period(proto.Message): Period Type. """ - duration = proto.Field(proto.INT32, number=1,) - period_type = proto.Field(proto.ENUM, number=2, enum="PeriodType",) + duration = proto.Field( + proto.INT32, + number=1, + ) + period_type = proto.Field( + proto.ENUM, + number=2, + enum="PeriodType", + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/operations.py b/google/cloud/channel_v1/types/operations.py index 2dd8fcb..01f4ad1 100644 --- a/google/cloud/channel_v1/types/operations.py +++ b/google/cloud/channel_v1/types/operations.py @@ -17,7 +17,10 @@ __protobuf__ = proto.module( - package="google.cloud.channel.v1", manifest={"OperationMetadata",}, + package="google.cloud.channel.v1", + manifest={ + "OperationMetadata", + }, ) @@ -46,7 +49,11 @@ class OperationType(proto.Enum): CHANGE_PARAMETERS = 15 PROVISION_CLOUD_IDENTITY = 16 - operation_type = proto.Field(proto.ENUM, number=1, enum=OperationType,) + operation_type = proto.Field( + proto.ENUM, + number=1, + enum=OperationType, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/products.py b/google/cloud/channel_v1/types/products.py index c5ba2f3..46c406b 100644 --- a/google/cloud/channel_v1/types/products.py +++ b/google/cloud/channel_v1/types/products.py @@ -18,7 +18,13 @@ __protobuf__ = proto.module( package="google.cloud.channel.v1", - manifest={"MediaType", "Product", "Sku", "MarketingInfo", "Media",}, + manifest={ + "MediaType", + "Product", + "Sku", + "MarketingInfo", + "Media", + }, ) @@ -39,8 +45,15 @@ class Product(proto.Message): Marketing information for the product. """ - name = proto.Field(proto.STRING, number=1,) - marketing_info = proto.Field(proto.MESSAGE, number=2, message="MarketingInfo",) + name = proto.Field( + proto.STRING, + number=1, + ) + marketing_info = proto.Field( + proto.MESSAGE, + number=2, + message="MarketingInfo", + ) class Sku(proto.Message): @@ -59,9 +72,20 @@ class Sku(proto.Message): Product the SKU is associated with. """ - name = proto.Field(proto.STRING, number=1,) - marketing_info = proto.Field(proto.MESSAGE, number=2, message="MarketingInfo",) - product = proto.Field(proto.MESSAGE, number=3, message="Product",) + name = proto.Field( + proto.STRING, + number=1, + ) + marketing_info = proto.Field( + proto.MESSAGE, + number=2, + message="MarketingInfo", + ) + product = proto.Field( + proto.MESSAGE, + number=3, + message="Product", + ) class MarketingInfo(proto.Message): @@ -78,9 +102,19 @@ class MarketingInfo(proto.Message): Default logo. """ - display_name = proto.Field(proto.STRING, number=1,) - description = proto.Field(proto.STRING, number=2,) - default_logo = proto.Field(proto.MESSAGE, number=3, message="Media",) + display_name = proto.Field( + proto.STRING, + number=1, + ) + description = proto.Field( + proto.STRING, + number=2, + ) + default_logo = proto.Field( + proto.MESSAGE, + number=3, + message="Media", + ) class Media(proto.Message): @@ -95,9 +129,19 @@ class Media(proto.Message): Type of the media. """ - title = proto.Field(proto.STRING, number=1,) - content = proto.Field(proto.STRING, number=2,) - type_ = proto.Field(proto.ENUM, number=3, enum="MediaType",) + title = proto.Field( + proto.STRING, + number=1, + ) + content = proto.Field( + proto.STRING, + number=2, + ) + type_ = proto.Field( + proto.ENUM, + number=3, + enum="MediaType", + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/service.py b/google/cloud/channel_v1/types/service.py index 384c32a..582eb7f 100644 --- a/google/cloud/channel_v1/types/service.py +++ b/google/cloud/channel_v1/types/service.py @@ -100,8 +100,14 @@ class CheckCloudIdentityAccountsExistRequest(proto.Message): account customer. """ - parent = proto.Field(proto.STRING, number=1,) - domain = proto.Field(proto.STRING, number=2,) + parent = proto.Field( + proto.STRING, + number=1, + ) + domain = proto.Field( + proto.STRING, + number=2, + ) class CloudIdentityCustomerAccount(proto.Message): @@ -125,10 +131,22 @@ class CloudIdentityCustomerAccount(proto.Message): the customer. """ - existing = proto.Field(proto.BOOL, number=1,) - owned = proto.Field(proto.BOOL, number=2,) - customer_name = proto.Field(proto.STRING, number=3,) - customer_cloud_identity_id = proto.Field(proto.STRING, number=4,) + existing = proto.Field( + proto.BOOL, + number=1, + ) + owned = proto.Field( + proto.BOOL, + number=2, + ) + customer_name = proto.Field( + proto.STRING, + number=3, + ) + customer_cloud_identity_id = proto.Field( + proto.STRING, + number=4, + ) class CheckCloudIdentityAccountsExistResponse(proto.Message): @@ -142,7 +160,9 @@ class CheckCloudIdentityAccountsExistResponse(proto.Message): """ cloud_identity_accounts = proto.RepeatedField( - proto.MESSAGE, number=1, message="CloudIdentityCustomerAccount", + proto.MESSAGE, + number=1, + message="CloudIdentityCustomerAccount", ) @@ -169,9 +189,18 @@ class ListCustomersRequest(proto.Message): call. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) class ListCustomersResponse(proto.Message): @@ -193,9 +222,14 @@ def raw_page(self): return self customers = proto.RepeatedField( - proto.MESSAGE, number=1, message=gcc_customers.Customer, + proto.MESSAGE, + number=1, + message=gcc_customers.Customer, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class GetCustomerRequest(proto.Message): @@ -209,7 +243,10 @@ class GetCustomerRequest(proto.Message): accounts/{account_id}/customers/{customer_id} """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class CreateCustomerRequest(proto.Message): @@ -225,8 +262,15 @@ class CreateCustomerRequest(proto.Message): Required. The customer to create. """ - parent = proto.Field(proto.STRING, number=1,) - customer = proto.Field(proto.MESSAGE, number=2, message=gcc_customers.Customer,) + parent = proto.Field( + proto.STRING, + number=1, + ) + customer = proto.Field( + proto.MESSAGE, + number=2, + message=gcc_customers.Customer, + ) class UpdateCustomerRequest(proto.Message): @@ -241,9 +285,15 @@ class UpdateCustomerRequest(proto.Message): Optional. """ - customer = proto.Field(proto.MESSAGE, number=2, message=gcc_customers.Customer,) + customer = proto.Field( + proto.MESSAGE, + number=2, + message=gcc_customers.Customer, + ) update_mask = proto.Field( - proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, + proto.MESSAGE, + number=3, + message=field_mask_pb2.FieldMask, ) @@ -257,7 +307,10 @@ class DeleteCustomerRequest(proto.Message): to delete. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class ImportCustomerRequest(proto.Message): @@ -309,13 +362,36 @@ class ImportCustomerRequest(proto.Message): accounts/{account_id}/customers/{customer_id} """ - domain = proto.Field(proto.STRING, number=2, oneof="customer_identity",) - cloud_identity_id = proto.Field(proto.STRING, number=3, oneof="customer_identity",) - parent = proto.Field(proto.STRING, number=1,) - auth_token = proto.Field(proto.STRING, number=4,) - overwrite_if_exists = proto.Field(proto.BOOL, number=5,) - channel_partner_id = proto.Field(proto.STRING, number=6,) - customer = proto.Field(proto.STRING, number=7,) + domain = proto.Field( + proto.STRING, + number=2, + oneof="customer_identity", + ) + cloud_identity_id = proto.Field( + proto.STRING, + number=3, + oneof="customer_identity", + ) + parent = proto.Field( + proto.STRING, + number=1, + ) + auth_token = proto.Field( + proto.STRING, + number=4, + ) + overwrite_if_exists = proto.Field( + proto.BOOL, + number=5, + ) + channel_partner_id = proto.Field( + proto.STRING, + number=6, + ) + customer = proto.Field( + proto.STRING, + number=7, + ) class ProvisionCloudIdentityRequest(proto.Message): @@ -335,12 +411,24 @@ class ProvisionCloudIdentityRequest(proto.Message): but do not post it. """ - customer = proto.Field(proto.STRING, number=1,) + customer = proto.Field( + proto.STRING, + number=1, + ) cloud_identity_info = proto.Field( - proto.MESSAGE, number=2, message=common.CloudIdentityInfo, + proto.MESSAGE, + number=2, + message=common.CloudIdentityInfo, + ) + user = proto.Field( + proto.MESSAGE, + number=3, + message=common.AdminUser, + ) + validate_only = proto.Field( + proto.BOOL, + number=4, ) - user = proto.Field(proto.MESSAGE, number=3, message=common.AdminUser,) - validate_only = proto.Field(proto.BOOL, number=4,) class ListEntitlementsRequest(proto.Message): @@ -367,9 +455,18 @@ class ListEntitlementsRequest(proto.Message): call. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) class ListEntitlementsResponse(proto.Message): @@ -390,9 +487,14 @@ def raw_page(self): return self entitlements = proto.RepeatedField( - proto.MESSAGE, number=1, message=gcc_entitlements.Entitlement, + proto.MESSAGE, + number=1, + message=gcc_entitlements.Entitlement, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class ListTransferableSkusRequest(proto.Message): @@ -451,16 +553,35 @@ class ListTransferableSkusRequest(proto.Message): """ cloud_identity_id = proto.Field( - proto.STRING, number=4, oneof="transferred_customer_identity", + proto.STRING, + number=4, + oneof="transferred_customer_identity", ) customer_name = proto.Field( - proto.STRING, number=7, oneof="transferred_customer_identity", + proto.STRING, + number=7, + oneof="transferred_customer_identity", + ) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + auth_token = proto.Field( + proto.STRING, + number=5, + ) + language_code = proto.Field( + proto.STRING, + number=6, ) - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - auth_token = proto.Field(proto.STRING, number=5,) - language_code = proto.Field(proto.STRING, number=6,) class ListTransferableSkusResponse(proto.Message): @@ -482,9 +603,14 @@ def raw_page(self): return self transferable_skus = proto.RepeatedField( - proto.MESSAGE, number=1, message=gcc_entitlements.TransferableSku, + proto.MESSAGE, + number=1, + message=gcc_entitlements.TransferableSku, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class ListTransferableOffersRequest(proto.Message): @@ -533,16 +659,35 @@ class ListTransferableOffersRequest(proto.Message): """ cloud_identity_id = proto.Field( - proto.STRING, number=4, oneof="transferred_customer_identity", + proto.STRING, + number=4, + oneof="transferred_customer_identity", ) customer_name = proto.Field( - proto.STRING, number=5, oneof="transferred_customer_identity", + proto.STRING, + number=5, + oneof="transferred_customer_identity", + ) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + sku = proto.Field( + proto.STRING, + number=6, + ) + language_code = proto.Field( + proto.STRING, + number=7, ) - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - sku = proto.Field(proto.STRING, number=6,) - language_code = proto.Field(proto.STRING, number=7,) class ListTransferableOffersResponse(proto.Message): @@ -564,9 +709,14 @@ def raw_page(self): return self transferable_offers = proto.RepeatedField( - proto.MESSAGE, number=1, message="TransferableOffer", + proto.MESSAGE, + number=1, + message="TransferableOffer", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class TransferableOffer(proto.Message): @@ -579,7 +729,11 @@ class TransferableOffer(proto.Message): allow the Transfer. """ - offer = proto.Field(proto.MESSAGE, number=1, message=gcc_offers.Offer,) + offer = proto.Field( + proto.MESSAGE, + number=1, + message=gcc_offers.Offer, + ) class GetEntitlementRequest(proto.Message): @@ -593,7 +747,10 @@ class GetEntitlementRequest(proto.Message): accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) class ListChannelPartnerLinksRequest(proto.Message): @@ -623,11 +780,22 @@ class ListChannelPartnerLinksRequest(proto.Message): ChannelPartnerLink will display. """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) view = proto.Field( - proto.ENUM, number=4, enum=gcc_channel_partner_links.ChannelPartnerLinkView, + proto.ENUM, + number=4, + enum=gcc_channel_partner_links.ChannelPartnerLinkView, ) @@ -649,9 +817,14 @@ def raw_page(self): return self channel_partner_links = proto.RepeatedField( - proto.MESSAGE, number=1, message=gcc_channel_partner_links.ChannelPartnerLink, + proto.MESSAGE, + number=1, + message=gcc_channel_partner_links.ChannelPartnerLink, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class GetChannelPartnerLinkRequest(proto.Message): @@ -669,9 +842,14 @@ class GetChannelPartnerLinkRequest(proto.Message): ChannelPartnerLink will display. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) view = proto.Field( - proto.ENUM, number=2, enum=gcc_channel_partner_links.ChannelPartnerLinkView, + proto.ENUM, + number=2, + enum=gcc_channel_partner_links.ChannelPartnerLinkView, ) @@ -690,9 +868,14 @@ class CreateChannelPartnerLinkRequest(proto.Message): can be used to create a link. """ - parent = proto.Field(proto.STRING, number=1,) + parent = proto.Field( + proto.STRING, + number=1, + ) channel_partner_link = proto.Field( - proto.MESSAGE, number=2, message=gcc_channel_partner_links.ChannelPartnerLink, + proto.MESSAGE, + number=2, + message=gcc_channel_partner_links.ChannelPartnerLink, ) @@ -715,12 +898,19 @@ class UpdateChannelPartnerLinkRequest(proto.Message): channel_partner_link.link_state. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) channel_partner_link = proto.Field( - proto.MESSAGE, number=2, message=gcc_channel_partner_links.ChannelPartnerLink, + proto.MESSAGE, + number=2, + message=gcc_channel_partner_links.ChannelPartnerLink, ) update_mask = proto.Field( - proto.MESSAGE, number=3, message=field_mask_pb2.FieldMask, + proto.MESSAGE, + number=3, + message=field_mask_pb2.FieldMask, ) @@ -752,11 +942,19 @@ class CreateEntitlementRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - parent = proto.Field(proto.STRING, number=1,) + parent = proto.Field( + proto.STRING, + number=1, + ) entitlement = proto.Field( - proto.MESSAGE, number=2, message=gcc_entitlements.Entitlement, + proto.MESSAGE, + number=2, + message=gcc_entitlements.Entitlement, + ) + request_id = proto.Field( + proto.STRING, + number=5, ) - request_id = proto.Field(proto.STRING, number=5,) class TransferEntitlementsRequest(proto.Message): @@ -797,12 +995,23 @@ class TransferEntitlementsRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - parent = proto.Field(proto.STRING, number=1,) + parent = proto.Field( + proto.STRING, + number=1, + ) entitlements = proto.RepeatedField( - proto.MESSAGE, number=2, message=gcc_entitlements.Entitlement, + proto.MESSAGE, + number=2, + message=gcc_entitlements.Entitlement, + ) + auth_token = proto.Field( + proto.STRING, + number=4, + ) + request_id = proto.Field( + proto.STRING, + number=6, ) - auth_token = proto.Field(proto.STRING, number=4,) - request_id = proto.Field(proto.STRING, number=6,) class TransferEntitlementsResponse(proto.Message): @@ -816,7 +1025,9 @@ class TransferEntitlementsResponse(proto.Message): """ entitlements = proto.RepeatedField( - proto.MESSAGE, number=1, message=gcc_entitlements.Entitlement, + proto.MESSAGE, + number=1, + message=gcc_entitlements.Entitlement, ) @@ -849,11 +1060,19 @@ class TransferEntitlementsToGoogleRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - parent = proto.Field(proto.STRING, number=1,) + parent = proto.Field( + proto.STRING, + number=1, + ) entitlements = proto.RepeatedField( - proto.MESSAGE, number=2, message=gcc_entitlements.Entitlement, + proto.MESSAGE, + number=2, + message=gcc_entitlements.Entitlement, + ) + request_id = proto.Field( + proto.STRING, + number=3, ) - request_id = proto.Field(proto.STRING, number=3,) class ChangeParametersRequest(proto.Message): @@ -891,12 +1110,23 @@ class ChangeParametersRequest(proto.Message): reseller. """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) parameters = proto.RepeatedField( - proto.MESSAGE, number=2, message=gcc_entitlements.Parameter, + proto.MESSAGE, + number=2, + message=gcc_entitlements.Parameter, + ) + request_id = proto.Field( + proto.STRING, + number=4, + ) + purchase_order_id = proto.Field( + proto.STRING, + number=5, ) - request_id = proto.Field(proto.STRING, number=4,) - purchase_order_id = proto.Field(proto.STRING, number=5,) class ChangeRenewalSettingsRequest(proto.Message): @@ -927,11 +1157,19 @@ class ChangeRenewalSettingsRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - name = proto.Field(proto.STRING, number=1,) + name = proto.Field( + proto.STRING, + number=1, + ) renewal_settings = proto.Field( - proto.MESSAGE, number=4, message=gcc_entitlements.RenewalSettings, + proto.MESSAGE, + number=4, + message=gcc_entitlements.RenewalSettings, + ) + request_id = proto.Field( + proto.STRING, + number=5, ) - request_id = proto.Field(proto.STRING, number=5,) class ChangeOfferRequest(proto.Message): @@ -971,13 +1209,27 @@ class ChangeOfferRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - name = proto.Field(proto.STRING, number=1,) - offer = proto.Field(proto.STRING, number=2,) + name = proto.Field( + proto.STRING, + number=1, + ) + offer = proto.Field( + proto.STRING, + number=2, + ) parameters = proto.RepeatedField( - proto.MESSAGE, number=3, message=gcc_entitlements.Parameter, + proto.MESSAGE, + number=3, + message=gcc_entitlements.Parameter, + ) + purchase_order_id = proto.Field( + proto.STRING, + number=5, + ) + request_id = proto.Field( + proto.STRING, + number=6, ) - purchase_order_id = proto.Field(proto.STRING, number=5,) - request_id = proto.Field(proto.STRING, number=6,) class StartPaidServiceRequest(proto.Message): @@ -1006,8 +1258,14 @@ class StartPaidServiceRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=3,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=3, + ) class CancelEntitlementRequest(proto.Message): @@ -1036,8 +1294,14 @@ class CancelEntitlementRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=3,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=3, + ) class SuspendEntitlementRequest(proto.Message): @@ -1066,8 +1330,14 @@ class SuspendEntitlementRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=3,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=3, + ) class ActivateEntitlementRequest(proto.Message): @@ -1096,8 +1366,14 @@ class ActivateEntitlementRequest(proto.Message): (``00000000-0000-0000-0000-000000000000``). """ - name = proto.Field(proto.STRING, number=1,) - request_id = proto.Field(proto.STRING, number=3,) + name = proto.Field( + proto.STRING, + number=1, + ) + request_id = proto.Field( + proto.STRING, + number=3, + ) class LookupOfferRequest(proto.Message): @@ -1110,7 +1386,10 @@ class LookupOfferRequest(proto.Message): accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} """ - entitlement = proto.Field(proto.STRING, number=1,) + entitlement = proto.Field( + proto.STRING, + number=1, + ) class ListProductsRequest(proto.Message): @@ -1136,10 +1415,22 @@ class ListProductsRequest(proto.Message): The default value is "en-US". """ - account = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - language_code = proto.Field(proto.STRING, number=4,) + account = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + language_code = proto.Field( + proto.STRING, + number=4, + ) class ListProductsResponse(proto.Message): @@ -1157,9 +1448,14 @@ def raw_page(self): return self products = proto.RepeatedField( - proto.MESSAGE, number=1, message=gcc_products.Product, + proto.MESSAGE, + number=1, + message=gcc_products.Product, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class ListSkusRequest(proto.Message): @@ -1189,11 +1485,26 @@ class ListSkusRequest(proto.Message): The default value is "en-US". """ - parent = proto.Field(proto.STRING, number=1,) - account = proto.Field(proto.STRING, number=2,) - page_size = proto.Field(proto.INT32, number=3,) - page_token = proto.Field(proto.STRING, number=4,) - language_code = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + account = proto.Field( + proto.STRING, + number=2, + ) + page_size = proto.Field( + proto.INT32, + number=3, + ) + page_token = proto.Field( + proto.STRING, + number=4, + ) + language_code = proto.Field( + proto.STRING, + number=5, + ) class ListSkusResponse(proto.Message): @@ -1210,8 +1521,15 @@ class ListSkusResponse(proto.Message): def raw_page(self): return self - skus = proto.RepeatedField(proto.MESSAGE, number=1, message=gcc_products.Sku,) - next_page_token = proto.Field(proto.STRING, number=2,) + skus = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gcc_products.Sku, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) class ListOffersRequest(proto.Message): @@ -1245,11 +1563,26 @@ class ListOffersRequest(proto.Message): The default value is "en-US". """ - parent = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) - filter = proto.Field(proto.STRING, number=4,) - language_code = proto.Field(proto.STRING, number=5,) + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + language_code = proto.Field( + proto.STRING, + number=5, + ) class ListOffersResponse(proto.Message): @@ -1266,8 +1599,15 @@ class ListOffersResponse(proto.Message): def raw_page(self): return self - offers = proto.RepeatedField(proto.MESSAGE, number=1, message=gcc_offers.Offer,) - next_page_token = proto.Field(proto.STRING, number=2,) + offers = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gcc_offers.Offer, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) class ListPurchasableSkusRequest(proto.Message): @@ -1320,7 +1660,10 @@ class CreateEntitlementPurchase(proto.Message): for all products. """ - product = proto.Field(proto.STRING, number=1,) + product = proto.Field( + proto.STRING, + number=1, + ) class ChangeOfferPurchase(proto.Message): r"""List SKUs for upgrading or downgrading an entitlement. Make the @@ -1341,7 +1684,10 @@ class ChangeType(proto.Enum): UPGRADE = 1 DOWNGRADE = 2 - entitlement = proto.Field(proto.STRING, number=1,) + entitlement = proto.Field( + proto.STRING, + number=1, + ) change_type = proto.Field( proto.ENUM, number=2, @@ -1355,12 +1701,27 @@ class ChangeType(proto.Enum): message=CreateEntitlementPurchase, ) change_offer_purchase = proto.Field( - proto.MESSAGE, number=3, oneof="purchase_option", message=ChangeOfferPurchase, + proto.MESSAGE, + number=3, + oneof="purchase_option", + message=ChangeOfferPurchase, + ) + customer = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=4, + ) + page_token = proto.Field( + proto.STRING, + number=5, + ) + language_code = proto.Field( + proto.STRING, + number=6, ) - customer = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=4,) - page_token = proto.Field(proto.STRING, number=5,) - language_code = proto.Field(proto.STRING, number=6,) class ListPurchasableSkusResponse(proto.Message): @@ -1378,9 +1739,14 @@ def raw_page(self): return self purchasable_skus = proto.RepeatedField( - proto.MESSAGE, number=1, message="PurchasableSku", + proto.MESSAGE, + number=1, + message="PurchasableSku", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class PurchasableSku(proto.Message): @@ -1392,7 +1758,11 @@ class PurchasableSku(proto.Message): SKU """ - sku = proto.Field(proto.MESSAGE, number=1, message=gcc_products.Sku,) + sku = proto.Field( + proto.MESSAGE, + number=1, + message=gcc_products.Sku, + ) class ListPurchasableOffersRequest(proto.Message): @@ -1442,7 +1812,10 @@ class CreateEntitlementPurchase(proto.Message): Format: products/{product_id}/skus/{sku_id}. """ - sku = proto.Field(proto.STRING, number=1,) + sku = proto.Field( + proto.STRING, + number=1, + ) class ChangeOfferPurchase(proto.Message): r"""List Offers for ChangeOffer purchase. @@ -1457,8 +1830,14 @@ class ChangeOfferPurchase(proto.Message): products/{product_id}/skus/{sku_id} """ - entitlement = proto.Field(proto.STRING, number=1,) - new_sku = proto.Field(proto.STRING, number=2,) + entitlement = proto.Field( + proto.STRING, + number=1, + ) + new_sku = proto.Field( + proto.STRING, + number=2, + ) create_entitlement_purchase = proto.Field( proto.MESSAGE, @@ -1467,12 +1846,27 @@ class ChangeOfferPurchase(proto.Message): message=CreateEntitlementPurchase, ) change_offer_purchase = proto.Field( - proto.MESSAGE, number=3, oneof="purchase_option", message=ChangeOfferPurchase, + proto.MESSAGE, + number=3, + oneof="purchase_option", + message=ChangeOfferPurchase, + ) + customer = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=4, + ) + page_token = proto.Field( + proto.STRING, + number=5, + ) + language_code = proto.Field( + proto.STRING, + number=6, ) - customer = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=4,) - page_token = proto.Field(proto.STRING, number=5,) - language_code = proto.Field(proto.STRING, number=6,) class ListPurchasableOffersResponse(proto.Message): @@ -1490,9 +1884,14 @@ def raw_page(self): return self purchasable_offers = proto.RepeatedField( - proto.MESSAGE, number=1, message="PurchasableOffer", + proto.MESSAGE, + number=1, + message="PurchasableOffer", + ) + next_page_token = proto.Field( + proto.STRING, + number=2, ) - next_page_token = proto.Field(proto.STRING, number=2,) class PurchasableOffer(proto.Message): @@ -1504,7 +1903,11 @@ class PurchasableOffer(proto.Message): Offer. """ - offer = proto.Field(proto.MESSAGE, number=1, message=gcc_offers.Offer,) + offer = proto.Field( + proto.MESSAGE, + number=1, + message=gcc_offers.Offer, + ) class RegisterSubscriberRequest(proto.Message): @@ -1518,8 +1921,14 @@ class RegisterSubscriberRequest(proto.Message): subscriber access to the registered topic. """ - account = proto.Field(proto.STRING, number=1,) - service_account = proto.Field(proto.STRING, number=2,) + account = proto.Field( + proto.STRING, + number=1, + ) + service_account = proto.Field( + proto.STRING, + number=2, + ) class RegisterSubscriberResponse(proto.Message): @@ -1531,7 +1940,10 @@ class RegisterSubscriberResponse(proto.Message): to. """ - topic = proto.Field(proto.STRING, number=1,) + topic = proto.Field( + proto.STRING, + number=1, + ) class UnregisterSubscriberRequest(proto.Message): @@ -1545,8 +1957,14 @@ class UnregisterSubscriberRequest(proto.Message): subscriber access to the topic. """ - account = proto.Field(proto.STRING, number=1,) - service_account = proto.Field(proto.STRING, number=2,) + account = proto.Field( + proto.STRING, + number=1, + ) + service_account = proto.Field( + proto.STRING, + number=2, + ) class UnregisterSubscriberResponse(proto.Message): @@ -1558,7 +1976,10 @@ class UnregisterSubscriberResponse(proto.Message): subscriber access was removed from. """ - topic = proto.Field(proto.STRING, number=1,) + topic = proto.Field( + proto.STRING, + number=1, + ) class ListSubscribersRequest(proto.Message): @@ -1583,9 +2004,18 @@ class ListSubscribersRequest(proto.Message): page token. """ - account = proto.Field(proto.STRING, number=1,) - page_size = proto.Field(proto.INT32, number=2,) - page_token = proto.Field(proto.STRING, number=3,) + account = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) class ListSubscribersResponse(proto.Message): @@ -1608,9 +2038,18 @@ class ListSubscribersResponse(proto.Message): def raw_page(self): return self - topic = proto.Field(proto.STRING, number=1,) - service_accounts = proto.RepeatedField(proto.STRING, number=2,) - next_page_token = proto.Field(proto.STRING, number=3,) + topic = proto.Field( + proto.STRING, + number=1, + ) + service_accounts = proto.RepeatedField( + proto.STRING, + number=2, + ) + next_page_token = proto.Field( + proto.STRING, + number=3, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/subscriber_event.py b/google/cloud/channel_v1/types/subscriber_event.py index f7bc567..e80201c 100644 --- a/google/cloud/channel_v1/types/subscriber_event.py +++ b/google/cloud/channel_v1/types/subscriber_event.py @@ -18,7 +18,11 @@ __protobuf__ = proto.module( package="google.cloud.channel.v1", - manifest={"CustomerEvent", "EntitlementEvent", "SubscriberEvent",}, + manifest={ + "CustomerEvent", + "EntitlementEvent", + "SubscriberEvent", + }, ) @@ -40,8 +44,15 @@ class Type(proto.Enum): PRIMARY_DOMAIN_CHANGED = 1 PRIMARY_DOMAIN_VERIFIED = 2 - customer = proto.Field(proto.STRING, number=1,) - event_type = proto.Field(proto.ENUM, number=2, enum=Type,) + customer = proto.Field( + proto.STRING, + number=1, + ) + event_type = proto.Field( + proto.ENUM, + number=2, + enum=Type, + ) class EntitlementEvent(proto.Message): @@ -73,8 +84,15 @@ class Type(proto.Enum): LICENSE_ASSIGNMENT_CHANGED = 12 LICENSE_CAP_CHANGED = 13 - entitlement = proto.Field(proto.STRING, number=1,) - event_type = proto.Field(proto.ENUM, number=2, enum=Type,) + entitlement = proto.Field( + proto.STRING, + number=1, + ) + event_type = proto.Field( + proto.ENUM, + number=2, + enum=Type, + ) class SubscriberEvent(proto.Message): @@ -102,10 +120,16 @@ class SubscriberEvent(proto.Message): """ customer_event = proto.Field( - proto.MESSAGE, number=1, oneof="event", message="CustomerEvent", + proto.MESSAGE, + number=1, + oneof="event", + message="CustomerEvent", ) entitlement_event = proto.Field( - proto.MESSAGE, number=2, oneof="event", message="EntitlementEvent", + proto.MESSAGE, + number=2, + oneof="event", + message="EntitlementEvent", ) diff --git a/noxfile.py b/noxfile.py index 2a2001c..3addb4e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -24,7 +24,7 @@ import nox -BLACK_VERSION = "black==19.10b0" +BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -57,7 +57,9 @@ def lint(session): """ session.install("flake8", BLACK_VERSION) session.run( - "black", "--check", *BLACK_PATHS, + "black", + "--check", + *BLACK_PATHS, ) session.run("flake8", "google", "tests") @@ -67,7 +69,8 @@ def blacken(session): """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) session.run( - "black", *BLACK_PATHS, + "black", + *BLACK_PATHS, ) diff --git a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py index 06f8197..4b67ad0 100644 --- a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py +++ b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py @@ -106,7 +106,11 @@ def test__get_default_mtls_endpoint(): @pytest.mark.parametrize( - "client_class", [CloudChannelServiceClient, CloudChannelServiceAsyncClient,] + "client_class", + [ + CloudChannelServiceClient, + CloudChannelServiceAsyncClient, + ], ) def test_cloud_channel_service_client_from_service_account_info(client_class): creds = ga_credentials.AnonymousCredentials() @@ -148,7 +152,11 @@ def test_cloud_channel_service_client_service_account_always_use_jwt( @pytest.mark.parametrize( - "client_class", [CloudChannelServiceClient, CloudChannelServiceAsyncClient,] + "client_class", + [ + CloudChannelServiceClient, + CloudChannelServiceAsyncClient, + ], ) def test_cloud_channel_service_client_from_service_account_file(client_class): creds = ga_credentials.AnonymousCredentials() @@ -530,7 +538,9 @@ def test_cloud_channel_service_client_client_options_scopes( client_class, transport_class, transport_name ): # Check the case scopes are provided. - options = client_options.ClientOptions(scopes=["1", "2"],) + options = client_options.ClientOptions( + scopes=["1", "2"], + ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None client = client_class(client_options=options, transport=transport_name) @@ -670,10 +680,17 @@ def test_cloud_channel_service_client_create_channel_credentials_file( ) -@pytest.mark.parametrize("request_type", [service.ListCustomersRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListCustomersRequest, + dict, + ], +) def test_list_customers(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -702,7 +719,8 @@ def test_list_customers_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -718,7 +736,8 @@ async def test_list_customers_async( transport: str = "grpc_asyncio", request_type=service.ListCustomersRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -729,7 +748,9 @@ async def test_list_customers_async( with mock.patch.object(type(client.transport.list_customers), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.ListCustomersResponse(next_page_token="next_page_token_value",) + service.ListCustomersResponse( + next_page_token="next_page_token_value", + ) ) response = await client.list_customers(request) @@ -771,7 +792,10 @@ def test_list_customers_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -800,12 +824,16 @@ async def test_list_customers_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_customers_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -820,12 +848,21 @@ def test_list_customers_pager(transport_name: str = "grpc"): ], next_page_token="abc", ), - service.ListCustomersResponse(customers=[], next_page_token="def",), service.ListCustomersResponse( - customers=[customers.Customer(),], next_page_token="ghi", + customers=[], + next_page_token="def", + ), + service.ListCustomersResponse( + customers=[ + customers.Customer(), + ], + next_page_token="ghi", ), service.ListCustomersResponse( - customers=[customers.Customer(), customers.Customer(),], + customers=[ + customers.Customer(), + customers.Customer(), + ], ), RuntimeError, ) @@ -845,7 +882,8 @@ def test_list_customers_pager(transport_name: str = "grpc"): def test_list_customers_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -860,12 +898,21 @@ def test_list_customers_pages(transport_name: str = "grpc"): ], next_page_token="abc", ), - service.ListCustomersResponse(customers=[], next_page_token="def",), service.ListCustomersResponse( - customers=[customers.Customer(),], next_page_token="ghi", + customers=[], + next_page_token="def", + ), + service.ListCustomersResponse( + customers=[ + customers.Customer(), + ], + next_page_token="ghi", ), service.ListCustomersResponse( - customers=[customers.Customer(), customers.Customer(),], + customers=[ + customers.Customer(), + customers.Customer(), + ], ), RuntimeError, ) @@ -894,16 +941,27 @@ async def test_list_customers_async_pager(): ], next_page_token="abc", ), - service.ListCustomersResponse(customers=[], next_page_token="def",), service.ListCustomersResponse( - customers=[customers.Customer(),], next_page_token="ghi", + customers=[], + next_page_token="def", + ), + service.ListCustomersResponse( + customers=[ + customers.Customer(), + ], + next_page_token="ghi", ), service.ListCustomersResponse( - customers=[customers.Customer(), customers.Customer(),], + customers=[ + customers.Customer(), + customers.Customer(), + ], ), RuntimeError, ) - async_pager = await client.list_customers(request={},) + async_pager = await client.list_customers( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -933,12 +991,21 @@ async def test_list_customers_async_pages(): ], next_page_token="abc", ), - service.ListCustomersResponse(customers=[], next_page_token="def",), service.ListCustomersResponse( - customers=[customers.Customer(),], next_page_token="ghi", + customers=[], + next_page_token="def", + ), + service.ListCustomersResponse( + customers=[ + customers.Customer(), + ], + next_page_token="ghi", ), service.ListCustomersResponse( - customers=[customers.Customer(), customers.Customer(),], + customers=[ + customers.Customer(), + customers.Customer(), + ], ), RuntimeError, ) @@ -949,10 +1016,17 @@ async def test_list_customers_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.GetCustomerRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.GetCustomerRequest, + dict, + ], +) def test_get_customer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -993,7 +1067,8 @@ def test_get_customer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1009,7 +1084,8 @@ async def test_get_customer_async( transport: str = "grpc_asyncio", request_type=service.GetCustomerRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1076,7 +1152,10 @@ def test_get_customer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -1103,7 +1182,10 @@ async def test_get_customer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_get_customer_flattened(): @@ -1117,7 +1199,9 @@ def test_get_customer_flattened(): call.return_value = customers.Customer() # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.get_customer(name="name_value",) + client.get_customer( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1137,7 +1221,8 @@ def test_get_customer_flattened_error(): # fields is an error. with pytest.raises(ValueError): client.get_customer( - service.GetCustomerRequest(), name="name_value", + service.GetCustomerRequest(), + name="name_value", ) @@ -1155,7 +1240,9 @@ async def test_get_customer_flattened_async(): call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(customers.Customer()) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.get_customer(name="name_value",) + response = await client.get_customer( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1176,16 +1263,22 @@ async def test_get_customer_flattened_error_async(): # fields is an error. with pytest.raises(ValueError): await client.get_customer( - service.GetCustomerRequest(), name="name_value", + service.GetCustomerRequest(), + name="name_value", ) @pytest.mark.parametrize( - "request_type", [service.CheckCloudIdentityAccountsExistRequest, dict,] + "request_type", + [ + service.CheckCloudIdentityAccountsExistRequest, + dict, + ], ) def test_check_cloud_identity_accounts_exist(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1213,7 +1306,8 @@ def test_check_cloud_identity_accounts_exist_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1232,7 +1326,8 @@ async def test_check_cloud_identity_accounts_exist_async( request_type=service.CheckCloudIdentityAccountsExistRequest, ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1288,7 +1383,10 @@ def test_check_cloud_identity_accounts_exist_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -1319,13 +1417,23 @@ async def test_check_cloud_identity_accounts_exist_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.CreateCustomerRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.CreateCustomerRequest, + dict, + ], +) def test_create_customer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1366,7 +1474,8 @@ def test_create_customer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1382,7 +1491,8 @@ async def test_create_customer_async( transport: str = "grpc_asyncio", request_type=service.CreateCustomerRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1449,7 +1559,10 @@ def test_create_customer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -1476,13 +1589,23 @@ async def test_create_customer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.UpdateCustomerRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.UpdateCustomerRequest, + dict, + ], +) def test_update_customer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1523,7 +1646,8 @@ def test_update_customer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1539,7 +1663,8 @@ async def test_update_customer_async( transport: str = "grpc_asyncio", request_type=service.UpdateCustomerRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1606,9 +1731,10 @@ def test_update_customer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer.name=customer.name/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "customer.name=customer.name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -1635,15 +1761,23 @@ async def test_update_customer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer.name=customer.name/value",) in kw[ - "metadata" - ] + assert ( + "x-goog-request-params", + "customer.name=customer.name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.DeleteCustomerRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.DeleteCustomerRequest, + dict, + ], +) def test_delete_customer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1669,7 +1803,8 @@ def test_delete_customer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1685,7 +1820,8 @@ async def test_delete_customer_async( transport: str = "grpc_asyncio", request_type=service.DeleteCustomerRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1735,7 +1871,10 @@ def test_delete_customer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -1762,7 +1901,10 @@ async def test_delete_customer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] def test_delete_customer_flattened(): @@ -1776,7 +1918,9 @@ def test_delete_customer_flattened(): call.return_value = None # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - client.delete_customer(name="name_value",) + client.delete_customer( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1796,7 +1940,8 @@ def test_delete_customer_flattened_error(): # fields is an error. with pytest.raises(ValueError): client.delete_customer( - service.DeleteCustomerRequest(), name="name_value", + service.DeleteCustomerRequest(), + name="name_value", ) @@ -1814,7 +1959,9 @@ async def test_delete_customer_flattened_async(): call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) # Call the method with a truthy value for each flattened field, # using the keyword arguments to the method. - response = await client.delete_customer(name="name_value",) + response = await client.delete_customer( + name="name_value", + ) # Establish that the underlying call was made with the expected # request object values. @@ -1835,14 +1982,22 @@ async def test_delete_customer_flattened_error_async(): # fields is an error. with pytest.raises(ValueError): await client.delete_customer( - service.DeleteCustomerRequest(), name="name_value", + service.DeleteCustomerRequest(), + name="name_value", ) -@pytest.mark.parametrize("request_type", [service.ImportCustomerRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ImportCustomerRequest, + dict, + ], +) def test_import_customer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1883,7 +2038,8 @@ def test_import_customer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -1899,7 +2055,8 @@ async def test_import_customer_async( transport: str = "grpc_asyncio", request_type=service.ImportCustomerRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -1966,7 +2123,10 @@ def test_import_customer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -1993,13 +2153,23 @@ async def test_import_customer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ProvisionCloudIdentityRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ProvisionCloudIdentityRequest, + dict, + ], +) def test_provision_cloud_identity(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2027,7 +2197,8 @@ def test_provision_cloud_identity_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2045,7 +2216,8 @@ async def test_provision_cloud_identity_async( transport: str = "grpc_asyncio", request_type=service.ProvisionCloudIdentityRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2101,7 +2273,10 @@ def test_provision_cloud_identity_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer=customer/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "customer=customer/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -2132,13 +2307,23 @@ async def test_provision_cloud_identity_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer=customer/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "customer=customer/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ListEntitlementsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListEntitlementsRequest, + dict, + ], +) def test_list_entitlements(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2169,7 +2354,8 @@ def test_list_entitlements_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2187,7 +2373,8 @@ async def test_list_entitlements_async( transport: str = "grpc_asyncio", request_type=service.ListEntitlementsRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2200,7 +2387,9 @@ async def test_list_entitlements_async( ) as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.ListEntitlementsResponse(next_page_token="next_page_token_value",) + service.ListEntitlementsResponse( + next_page_token="next_page_token_value", + ) ) response = await client.list_entitlements(request) @@ -2244,7 +2433,10 @@ def test_list_entitlements_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -2275,12 +2467,16 @@ async def test_list_entitlements_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_entitlements_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2297,12 +2493,21 @@ def test_list_entitlements_pager(transport_name: str = "grpc"): ], next_page_token="abc", ), - service.ListEntitlementsResponse(entitlements=[], next_page_token="def",), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(),], next_page_token="ghi", + entitlements=[], + next_page_token="def", + ), + service.ListEntitlementsResponse( + entitlements=[ + entitlements.Entitlement(), + ], + next_page_token="ghi", ), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(), entitlements.Entitlement(),], + entitlements=[ + entitlements.Entitlement(), + entitlements.Entitlement(), + ], ), RuntimeError, ) @@ -2322,7 +2527,8 @@ def test_list_entitlements_pager(transport_name: str = "grpc"): def test_list_entitlements_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2339,12 +2545,21 @@ def test_list_entitlements_pages(transport_name: str = "grpc"): ], next_page_token="abc", ), - service.ListEntitlementsResponse(entitlements=[], next_page_token="def",), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(),], next_page_token="ghi", + entitlements=[], + next_page_token="def", + ), + service.ListEntitlementsResponse( + entitlements=[ + entitlements.Entitlement(), + ], + next_page_token="ghi", ), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(), entitlements.Entitlement(),], + entitlements=[ + entitlements.Entitlement(), + entitlements.Entitlement(), + ], ), RuntimeError, ) @@ -2375,16 +2590,27 @@ async def test_list_entitlements_async_pager(): ], next_page_token="abc", ), - service.ListEntitlementsResponse(entitlements=[], next_page_token="def",), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(),], next_page_token="ghi", + entitlements=[], + next_page_token="def", + ), + service.ListEntitlementsResponse( + entitlements=[ + entitlements.Entitlement(), + ], + next_page_token="ghi", ), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(), entitlements.Entitlement(),], + entitlements=[ + entitlements.Entitlement(), + entitlements.Entitlement(), + ], ), RuntimeError, ) - async_pager = await client.list_entitlements(request={},) + async_pager = await client.list_entitlements( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -2416,12 +2642,21 @@ async def test_list_entitlements_async_pages(): ], next_page_token="abc", ), - service.ListEntitlementsResponse(entitlements=[], next_page_token="def",), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(),], next_page_token="ghi", + entitlements=[], + next_page_token="def", + ), + service.ListEntitlementsResponse( + entitlements=[ + entitlements.Entitlement(), + ], + next_page_token="ghi", ), service.ListEntitlementsResponse( - entitlements=[entitlements.Entitlement(), entitlements.Entitlement(),], + entitlements=[ + entitlements.Entitlement(), + entitlements.Entitlement(), + ], ), RuntimeError, ) @@ -2432,10 +2667,17 @@ async def test_list_entitlements_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.ListTransferableSkusRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListTransferableSkusRequest, + dict, + ], +) def test_list_transferable_skus(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2466,7 +2708,8 @@ def test_list_transferable_skus_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2484,7 +2727,8 @@ async def test_list_transferable_skus_async( transport: str = "grpc_asyncio", request_type=service.ListTransferableSkusRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2543,7 +2787,10 @@ def test_list_transferable_skus_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -2574,12 +2821,16 @@ async def test_list_transferable_skus_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_transferable_skus_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2597,10 +2848,13 @@ def test_list_transferable_skus_pager(transport_name: str = "grpc"): next_page_token="abc", ), service.ListTransferableSkusResponse( - transferable_skus=[], next_page_token="def", + transferable_skus=[], + next_page_token="def", ), service.ListTransferableSkusResponse( - transferable_skus=[entitlements.TransferableSku(),], + transferable_skus=[ + entitlements.TransferableSku(), + ], next_page_token="ghi", ), service.ListTransferableSkusResponse( @@ -2627,7 +2881,8 @@ def test_list_transferable_skus_pager(transport_name: str = "grpc"): def test_list_transferable_skus_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2645,10 +2900,13 @@ def test_list_transferable_skus_pages(transport_name: str = "grpc"): next_page_token="abc", ), service.ListTransferableSkusResponse( - transferable_skus=[], next_page_token="def", + transferable_skus=[], + next_page_token="def", ), service.ListTransferableSkusResponse( - transferable_skus=[entitlements.TransferableSku(),], + transferable_skus=[ + entitlements.TransferableSku(), + ], next_page_token="ghi", ), service.ListTransferableSkusResponse( @@ -2687,10 +2945,13 @@ async def test_list_transferable_skus_async_pager(): next_page_token="abc", ), service.ListTransferableSkusResponse( - transferable_skus=[], next_page_token="def", + transferable_skus=[], + next_page_token="def", ), service.ListTransferableSkusResponse( - transferable_skus=[entitlements.TransferableSku(),], + transferable_skus=[ + entitlements.TransferableSku(), + ], next_page_token="ghi", ), service.ListTransferableSkusResponse( @@ -2701,7 +2962,9 @@ async def test_list_transferable_skus_async_pager(): ), RuntimeError, ) - async_pager = await client.list_transferable_skus(request={},) + async_pager = await client.list_transferable_skus( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -2734,10 +2997,13 @@ async def test_list_transferable_skus_async_pages(): next_page_token="abc", ), service.ListTransferableSkusResponse( - transferable_skus=[], next_page_token="def", + transferable_skus=[], + next_page_token="def", ), service.ListTransferableSkusResponse( - transferable_skus=[entitlements.TransferableSku(),], + transferable_skus=[ + entitlements.TransferableSku(), + ], next_page_token="ghi", ), service.ListTransferableSkusResponse( @@ -2755,10 +3021,17 @@ async def test_list_transferable_skus_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.ListTransferableOffersRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListTransferableOffersRequest, + dict, + ], +) def test_list_transferable_offers(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2789,7 +3062,8 @@ def test_list_transferable_offers_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2807,7 +3081,8 @@ async def test_list_transferable_offers_async( transport: str = "grpc_asyncio", request_type=service.ListTransferableOffersRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -2866,7 +3141,10 @@ def test_list_transferable_offers_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -2897,12 +3175,16 @@ async def test_list_transferable_offers_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_transferable_offers_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2920,10 +3202,13 @@ def test_list_transferable_offers_pager(transport_name: str = "grpc"): next_page_token="abc", ), service.ListTransferableOffersResponse( - transferable_offers=[], next_page_token="def", + transferable_offers=[], + next_page_token="def", ), service.ListTransferableOffersResponse( - transferable_offers=[service.TransferableOffer(),], + transferable_offers=[ + service.TransferableOffer(), + ], next_page_token="ghi", ), service.ListTransferableOffersResponse( @@ -2950,7 +3235,8 @@ def test_list_transferable_offers_pager(transport_name: str = "grpc"): def test_list_transferable_offers_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -2968,10 +3254,13 @@ def test_list_transferable_offers_pages(transport_name: str = "grpc"): next_page_token="abc", ), service.ListTransferableOffersResponse( - transferable_offers=[], next_page_token="def", + transferable_offers=[], + next_page_token="def", ), service.ListTransferableOffersResponse( - transferable_offers=[service.TransferableOffer(),], + transferable_offers=[ + service.TransferableOffer(), + ], next_page_token="ghi", ), service.ListTransferableOffersResponse( @@ -3010,10 +3299,13 @@ async def test_list_transferable_offers_async_pager(): next_page_token="abc", ), service.ListTransferableOffersResponse( - transferable_offers=[], next_page_token="def", + transferable_offers=[], + next_page_token="def", ), service.ListTransferableOffersResponse( - transferable_offers=[service.TransferableOffer(),], + transferable_offers=[ + service.TransferableOffer(), + ], next_page_token="ghi", ), service.ListTransferableOffersResponse( @@ -3024,7 +3316,9 @@ async def test_list_transferable_offers_async_pager(): ), RuntimeError, ) - async_pager = await client.list_transferable_offers(request={},) + async_pager = await client.list_transferable_offers( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -3057,10 +3351,13 @@ async def test_list_transferable_offers_async_pages(): next_page_token="abc", ), service.ListTransferableOffersResponse( - transferable_offers=[], next_page_token="def", + transferable_offers=[], + next_page_token="def", ), service.ListTransferableOffersResponse( - transferable_offers=[service.TransferableOffer(),], + transferable_offers=[ + service.TransferableOffer(), + ], next_page_token="ghi", ), service.ListTransferableOffersResponse( @@ -3078,10 +3375,17 @@ async def test_list_transferable_offers_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.GetEntitlementRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.GetEntitlementRequest, + dict, + ], +) def test_get_entitlement(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3124,7 +3428,8 @@ def test_get_entitlement_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3140,7 +3445,8 @@ async def test_get_entitlement_async( transport: str = "grpc_asyncio", request_type=service.GetEntitlementRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3209,7 +3515,10 @@ def test_get_entitlement_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -3238,13 +3547,23 @@ async def test_get_entitlement_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.CreateEntitlementRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.CreateEntitlementRequest, + dict, + ], +) def test_create_entitlement(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3272,7 +3591,8 @@ def test_create_entitlement_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3290,7 +3610,8 @@ async def test_create_entitlement_async( transport: str = "grpc_asyncio", request_type=service.CreateEntitlementRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3346,7 +3667,10 @@ def test_create_entitlement_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -3377,13 +3701,23 @@ async def test_create_entitlement_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ChangeParametersRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ChangeParametersRequest, + dict, + ], +) def test_change_parameters(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3411,7 +3745,8 @@ def test_change_parameters_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3429,7 +3764,8 @@ async def test_change_parameters_async( transport: str = "grpc_asyncio", request_type=service.ChangeParametersRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3485,7 +3821,10 @@ def test_change_parameters_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -3516,13 +3855,23 @@ async def test_change_parameters_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ChangeRenewalSettingsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ChangeRenewalSettingsRequest, + dict, + ], +) def test_change_renewal_settings(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3550,7 +3899,8 @@ def test_change_renewal_settings_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3568,7 +3918,8 @@ async def test_change_renewal_settings_async( transport: str = "grpc_asyncio", request_type=service.ChangeRenewalSettingsRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3624,7 +3975,10 @@ def test_change_renewal_settings_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -3655,13 +4009,23 @@ async def test_change_renewal_settings_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ChangeOfferRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ChangeOfferRequest, + dict, + ], +) def test_change_offer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3687,7 +4051,8 @@ def test_change_offer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3703,7 +4068,8 @@ async def test_change_offer_async( transport: str = "grpc_asyncio", request_type=service.ChangeOfferRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3755,7 +4121,10 @@ def test_change_offer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -3784,13 +4153,23 @@ async def test_change_offer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.StartPaidServiceRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.StartPaidServiceRequest, + dict, + ], +) def test_start_paid_service(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3818,7 +4197,8 @@ def test_start_paid_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3836,7 +4216,8 @@ async def test_start_paid_service_async( transport: str = "grpc_asyncio", request_type=service.StartPaidServiceRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3892,7 +4273,10 @@ def test_start_paid_service_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -3923,13 +4307,23 @@ async def test_start_paid_service_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.SuspendEntitlementRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.SuspendEntitlementRequest, + dict, + ], +) def test_suspend_entitlement(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -3957,7 +4351,8 @@ def test_suspend_entitlement_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -3975,7 +4370,8 @@ async def test_suspend_entitlement_async( transport: str = "grpc_asyncio", request_type=service.SuspendEntitlementRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4031,7 +4427,10 @@ def test_suspend_entitlement_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -4062,13 +4461,23 @@ async def test_suspend_entitlement_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.CancelEntitlementRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.CancelEntitlementRequest, + dict, + ], +) def test_cancel_entitlement(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4096,7 +4505,8 @@ def test_cancel_entitlement_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4114,7 +4524,8 @@ async def test_cancel_entitlement_async( transport: str = "grpc_asyncio", request_type=service.CancelEntitlementRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4170,7 +4581,10 @@ def test_cancel_entitlement_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -4201,13 +4615,23 @@ async def test_cancel_entitlement_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ActivateEntitlementRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ActivateEntitlementRequest, + dict, + ], +) def test_activate_entitlement(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4235,7 +4659,8 @@ def test_activate_entitlement_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4253,7 +4678,8 @@ async def test_activate_entitlement_async( transport: str = "grpc_asyncio", request_type=service.ActivateEntitlementRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4309,7 +4735,10 @@ def test_activate_entitlement_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -4340,13 +4769,23 @@ async def test_activate_entitlement_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.TransferEntitlementsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.TransferEntitlementsRequest, + dict, + ], +) def test_transfer_entitlements(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4374,7 +4813,8 @@ def test_transfer_entitlements_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4392,7 +4832,8 @@ async def test_transfer_entitlements_async( transport: str = "grpc_asyncio", request_type=service.TransferEntitlementsRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4448,7 +4889,10 @@ def test_transfer_entitlements_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -4479,15 +4923,23 @@ async def test_transfer_entitlements_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.parametrize( - "request_type", [service.TransferEntitlementsToGoogleRequest, dict,] + "request_type", + [ + service.TransferEntitlementsToGoogleRequest, + dict, + ], ) def test_transfer_entitlements_to_google(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4515,7 +4967,8 @@ def test_transfer_entitlements_to_google_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4534,7 +4987,8 @@ async def test_transfer_entitlements_to_google_async( request_type=service.TransferEntitlementsToGoogleRequest, ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4590,7 +5044,10 @@ def test_transfer_entitlements_to_google_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -4621,15 +5078,23 @@ async def test_transfer_entitlements_to_google_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.parametrize( - "request_type", [service.ListChannelPartnerLinksRequest, dict,] + "request_type", + [ + service.ListChannelPartnerLinksRequest, + dict, + ], ) def test_list_channel_partner_links(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4660,7 +5125,8 @@ def test_list_channel_partner_links_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4678,7 +5144,8 @@ async def test_list_channel_partner_links_async( transport: str = "grpc_asyncio", request_type=service.ListChannelPartnerLinksRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4737,7 +5204,10 @@ def test_list_channel_partner_links_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -4768,12 +5238,16 @@ async def test_list_channel_partner_links_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_channel_partner_links_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4791,10 +5265,13 @@ def test_list_channel_partner_links_pager(transport_name: str = "grpc"): next_page_token="abc", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[], next_page_token="def", + channel_partner_links=[], + next_page_token="def", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[channel_partner_links.ChannelPartnerLink(),], + channel_partner_links=[ + channel_partner_links.ChannelPartnerLink(), + ], next_page_token="ghi", ), service.ListChannelPartnerLinksResponse( @@ -4823,7 +5300,8 @@ def test_list_channel_partner_links_pager(transport_name: str = "grpc"): def test_list_channel_partner_links_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -4841,10 +5319,13 @@ def test_list_channel_partner_links_pages(transport_name: str = "grpc"): next_page_token="abc", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[], next_page_token="def", + channel_partner_links=[], + next_page_token="def", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[channel_partner_links.ChannelPartnerLink(),], + channel_partner_links=[ + channel_partner_links.ChannelPartnerLink(), + ], next_page_token="ghi", ), service.ListChannelPartnerLinksResponse( @@ -4883,10 +5364,13 @@ async def test_list_channel_partner_links_async_pager(): next_page_token="abc", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[], next_page_token="def", + channel_partner_links=[], + next_page_token="def", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[channel_partner_links.ChannelPartnerLink(),], + channel_partner_links=[ + channel_partner_links.ChannelPartnerLink(), + ], next_page_token="ghi", ), service.ListChannelPartnerLinksResponse( @@ -4897,7 +5381,9 @@ async def test_list_channel_partner_links_async_pager(): ), RuntimeError, ) - async_pager = await client.list_channel_partner_links(request={},) + async_pager = await client.list_channel_partner_links( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -4932,10 +5418,13 @@ async def test_list_channel_partner_links_async_pages(): next_page_token="abc", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[], next_page_token="def", + channel_partner_links=[], + next_page_token="def", ), service.ListChannelPartnerLinksResponse( - channel_partner_links=[channel_partner_links.ChannelPartnerLink(),], + channel_partner_links=[ + channel_partner_links.ChannelPartnerLink(), + ], next_page_token="ghi", ), service.ListChannelPartnerLinksResponse( @@ -4953,10 +5442,17 @@ async def test_list_channel_partner_links_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.GetChannelPartnerLinkRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.GetChannelPartnerLinkRequest, + dict, + ], +) def test_get_channel_partner_link(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -4995,7 +5491,8 @@ def test_get_channel_partner_link_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5013,7 +5510,8 @@ async def test_get_channel_partner_link_async( transport: str = "grpc_asyncio", request_type=service.GetChannelPartnerLinkRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5080,7 +5578,10 @@ def test_get_channel_partner_link_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -5111,15 +5612,23 @@ async def test_get_channel_partner_link_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.parametrize( - "request_type", [service.CreateChannelPartnerLinkRequest, dict,] + "request_type", + [ + service.CreateChannelPartnerLinkRequest, + dict, + ], ) def test_create_channel_partner_link(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5158,7 +5667,8 @@ def test_create_channel_partner_link_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5177,7 +5687,8 @@ async def test_create_channel_partner_link_async( request_type=service.CreateChannelPartnerLinkRequest, ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5244,7 +5755,10 @@ def test_create_channel_partner_link_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -5275,15 +5789,23 @@ async def test_create_channel_partner_link_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.parametrize( - "request_type", [service.UpdateChannelPartnerLinkRequest, dict,] + "request_type", + [ + service.UpdateChannelPartnerLinkRequest, + dict, + ], ) def test_update_channel_partner_link(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5322,7 +5844,8 @@ def test_update_channel_partner_link_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5341,7 +5864,8 @@ async def test_update_channel_partner_link_async( request_type=service.UpdateChannelPartnerLinkRequest, ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5408,7 +5932,10 @@ def test_update_channel_partner_link_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -5439,13 +5966,23 @@ async def test_update_channel_partner_link_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "name=name/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.LookupOfferRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.LookupOfferRequest, + dict, + ], +) def test_lookup_offer(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5455,7 +5992,9 @@ def test_lookup_offer(request_type, transport: str = "grpc"): # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.lookup_offer), "__call__") as call: # Designate an appropriate return value for the call. - call.return_value = offers.Offer(name="name_value",) + call.return_value = offers.Offer( + name="name_value", + ) response = client.lookup_offer(request) # Establish that the underlying gRPC stub method was called. @@ -5472,7 +6011,8 @@ def test_lookup_offer_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5488,7 +6028,8 @@ async def test_lookup_offer_async( transport: str = "grpc_asyncio", request_type=service.LookupOfferRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5499,7 +6040,9 @@ async def test_lookup_offer_async( with mock.patch.object(type(client.transport.lookup_offer), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - offers.Offer(name="name_value",) + offers.Offer( + name="name_value", + ) ) response = await client.lookup_offer(request) @@ -5541,7 +6084,10 @@ def test_lookup_offer_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "entitlement=entitlement/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "entitlement=entitlement/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -5568,13 +6114,23 @@ async def test_lookup_offer_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "entitlement=entitlement/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "entitlement=entitlement/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ListProductsRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListProductsRequest, + dict, + ], +) def test_list_products(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5603,7 +6159,8 @@ def test_list_products_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5619,7 +6176,8 @@ async def test_list_products_async( transport: str = "grpc_asyncio", request_type=service.ListProductsRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5630,7 +6188,9 @@ async def test_list_products_async( with mock.patch.object(type(client.transport.list_products), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.ListProductsResponse(next_page_token="next_page_token_value",) + service.ListProductsResponse( + next_page_token="next_page_token_value", + ) ) response = await client.list_products(request) @@ -5651,7 +6211,8 @@ async def test_list_products_async_from_dict(): def test_list_products_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5659,15 +6220,28 @@ def test_list_products_pager(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListProductsResponse( - products=[products.Product(), products.Product(), products.Product(),], + products=[ + products.Product(), + products.Product(), + products.Product(), + ], next_page_token="abc", ), - service.ListProductsResponse(products=[], next_page_token="def",), service.ListProductsResponse( - products=[products.Product(),], next_page_token="ghi", + products=[], + next_page_token="def", ), service.ListProductsResponse( - products=[products.Product(), products.Product(),], + products=[ + products.Product(), + ], + next_page_token="ghi", + ), + service.ListProductsResponse( + products=[ + products.Product(), + products.Product(), + ], ), RuntimeError, ) @@ -5684,7 +6258,8 @@ def test_list_products_pager(transport_name: str = "grpc"): def test_list_products_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5692,15 +6267,28 @@ def test_list_products_pages(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListProductsResponse( - products=[products.Product(), products.Product(), products.Product(),], + products=[ + products.Product(), + products.Product(), + products.Product(), + ], next_page_token="abc", ), - service.ListProductsResponse(products=[], next_page_token="def",), service.ListProductsResponse( - products=[products.Product(),], next_page_token="ghi", + products=[], + next_page_token="def", ), service.ListProductsResponse( - products=[products.Product(), products.Product(),], + products=[ + products.Product(), + ], + next_page_token="ghi", + ), + service.ListProductsResponse( + products=[ + products.Product(), + products.Product(), + ], ), RuntimeError, ) @@ -5722,19 +6310,34 @@ async def test_list_products_async_pager(): # Set the response to a series of pages. call.side_effect = ( service.ListProductsResponse( - products=[products.Product(), products.Product(), products.Product(),], + products=[ + products.Product(), + products.Product(), + products.Product(), + ], next_page_token="abc", ), - service.ListProductsResponse(products=[], next_page_token="def",), service.ListProductsResponse( - products=[products.Product(),], next_page_token="ghi", + products=[], + next_page_token="def", + ), + service.ListProductsResponse( + products=[ + products.Product(), + ], + next_page_token="ghi", ), service.ListProductsResponse( - products=[products.Product(), products.Product(),], + products=[ + products.Product(), + products.Product(), + ], ), RuntimeError, ) - async_pager = await client.list_products(request={},) + async_pager = await client.list_products( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -5757,15 +6360,28 @@ async def test_list_products_async_pages(): # Set the response to a series of pages. call.side_effect = ( service.ListProductsResponse( - products=[products.Product(), products.Product(), products.Product(),], + products=[ + products.Product(), + products.Product(), + products.Product(), + ], next_page_token="abc", ), - service.ListProductsResponse(products=[], next_page_token="def",), service.ListProductsResponse( - products=[products.Product(),], next_page_token="ghi", + products=[], + next_page_token="def", + ), + service.ListProductsResponse( + products=[ + products.Product(), + ], + next_page_token="ghi", ), service.ListProductsResponse( - products=[products.Product(), products.Product(),], + products=[ + products.Product(), + products.Product(), + ], ), RuntimeError, ) @@ -5776,10 +6392,17 @@ async def test_list_products_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.ListSkusRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListSkusRequest, + dict, + ], +) def test_list_skus(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5808,7 +6431,8 @@ def test_list_skus_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5824,7 +6448,8 @@ async def test_list_skus_async( transport: str = "grpc_asyncio", request_type=service.ListSkusRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -5835,7 +6460,9 @@ async def test_list_skus_async( with mock.patch.object(type(client.transport.list_skus), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.ListSkusResponse(next_page_token="next_page_token_value",) + service.ListSkusResponse( + next_page_token="next_page_token_value", + ) ) response = await client.list_skus(request) @@ -5877,7 +6504,10 @@ def test_list_skus_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -5906,12 +6536,16 @@ async def test_list_skus_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_skus_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5919,12 +6553,29 @@ def test_list_skus_pager(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListSkusResponse( - skus=[products.Sku(), products.Sku(), products.Sku(),], + skus=[ + products.Sku(), + products.Sku(), + products.Sku(), + ], next_page_token="abc", ), - service.ListSkusResponse(skus=[], next_page_token="def",), - service.ListSkusResponse(skus=[products.Sku(),], next_page_token="ghi",), - service.ListSkusResponse(skus=[products.Sku(), products.Sku(),],), + service.ListSkusResponse( + skus=[], + next_page_token="def", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + ], + next_page_token="ghi", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + products.Sku(), + ], + ), RuntimeError, ) @@ -5943,7 +6594,8 @@ def test_list_skus_pager(transport_name: str = "grpc"): def test_list_skus_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -5951,12 +6603,29 @@ def test_list_skus_pages(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListSkusResponse( - skus=[products.Sku(), products.Sku(), products.Sku(),], + skus=[ + products.Sku(), + products.Sku(), + products.Sku(), + ], next_page_token="abc", ), - service.ListSkusResponse(skus=[], next_page_token="def",), - service.ListSkusResponse(skus=[products.Sku(),], next_page_token="ghi",), - service.ListSkusResponse(skus=[products.Sku(), products.Sku(),],), + service.ListSkusResponse( + skus=[], + next_page_token="def", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + ], + next_page_token="ghi", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + products.Sku(), + ], + ), RuntimeError, ) pages = list(client.list_skus(request={}).pages) @@ -5977,15 +6646,34 @@ async def test_list_skus_async_pager(): # Set the response to a series of pages. call.side_effect = ( service.ListSkusResponse( - skus=[products.Sku(), products.Sku(), products.Sku(),], + skus=[ + products.Sku(), + products.Sku(), + products.Sku(), + ], next_page_token="abc", ), - service.ListSkusResponse(skus=[], next_page_token="def",), - service.ListSkusResponse(skus=[products.Sku(),], next_page_token="ghi",), - service.ListSkusResponse(skus=[products.Sku(), products.Sku(),],), + service.ListSkusResponse( + skus=[], + next_page_token="def", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + ], + next_page_token="ghi", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + products.Sku(), + ], + ), RuntimeError, ) - async_pager = await client.list_skus(request={},) + async_pager = await client.list_skus( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -6008,12 +6696,29 @@ async def test_list_skus_async_pages(): # Set the response to a series of pages. call.side_effect = ( service.ListSkusResponse( - skus=[products.Sku(), products.Sku(), products.Sku(),], + skus=[ + products.Sku(), + products.Sku(), + products.Sku(), + ], next_page_token="abc", ), - service.ListSkusResponse(skus=[], next_page_token="def",), - service.ListSkusResponse(skus=[products.Sku(),], next_page_token="ghi",), - service.ListSkusResponse(skus=[products.Sku(), products.Sku(),],), + service.ListSkusResponse( + skus=[], + next_page_token="def", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + ], + next_page_token="ghi", + ), + service.ListSkusResponse( + skus=[ + products.Sku(), + products.Sku(), + ], + ), RuntimeError, ) pages = [] @@ -6023,10 +6728,17 @@ async def test_list_skus_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.ListOffersRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListOffersRequest, + dict, + ], +) def test_list_offers(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6055,7 +6767,8 @@ def test_list_offers_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6071,7 +6784,8 @@ async def test_list_offers_async( transport: str = "grpc_asyncio", request_type=service.ListOffersRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6082,7 +6796,9 @@ async def test_list_offers_async( with mock.patch.object(type(client.transport.list_offers), "__call__") as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.ListOffersResponse(next_page_token="next_page_token_value",) + service.ListOffersResponse( + next_page_token="next_page_token_value", + ) ) response = await client.list_offers(request) @@ -6124,7 +6840,10 @@ def test_list_offers_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -6153,12 +6872,16 @@ async def test_list_offers_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "parent=parent/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] def test_list_offers_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6166,14 +6889,29 @@ def test_list_offers_pager(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListOffersResponse( - offers=[offers.Offer(), offers.Offer(), offers.Offer(),], + offers=[ + offers.Offer(), + offers.Offer(), + offers.Offer(), + ], next_page_token="abc", ), - service.ListOffersResponse(offers=[], next_page_token="def",), service.ListOffersResponse( - offers=[offers.Offer(),], next_page_token="ghi", + offers=[], + next_page_token="def", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + ], + next_page_token="ghi", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + offers.Offer(), + ], ), - service.ListOffersResponse(offers=[offers.Offer(), offers.Offer(),],), RuntimeError, ) @@ -6192,7 +6930,8 @@ def test_list_offers_pager(transport_name: str = "grpc"): def test_list_offers_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6200,14 +6939,29 @@ def test_list_offers_pages(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListOffersResponse( - offers=[offers.Offer(), offers.Offer(), offers.Offer(),], + offers=[ + offers.Offer(), + offers.Offer(), + offers.Offer(), + ], next_page_token="abc", ), - service.ListOffersResponse(offers=[], next_page_token="def",), service.ListOffersResponse( - offers=[offers.Offer(),], next_page_token="ghi", + offers=[], + next_page_token="def", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + ], + next_page_token="ghi", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + offers.Offer(), + ], ), - service.ListOffersResponse(offers=[offers.Offer(), offers.Offer(),],), RuntimeError, ) pages = list(client.list_offers(request={}).pages) @@ -6228,17 +6982,34 @@ async def test_list_offers_async_pager(): # Set the response to a series of pages. call.side_effect = ( service.ListOffersResponse( - offers=[offers.Offer(), offers.Offer(), offers.Offer(),], + offers=[ + offers.Offer(), + offers.Offer(), + offers.Offer(), + ], next_page_token="abc", ), - service.ListOffersResponse(offers=[], next_page_token="def",), service.ListOffersResponse( - offers=[offers.Offer(),], next_page_token="ghi", + offers=[], + next_page_token="def", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + ], + next_page_token="ghi", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + offers.Offer(), + ], ), - service.ListOffersResponse(offers=[offers.Offer(), offers.Offer(),],), RuntimeError, ) - async_pager = await client.list_offers(request={},) + async_pager = await client.list_offers( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -6261,14 +7032,29 @@ async def test_list_offers_async_pages(): # Set the response to a series of pages. call.side_effect = ( service.ListOffersResponse( - offers=[offers.Offer(), offers.Offer(), offers.Offer(),], + offers=[ + offers.Offer(), + offers.Offer(), + offers.Offer(), + ], next_page_token="abc", ), - service.ListOffersResponse(offers=[], next_page_token="def",), service.ListOffersResponse( - offers=[offers.Offer(),], next_page_token="ghi", + offers=[], + next_page_token="def", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + ], + next_page_token="ghi", + ), + service.ListOffersResponse( + offers=[ + offers.Offer(), + offers.Offer(), + ], ), - service.ListOffersResponse(offers=[offers.Offer(), offers.Offer(),],), RuntimeError, ) pages = [] @@ -6278,10 +7064,17 @@ async def test_list_offers_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.ListPurchasableSkusRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListPurchasableSkusRequest, + dict, + ], +) def test_list_purchasable_skus(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6312,7 +7105,8 @@ def test_list_purchasable_skus_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6330,7 +7124,8 @@ async def test_list_purchasable_skus_async( transport: str = "grpc_asyncio", request_type=service.ListPurchasableSkusRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6389,7 +7184,10 @@ def test_list_purchasable_skus_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer=customer/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "customer=customer/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -6420,12 +7218,16 @@ async def test_list_purchasable_skus_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer=customer/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "customer=customer/value", + ) in kw["metadata"] def test_list_purchasable_skus_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6443,13 +7245,20 @@ def test_list_purchasable_skus_pager(transport_name: str = "grpc"): next_page_token="abc", ), service.ListPurchasableSkusResponse( - purchasable_skus=[], next_page_token="def", + purchasable_skus=[], + next_page_token="def", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(),], next_page_token="ghi", + purchasable_skus=[ + service.PurchasableSku(), + ], + next_page_token="ghi", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(), service.PurchasableSku(),], + purchasable_skus=[ + service.PurchasableSku(), + service.PurchasableSku(), + ], ), RuntimeError, ) @@ -6469,7 +7278,8 @@ def test_list_purchasable_skus_pager(transport_name: str = "grpc"): def test_list_purchasable_skus_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6487,13 +7297,20 @@ def test_list_purchasable_skus_pages(transport_name: str = "grpc"): next_page_token="abc", ), service.ListPurchasableSkusResponse( - purchasable_skus=[], next_page_token="def", + purchasable_skus=[], + next_page_token="def", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(),], next_page_token="ghi", + purchasable_skus=[ + service.PurchasableSku(), + ], + next_page_token="ghi", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(), service.PurchasableSku(),], + purchasable_skus=[ + service.PurchasableSku(), + service.PurchasableSku(), + ], ), RuntimeError, ) @@ -6525,17 +7342,26 @@ async def test_list_purchasable_skus_async_pager(): next_page_token="abc", ), service.ListPurchasableSkusResponse( - purchasable_skus=[], next_page_token="def", + purchasable_skus=[], + next_page_token="def", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(),], next_page_token="ghi", + purchasable_skus=[ + service.PurchasableSku(), + ], + next_page_token="ghi", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(), service.PurchasableSku(),], + purchasable_skus=[ + service.PurchasableSku(), + service.PurchasableSku(), + ], ), RuntimeError, ) - async_pager = await client.list_purchasable_skus(request={},) + async_pager = await client.list_purchasable_skus( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -6568,13 +7394,20 @@ async def test_list_purchasable_skus_async_pages(): next_page_token="abc", ), service.ListPurchasableSkusResponse( - purchasable_skus=[], next_page_token="def", + purchasable_skus=[], + next_page_token="def", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(),], next_page_token="ghi", + purchasable_skus=[ + service.PurchasableSku(), + ], + next_page_token="ghi", ), service.ListPurchasableSkusResponse( - purchasable_skus=[service.PurchasableSku(), service.PurchasableSku(),], + purchasable_skus=[ + service.PurchasableSku(), + service.PurchasableSku(), + ], ), RuntimeError, ) @@ -6585,10 +7418,17 @@ async def test_list_purchasable_skus_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.ListPurchasableOffersRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListPurchasableOffersRequest, + dict, + ], +) def test_list_purchasable_offers(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6619,7 +7459,8 @@ def test_list_purchasable_offers_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6637,7 +7478,8 @@ async def test_list_purchasable_offers_async( transport: str = "grpc_asyncio", request_type=service.ListPurchasableOffersRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6696,7 +7538,10 @@ def test_list_purchasable_offers_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer=customer/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "customer=customer/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -6727,12 +7572,16 @@ async def test_list_purchasable_offers_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "customer=customer/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "customer=customer/value", + ) in kw["metadata"] def test_list_purchasable_offers_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6750,10 +7599,14 @@ def test_list_purchasable_offers_pager(transport_name: str = "grpc"): next_page_token="abc", ), service.ListPurchasableOffersResponse( - purchasable_offers=[], next_page_token="def", + purchasable_offers=[], + next_page_token="def", ), service.ListPurchasableOffersResponse( - purchasable_offers=[service.PurchasableOffer(),], next_page_token="ghi", + purchasable_offers=[ + service.PurchasableOffer(), + ], + next_page_token="ghi", ), service.ListPurchasableOffersResponse( purchasable_offers=[ @@ -6779,7 +7632,8 @@ def test_list_purchasable_offers_pager(transport_name: str = "grpc"): def test_list_purchasable_offers_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6797,10 +7651,14 @@ def test_list_purchasable_offers_pages(transport_name: str = "grpc"): next_page_token="abc", ), service.ListPurchasableOffersResponse( - purchasable_offers=[], next_page_token="def", + purchasable_offers=[], + next_page_token="def", ), service.ListPurchasableOffersResponse( - purchasable_offers=[service.PurchasableOffer(),], next_page_token="ghi", + purchasable_offers=[ + service.PurchasableOffer(), + ], + next_page_token="ghi", ), service.ListPurchasableOffersResponse( purchasable_offers=[ @@ -6838,10 +7696,14 @@ async def test_list_purchasable_offers_async_pager(): next_page_token="abc", ), service.ListPurchasableOffersResponse( - purchasable_offers=[], next_page_token="def", + purchasable_offers=[], + next_page_token="def", ), service.ListPurchasableOffersResponse( - purchasable_offers=[service.PurchasableOffer(),], next_page_token="ghi", + purchasable_offers=[ + service.PurchasableOffer(), + ], + next_page_token="ghi", ), service.ListPurchasableOffersResponse( purchasable_offers=[ @@ -6851,7 +7713,9 @@ async def test_list_purchasable_offers_async_pager(): ), RuntimeError, ) - async_pager = await client.list_purchasable_offers(request={},) + async_pager = await client.list_purchasable_offers( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -6884,10 +7748,14 @@ async def test_list_purchasable_offers_async_pages(): next_page_token="abc", ), service.ListPurchasableOffersResponse( - purchasable_offers=[], next_page_token="def", + purchasable_offers=[], + next_page_token="def", ), service.ListPurchasableOffersResponse( - purchasable_offers=[service.PurchasableOffer(),], next_page_token="ghi", + purchasable_offers=[ + service.PurchasableOffer(), + ], + next_page_token="ghi", ), service.ListPurchasableOffersResponse( purchasable_offers=[ @@ -6904,10 +7772,17 @@ async def test_list_purchasable_offers_async_pages(): assert page_.raw_page.next_page_token == token -@pytest.mark.parametrize("request_type", [service.RegisterSubscriberRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.RegisterSubscriberRequest, + dict, + ], +) def test_register_subscriber(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6919,7 +7794,9 @@ def test_register_subscriber(request_type, transport: str = "grpc"): type(client.transport.register_subscriber), "__call__" ) as call: # Designate an appropriate return value for the call. - call.return_value = service.RegisterSubscriberResponse(topic="topic_value",) + call.return_value = service.RegisterSubscriberResponse( + topic="topic_value", + ) response = client.register_subscriber(request) # Establish that the underlying gRPC stub method was called. @@ -6936,7 +7813,8 @@ def test_register_subscriber_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -6954,7 +7832,8 @@ async def test_register_subscriber_async( transport: str = "grpc_asyncio", request_type=service.RegisterSubscriberRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -6967,7 +7846,9 @@ async def test_register_subscriber_async( ) as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.RegisterSubscriberResponse(topic="topic_value",) + service.RegisterSubscriberResponse( + topic="topic_value", + ) ) response = await client.register_subscriber(request) @@ -7011,7 +7892,10 @@ def test_register_subscriber_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "account=account/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "account=account/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -7042,13 +7926,23 @@ async def test_register_subscriber_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "account=account/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "account=account/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.UnregisterSubscriberRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.UnregisterSubscriberRequest, + dict, + ], +) def test_unregister_subscriber(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7060,7 +7954,9 @@ def test_unregister_subscriber(request_type, transport: str = "grpc"): type(client.transport.unregister_subscriber), "__call__" ) as call: # Designate an appropriate return value for the call. - call.return_value = service.UnregisterSubscriberResponse(topic="topic_value",) + call.return_value = service.UnregisterSubscriberResponse( + topic="topic_value", + ) response = client.unregister_subscriber(request) # Establish that the underlying gRPC stub method was called. @@ -7077,7 +7973,8 @@ def test_unregister_subscriber_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7095,7 +7992,8 @@ async def test_unregister_subscriber_async( transport: str = "grpc_asyncio", request_type=service.UnregisterSubscriberRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7108,7 +8006,9 @@ async def test_unregister_subscriber_async( ) as call: # Designate an appropriate return value for the call. call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( - service.UnregisterSubscriberResponse(topic="topic_value",) + service.UnregisterSubscriberResponse( + topic="topic_value", + ) ) response = await client.unregister_subscriber(request) @@ -7152,7 +8052,10 @@ def test_unregister_subscriber_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "account=account/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "account=account/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -7183,13 +8086,23 @@ async def test_unregister_subscriber_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "account=account/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "account=account/value", + ) in kw["metadata"] -@pytest.mark.parametrize("request_type", [service.ListSubscribersRequest, dict,]) +@pytest.mark.parametrize( + "request_type", + [ + service.ListSubscribersRequest, + dict, + ], +) def test_list_subscribers(request_type, transport: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7222,7 +8135,8 @@ def test_list_subscribers_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7238,7 +8152,8 @@ async def test_list_subscribers_async( transport: str = "grpc_asyncio", request_type=service.ListSubscribersRequest ): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # Everything is optional in proto3 as far as the runtime is concerned, @@ -7297,7 +8212,10 @@ def test_list_subscribers_field_headers(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "account=account/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "account=account/value", + ) in kw["metadata"] @pytest.mark.asyncio @@ -7326,12 +8244,16 @@ async def test_list_subscribers_field_headers_async(): # Establish that the field header was sent. _, _, kw = call.mock_calls[0] - assert ("x-goog-request-params", "account=account/value",) in kw["metadata"] + assert ( + "x-goog-request-params", + "account=account/value", + ) in kw["metadata"] def test_list_subscribers_pager(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7339,15 +8261,29 @@ def test_list_subscribers_pager(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListSubscribersResponse( - service_accounts=[str(), str(), str(),], next_page_token="abc", + service_accounts=[ + str(), + str(), + str(), + ], + next_page_token="abc", ), service.ListSubscribersResponse( - service_accounts=[], next_page_token="def", + service_accounts=[], + next_page_token="def", + ), + service.ListSubscribersResponse( + service_accounts=[ + str(), + ], + next_page_token="ghi", ), service.ListSubscribersResponse( - service_accounts=[str(),], next_page_token="ghi", + service_accounts=[ + str(), + str(), + ], ), - service.ListSubscribersResponse(service_accounts=[str(), str(),],), RuntimeError, ) @@ -7366,7 +8302,8 @@ def test_list_subscribers_pager(transport_name: str = "grpc"): def test_list_subscribers_pages(transport_name: str = "grpc"): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, ) # Mock the actual call within the gRPC stub, and fake the request. @@ -7374,15 +8311,29 @@ def test_list_subscribers_pages(transport_name: str = "grpc"): # Set the response to a series of pages. call.side_effect = ( service.ListSubscribersResponse( - service_accounts=[str(), str(), str(),], next_page_token="abc", + service_accounts=[ + str(), + str(), + str(), + ], + next_page_token="abc", ), service.ListSubscribersResponse( - service_accounts=[], next_page_token="def", + service_accounts=[], + next_page_token="def", + ), + service.ListSubscribersResponse( + service_accounts=[ + str(), + ], + next_page_token="ghi", ), service.ListSubscribersResponse( - service_accounts=[str(),], next_page_token="ghi", + service_accounts=[ + str(), + str(), + ], ), - service.ListSubscribersResponse(service_accounts=[str(), str(),],), RuntimeError, ) pages = list(client.list_subscribers(request={}).pages) @@ -7403,18 +8354,34 @@ async def test_list_subscribers_async_pager(): # Set the response to a series of pages. call.side_effect = ( service.ListSubscribersResponse( - service_accounts=[str(), str(), str(),], next_page_token="abc", + service_accounts=[ + str(), + str(), + str(), + ], + next_page_token="abc", ), service.ListSubscribersResponse( - service_accounts=[], next_page_token="def", + service_accounts=[], + next_page_token="def", + ), + service.ListSubscribersResponse( + service_accounts=[ + str(), + ], + next_page_token="ghi", ), service.ListSubscribersResponse( - service_accounts=[str(),], next_page_token="ghi", + service_accounts=[ + str(), + str(), + ], ), - service.ListSubscribersResponse(service_accounts=[str(), str(),],), RuntimeError, ) - async_pager = await client.list_subscribers(request={},) + async_pager = await client.list_subscribers( + request={}, + ) assert async_pager.next_page_token == "abc" responses = [] async for response in async_pager: @@ -7437,15 +8404,29 @@ async def test_list_subscribers_async_pages(): # Set the response to a series of pages. call.side_effect = ( service.ListSubscribersResponse( - service_accounts=[str(), str(), str(),], next_page_token="abc", + service_accounts=[ + str(), + str(), + str(), + ], + next_page_token="abc", ), service.ListSubscribersResponse( - service_accounts=[], next_page_token="def", + service_accounts=[], + next_page_token="def", ), service.ListSubscribersResponse( - service_accounts=[str(),], next_page_token="ghi", + service_accounts=[ + str(), + ], + next_page_token="ghi", + ), + service.ListSubscribersResponse( + service_accounts=[ + str(), + str(), + ], ), - service.ListSubscribersResponse(service_accounts=[str(), str(),],), RuntimeError, ) pages = [] @@ -7462,7 +8443,8 @@ def test_credentials_transport_error(): ) with pytest.raises(ValueError): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport=transport, + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, ) # It is an error to provide a credentials file and a transport instance. @@ -7482,7 +8464,10 @@ def test_credentials_transport_error(): options = client_options.ClientOptions() options.api_key = "api_key" with pytest.raises(ValueError): - client = CloudChannelServiceClient(client_options=options, transport=transport,) + client = CloudChannelServiceClient( + client_options=options, + transport=transport, + ) # It is an error to provide an api_key and a credential. options = mock.Mock() @@ -7498,7 +8483,8 @@ def test_credentials_transport_error(): ) with pytest.raises(ValueError): client = CloudChannelServiceClient( - client_options={"scopes": ["1", "2"]}, transport=transport, + client_options={"scopes": ["1", "2"]}, + transport=transport, ) @@ -7546,7 +8532,10 @@ def test_transport_grpc_default(): client = CloudChannelServiceClient( credentials=ga_credentials.AnonymousCredentials(), ) - assert isinstance(client.transport, transports.CloudChannelServiceGrpcTransport,) + assert isinstance( + client.transport, + transports.CloudChannelServiceGrpcTransport, + ) def test_cloud_channel_service_base_transport_error(): @@ -7630,7 +8619,8 @@ def test_cloud_channel_service_base_transport_with_credentials_file(): Transport.return_value = None load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) transport = transports.CloudChannelServiceTransport( - credentials_file="credentials.json", quota_project_id="octopus", + credentials_file="credentials.json", + quota_project_id="octopus", ) load_creds.assert_called_once_with( "credentials.json", @@ -7790,7 +8780,8 @@ def test_cloud_channel_service_grpc_transport_channel(): # Check that channel is used if provided. transport = transports.CloudChannelServiceGrpcTransport( - host="squid.clam.whelk", channel=channel, + host="squid.clam.whelk", + channel=channel, ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" @@ -7802,7 +8793,8 @@ def test_cloud_channel_service_grpc_asyncio_transport_channel(): # Check that channel is used if provided. transport = transports.CloudChannelServiceGrpcAsyncIOTransport( - host="squid.clam.whelk", channel=channel, + host="squid.clam.whelk", + channel=channel, ) assert transport.grpc_channel == channel assert transport._host == "squid.clam.whelk:443" @@ -7911,12 +8903,16 @@ def test_cloud_channel_service_transport_channel_mtls_with_adc(transport_class): def test_cloud_channel_service_grpc_lro_client(): client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", ) transport = client.transport # Ensure that we have a api-core operations client. - assert isinstance(transport.operations_client, operations_v1.OperationsClient,) + assert isinstance( + transport.operations_client, + operations_v1.OperationsClient, + ) # Ensure that subsequent calls to the property send the exact same object. assert transport.operations_client is transport.operations_client @@ -7924,12 +8920,16 @@ def test_cloud_channel_service_grpc_lro_client(): def test_cloud_channel_service_grpc_lro_async_client(): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc_asyncio", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc_asyncio", ) transport = client.transport # Ensure that we have a api-core operations client. - assert isinstance(transport.operations_client, operations_v1.OperationsAsyncClient,) + assert isinstance( + transport.operations_client, + operations_v1.OperationsAsyncClient, + ) # Ensure that subsequent calls to the property send the exact same object. assert transport.operations_client is transport.operations_client @@ -7939,7 +8939,8 @@ def test_channel_partner_link_path(): account = "squid" channel_partner_link = "clam" expected = "accounts/{account}/channelPartnerLinks/{channel_partner_link}".format( - account=account, channel_partner_link=channel_partner_link, + account=account, + channel_partner_link=channel_partner_link, ) actual = CloudChannelServiceClient.channel_partner_link_path( account, channel_partner_link @@ -7963,7 +8964,8 @@ def test_customer_path(): account = "oyster" customer = "nudibranch" expected = "accounts/{account}/customers/{customer}".format( - account=account, customer=customer, + account=account, + customer=customer, ) actual = CloudChannelServiceClient.customer_path(account, customer) assert expected == actual @@ -7985,8 +8987,12 @@ def test_entitlement_path(): account = "winkle" customer = "nautilus" entitlement = "scallop" - expected = "accounts/{account}/customers/{customer}/entitlements/{entitlement}".format( - account=account, customer=customer, entitlement=entitlement, + expected = ( + "accounts/{account}/customers/{customer}/entitlements/{entitlement}".format( + account=account, + customer=customer, + entitlement=entitlement, + ) ) actual = CloudChannelServiceClient.entitlement_path(account, customer, entitlement) assert expected == actual @@ -8008,7 +9014,10 @@ def test_parse_entitlement_path(): def test_offer_path(): account = "whelk" offer = "octopus" - expected = "accounts/{account}/offers/{offer}".format(account=account, offer=offer,) + expected = "accounts/{account}/offers/{offer}".format( + account=account, + offer=offer, + ) actual = CloudChannelServiceClient.offer_path(account, offer) assert expected == actual @@ -8027,7 +9036,9 @@ def test_parse_offer_path(): def test_product_path(): product = "cuttlefish" - expected = "products/{product}".format(product=product,) + expected = "products/{product}".format( + product=product, + ) actual = CloudChannelServiceClient.product_path(product) assert expected == actual @@ -8046,7 +9057,10 @@ def test_parse_product_path(): def test_sku_path(): product = "winkle" sku = "nautilus" - expected = "products/{product}/skus/{sku}".format(product=product, sku=sku,) + expected = "products/{product}/skus/{sku}".format( + product=product, + sku=sku, + ) actual = CloudChannelServiceClient.sku_path(product, sku) assert expected == actual @@ -8085,7 +9099,9 @@ def test_parse_common_billing_account_path(): def test_common_folder_path(): folder = "whelk" - expected = "folders/{folder}".format(folder=folder,) + expected = "folders/{folder}".format( + folder=folder, + ) actual = CloudChannelServiceClient.common_folder_path(folder) assert expected == actual @@ -8103,7 +9119,9 @@ def test_parse_common_folder_path(): def test_common_organization_path(): organization = "oyster" - expected = "organizations/{organization}".format(organization=organization,) + expected = "organizations/{organization}".format( + organization=organization, + ) actual = CloudChannelServiceClient.common_organization_path(organization) assert expected == actual @@ -8121,7 +9139,9 @@ def test_parse_common_organization_path(): def test_common_project_path(): project = "cuttlefish" - expected = "projects/{project}".format(project=project,) + expected = "projects/{project}".format( + project=project, + ) actual = CloudChannelServiceClient.common_project_path(project) assert expected == actual @@ -8141,7 +9161,8 @@ def test_common_location_path(): project = "winkle" location = "nautilus" expected = "projects/{project}/locations/{location}".format( - project=project, location=location, + project=project, + location=location, ) actual = CloudChannelServiceClient.common_location_path(project, location) assert expected == actual @@ -8166,7 +9187,8 @@ def test_client_with_default_client_info(): transports.CloudChannelServiceTransport, "_prep_wrapped_messages" ) as prep: client = CloudChannelServiceClient( - credentials=ga_credentials.AnonymousCredentials(), client_info=client_info, + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, ) prep.assert_called_once_with(client_info) @@ -8175,7 +9197,8 @@ def test_client_with_default_client_info(): ) as prep: transport_class = CloudChannelServiceClient.get_transport_class() transport = transport_class( - credentials=ga_credentials.AnonymousCredentials(), client_info=client_info, + credentials=ga_credentials.AnonymousCredentials(), + client_info=client_info, ) prep.assert_called_once_with(client_info) @@ -8183,7 +9206,8 @@ def test_client_with_default_client_info(): @pytest.mark.asyncio async def test_transport_close_async(): client = CloudChannelServiceAsyncClient( - credentials=ga_credentials.AnonymousCredentials(), transport="grpc_asyncio", + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc_asyncio", ) with mock.patch.object( type(getattr(client.transport, "grpc_channel")), "close" From 4ed29a5ae7d3bf64d19dd352adc624dc3eadfdad Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 16:50:28 +0000 Subject: [PATCH 03/15] chore(python): add E231 to .flake8 ignore list (#155) Source-Link: https://github.com/googleapis/synthtool/commit/7ff4aad2ec5af0380e8bd6da1fa06eaadf24ec81 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 --- .flake8 | 2 +- .github/.OwlBot.lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 29227d4..2e43874 100644 --- a/.flake8 +++ b/.flake8 @@ -16,7 +16,7 @@ # Generated by synthtool. DO NOT EDIT! [flake8] -ignore = E203, E266, E501, W503 +ignore = E203, E231, E266, E501, W503 exclude = # Exclude generated code. **/proto/** diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 87dd006..9e0a935 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe + digest: sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 From 10c924aeade00c0438b9c2aa70509f2e20ba4039 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 00:10:30 +0000 Subject: [PATCH 04/15] chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#156) Source-Link: https://github.com/googleapis/synthtool/commit/7804ade3daae0d66649bee8df6c55484c6580b8d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d --- .github/.OwlBot.lock.yaml | 3 ++- .pre-commit-config.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9e0a935..22cc254 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244 + digest: sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d +# created: 2022-03-30T23:44:26.560599165Z diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62eb5a7..46d2371 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 22.3.0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 From 252e73df5d6efe03dfbdff6b8dceeff6b29ca28a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 02:06:15 +0000 Subject: [PATCH 05/15] chore(python): Enable size-label bot (#157) Source-Link: https://github.com/googleapis/synthtool/commit/06e82790dd719a165ad32b8a06f8f6ec3e3cae0f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-label.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .github/auto-label.yaml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 22cc254..58a0b15 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d -# created: 2022-03-30T23:44:26.560599165Z + digest: sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce +# created: 2022-04-01T01:42:03.609279246Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml new file mode 100644 index 0000000..09c8d73 --- /dev/null +++ b/.github/auto-label.yaml @@ -0,0 +1,2 @@ +requestsize: + enabled: true From 7544912412985142617d89cbb5fb8891b22647c7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:48:31 +0000 Subject: [PATCH 06/15] chore(python): refactor unit / system test dependency install (#158) Source-Link: https://github.com/googleapis/synthtool/commit/993985f0fc4b37152e588f0549bcbdaf34666023 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd --- .github/.OwlBot.lock.yaml | 4 +- noxfile.py | 105 ++++++++++++++++++++++++++++++-------- 2 files changed, 87 insertions(+), 22 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 58a0b15..fa57622 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce -# created: 2022-04-01T01:42:03.609279246Z + digest: sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd +# created: 2022-04-01T15:48:07.524222836Z diff --git a/noxfile.py b/noxfile.py index 3addb4e..6ee5e8a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -20,16 +20,40 @@ import os import pathlib import shutil +import warnings import nox - BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" -SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] + UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] +UNIT_TEST_STANDARD_DEPENDENCIES = [ + "mock", + "asyncmock", + "pytest", + "pytest-cov", + "pytest-asyncio", +] +UNIT_TEST_EXTERNAL_DEPENDENCIES = [] +UNIT_TEST_LOCAL_DEPENDENCIES = [] +UNIT_TEST_DEPENDENCIES = [] +UNIT_TEST_EXTRAS = [] +UNIT_TEST_EXTRAS_BY_PYTHON = {} + +SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] +SYSTEM_TEST_STANDARD_DEPENDENCIES = [ + "mock", + "pytest", + "google-cloud-testutils", +] +SYSTEM_TEST_EXTERNAL_DEPENDENCIES = [] +SYSTEM_TEST_LOCAL_DEPENDENCIES = [] +SYSTEM_TEST_DEPENDENCIES = [] +SYSTEM_TEST_EXTRAS = [] +SYSTEM_TEST_EXTRAS_BY_PYTHON = {} CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -81,23 +105,41 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--restructuredtext", "--strict") +def install_unittest_dependencies(session, *constraints): + standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES + session.install(*standard_deps, *constraints) + + if UNIT_TEST_EXTERNAL_DEPENDENCIES: + warnings.warn( + "'unit_test_external_dependencies' is deprecated. Instead, please " + "use 'unit_test_dependencies' or 'unit_test_local_dependencies'.", + DeprecationWarning, + ) + session.install(*UNIT_TEST_EXTERNAL_DEPENDENCIES, *constraints) + + if UNIT_TEST_LOCAL_DEPENDENCIES: + session.install(*UNIT_TEST_LOCAL_DEPENDENCIES, *constraints) + + if UNIT_TEST_EXTRAS_BY_PYTHON: + extras = UNIT_TEST_EXTRAS_BY_PYTHON.get(session.python, []) + elif UNIT_TEST_EXTRAS: + extras = UNIT_TEST_EXTRAS + else: + extras = [] + + if extras: + session.install("-e", f".[{','.join(extras)}]", *constraints) + else: + session.install("-e", ".", *constraints) + + def default(session): # Install all test dependencies, then install this package in-place. constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) - session.install( - "mock", - "asyncmock", - "pytest", - "pytest-cov", - "pytest-asyncio", - "-c", - constraints_path, - ) - - session.install("-e", ".", "-c", constraints_path) + install_unittest_dependencies(session, "-c", constraints_path) # Run py.test against the unit tests. session.run( @@ -121,6 +163,35 @@ def unit(session): default(session) +def install_systemtest_dependencies(session, *constraints): + + # Use pre-release gRPC for system tests. + session.install("--pre", "grpcio") + + session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_EXTERNAL_DEPENDENCIES: + session.install(*SYSTEM_TEST_EXTERNAL_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_LOCAL_DEPENDENCIES: + session.install("-e", *SYSTEM_TEST_LOCAL_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_DEPENDENCIES: + session.install("-e", *SYSTEM_TEST_DEPENDENCIES, *constraints) + + if SYSTEM_TEST_EXTRAS_BY_PYTHON: + extras = SYSTEM_TEST_EXTRAS_BY_PYTHON.get(session.python, []) + elif SYSTEM_TEST_EXTRAS: + extras = SYSTEM_TEST_EXTRAS + else: + extras = [] + + if extras: + session.install("-e", f".[{','.join(extras)}]", *constraints) + else: + session.install("-e", ".", *constraints) + + @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" @@ -143,13 +214,7 @@ def system(session): if not system_test_exists and not system_test_folder_exists: session.skip("System tests were not found") - # Use pre-release gRPC for system tests. - session.install("--pre", "grpcio") - - # Install all test dependencies, then install this package into the - # virtualenv's dist-packages. - session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path) - session.install("-e", ".", "-c", constraints_path) + install_systemtest_dependencies(session, "-c", constraints_path) # Run py.test against the system tests. if system_test_exists: From 626f98520eebd27d29130c19263c61d7f3b3ec38 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 10:46:17 +0000 Subject: [PATCH 07/15] chore(python): add license header to auto-label.yaml (#159) Source-Link: https://github.com/googleapis/synthtool/commit/eb78c980b52c7c6746d2edb77d9cf7aaa99a2aab Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-label.yaml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index fa57622..bc893c9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:1894490910e891a385484514b22eb5133578897eb5b3c380e6d8ad475c6647cd -# created: 2022-04-01T15:48:07.524222836Z + digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 +# created: 2022-04-06T10:30:21.687684602Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml index 09c8d73..41bff0b 100644 --- a/.github/auto-label.yaml +++ b/.github/auto-label.yaml @@ -1,2 +1,15 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. requestsize: enabled: true From 63d93b0fec82f9a817af9c25b0e310a3eea80a46 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 07:13:11 -0400 Subject: [PATCH 08/15] chore: Use gapic-generator-python 0.65.0 (#162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Use gapic-generator-python 0.65.0 PiperOrigin-RevId: 440970084 Source-Link: https://github.com/googleapis/googleapis/commit/5e0a3d57254ab9857ccac77fc6ffade7b69a2dc7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0c628a3fade768f225d76992791ea1ba2a881be Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud_channel_service/async_client.py | 37 +---- .../services/cloud_channel_service/client.py | 37 +---- .../cloud_channel_service/transports/base.py | 5 + .../cloud_channel_service/transports/grpc.py | 4 + google/cloud/channel_v1/types/__init__.py | 4 +- .../channel_v1/test_cloud_channel_service.py | 145 +++++++++++++----- 6 files changed, 120 insertions(+), 112 deletions(-) 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 0fb9013..3a35767 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 @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -275,7 +275,6 @@ async def list_customers( [Customer][google.cloud.channel.v1.Customer]s, or an empty list if there are no customers. - .. code-block:: python from google.cloud import channel_v1 @@ -376,7 +375,6 @@ async def get_customer( Return value: The [Customer][google.cloud.channel.v1.Customer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -491,7 +489,6 @@ async def check_cloud_identity_accounts_exist( [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources match the domain. - .. code-block:: python from google.cloud import channel_v1 @@ -579,7 +576,6 @@ async def create_customer( Return value: The newly created [Customer][google.cloud.channel.v1.Customer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -671,7 +667,6 @@ async def update_customer( Return value: The updated [Customer][google.cloud.channel.v1.Customer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -763,7 +758,6 @@ async def delete_customer( - NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in the request. - .. code-block:: python from google.cloud import channel_v1 @@ -862,7 +856,6 @@ async def import_customer( Return value: The [Customer][google.cloud.channel.v1.Customer]. - .. code-block:: python from google.cloud import channel_v1 @@ -960,7 +953,6 @@ async def provision_cloud_identity( contains an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1060,7 +1052,6 @@ async def list_entitlements( Return value: A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s. - .. code-block:: python from google.cloud import channel_v1 @@ -1169,7 +1160,6 @@ async def list_transferable_skus( Return value: A list of the customer's [TransferableSku][google.cloud.channel.v1.TransferableSku]. - .. code-block:: python from google.cloud import channel_v1 @@ -1281,7 +1271,6 @@ async def list_transferable_offers( [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU. - .. code-block:: python from google.cloud import channel_v1 @@ -1382,7 +1371,6 @@ async def get_entitlement( Return value: The requested [Entitlement][google.cloud.channel.v1.Entitlement] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -1500,7 +1488,6 @@ async def create_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1618,7 +1605,6 @@ async def change_parameters( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1734,7 +1720,6 @@ async def change_renewal_settings( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1846,7 +1831,6 @@ async def change_offer( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1962,7 +1946,6 @@ async def start_paid_service( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2074,7 +2057,6 @@ async def suspend_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2191,7 +2173,6 @@ async def cancel_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2319,7 +2300,6 @@ async def activate_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2444,7 +2424,6 @@ async def transfer_entitlements( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2572,7 +2551,6 @@ async def transfer_entitlements_to_google( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2689,7 +2667,6 @@ async def list_channel_partner_links( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources. - .. code-block:: python from google.cloud import channel_v1 @@ -2791,7 +2768,6 @@ async def get_channel_partner_link( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -2890,7 +2866,6 @@ async def create_channel_partner_link( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -2994,7 +2969,6 @@ async def update_channel_partner_link( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -3086,7 +3060,6 @@ async def lookup_offer( Return value: The [Offer][google.cloud.channel.v1.Offer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -3169,7 +3142,6 @@ async def list_products( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3253,7 +3225,6 @@ async def list_skus( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3344,7 +3315,6 @@ async def list_offers( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3439,7 +3409,6 @@ async def list_purchasable_skus( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3540,7 +3509,6 @@ async def list_purchasable_offers( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3649,7 +3617,6 @@ async def register_subscriber( Return value: The topic name with the registered service email address. - .. code-block:: python from google.cloud import channel_v1 @@ -3745,7 +3712,6 @@ async def unregister_subscriber( address. Returns a success response if the service email address wasn't registered with the topic. - .. code-block:: python from google.cloud import channel_v1 @@ -3836,7 +3802,6 @@ async def list_subscribers( Return value: A list of service email addresses. - .. code-block:: python from google.cloud import channel_v1 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 94f5fa3..3a13abe 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/client.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import os import re -from typing import Dict, Optional, Sequence, Tuple, Type, Union +from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib @@ -570,7 +570,6 @@ def list_customers( [Customer][google.cloud.channel.v1.Customer]s, or an empty list if there are no customers. - .. code-block:: python from google.cloud import channel_v1 @@ -672,7 +671,6 @@ def get_customer( Return value: The [Customer][google.cloud.channel.v1.Customer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -787,7 +785,6 @@ def check_cloud_identity_accounts_exist( [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources match the domain. - .. code-block:: python from google.cloud import channel_v1 @@ -878,7 +875,6 @@ def create_customer( Return value: The newly created [Customer][google.cloud.channel.v1.Customer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -971,7 +967,6 @@ def update_customer( Return value: The updated [Customer][google.cloud.channel.v1.Customer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -1064,7 +1059,6 @@ def delete_customer( - NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in the request. - .. code-block:: python from google.cloud import channel_v1 @@ -1163,7 +1157,6 @@ def import_customer( Return value: The [Customer][google.cloud.channel.v1.Customer]. - .. code-block:: python from google.cloud import channel_v1 @@ -1262,7 +1255,6 @@ def provision_cloud_identity( contains an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1363,7 +1355,6 @@ def list_entitlements( Return value: A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s. - .. code-block:: python from google.cloud import channel_v1 @@ -1473,7 +1464,6 @@ def list_transferable_skus( Return value: A list of the customer's [TransferableSku][google.cloud.channel.v1.TransferableSku]. - .. code-block:: python from google.cloud import channel_v1 @@ -1586,7 +1576,6 @@ def list_transferable_offers( [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU. - .. code-block:: python from google.cloud import channel_v1 @@ -1688,7 +1677,6 @@ def get_entitlement( Return value: The requested [Entitlement][google.cloud.channel.v1.Entitlement] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -1807,7 +1795,6 @@ def create_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -1926,7 +1913,6 @@ def change_parameters( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2043,7 +2029,6 @@ def change_renewal_settings( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2156,7 +2141,6 @@ def change_offer( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2273,7 +2257,6 @@ def start_paid_service( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2386,7 +2369,6 @@ def suspend_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2504,7 +2486,6 @@ def cancel_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2633,7 +2614,6 @@ def activate_entitlement( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2759,7 +2739,6 @@ def transfer_entitlements( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -2888,7 +2867,6 @@ def transfer_entitlements_to_google( will contain an instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - .. code-block:: python from google.cloud import channel_v1 @@ -3008,7 +2986,6 @@ def list_channel_partner_links( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources. - .. code-block:: python from google.cloud import channel_v1 @@ -3113,7 +3090,6 @@ def get_channel_partner_link( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -3213,7 +3189,6 @@ def create_channel_partner_link( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -3320,7 +3295,6 @@ def update_channel_partner_link( [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -3415,7 +3389,6 @@ def lookup_offer( Return value: The [Offer][google.cloud.channel.v1.Offer] resource. - .. code-block:: python from google.cloud import channel_v1 @@ -3499,7 +3472,6 @@ def list_products( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3584,7 +3556,6 @@ def list_skus( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3676,7 +3647,6 @@ def list_offers( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3772,7 +3742,6 @@ def list_purchasable_skus( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3874,7 +3843,6 @@ def list_purchasable_offers( - INVALID_ARGUMENT: Required request parameters are missing or invalid. - .. code-block:: python from google.cloud import channel_v1 @@ -3984,7 +3952,6 @@ def register_subscriber( Return value: The topic name with the registered service email address. - .. code-block:: python from google.cloud import channel_v1 @@ -4081,7 +4048,6 @@ def unregister_subscriber( address. Returns a success response if the service email address wasn't registered with the topic. - .. code-block:: python from google.cloud import channel_v1 @@ -4173,7 +4139,6 @@ def list_subscribers( Return value: A list of service email addresses. - .. code-block:: python from google.cloud import channel_v1 diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py index 3473cc0..ec3c87b 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py @@ -87,6 +87,7 @@ def __init__( always_use_jwt_access (Optional[bool]): Whether self signed JWT should be used for service account credentials. """ + # Save the hostname. Default to port 443 (HTTPS) if none is specified. if ":" not in host: host += ":443" @@ -670,5 +671,9 @@ def list_subscribers( ]: raise NotImplementedError() + @property + def kind(self) -> str: + raise NotImplementedError() + __all__ = ("CloudChannelServiceTransport",) 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 d9bc380..ac8f888 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 @@ -1871,5 +1871,9 @@ def list_subscribers( def close(self): self.grpc_channel.close() + @property + def kind(self) -> str: + return "grpc" + __all__ = ("CloudChannelServiceGrpcTransport",) diff --git a/google/cloud/channel_v1/types/__init__.py b/google/cloud/channel_v1/types/__init__.py index c54feea..465b48a 100644 --- a/google/cloud/channel_v1/types/__init__.py +++ b/google/cloud/channel_v1/types/__init__.py @@ -56,7 +56,9 @@ PromotionalOrderType, ResourceType, ) -from .operations import OperationMetadata +from .operations import ( + OperationMetadata, +) from .products import ( MarketingInfo, Media, diff --git a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py index 4b67ad0..fca10fe 100644 --- a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py +++ b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py @@ -106,24 +106,26 @@ def test__get_default_mtls_endpoint(): @pytest.mark.parametrize( - "client_class", + "client_class,transport_name", [ - CloudChannelServiceClient, - CloudChannelServiceAsyncClient, + (CloudChannelServiceClient, "grpc"), + (CloudChannelServiceAsyncClient, "grpc_asyncio"), ], ) -def test_cloud_channel_service_client_from_service_account_info(client_class): +def test_cloud_channel_service_client_from_service_account_info( + client_class, transport_name +): creds = ga_credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_info" ) as factory: factory.return_value = creds info = {"valid": True} - client = client_class.from_service_account_info(info) + client = client_class.from_service_account_info(info, transport=transport_name) assert client.transport._credentials == creds assert isinstance(client, client_class) - assert client.transport._host == "cloudchannel.googleapis.com:443" + assert client.transport._host == ("cloudchannel.googleapis.com:443") @pytest.mark.parametrize( @@ -152,27 +154,33 @@ def test_cloud_channel_service_client_service_account_always_use_jwt( @pytest.mark.parametrize( - "client_class", + "client_class,transport_name", [ - CloudChannelServiceClient, - CloudChannelServiceAsyncClient, + (CloudChannelServiceClient, "grpc"), + (CloudChannelServiceAsyncClient, "grpc_asyncio"), ], ) -def test_cloud_channel_service_client_from_service_account_file(client_class): +def test_cloud_channel_service_client_from_service_account_file( + client_class, transport_name +): creds = ga_credentials.AnonymousCredentials() with mock.patch.object( service_account.Credentials, "from_service_account_file" ) as factory: factory.return_value = creds - client = client_class.from_service_account_file("dummy/file/path.json") + client = client_class.from_service_account_file( + "dummy/file/path.json", transport=transport_name + ) assert client.transport._credentials == creds assert isinstance(client, client_class) - client = client_class.from_service_account_json("dummy/file/path.json") + client = client_class.from_service_account_json( + "dummy/file/path.json", transport=transport_name + ) assert client.transport._credentials == creds assert isinstance(client, client_class) - assert client.transport._host == "cloudchannel.googleapis.com:443" + assert client.transport._host == ("cloudchannel.googleapis.com:443") def test_cloud_channel_service_client_get_transport_class(): @@ -964,7 +972,7 @@ async def test_list_customers_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -1010,7 +1018,9 @@ async def test_list_customers_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_customers(request={})).pages: + async for page_ in ( + await client.list_customers(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2613,7 +2623,7 @@ async def test_list_entitlements_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -2661,7 +2671,9 @@ async def test_list_entitlements_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_entitlements(request={})).pages: + async for page_ in ( + await client.list_entitlements(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2967,7 +2979,7 @@ async def test_list_transferable_skus_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -3015,7 +3027,9 @@ async def test_list_transferable_skus_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_transferable_skus(request={})).pages: + async for page_ in ( + await client.list_transferable_skus(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3321,7 +3335,7 @@ async def test_list_transferable_offers_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -3369,7 +3383,9 @@ async def test_list_transferable_offers_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_transferable_offers(request={})).pages: + async for page_ in ( + await client.list_transferable_offers(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5386,7 +5402,7 @@ async def test_list_channel_partner_links_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -5436,7 +5452,9 @@ async def test_list_channel_partner_links_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_channel_partner_links(request={})).pages: + async for page_ in ( + await client.list_channel_partner_links(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6340,7 +6358,7 @@ async def test_list_products_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -6386,7 +6404,9 @@ async def test_list_products_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_products(request={})).pages: + async for page_ in ( + await client.list_products(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6676,7 +6696,7 @@ async def test_list_skus_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -6722,7 +6742,9 @@ async def test_list_skus_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_skus(request={})).pages: + async for page_ in ( + await client.list_skus(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7012,7 +7034,7 @@ async def test_list_offers_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -7058,7 +7080,9 @@ async def test_list_offers_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_offers(request={})).pages: + async for page_ in ( + await client.list_offers(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7364,7 +7388,7 @@ async def test_list_purchasable_skus_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -7412,7 +7436,9 @@ async def test_list_purchasable_skus_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_purchasable_skus(request={})).pages: + async for page_ in ( + await client.list_purchasable_skus(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7718,7 +7744,7 @@ async def test_list_purchasable_offers_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -7766,7 +7792,9 @@ async def test_list_purchasable_offers_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_purchasable_offers(request={})).pages: + async for page_ in ( + await client.list_purchasable_offers(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8384,7 +8412,7 @@ async def test_list_subscribers_async_pager(): ) assert async_pager.next_page_token == "abc" responses = [] - async for response in async_pager: + async for response in async_pager: # pragma: no branch responses.append(response) assert len(responses) == 6 @@ -8430,7 +8458,9 @@ async def test_list_subscribers_async_pages(): RuntimeError, ) pages = [] - async for page_ in (await client.list_subscribers(request={})).pages: + async for page_ in ( + await client.list_subscribers(request={}) + ).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8527,6 +8557,19 @@ def test_transport_adc(transport_class): adc.assert_called_once() +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + ], +) +def test_transport_kind(transport_name): + transport = CloudChannelServiceClient.get_transport_class(transport_name)( + credentials=ga_credentials.AnonymousCredentials(), + ) + assert transport.kind == transport_name + + def test_transport_grpc_default(): # A client should use the gRPC transport by default. client = CloudChannelServiceClient( @@ -8608,6 +8651,14 @@ def test_cloud_channel_service_base_transport(): with pytest.raises(NotImplementedError): transport.operations_client + # Catch all for all remaining methods and properties + remainder = [ + "kind", + ] + for r in remainder: + with pytest.raises(NotImplementedError): + getattr(transport, r)() + def test_cloud_channel_service_base_transport_with_credentials_file(): # Instantiate the base transport with a credentials file @@ -8755,24 +8806,40 @@ def test_cloud_channel_service_grpc_transport_client_cert_source_for_mtls( ) -def test_cloud_channel_service_host_no_port(): +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + "grpc_asyncio", + ], +) +def test_cloud_channel_service_host_no_port(transport_name): client = CloudChannelServiceClient( credentials=ga_credentials.AnonymousCredentials(), client_options=client_options.ClientOptions( api_endpoint="cloudchannel.googleapis.com" ), + transport=transport_name, ) - assert client.transport._host == "cloudchannel.googleapis.com:443" + assert client.transport._host == ("cloudchannel.googleapis.com:443") -def test_cloud_channel_service_host_with_port(): +@pytest.mark.parametrize( + "transport_name", + [ + "grpc", + "grpc_asyncio", + ], +) +def test_cloud_channel_service_host_with_port(transport_name): client = CloudChannelServiceClient( credentials=ga_credentials.AnonymousCredentials(), client_options=client_options.ClientOptions( api_endpoint="cloudchannel.googleapis.com:8000" ), + transport=transport_name, ) - assert client.transport._host == "cloudchannel.googleapis.com:8000" + assert client.transport._host == ("cloudchannel.googleapis.com:8000") def test_cloud_channel_service_grpc_transport_channel(): From d7b2e3fcbc283c204a6558afb4e12441c4f47a53 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 20:29:51 -0400 Subject: [PATCH 09/15] chore: use gapic-generator-python 0.65.1 (#163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: https://github.com/googleapis/googleapis/commit/2a273915b3f70fe86c9d2a75470a0b83e48d0abf Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab6756a48c89b5bcb9fb73443cb8e55d574f4643 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../snippet_metadata_channel_v1.json | 2544 ++++++++++++++++- 1 file changed, 2404 insertions(+), 140 deletions(-) diff --git a/samples/generated_samples/snippet_metadata_channel_v1.json b/samples/generated_samples/snippet_metadata_channel_v1.json index 65a6fcb..c1934a2 100644 --- a/samples/generated_samples/snippet_metadata_channel_v1.json +++ b/samples/generated_samples/snippet_metadata_channel_v1.json @@ -1,16 +1,57 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.channel.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-channel" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.activate_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ActivateEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ActivateEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ActivateEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "activate_entitlement" }, + "description": "Sample for ActivateEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_activate_entitlement_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_async", "segments": [ { @@ -43,18 +84,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_activate_entitlement_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.activate_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ActivateEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ActivateEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ActivateEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "activate_entitlement" }, + "description": "Sample for ActivateEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_activate_entitlement_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync", "segments": [ { @@ -87,19 +160,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_activate_entitlement_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.cancel_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CancelEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CancelEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CancelEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "cancel_entitlement" }, + "description": "Sample for CancelEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_cancel_entitlement_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_async", "segments": [ { @@ -132,18 +237,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_cancel_entitlement_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.cancel_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CancelEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CancelEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CancelEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "cancel_entitlement" }, + "description": "Sample for CancelEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_cancel_entitlement_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync", "segments": [ { @@ -176,19 +313,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_cancel_entitlement_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.change_offer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ChangeOffer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ChangeOffer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ChangeOfferRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "change_offer" }, + "description": "Sample for ChangeOffer", "file": "cloudchannel_v1_generated_cloud_channel_service_change_offer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeOffer_async", "segments": [ { @@ -221,18 +390,50 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_change_offer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.change_offer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ChangeOffer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ChangeOffer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ChangeOfferRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "change_offer" }, + "description": "Sample for ChangeOffer", "file": "cloudchannel_v1_generated_cloud_channel_service_change_offer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync", "segments": [ { @@ -265,19 +466,51 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_change_offer_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.change_parameters", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ChangeParameters", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ChangeParameters" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ChangeParametersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "change_parameters" }, + "description": "Sample for ChangeParameters", "file": "cloudchannel_v1_generated_cloud_channel_service_change_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeParameters_async", "segments": [ { @@ -310,18 +543,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_change_parameters_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.change_parameters", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ChangeParameters", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ChangeParameters" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ChangeParametersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "change_parameters" }, + "description": "Sample for ChangeParameters", "file": "cloudchannel_v1_generated_cloud_channel_service_change_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync", "segments": [ { @@ -354,19 +619,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_change_parameters_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.change_renewal_settings", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ChangeRenewalSettings" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ChangeRenewalSettingsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "change_renewal_settings" }, + "description": "Sample for ChangeRenewalSettings", "file": "cloudchannel_v1_generated_cloud_channel_service_change_renewal_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_async", "segments": [ { @@ -399,18 +696,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_change_renewal_settings_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.change_renewal_settings", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ChangeRenewalSettings" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ChangeRenewalSettingsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "change_renewal_settings" }, + "description": "Sample for ChangeRenewalSettings", "file": "cloudchannel_v1_generated_cloud_channel_service_change_renewal_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync", "segments": [ { @@ -443,19 +772,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_change_renewal_settings_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.check_cloud_identity_accounts_exist", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CheckCloudIdentityAccountsExist" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CheckCloudIdentityAccountsExistRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.CheckCloudIdentityAccountsExistResponse", + "shortName": "check_cloud_identity_accounts_exist" }, + "description": "Sample for CheckCloudIdentityAccountsExist", "file": "cloudchannel_v1_generated_cloud_channel_service_check_cloud_identity_accounts_exist_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_async", "segments": [ { @@ -488,18 +849,50 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_check_cloud_identity_accounts_exist_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.check_cloud_identity_accounts_exist", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CheckCloudIdentityAccountsExist" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CheckCloudIdentityAccountsExistRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.CheckCloudIdentityAccountsExistResponse", + "shortName": "check_cloud_identity_accounts_exist" }, + "description": "Sample for CheckCloudIdentityAccountsExist", "file": "cloudchannel_v1_generated_cloud_channel_service_check_cloud_identity_accounts_exist_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync", "segments": [ { @@ -532,19 +925,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_check_cloud_identity_accounts_exist_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_channel_partner_link", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CreateChannelPartnerLink" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CreateChannelPartnerLinkRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "create_channel_partner_link" }, + "description": "Sample for CreateChannelPartnerLink", "file": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_link_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_async", "segments": [ { @@ -577,18 +1002,50 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_link_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_channel_partner_link", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CreateChannelPartnerLink" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CreateChannelPartnerLinkRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "create_channel_partner_link" }, + "description": "Sample for CreateChannelPartnerLink", "file": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_link_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync", "segments": [ { @@ -621,19 +1078,51 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_link_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CreateCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CreateCustomerRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "create_customer" }, + "description": "Sample for CreateCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_async", "segments": [ { @@ -666,18 +1155,50 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CreateCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CreateCustomerRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "create_customer" }, + "description": "Sample for CreateCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync", "segments": [ { @@ -710,19 +1231,51 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CreateEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CreateEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_entitlement" }, + "description": "Sample for CreateEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_async", "segments": [ { @@ -755,18 +1308,50 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "CreateEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.CreateEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_entitlement" }, + "description": "Sample for CreateEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync", "segments": [ { @@ -799,19 +1384,54 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.delete_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "DeleteCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.DeleteCustomerRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_customer" }, + "description": "Sample for DeleteCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_async", "segments": [ { @@ -842,18 +1462,53 @@ "end": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.delete_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "DeleteCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.DeleteCustomerRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_customer" }, + "description": "Sample for DeleteCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync", "segments": [ { @@ -884,19 +1539,51 @@ "end": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_channel_partner_link", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "GetChannelPartnerLink" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.GetChannelPartnerLinkRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "get_channel_partner_link" }, + "description": "Sample for GetChannelPartnerLink", "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_async", "segments": [ { @@ -929,18 +1616,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_channel_partner_link", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "GetChannelPartnerLink" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.GetChannelPartnerLinkRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "get_channel_partner_link" }, + "description": "Sample for GetChannelPartnerLink", "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync", "segments": [ { @@ -973,19 +1692,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "GetCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.GetCustomerRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "get_customer" }, + "description": "Sample for GetCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_async", "segments": [ { @@ -1018,18 +1773,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "GetCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.GetCustomerRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "get_customer" }, + "description": "Sample for GetCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync", "segments": [ { @@ -1062,19 +1853,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "GetEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.GetEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Entitlement", + "shortName": "get_entitlement" }, + "description": "Sample for GetEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_async", "segments": [ { @@ -1107,18 +1930,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "GetEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.GetEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Entitlement", + "shortName": "get_entitlement" }, + "description": "Sample for GetEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync", "segments": [ { @@ -1151,19 +2006,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.import_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ImportCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ImportCustomerRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "import_customer" }, + "description": "Sample for ImportCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_import_customer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_async", "segments": [ { @@ -1196,18 +2083,50 @@ "start": 44, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_import_customer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.import_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ImportCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ImportCustomerRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "import_customer" }, + "description": "Sample for ImportCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_import_customer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync", "segments": [ { @@ -1240,19 +2159,51 @@ "start": 44, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_import_customer_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_channel_partner_links", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListChannelPartnerLinks" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListChannelPartnerLinksRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksAsyncPager", + "shortName": "list_channel_partner_links" }, + "description": "Sample for ListChannelPartnerLinks", "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_async", "segments": [ { @@ -1285,18 +2236,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_channel_partner_links", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListChannelPartnerLinks" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListChannelPartnerLinksRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksPager", + "shortName": "list_channel_partner_links" }, + "description": "Sample for ListChannelPartnerLinks", "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync", "segments": [ { @@ -1329,19 +2312,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_customers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListCustomers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListCustomersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersAsyncPager", + "shortName": "list_customers" }, + "description": "Sample for ListCustomers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_customers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_async", "segments": [ { @@ -1374,18 +2389,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_customers_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_customers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListCustomers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListCustomersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersPager", + "shortName": "list_customers" }, + "description": "Sample for ListCustomers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_customers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync", "segments": [ { @@ -1418,19 +2465,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_customers_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_entitlements", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListEntitlements" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListEntitlementsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsAsyncPager", + "shortName": "list_entitlements" }, + "description": "Sample for ListEntitlements", "file": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_async", "segments": [ { @@ -1463,18 +2542,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_entitlements", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListEntitlements" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListEntitlementsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsPager", + "shortName": "list_entitlements" }, + "description": "Sample for ListEntitlements", "file": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync", "segments": [ { @@ -1507,19 +2618,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_offers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListOffers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListOffers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListOffersAsyncPager", + "shortName": "list_offers" }, + "description": "Sample for ListOffers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_offers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_async", "segments": [ { @@ -1552,18 +2695,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_offers_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_offers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListOffers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListOffers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListOffersPager", + "shortName": "list_offers" }, + "description": "Sample for ListOffers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_offers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_sync", "segments": [ { @@ -1596,19 +2771,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_offers_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_products", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListProducts", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListProducts" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListProductsAsyncPager", + "shortName": "list_products" }, + "description": "Sample for ListProducts", "file": "cloudchannel_v1_generated_cloud_channel_service_list_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_async", "segments": [ { @@ -1641,18 +2848,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_products_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_products", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListProducts", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListProducts" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListProductsPager", + "shortName": "list_products" }, + "description": "Sample for ListProducts", "file": "cloudchannel_v1_generated_cloud_channel_service_list_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_sync", "segments": [ { @@ -1685,19 +2924,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_products_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_purchasable_offers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListPurchasableOffers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableOffersAsyncPager", + "shortName": "list_purchasable_offers" }, + "description": "Sample for ListPurchasableOffers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_async", "segments": [ { @@ -1730,18 +3001,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_purchasable_offers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListPurchasableOffers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableOffersPager", + "shortName": "list_purchasable_offers" }, + "description": "Sample for ListPurchasableOffers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync", "segments": [ { @@ -1774,19 +3077,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_purchasable_skus", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListPurchasableSkus" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableSkusAsyncPager", + "shortName": "list_purchasable_skus" }, + "description": "Sample for ListPurchasableSkus", "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_async", "segments": [ { @@ -1819,18 +3154,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_purchasable_skus", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListPurchasableSkus" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableSkusPager", + "shortName": "list_purchasable_skus" }, + "description": "Sample for ListPurchasableSkus", "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync", "segments": [ { @@ -1863,19 +3230,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_skus", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSkus", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListSkus" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSkusAsyncPager", + "shortName": "list_skus" }, + "description": "Sample for ListSkus", "file": "cloudchannel_v1_generated_cloud_channel_service_list_skus_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_async", "segments": [ { @@ -1908,18 +3307,50 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_skus_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_skus", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSkus", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListSkus" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSkusPager", + "shortName": "list_skus" }, + "description": "Sample for ListSkus", "file": "cloudchannel_v1_generated_cloud_channel_service_list_skus_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_sync", "segments": [ { @@ -1952,19 +3383,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_skus_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_subscribers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListSubscribers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSubscribersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSubscribersAsyncPager", + "shortName": "list_subscribers" }, + "description": "Sample for ListSubscribers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_async", "segments": [ { @@ -1997,18 +3460,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_subscribers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListSubscribers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSubscribersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSubscribersPager", + "shortName": "list_subscribers" }, + "description": "Sample for ListSubscribers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync", "segments": [ { @@ -2041,19 +3536,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_transferable_offers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListTransferableOffers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersAsyncPager", + "shortName": "list_transferable_offers" }, + "description": "Sample for ListTransferableOffers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_async", "segments": [ { @@ -2086,18 +3613,50 @@ "start": 44, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_transferable_offers", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListTransferableOffers" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersPager", + "shortName": "list_transferable_offers" }, + "description": "Sample for ListTransferableOffers", "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync", "segments": [ { @@ -2130,19 +3689,51 @@ "start": 44, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_transferable_skus", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListTransferableSkus" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusAsyncPager", + "shortName": "list_transferable_skus" }, + "description": "Sample for ListTransferableSkus", "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_async", "segments": [ { @@ -2175,18 +3766,50 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_transferable_skus", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ListTransferableSkus" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusPager", + "shortName": "list_transferable_skus" }, + "description": "Sample for ListTransferableSkus", "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync", "segments": [ { @@ -2219,19 +3842,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.lookup_offer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.LookupOffer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "LookupOffer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.LookupOfferRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Offer", + "shortName": "lookup_offer" }, + "description": "Sample for LookupOffer", "file": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_async", "segments": [ { @@ -2264,18 +3919,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.lookup_offer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.LookupOffer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "LookupOffer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.LookupOfferRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Offer", + "shortName": "lookup_offer" }, + "description": "Sample for LookupOffer", "file": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync", "segments": [ { @@ -2308,19 +3995,51 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.provision_cloud_identity", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ProvisionCloudIdentity" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ProvisionCloudIdentityRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "provision_cloud_identity" }, + "description": "Sample for ProvisionCloudIdentity", "file": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_async", "segments": [ { @@ -2353,18 +4072,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.provision_cloud_identity", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "ProvisionCloudIdentity" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ProvisionCloudIdentityRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "provision_cloud_identity" }, + "description": "Sample for ProvisionCloudIdentity", "file": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync", "segments": [ { @@ -2397,19 +4148,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.register_subscriber", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "RegisterSubscriber" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.RegisterSubscriberRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.RegisterSubscriberResponse", + "shortName": "register_subscriber" }, + "description": "Sample for RegisterSubscriber", "file": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_async", "segments": [ { @@ -2442,18 +4225,50 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.register_subscriber", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "RegisterSubscriber" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.RegisterSubscriberRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.RegisterSubscriberResponse", + "shortName": "register_subscriber" }, + "description": "Sample for RegisterSubscriber", "file": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync", "segments": [ { @@ -2486,19 +4301,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.start_paid_service", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.StartPaidService", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "StartPaidService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.StartPaidServiceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "start_paid_service" }, + "description": "Sample for StartPaidService", "file": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_async", "segments": [ { @@ -2531,18 +4378,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.start_paid_service", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.StartPaidService", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "StartPaidService" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.StartPaidServiceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "start_paid_service" }, + "description": "Sample for StartPaidService", "file": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync", "segments": [ { @@ -2575,19 +4454,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.suspend_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "SuspendEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.SuspendEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "suspend_entitlement" }, + "description": "Sample for SuspendEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_async", "segments": [ { @@ -2620,18 +4531,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.suspend_entitlement", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "SuspendEntitlement" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.SuspendEntitlementRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "suspend_entitlement" }, + "description": "Sample for SuspendEntitlement", "file": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync", "segments": [ { @@ -2664,19 +4607,51 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.transfer_entitlements_to_google", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "TransferEntitlementsToGoogle" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.TransferEntitlementsToGoogleRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "transfer_entitlements_to_google" }, + "description": "Sample for TransferEntitlementsToGoogle", "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_async", "segments": [ { @@ -2709,18 +4684,50 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.transfer_entitlements_to_google", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "TransferEntitlementsToGoogle" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.TransferEntitlementsToGoogleRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "transfer_entitlements_to_google" }, + "description": "Sample for TransferEntitlementsToGoogle", "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync", "segments": [ { @@ -2753,19 +4760,51 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.transfer_entitlements", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "TransferEntitlements" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.TransferEntitlementsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "transfer_entitlements" }, + "description": "Sample for TransferEntitlements", "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_async", "segments": [ { @@ -2798,18 +4837,50 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.transfer_entitlements", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "TransferEntitlements" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.TransferEntitlementsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "transfer_entitlements" }, + "description": "Sample for TransferEntitlements", "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync", "segments": [ { @@ -2842,19 +4913,51 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.unregister_subscriber", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "UnregisterSubscriber" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.UnregisterSubscriberRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.UnregisterSubscriberResponse", + "shortName": "unregister_subscriber" }, + "description": "Sample for UnregisterSubscriber", "file": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_async", "segments": [ { @@ -2887,18 +4990,50 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.unregister_subscriber", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "UnregisterSubscriber" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.UnregisterSubscriberRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.UnregisterSubscriberResponse", + "shortName": "unregister_subscriber" }, + "description": "Sample for UnregisterSubscriber", "file": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync", "segments": [ { @@ -2931,19 +5066,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.update_channel_partner_link", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "UpdateChannelPartnerLink" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.UpdateChannelPartnerLinkRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "update_channel_partner_link" }, + "description": "Sample for UpdateChannelPartnerLink", "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_async", "segments": [ { @@ -2976,18 +5143,50 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.update_channel_partner_link", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "UpdateChannelPartnerLink" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.UpdateChannelPartnerLinkRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "update_channel_partner_link" }, + "description": "Sample for UpdateChannelPartnerLink", "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync", "segments": [ { @@ -3020,19 +5219,51 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.update_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "UpdateCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.UpdateCustomerRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "update_customer" }, + "description": "Sample for UpdateCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_update_customer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_async", "segments": [ { @@ -3065,18 +5296,50 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_update_customer_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.update_customer", "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateCustomer", "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, "shortName": "UpdateCustomer" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.UpdateCustomerRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "update_customer" }, + "description": "Sample for UpdateCustomer", "file": "cloudchannel_v1_generated_cloud_channel_service_update_customer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync", "segments": [ { @@ -3109,7 +5372,8 @@ "start": 46, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_update_customer_sync.py" } ] } From b983d98fde2972249347aebf72a7f9d49ad38fba Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 21:20:24 -0400 Subject: [PATCH 10/15] chore(python): add nox session to sort python imports (#164) Source-Link: https://github.com/googleapis/synthtool/commit/1b71c10e20de7ed3f97f692f99a0e3399b67049f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 +- docs/conf.py | 2 +- google/cloud/channel/__init__.py | 204 +++++++++--------- google/cloud/channel_v1/__init__.py | 195 +++++++++-------- .../cloud_channel_service/__init__.py | 2 +- .../cloud_channel_service/async_client.py | 30 +-- .../services/cloud_channel_service/client.py | 28 +-- .../services/cloud_channel_service/pagers.py | 18 +- .../transports/__init__.py | 1 - .../cloud_channel_service/transports/base.py | 23 +- .../cloud_channel_service/transports/grpc.py | 26 +-- .../transports/grpc_asyncio.py | 26 +-- google/cloud/channel_v1/types/__init__.py | 36 +--- .../channel_v1/types/channel_partner_links.py | 3 +- google/cloud/channel_v1/types/common.py | 4 +- google/cloud/channel_v1/types/customers.py | 5 +- google/cloud/channel_v1/types/entitlements.py | 7 +- google/cloud/channel_v1/types/offers.py | 6 +- google/cloud/channel_v1/types/operations.py | 1 - google/cloud/channel_v1/types/products.py | 1 - google/cloud/channel_v1/types/service.py | 3 +- .../channel_v1/types/subscriber_event.py | 1 - noxfile.py | 28 ++- setup.py | 1 + .../channel_v1/test_cloud_channel_service.py | 65 +++--- 25 files changed, 365 insertions(+), 355 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index bc893c9..7c454ab 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 -# created: 2022-04-06T10:30:21.687684602Z + digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 +# created: 2022-04-20T23:42:53.970438194Z diff --git a/docs/conf.py b/docs/conf.py index 06a95e2..da0d8ef 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/google/cloud/channel/__init__.py b/google/cloud/channel/__init__.py index 12606ff..01de731 100644 --- a/google/cloud/channel/__init__.py +++ b/google/cloud/channel/__init__.py @@ -14,111 +14,121 @@ # limitations under the License. # +from google.cloud.channel_v1.services.cloud_channel_service.async_client import ( + CloudChannelServiceAsyncClient, +) from google.cloud.channel_v1.services.cloud_channel_service.client import ( CloudChannelServiceClient, ) -from google.cloud.channel_v1.services.cloud_channel_service.async_client import ( - CloudChannelServiceAsyncClient, +from google.cloud.channel_v1.types.channel_partner_links import ( + ChannelPartnerLink, + ChannelPartnerLinkState, + ChannelPartnerLinkView, +) +from google.cloud.channel_v1.types.common import ( + AdminUser, + CloudIdentityInfo, + EduData, + Value, +) +from google.cloud.channel_v1.types.customers import ContactInfo, Customer +from google.cloud.channel_v1.types.entitlements import ( + AssociationInfo, + CommitmentSettings, + Entitlement, + Parameter, + ProvisionedService, + RenewalSettings, + TransferableSku, + TransferEligibility, + TrialSettings, +) +from google.cloud.channel_v1.types.offers import ( + Constraints, + CustomerConstraints, + Offer, + ParameterDefinition, + PaymentPlan, + PaymentType, + Period, + PeriodType, + Plan, + Price, + PriceByResource, + PricePhase, + PriceTier, + PromotionalOrderType, + ResourceType, ) - -from google.cloud.channel_v1.types.channel_partner_links import ChannelPartnerLink -from google.cloud.channel_v1.types.channel_partner_links import ChannelPartnerLinkState -from google.cloud.channel_v1.types.channel_partner_links import ChannelPartnerLinkView -from google.cloud.channel_v1.types.common import AdminUser -from google.cloud.channel_v1.types.common import CloudIdentityInfo -from google.cloud.channel_v1.types.common import EduData -from google.cloud.channel_v1.types.common import Value -from google.cloud.channel_v1.types.customers import ContactInfo -from google.cloud.channel_v1.types.customers import Customer -from google.cloud.channel_v1.types.entitlements import AssociationInfo -from google.cloud.channel_v1.types.entitlements import CommitmentSettings -from google.cloud.channel_v1.types.entitlements import Entitlement -from google.cloud.channel_v1.types.entitlements import Parameter -from google.cloud.channel_v1.types.entitlements import ProvisionedService -from google.cloud.channel_v1.types.entitlements import RenewalSettings -from google.cloud.channel_v1.types.entitlements import TransferableSku -from google.cloud.channel_v1.types.entitlements import TransferEligibility -from google.cloud.channel_v1.types.entitlements import TrialSettings -from google.cloud.channel_v1.types.offers import Constraints -from google.cloud.channel_v1.types.offers import CustomerConstraints -from google.cloud.channel_v1.types.offers import Offer -from google.cloud.channel_v1.types.offers import ParameterDefinition -from google.cloud.channel_v1.types.offers import Period -from google.cloud.channel_v1.types.offers import Plan -from google.cloud.channel_v1.types.offers import Price -from google.cloud.channel_v1.types.offers import PriceByResource -from google.cloud.channel_v1.types.offers import PricePhase -from google.cloud.channel_v1.types.offers import PriceTier -from google.cloud.channel_v1.types.offers import PaymentPlan -from google.cloud.channel_v1.types.offers import PaymentType -from google.cloud.channel_v1.types.offers import PeriodType -from google.cloud.channel_v1.types.offers import PromotionalOrderType -from google.cloud.channel_v1.types.offers import ResourceType from google.cloud.channel_v1.types.operations import OperationMetadata -from google.cloud.channel_v1.types.products import MarketingInfo -from google.cloud.channel_v1.types.products import Media -from google.cloud.channel_v1.types.products import Product -from google.cloud.channel_v1.types.products import Sku -from google.cloud.channel_v1.types.products import MediaType -from google.cloud.channel_v1.types.service import ActivateEntitlementRequest -from google.cloud.channel_v1.types.service import CancelEntitlementRequest -from google.cloud.channel_v1.types.service import ChangeOfferRequest -from google.cloud.channel_v1.types.service import ChangeParametersRequest -from google.cloud.channel_v1.types.service import ChangeRenewalSettingsRequest -from google.cloud.channel_v1.types.service import CheckCloudIdentityAccountsExistRequest +from google.cloud.channel_v1.types.products import ( + MarketingInfo, + Media, + MediaType, + Product, + Sku, +) from google.cloud.channel_v1.types.service import ( + ActivateEntitlementRequest, + CancelEntitlementRequest, + ChangeOfferRequest, + ChangeParametersRequest, + ChangeRenewalSettingsRequest, + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse, + CloudIdentityCustomerAccount, + CreateChannelPartnerLinkRequest, + CreateCustomerRequest, + CreateEntitlementRequest, + DeleteCustomerRequest, + GetChannelPartnerLinkRequest, + GetCustomerRequest, + GetEntitlementRequest, + ImportCustomerRequest, + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListCustomersRequest, + ListCustomersResponse, + ListEntitlementsRequest, + ListEntitlementsResponse, + ListOffersRequest, + ListOffersResponse, + ListProductsRequest, + ListProductsResponse, + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + ListSkusRequest, + ListSkusResponse, + ListSubscribersRequest, + ListSubscribersResponse, + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableSkusRequest, + ListTransferableSkusResponse, + LookupOfferRequest, + ProvisionCloudIdentityRequest, + PurchasableOffer, + PurchasableSku, + RegisterSubscriberRequest, + RegisterSubscriberResponse, + StartPaidServiceRequest, + SuspendEntitlementRequest, + TransferableOffer, + TransferEntitlementsRequest, + TransferEntitlementsResponse, + TransferEntitlementsToGoogleRequest, + UnregisterSubscriberRequest, + UnregisterSubscriberResponse, + UpdateChannelPartnerLinkRequest, + UpdateCustomerRequest, +) +from google.cloud.channel_v1.types.subscriber_event import ( + CustomerEvent, + EntitlementEvent, + SubscriberEvent, ) -from google.cloud.channel_v1.types.service import CloudIdentityCustomerAccount -from google.cloud.channel_v1.types.service import CreateChannelPartnerLinkRequest -from google.cloud.channel_v1.types.service import CreateCustomerRequest -from google.cloud.channel_v1.types.service import CreateEntitlementRequest -from google.cloud.channel_v1.types.service import DeleteCustomerRequest -from google.cloud.channel_v1.types.service import GetChannelPartnerLinkRequest -from google.cloud.channel_v1.types.service import GetCustomerRequest -from google.cloud.channel_v1.types.service import GetEntitlementRequest -from google.cloud.channel_v1.types.service import ImportCustomerRequest -from google.cloud.channel_v1.types.service import ListChannelPartnerLinksRequest -from google.cloud.channel_v1.types.service import ListChannelPartnerLinksResponse -from google.cloud.channel_v1.types.service import ListCustomersRequest -from google.cloud.channel_v1.types.service import ListCustomersResponse -from google.cloud.channel_v1.types.service import ListEntitlementsRequest -from google.cloud.channel_v1.types.service import ListEntitlementsResponse -from google.cloud.channel_v1.types.service import ListOffersRequest -from google.cloud.channel_v1.types.service import ListOffersResponse -from google.cloud.channel_v1.types.service import ListProductsRequest -from google.cloud.channel_v1.types.service import ListProductsResponse -from google.cloud.channel_v1.types.service import ListPurchasableOffersRequest -from google.cloud.channel_v1.types.service import ListPurchasableOffersResponse -from google.cloud.channel_v1.types.service import ListPurchasableSkusRequest -from google.cloud.channel_v1.types.service import ListPurchasableSkusResponse -from google.cloud.channel_v1.types.service import ListSkusRequest -from google.cloud.channel_v1.types.service import ListSkusResponse -from google.cloud.channel_v1.types.service import ListSubscribersRequest -from google.cloud.channel_v1.types.service import ListSubscribersResponse -from google.cloud.channel_v1.types.service import ListTransferableOffersRequest -from google.cloud.channel_v1.types.service import ListTransferableOffersResponse -from google.cloud.channel_v1.types.service import ListTransferableSkusRequest -from google.cloud.channel_v1.types.service import ListTransferableSkusResponse -from google.cloud.channel_v1.types.service import LookupOfferRequest -from google.cloud.channel_v1.types.service import ProvisionCloudIdentityRequest -from google.cloud.channel_v1.types.service import PurchasableOffer -from google.cloud.channel_v1.types.service import PurchasableSku -from google.cloud.channel_v1.types.service import RegisterSubscriberRequest -from google.cloud.channel_v1.types.service import RegisterSubscriberResponse -from google.cloud.channel_v1.types.service import StartPaidServiceRequest -from google.cloud.channel_v1.types.service import SuspendEntitlementRequest -from google.cloud.channel_v1.types.service import TransferableOffer -from google.cloud.channel_v1.types.service import TransferEntitlementsRequest -from google.cloud.channel_v1.types.service import TransferEntitlementsResponse -from google.cloud.channel_v1.types.service import TransferEntitlementsToGoogleRequest -from google.cloud.channel_v1.types.service import UnregisterSubscriberRequest -from google.cloud.channel_v1.types.service import UnregisterSubscriberResponse -from google.cloud.channel_v1.types.service import UpdateChannelPartnerLinkRequest -from google.cloud.channel_v1.types.service import UpdateCustomerRequest -from google.cloud.channel_v1.types.subscriber_event import CustomerEvent -from google.cloud.channel_v1.types.subscriber_event import EntitlementEvent -from google.cloud.channel_v1.types.subscriber_event import SubscriberEvent __all__ = ( "CloudChannelServiceClient", diff --git a/google/cloud/channel_v1/__init__.py b/google/cloud/channel_v1/__init__.py index 2503677..bf0efd1 100644 --- a/google/cloud/channel_v1/__init__.py +++ b/google/cloud/channel_v1/__init__.py @@ -14,105 +14,104 @@ # limitations under the License. # -from .services.cloud_channel_service import CloudChannelServiceClient -from .services.cloud_channel_service import CloudChannelServiceAsyncClient - -from .types.channel_partner_links import ChannelPartnerLink -from .types.channel_partner_links import ChannelPartnerLinkState -from .types.channel_partner_links import ChannelPartnerLinkView -from .types.common import AdminUser -from .types.common import CloudIdentityInfo -from .types.common import EduData -from .types.common import Value -from .types.customers import ContactInfo -from .types.customers import Customer -from .types.entitlements import AssociationInfo -from .types.entitlements import CommitmentSettings -from .types.entitlements import Entitlement -from .types.entitlements import Parameter -from .types.entitlements import ProvisionedService -from .types.entitlements import RenewalSettings -from .types.entitlements import TransferableSku -from .types.entitlements import TransferEligibility -from .types.entitlements import TrialSettings -from .types.offers import Constraints -from .types.offers import CustomerConstraints -from .types.offers import Offer -from .types.offers import ParameterDefinition -from .types.offers import Period -from .types.offers import Plan -from .types.offers import Price -from .types.offers import PriceByResource -from .types.offers import PricePhase -from .types.offers import PriceTier -from .types.offers import PaymentPlan -from .types.offers import PaymentType -from .types.offers import PeriodType -from .types.offers import PromotionalOrderType -from .types.offers import ResourceType +from .services.cloud_channel_service import ( + CloudChannelServiceAsyncClient, + CloudChannelServiceClient, +) +from .types.channel_partner_links import ( + ChannelPartnerLink, + ChannelPartnerLinkState, + ChannelPartnerLinkView, +) +from .types.common import AdminUser, CloudIdentityInfo, EduData, Value +from .types.customers import ContactInfo, Customer +from .types.entitlements import ( + AssociationInfo, + CommitmentSettings, + Entitlement, + Parameter, + ProvisionedService, + RenewalSettings, + TransferableSku, + TransferEligibility, + TrialSettings, +) +from .types.offers import ( + Constraints, + CustomerConstraints, + Offer, + ParameterDefinition, + PaymentPlan, + PaymentType, + Period, + PeriodType, + Plan, + Price, + PriceByResource, + PricePhase, + PriceTier, + PromotionalOrderType, + ResourceType, +) from .types.operations import OperationMetadata -from .types.products import MarketingInfo -from .types.products import Media -from .types.products import Product -from .types.products import Sku -from .types.products import MediaType -from .types.service import ActivateEntitlementRequest -from .types.service import CancelEntitlementRequest -from .types.service import ChangeOfferRequest -from .types.service import ChangeParametersRequest -from .types.service import ChangeRenewalSettingsRequest -from .types.service import CheckCloudIdentityAccountsExistRequest -from .types.service import CheckCloudIdentityAccountsExistResponse -from .types.service import CloudIdentityCustomerAccount -from .types.service import CreateChannelPartnerLinkRequest -from .types.service import CreateCustomerRequest -from .types.service import CreateEntitlementRequest -from .types.service import DeleteCustomerRequest -from .types.service import GetChannelPartnerLinkRequest -from .types.service import GetCustomerRequest -from .types.service import GetEntitlementRequest -from .types.service import ImportCustomerRequest -from .types.service import ListChannelPartnerLinksRequest -from .types.service import ListChannelPartnerLinksResponse -from .types.service import ListCustomersRequest -from .types.service import ListCustomersResponse -from .types.service import ListEntitlementsRequest -from .types.service import ListEntitlementsResponse -from .types.service import ListOffersRequest -from .types.service import ListOffersResponse -from .types.service import ListProductsRequest -from .types.service import ListProductsResponse -from .types.service import ListPurchasableOffersRequest -from .types.service import ListPurchasableOffersResponse -from .types.service import ListPurchasableSkusRequest -from .types.service import ListPurchasableSkusResponse -from .types.service import ListSkusRequest -from .types.service import ListSkusResponse -from .types.service import ListSubscribersRequest -from .types.service import ListSubscribersResponse -from .types.service import ListTransferableOffersRequest -from .types.service import ListTransferableOffersResponse -from .types.service import ListTransferableSkusRequest -from .types.service import ListTransferableSkusResponse -from .types.service import LookupOfferRequest -from .types.service import ProvisionCloudIdentityRequest -from .types.service import PurchasableOffer -from .types.service import PurchasableSku -from .types.service import RegisterSubscriberRequest -from .types.service import RegisterSubscriberResponse -from .types.service import StartPaidServiceRequest -from .types.service import SuspendEntitlementRequest -from .types.service import TransferableOffer -from .types.service import TransferEntitlementsRequest -from .types.service import TransferEntitlementsResponse -from .types.service import TransferEntitlementsToGoogleRequest -from .types.service import UnregisterSubscriberRequest -from .types.service import UnregisterSubscriberResponse -from .types.service import UpdateChannelPartnerLinkRequest -from .types.service import UpdateCustomerRequest -from .types.subscriber_event import CustomerEvent -from .types.subscriber_event import EntitlementEvent -from .types.subscriber_event import SubscriberEvent +from .types.products import MarketingInfo, Media, MediaType, Product, Sku +from .types.service import ( + ActivateEntitlementRequest, + CancelEntitlementRequest, + ChangeOfferRequest, + ChangeParametersRequest, + ChangeRenewalSettingsRequest, + CheckCloudIdentityAccountsExistRequest, + CheckCloudIdentityAccountsExistResponse, + CloudIdentityCustomerAccount, + CreateChannelPartnerLinkRequest, + CreateCustomerRequest, + CreateEntitlementRequest, + DeleteCustomerRequest, + GetChannelPartnerLinkRequest, + GetCustomerRequest, + GetEntitlementRequest, + ImportCustomerRequest, + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListCustomersRequest, + ListCustomersResponse, + ListEntitlementsRequest, + ListEntitlementsResponse, + ListOffersRequest, + ListOffersResponse, + ListProductsRequest, + ListProductsResponse, + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + ListSkusRequest, + ListSkusResponse, + ListSubscribersRequest, + ListSubscribersResponse, + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableSkusRequest, + ListTransferableSkusResponse, + LookupOfferRequest, + ProvisionCloudIdentityRequest, + PurchasableOffer, + PurchasableSku, + RegisterSubscriberRequest, + RegisterSubscriberResponse, + StartPaidServiceRequest, + SuspendEntitlementRequest, + TransferableOffer, + TransferEntitlementsRequest, + TransferEntitlementsResponse, + TransferEntitlementsToGoogleRequest, + UnregisterSubscriberRequest, + UnregisterSubscriberResponse, + UpdateChannelPartnerLinkRequest, + UpdateCustomerRequest, +) +from .types.subscriber_event import CustomerEvent, EntitlementEvent, SubscriberEvent __all__ = ( "CloudChannelServiceAsyncClient", diff --git a/google/cloud/channel_v1/services/cloud_channel_service/__init__.py b/google/cloud/channel_v1/services/cloud_channel_service/__init__.py index e8b88c8..686c48e 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/__init__.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/__init__.py @@ -13,8 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .client import CloudChannelServiceClient from .async_client import CloudChannelServiceAsyncClient +from .client import CloudChannelServiceClient __all__ = ( "CloudChannelServiceClient", 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 3a35767..67a6a53 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 @@ -17,14 +17,14 @@ import functools import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources -from google.api_core.client_options import ClientOptions from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries +from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -33,21 +33,25 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.channel_v1.services.cloud_channel_service import pagers -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import common -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import operations -from google.cloud.channel_v1.types import products -from google.cloud.channel_v1.types import service from google.protobuf import empty_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.type import postal_address_pb2 # type: ignore -from .transports.base import CloudChannelServiceTransport, DEFAULT_CLIENT_INFO -from .transports.grpc_asyncio import CloudChannelServiceGrpcAsyncIOTransport + +from google.cloud.channel_v1.services.cloud_channel_service import pagers +from google.cloud.channel_v1.types import ( + channel_partner_links, + common, + customers, + entitlements, + offers, + operations, + products, + service, +) + from .client import CloudChannelServiceClient +from .transports.base import DEFAULT_CLIENT_INFO, CloudChannelServiceTransport +from .transports.grpc_asyncio import CloudChannelServiceGrpcAsyncIOTransport class CloudChannelServiceAsyncClient: 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 3a13abe..6d7a1a7 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/client.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/client.py @@ -17,17 +17,17 @@ import os import re from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union -import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions as core_exceptions from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore +from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +import pkg_resources try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -36,19 +36,23 @@ from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore -from google.cloud.channel_v1.services.cloud_channel_service import pagers -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import common -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import operations -from google.cloud.channel_v1.types import products -from google.cloud.channel_v1.types import service from google.protobuf import empty_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.type import postal_address_pb2 # type: ignore -from .transports.base import CloudChannelServiceTransport, DEFAULT_CLIENT_INFO + +from google.cloud.channel_v1.services.cloud_channel_service import pagers +from google.cloud.channel_v1.types import ( + channel_partner_links, + common, + customers, + entitlements, + offers, + operations, + products, + service, +) + +from .transports.base import DEFAULT_CLIENT_INFO, CloudChannelServiceTransport from .transports.grpc import CloudChannelServiceGrpcTransport from .transports.grpc_asyncio import CloudChannelServiceGrpcAsyncIOTransport diff --git a/google/cloud/channel_v1/services/cloud_channel_service/pagers.py b/google/cloud/channel_v1/services/cloud_channel_service/pagers.py index 36f19cf..bf82506 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/pagers.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/pagers.py @@ -18,18 +18,20 @@ AsyncIterator, Awaitable, Callable, + Iterator, + Optional, Sequence, Tuple, - Optional, - Iterator, ) -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import products -from google.cloud.channel_v1.types import service +from google.cloud.channel_v1.types import ( + channel_partner_links, + customers, + entitlements, + offers, + products, + service, +) class ListCustomersPager: diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/__init__.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/__init__.py index 8f3c57f..0c827d3 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/__init__.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/__init__.py @@ -20,7 +20,6 @@ from .grpc import CloudChannelServiceGrpcTransport from .grpc_asyncio import CloudChannelServiceGrpcAsyncIOTransport - # Compile a registry of transports. _transport_registry = ( OrderedDict() diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py index ec3c87b..499b49f 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py @@ -15,24 +15,25 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import pkg_resources -import google.auth # type: ignore import google.api_core from google.api_core import exceptions as core_exceptions -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, operations_v1 from google.api_core import retry as retries -from google.api_core import operations_v1 +import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore -from google.oauth2 import service_account # type: ignore - -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import service from google.longrunning import operations_pb2 # type: ignore +from google.oauth2 import service_account # type: ignore from google.protobuf import empty_pb2 # type: ignore +import pkg_resources + +from google.cloud.channel_v1.types import ( + channel_partner_links, + customers, + entitlements, + offers, + service, +) try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( 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 ac8f888..68352ab 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 @@ -13,26 +13,26 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import grpc_helpers -from google.api_core import operations_v1 -from google.api_core import gapic_v1 +from google.api_core import gapic_v1, grpc_helpers, operations_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - -import grpc # type: ignore - -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import service from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore -from .base import CloudChannelServiceTransport, DEFAULT_CLIENT_INFO +import grpc # type: ignore + +from google.cloud.channel_v1.types import ( + channel_partner_links, + customers, + entitlements, + offers, + service, +) + +from .base import DEFAULT_CLIENT_INFO, CloudChannelServiceTransport class CloudChannelServiceGrpcTransport(CloudChannelServiceTransport): 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 1530afa..064bc3d 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 @@ -13,26 +13,26 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union +import warnings -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers_async -from google.api_core import operations_v1 +from google.api_core import gapic_v1, grpc_helpers_async, operations_v1 from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore - +from google.longrunning import operations_pb2 # type: ignore +from google.protobuf import empty_pb2 # type: ignore import grpc # type: ignore from grpc.experimental import aio # type: ignore -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import service -from google.longrunning import operations_pb2 # type: ignore -from google.protobuf import empty_pb2 # type: ignore -from .base import CloudChannelServiceTransport, DEFAULT_CLIENT_INFO +from google.cloud.channel_v1.types import ( + channel_partner_links, + customers, + entitlements, + offers, + service, +) + +from .base import DEFAULT_CLIENT_INFO, CloudChannelServiceTransport from .grpc import CloudChannelServiceGrpcTransport diff --git a/google/cloud/channel_v1/types/__init__.py b/google/cloud/channel_v1/types/__init__.py index 465b48a..2fcd4e2 100644 --- a/google/cloud/channel_v1/types/__init__.py +++ b/google/cloud/channel_v1/types/__init__.py @@ -18,16 +18,8 @@ ChannelPartnerLinkState, ChannelPartnerLinkView, ) -from .common import ( - AdminUser, - CloudIdentityInfo, - EduData, - Value, -) -from .customers import ( - ContactInfo, - Customer, -) +from .common import AdminUser, CloudIdentityInfo, EduData, Value +from .customers import ContactInfo, Customer from .entitlements import ( AssociationInfo, CommitmentSettings, @@ -44,28 +36,20 @@ CustomerConstraints, Offer, ParameterDefinition, + PaymentPlan, + PaymentType, Period, + PeriodType, Plan, Price, PriceByResource, PricePhase, PriceTier, - PaymentPlan, - PaymentType, - PeriodType, PromotionalOrderType, ResourceType, ) -from .operations import ( - OperationMetadata, -) -from .products import ( - MarketingInfo, - Media, - Product, - Sku, - MediaType, -) +from .operations import OperationMetadata +from .products import MarketingInfo, Media, MediaType, Product, Sku from .service import ( ActivateEntitlementRequest, CancelEntitlementRequest, @@ -122,11 +106,7 @@ UpdateChannelPartnerLinkRequest, UpdateCustomerRequest, ) -from .subscriber_event import ( - CustomerEvent, - EntitlementEvent, - SubscriberEvent, -) +from .subscriber_event import CustomerEvent, EntitlementEvent, SubscriberEvent __all__ = ( "ChannelPartnerLink", diff --git a/google/cloud/channel_v1/types/channel_partner_links.py b/google/cloud/channel_v1/types/channel_partner_links.py index 29fe1af..4c186ef 100644 --- a/google/cloud/channel_v1/types/channel_partner_links.py +++ b/google/cloud/channel_v1/types/channel_partner_links.py @@ -13,11 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.protobuf import timestamp_pb2 # type: ignore import proto # type: ignore from google.cloud.channel_v1.types import common -from google.protobuf import timestamp_pb2 # type: ignore - __protobuf__ = proto.module( package="google.cloud.channel.v1", diff --git a/google/cloud/channel_v1/types/common.py b/google/cloud/channel_v1/types/common.py index 332f611..e7dc691 100644 --- a/google/cloud/channel_v1/types/common.py +++ b/google/cloud/channel_v1/types/common.py @@ -13,10 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - from google.protobuf import any_pb2 # type: ignore - +import proto # type: ignore __protobuf__ = proto.module( package="google.cloud.channel.v1", diff --git a/google/cloud/channel_v1/types/customers.py b/google/cloud/channel_v1/types/customers.py index cfc2ea4..523312f 100644 --- a/google/cloud/channel_v1/types/customers.py +++ b/google/cloud/channel_v1/types/customers.py @@ -13,12 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - -from google.cloud.channel_v1.types import common from google.protobuf import timestamp_pb2 # type: ignore from google.type import postal_address_pb2 # type: ignore +import proto # type: ignore +from google.cloud.channel_v1.types import common __protobuf__ = proto.module( package="google.cloud.channel.v1", diff --git a/google/cloud/channel_v1/types/entitlements.py b/google/cloud/channel_v1/types/entitlements.py index 67fed17..4eb7cbf 100644 --- a/google/cloud/channel_v1/types/entitlements.py +++ b/google/cloud/channel_v1/types/entitlements.py @@ -13,13 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - -from google.cloud.channel_v1.types import common -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import products from google.protobuf import timestamp_pb2 # type: ignore +import proto # type: ignore +from google.cloud.channel_v1.types import common, offers, products __protobuf__ = proto.module( package="google.cloud.channel.v1", diff --git a/google/cloud/channel_v1/types/offers.py b/google/cloud/channel_v1/types/offers.py index 76b1cf4..9e8b6ac 100644 --- a/google/cloud/channel_v1/types/offers.py +++ b/google/cloud/channel_v1/types/offers.py @@ -13,13 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import proto # type: ignore - -from google.cloud.channel_v1.types import common -from google.cloud.channel_v1.types import products from google.protobuf import timestamp_pb2 # type: ignore from google.type import money_pb2 # type: ignore +import proto # type: ignore +from google.cloud.channel_v1.types import common, products __protobuf__ = proto.module( package="google.cloud.channel.v1", diff --git a/google/cloud/channel_v1/types/operations.py b/google/cloud/channel_v1/types/operations.py index 01f4ad1..4e45124 100644 --- a/google/cloud/channel_v1/types/operations.py +++ b/google/cloud/channel_v1/types/operations.py @@ -15,7 +15,6 @@ # import proto # type: ignore - __protobuf__ = proto.module( package="google.cloud.channel.v1", manifest={ diff --git a/google/cloud/channel_v1/types/products.py b/google/cloud/channel_v1/types/products.py index 46c406b..ef72eb9 100644 --- a/google/cloud/channel_v1/types/products.py +++ b/google/cloud/channel_v1/types/products.py @@ -15,7 +15,6 @@ # import proto # type: ignore - __protobuf__ = proto.module( package="google.cloud.channel.v1", manifest={ diff --git a/google/cloud/channel_v1/types/service.py b/google/cloud/channel_v1/types/service.py index 582eb7f..a812f5b 100644 --- a/google/cloud/channel_v1/types/service.py +++ b/google/cloud/channel_v1/types/service.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from google.protobuf import field_mask_pb2 # type: ignore import proto # type: ignore from google.cloud.channel_v1.types import ( @@ -23,8 +24,6 @@ from google.cloud.channel_v1.types import entitlements as gcc_entitlements from google.cloud.channel_v1.types import offers as gcc_offers from google.cloud.channel_v1.types import products as gcc_products -from google.protobuf import field_mask_pb2 # type: ignore - __protobuf__ = proto.module( package="google.cloud.channel.v1", diff --git a/google/cloud/channel_v1/types/subscriber_event.py b/google/cloud/channel_v1/types/subscriber_event.py index e80201c..6a8ae3c 100644 --- a/google/cloud/channel_v1/types/subscriber_event.py +++ b/google/cloud/channel_v1/types/subscriber_event.py @@ -15,7 +15,6 @@ # import proto # type: ignore - __protobuf__ = proto.module( package="google.cloud.channel.v1", manifest={ diff --git a/noxfile.py b/noxfile.py index 6ee5e8a..7c1742d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import shutil @@ -25,7 +26,8 @@ import nox BLACK_VERSION = "black==22.3.0" -BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] +ISORT_VERSION = "isort==5.10.1" +LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -83,7 +85,7 @@ def lint(session): session.run( "black", "--check", - *BLACK_PATHS, + *LINT_PATHS, ) session.run("flake8", "google", "tests") @@ -94,7 +96,27 @@ def blacken(session): session.install(BLACK_VERSION) session.run( "black", - *BLACK_PATHS, + *LINT_PATHS, + ) + + +@nox.session(python=DEFAULT_PYTHON_VERSION) +def format(session): + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run( + "isort", + "--fss", + *LINT_PATHS, + ) + session.run( + "black", + *LINT_PATHS, ) diff --git a/setup.py b/setup.py index 751d0fe..bf1e7ff 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ import io import os + import setuptools # type: ignore version = "1.7.1" diff --git a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py index fca10fe..f1c58e9 100644 --- a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py +++ b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py @@ -13,51 +13,52 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import mock - -import grpc -from grpc.experimental import aio import math -import pytest -from proto.marshal.rules.dates import DurationRule, TimestampRule - +import os +from google.api_core import ( + future, + gapic_v1, + grpc_helpers, + grpc_helpers_async, + operation, + operations_v1, + path_template, +) from google.api_core import client_options from google.api_core import exceptions as core_exceptions -from google.api_core import future -from google.api_core import gapic_v1 -from google.api_core import grpc_helpers -from google.api_core import grpc_helpers_async -from google.api_core import operation from google.api_core import operation_async # type: ignore -from google.api_core import operations_v1 -from google.api_core import path_template +import google.auth from google.auth import credentials as ga_credentials from google.auth.exceptions import MutualTLSChannelError -from google.cloud.channel_v1.services.cloud_channel_service import ( - CloudChannelServiceAsyncClient, -) -from google.cloud.channel_v1.services.cloud_channel_service import ( - CloudChannelServiceClient, -) -from google.cloud.channel_v1.services.cloud_channel_service import pagers -from google.cloud.channel_v1.services.cloud_channel_service import transports -from google.cloud.channel_v1.types import channel_partner_links -from google.cloud.channel_v1.types import common -from google.cloud.channel_v1.types import customers -from google.cloud.channel_v1.types import entitlements -from google.cloud.channel_v1.types import offers -from google.cloud.channel_v1.types import operations -from google.cloud.channel_v1.types import products -from google.cloud.channel_v1.types import service from google.longrunning import operations_pb2 from google.oauth2 import service_account from google.protobuf import any_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore from google.type import postal_address_pb2 # type: ignore -import google.auth +import grpc +from grpc.experimental import aio +import mock +from proto.marshal.rules.dates import DurationRule, TimestampRule +import pytest + +from google.cloud.channel_v1.services.cloud_channel_service import ( + CloudChannelServiceAsyncClient, + CloudChannelServiceClient, + pagers, + transports, +) +from google.cloud.channel_v1.types import ( + channel_partner_links, + common, + customers, + entitlements, + offers, + operations, + products, + service, +) def client_cert_source_callback(): From 5ddbaf1d2b69c4437e1e52b688359ad52141e3bc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 16:12:17 +0000 Subject: [PATCH 11/15] chore(python): use ubuntu 22.04 in docs image (#166) Source-Link: https://github.com/googleapis/synthtool/commit/f15cc72fb401b4861cedebb10af74afe428fb1f8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/docker/docs/Dockerfile | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 7c454ab..64f82d6 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 -# created: 2022-04-20T23:42:53.970438194Z + digest: sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd +# created: 2022-04-21T15:43:16.246106921Z diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index 4e1b1fb..238b87b 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ubuntu:20.04 +from ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -60,8 +60,24 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -f /var/cache/apt/archives/*.deb +###################### Install python 3.8.11 + +# Download python 3.8.11 +RUN wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz + +# Extract files +RUN tar -xvf Python-3.8.11.tgz + +# Install python 3.8.11 +RUN ./Python-3.8.11/configure --enable-optimizations +RUN make altinstall + +###################### Install pip RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ - && python3.8 /tmp/get-pip.py \ + && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py +# Test pip +RUN python3 -m pip + CMD ["python3.8"] From 2a881514bb8ecfbcbdec9dac15663f4caa00bd00 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 20:18:27 -0400 Subject: [PATCH 12/15] feat: Add filter in ListCustomersRequest (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add new enum value, new filter in ListCustomersRequest of Cloud Channel API PiperOrigin-RevId: 443474187 Source-Link: https://github.com/googleapis/googleapis/commit/d4dd268f399a72da4222f15ba16b4f96b370b098 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ea6d793dd57571faa6442cc88db7e9ee6c54d70 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWVhNmQ3OTNkZDU3NTcxZmFhNjQ0MmNjODhkYjdlOWVlNmM1NGQ3MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google/cloud/channel_v1/types/entitlements.py | 4 +++- google/cloud/channel_v1/types/service.py | 9 +++++++++ google/cloud/channel_v1/types/subscriber_event.py | 6 +++--- scripts/fixup_channel_v1_keywords.py | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/google/cloud/channel_v1/types/entitlements.py b/google/cloud/channel_v1/types/entitlements.py index 4eb7cbf..28d9728 100644 --- a/google/cloud/channel_v1/types/entitlements.py +++ b/google/cloud/channel_v1/types/entitlements.py @@ -70,7 +70,9 @@ class Entitlement(proto.Message): company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property - accepts up to 80 plain text characters. + accepts up to 80 plain text characters. This is + only supported for Google Workspace + entitlements. trial_settings (google.cloud.channel_v1.types.TrialSettings): Output only. Settings for trial offers. association_info (google.cloud.channel_v1.types.AssociationInfo): diff --git a/google/cloud/channel_v1/types/service.py b/google/cloud/channel_v1/types/service.py index a812f5b..e1d1083 100644 --- a/google/cloud/channel_v1/types/service.py +++ b/google/cloud/channel_v1/types/service.py @@ -186,6 +186,11 @@ class ListCustomersRequest(proto.Message): of the previous [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call. + filter (str): + Optional. Filters applied to the + [CloudChannelService.ListCustomers] results. See + https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers + for more information. """ parent = proto.Field( @@ -200,6 +205,10 @@ class ListCustomersRequest(proto.Message): proto.STRING, number=3, ) + filter = proto.Field( + proto.STRING, + number=4, + ) class ListCustomersResponse(proto.Message): diff --git a/google/cloud/channel_v1/types/subscriber_event.py b/google/cloud/channel_v1/types/subscriber_event.py index 6a8ae3c..51fc00b 100644 --- a/google/cloud/channel_v1/types/subscriber_event.py +++ b/google/cloud/channel_v1/types/subscriber_event.py @@ -96,7 +96,7 @@ class Type(proto.Enum): class SubscriberEvent(proto.Message): r"""Represents information which resellers will get as part of - notification from Cloud Pub/Sub. + notification from Pub/Sub. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -107,12 +107,12 @@ class SubscriberEvent(proto.Message): Attributes: customer_event (google.cloud.channel_v1.types.CustomerEvent): - Customer event send as part of Pub/Sub event + Customer event sent as part of Pub/Sub event to partners. This field is a member of `oneof`_ ``event``. entitlement_event (google.cloud.channel_v1.types.EntitlementEvent): - Entitlement event send as part of Pub/Sub + Entitlement event sent as part of Pub/Sub event to partners. This field is a member of `oneof`_ ``event``. diff --git a/scripts/fixup_channel_v1_keywords.py b/scripts/fixup_channel_v1_keywords.py index 326fdf4..2734775 100644 --- a/scripts/fixup_channel_v1_keywords.py +++ b/scripts/fixup_channel_v1_keywords.py @@ -54,7 +54,7 @@ class channelCallTransformer(cst.CSTTransformer): 'get_entitlement': ('name', ), 'import_customer': ('domain', 'cloud_identity_id', 'parent', 'overwrite_if_exists', 'auth_token', 'channel_partner_id', 'customer', ), 'list_channel_partner_links': ('parent', 'page_size', 'page_token', 'view', ), - 'list_customers': ('parent', 'page_size', 'page_token', ), + 'list_customers': ('parent', 'page_size', 'page_token', 'filter', ), 'list_entitlements': ('parent', 'page_size', 'page_token', ), 'list_offers': ('parent', 'page_size', 'page_token', 'filter', 'language_code', ), 'list_products': ('account', 'page_size', 'page_token', 'language_code', ), From 18db43c21a935ab9bc52539edf8f97556aa05819 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 10:49:39 -0400 Subject: [PATCH 13/15] feat: Add API definitions for Cloud Channel Repricing APIs (#169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add API definitions for Cloud Channel Repricing APIs PiperOrigin-RevId: 443782462 Source-Link: https://github.com/googleapis/googleapis/commit/9efd9766f0f6f31d238d197401a0d24f2364a6f3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a7e22c0d406577ad228feb8e377521bd3739198 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE3ZTIyYzBkNDA2NTc3YWQyMjhmZWI4ZTM3NzUyMWJkMzczOTE5OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google/cloud/channel/__init__.py | 38 + google/cloud/channel_v1/__init__.py | 38 + google/cloud/channel_v1/gapic_metadata.json | 100 + .../cloud_channel_service/async_client.py | 1299 +++++++ .../services/cloud_channel_service/client.py | 1355 +++++++ .../services/cloud_channel_service/pagers.py | 263 ++ .../cloud_channel_service/transports/base.py | 165 + .../cloud_channel_service/transports/grpc.py | 579 +++ .../transports/grpc_asyncio.py | 582 +++ google/cloud/channel_v1/types/__init__.py | 38 + google/cloud/channel_v1/types/repricing.py | 245 ++ google/cloud/channel_v1/types/service.py | 330 ++ ..._channel_partner_repricing_config_async.py | 49 + ...e_channel_partner_repricing_config_sync.py | 49 + ..._create_customer_repricing_config_async.py | 49 + ...e_create_customer_repricing_config_sync.py | 49 + ..._channel_partner_repricing_config_async.py | 43 + ...e_channel_partner_repricing_config_sync.py | 43 + ..._delete_customer_repricing_config_async.py | 43 + ...e_delete_customer_repricing_config_sync.py | 43 + ..._channel_partner_repricing_config_async.py | 45 + ...t_channel_partner_repricing_config_sync.py | 45 + ...ice_get_customer_repricing_config_async.py | 45 + ...vice_get_customer_repricing_config_sync.py | 45 + ...channel_partner_repricing_configs_async.py | 46 + ..._channel_partner_repricing_configs_sync.py | 46 + ...e_list_customer_repricing_configs_async.py | 46 + ...ce_list_customer_repricing_configs_sync.py | 46 + ..._channel_partner_repricing_config_async.py | 48 + ...e_channel_partner_repricing_config_sync.py | 48 + ..._update_customer_repricing_config_async.py | 48 + ...e_update_customer_repricing_config_sync.py | 48 + .../snippet_metadata_channel_v1.json | 3272 ++++++++++++----- scripts/fixup_channel_v1_keywords.py | 10 + .../channel_v1/test_cloud_channel_service.py | 2975 ++++++++++++++- 35 files changed, 11380 insertions(+), 833 deletions(-) create mode 100644 google/cloud/channel_v1/types/repricing.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_sync.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_async.py create mode 100644 samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_sync.py diff --git a/google/cloud/channel/__init__.py b/google/cloud/channel/__init__.py index 01de731..7d0eb98 100644 --- a/google/cloud/channel/__init__.py +++ b/google/cloud/channel/__init__.py @@ -68,6 +68,14 @@ Product, Sku, ) +from google.cloud.channel_v1.types.repricing import ( + ChannelPartnerRepricingConfig, + CustomerRepricingConfig, + PercentageAdjustment, + RebillingBasis, + RepricingAdjustment, + RepricingConfig, +) from google.cloud.channel_v1.types.service import ( ActivateEntitlementRequest, CancelEntitlementRequest, @@ -78,15 +86,25 @@ CheckCloudIdentityAccountsExistResponse, CloudIdentityCustomerAccount, CreateChannelPartnerLinkRequest, + CreateChannelPartnerRepricingConfigRequest, + CreateCustomerRepricingConfigRequest, CreateCustomerRequest, CreateEntitlementRequest, + DeleteChannelPartnerRepricingConfigRequest, + DeleteCustomerRepricingConfigRequest, DeleteCustomerRequest, GetChannelPartnerLinkRequest, + GetChannelPartnerRepricingConfigRequest, + GetCustomerRepricingConfigRequest, GetCustomerRequest, GetEntitlementRequest, ImportCustomerRequest, ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, + ListChannelPartnerRepricingConfigsRequest, + ListChannelPartnerRepricingConfigsResponse, + ListCustomerRepricingConfigsRequest, + ListCustomerRepricingConfigsResponse, ListCustomersRequest, ListCustomersResponse, ListEntitlementsRequest, @@ -122,6 +140,8 @@ UnregisterSubscriberRequest, UnregisterSubscriberResponse, UpdateChannelPartnerLinkRequest, + UpdateChannelPartnerRepricingConfigRequest, + UpdateCustomerRepricingConfigRequest, UpdateCustomerRequest, ) from google.cloud.channel_v1.types.subscriber_event import ( @@ -172,6 +192,12 @@ "Product", "Sku", "MediaType", + "ChannelPartnerRepricingConfig", + "CustomerRepricingConfig", + "PercentageAdjustment", + "RepricingAdjustment", + "RepricingConfig", + "RebillingBasis", "ActivateEntitlementRequest", "CancelEntitlementRequest", "ChangeOfferRequest", @@ -181,15 +207,25 @@ "CheckCloudIdentityAccountsExistResponse", "CloudIdentityCustomerAccount", "CreateChannelPartnerLinkRequest", + "CreateChannelPartnerRepricingConfigRequest", + "CreateCustomerRepricingConfigRequest", "CreateCustomerRequest", "CreateEntitlementRequest", + "DeleteChannelPartnerRepricingConfigRequest", + "DeleteCustomerRepricingConfigRequest", "DeleteCustomerRequest", "GetChannelPartnerLinkRequest", + "GetChannelPartnerRepricingConfigRequest", + "GetCustomerRepricingConfigRequest", "GetCustomerRequest", "GetEntitlementRequest", "ImportCustomerRequest", "ListChannelPartnerLinksRequest", "ListChannelPartnerLinksResponse", + "ListChannelPartnerRepricingConfigsRequest", + "ListChannelPartnerRepricingConfigsResponse", + "ListCustomerRepricingConfigsRequest", + "ListCustomerRepricingConfigsResponse", "ListCustomersRequest", "ListCustomersResponse", "ListEntitlementsRequest", @@ -225,6 +261,8 @@ "UnregisterSubscriberRequest", "UnregisterSubscriberResponse", "UpdateChannelPartnerLinkRequest", + "UpdateChannelPartnerRepricingConfigRequest", + "UpdateCustomerRepricingConfigRequest", "UpdateCustomerRequest", "CustomerEvent", "EntitlementEvent", diff --git a/google/cloud/channel_v1/__init__.py b/google/cloud/channel_v1/__init__.py index bf0efd1..c5f1724 100644 --- a/google/cloud/channel_v1/__init__.py +++ b/google/cloud/channel_v1/__init__.py @@ -55,6 +55,14 @@ ) from .types.operations import OperationMetadata from .types.products import MarketingInfo, Media, MediaType, Product, Sku +from .types.repricing import ( + ChannelPartnerRepricingConfig, + CustomerRepricingConfig, + PercentageAdjustment, + RebillingBasis, + RepricingAdjustment, + RepricingConfig, +) from .types.service import ( ActivateEntitlementRequest, CancelEntitlementRequest, @@ -65,15 +73,25 @@ CheckCloudIdentityAccountsExistResponse, CloudIdentityCustomerAccount, CreateChannelPartnerLinkRequest, + CreateChannelPartnerRepricingConfigRequest, + CreateCustomerRepricingConfigRequest, CreateCustomerRequest, CreateEntitlementRequest, + DeleteChannelPartnerRepricingConfigRequest, + DeleteCustomerRepricingConfigRequest, DeleteCustomerRequest, GetChannelPartnerLinkRequest, + GetChannelPartnerRepricingConfigRequest, + GetCustomerRepricingConfigRequest, GetCustomerRequest, GetEntitlementRequest, ImportCustomerRequest, ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, + ListChannelPartnerRepricingConfigsRequest, + ListChannelPartnerRepricingConfigsResponse, + ListCustomerRepricingConfigsRequest, + ListCustomerRepricingConfigsResponse, ListCustomersRequest, ListCustomersResponse, ListEntitlementsRequest, @@ -109,6 +127,8 @@ UnregisterSubscriberRequest, UnregisterSubscriberResponse, UpdateChannelPartnerLinkRequest, + UpdateChannelPartnerRepricingConfigRequest, + UpdateCustomerRepricingConfigRequest, UpdateCustomerRequest, ) from .types.subscriber_event import CustomerEvent, EntitlementEvent, SubscriberEvent @@ -125,6 +145,7 @@ "ChannelPartnerLink", "ChannelPartnerLinkState", "ChannelPartnerLinkView", + "ChannelPartnerRepricingConfig", "CheckCloudIdentityAccountsExistRequest", "CheckCloudIdentityAccountsExistResponse", "CloudChannelServiceClient", @@ -134,21 +155,32 @@ "Constraints", "ContactInfo", "CreateChannelPartnerLinkRequest", + "CreateChannelPartnerRepricingConfigRequest", + "CreateCustomerRepricingConfigRequest", "CreateCustomerRequest", "CreateEntitlementRequest", "Customer", "CustomerConstraints", "CustomerEvent", + "CustomerRepricingConfig", + "DeleteChannelPartnerRepricingConfigRequest", + "DeleteCustomerRepricingConfigRequest", "DeleteCustomerRequest", "EduData", "Entitlement", "EntitlementEvent", "GetChannelPartnerLinkRequest", + "GetChannelPartnerRepricingConfigRequest", + "GetCustomerRepricingConfigRequest", "GetCustomerRequest", "GetEntitlementRequest", "ImportCustomerRequest", "ListChannelPartnerLinksRequest", "ListChannelPartnerLinksResponse", + "ListChannelPartnerRepricingConfigsRequest", + "ListChannelPartnerRepricingConfigsResponse", + "ListCustomerRepricingConfigsRequest", + "ListCustomerRepricingConfigsResponse", "ListCustomersRequest", "ListCustomersResponse", "ListEntitlementsRequest", @@ -179,6 +211,7 @@ "ParameterDefinition", "PaymentPlan", "PaymentType", + "PercentageAdjustment", "Period", "PeriodType", "Plan", @@ -192,9 +225,12 @@ "ProvisionedService", "PurchasableOffer", "PurchasableSku", + "RebillingBasis", "RegisterSubscriberRequest", "RegisterSubscriberResponse", "RenewalSettings", + "RepricingAdjustment", + "RepricingConfig", "ResourceType", "Sku", "StartPaidServiceRequest", @@ -210,6 +246,8 @@ "UnregisterSubscriberRequest", "UnregisterSubscriberResponse", "UpdateChannelPartnerLinkRequest", + "UpdateChannelPartnerRepricingConfigRequest", + "UpdateCustomerRepricingConfigRequest", "UpdateCustomerRequest", "Value", ) diff --git a/google/cloud/channel_v1/gapic_metadata.json b/google/cloud/channel_v1/gapic_metadata.json index 9c71a5f..38333bb 100644 --- a/google/cloud/channel_v1/gapic_metadata.json +++ b/google/cloud/channel_v1/gapic_metadata.json @@ -45,31 +45,61 @@ "create_channel_partner_link" ] }, + "CreateChannelPartnerRepricingConfig": { + "methods": [ + "create_channel_partner_repricing_config" + ] + }, "CreateCustomer": { "methods": [ "create_customer" ] }, + "CreateCustomerRepricingConfig": { + "methods": [ + "create_customer_repricing_config" + ] + }, "CreateEntitlement": { "methods": [ "create_entitlement" ] }, + "DeleteChannelPartnerRepricingConfig": { + "methods": [ + "delete_channel_partner_repricing_config" + ] + }, "DeleteCustomer": { "methods": [ "delete_customer" ] }, + "DeleteCustomerRepricingConfig": { + "methods": [ + "delete_customer_repricing_config" + ] + }, "GetChannelPartnerLink": { "methods": [ "get_channel_partner_link" ] }, + "GetChannelPartnerRepricingConfig": { + "methods": [ + "get_channel_partner_repricing_config" + ] + }, "GetCustomer": { "methods": [ "get_customer" ] }, + "GetCustomerRepricingConfig": { + "methods": [ + "get_customer_repricing_config" + ] + }, "GetEntitlement": { "methods": [ "get_entitlement" @@ -85,6 +115,16 @@ "list_channel_partner_links" ] }, + "ListChannelPartnerRepricingConfigs": { + "methods": [ + "list_channel_partner_repricing_configs" + ] + }, + "ListCustomerRepricingConfigs": { + "methods": [ + "list_customer_repricing_configs" + ] + }, "ListCustomers": { "methods": [ "list_customers" @@ -180,10 +220,20 @@ "update_channel_partner_link" ] }, + "UpdateChannelPartnerRepricingConfig": { + "methods": [ + "update_channel_partner_repricing_config" + ] + }, "UpdateCustomer": { "methods": [ "update_customer" ] + }, + "UpdateCustomerRepricingConfig": { + "methods": [ + "update_customer_repricing_config" + ] } } }, @@ -225,31 +275,61 @@ "create_channel_partner_link" ] }, + "CreateChannelPartnerRepricingConfig": { + "methods": [ + "create_channel_partner_repricing_config" + ] + }, "CreateCustomer": { "methods": [ "create_customer" ] }, + "CreateCustomerRepricingConfig": { + "methods": [ + "create_customer_repricing_config" + ] + }, "CreateEntitlement": { "methods": [ "create_entitlement" ] }, + "DeleteChannelPartnerRepricingConfig": { + "methods": [ + "delete_channel_partner_repricing_config" + ] + }, "DeleteCustomer": { "methods": [ "delete_customer" ] }, + "DeleteCustomerRepricingConfig": { + "methods": [ + "delete_customer_repricing_config" + ] + }, "GetChannelPartnerLink": { "methods": [ "get_channel_partner_link" ] }, + "GetChannelPartnerRepricingConfig": { + "methods": [ + "get_channel_partner_repricing_config" + ] + }, "GetCustomer": { "methods": [ "get_customer" ] }, + "GetCustomerRepricingConfig": { + "methods": [ + "get_customer_repricing_config" + ] + }, "GetEntitlement": { "methods": [ "get_entitlement" @@ -265,6 +345,16 @@ "list_channel_partner_links" ] }, + "ListChannelPartnerRepricingConfigs": { + "methods": [ + "list_channel_partner_repricing_configs" + ] + }, + "ListCustomerRepricingConfigs": { + "methods": [ + "list_customer_repricing_configs" + ] + }, "ListCustomers": { "methods": [ "list_customers" @@ -360,10 +450,20 @@ "update_channel_partner_link" ] }, + "UpdateChannelPartnerRepricingConfig": { + "methods": [ + "update_channel_partner_repricing_config" + ] + }, "UpdateCustomer": { "methods": [ "update_customer" ] + }, + "UpdateCustomerRepricingConfig": { + "methods": [ + "update_customer_repricing_config" + ] } } } 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 67a6a53..030c9fe 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 @@ -46,6 +46,7 @@ offers, operations, products, + repricing, service, ) @@ -91,8 +92,20 @@ class CloudChannelServiceAsyncClient: parse_channel_partner_link_path = staticmethod( CloudChannelServiceClient.parse_channel_partner_link_path ) + channel_partner_repricing_config_path = staticmethod( + CloudChannelServiceClient.channel_partner_repricing_config_path + ) + parse_channel_partner_repricing_config_path = staticmethod( + CloudChannelServiceClient.parse_channel_partner_repricing_config_path + ) customer_path = staticmethod(CloudChannelServiceClient.customer_path) parse_customer_path = staticmethod(CloudChannelServiceClient.parse_customer_path) + customer_repricing_config_path = staticmethod( + CloudChannelServiceClient.customer_repricing_config_path + ) + parse_customer_repricing_config_path = staticmethod( + CloudChannelServiceClient.parse_customer_repricing_config_path + ) entitlement_path = staticmethod(CloudChannelServiceClient.entitlement_path) parse_entitlement_path = staticmethod( CloudChannelServiceClient.parse_entitlement_path @@ -3042,6 +3055,1292 @@ def sample_update_channel_partner_link(): # Done; return the response. return response + async def get_customer_repricing_config( + self, + request: Union[service.GetCustomerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.CustomerRepricingConfig: + r"""Gets information about how a Reseller modifies their bill before + sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_get_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.GetCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_customer_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.GetCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.GetCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig]. + name (:class:`str`): + Required. The resource name of the + CustomerRepricingConfig. Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.CustomerRepricingConfig: + Configuration for how a reseller will + reprice a Customer. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.GetCustomerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.get_customer_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def list_customer_repricing_configs( + self, + request: Union[service.ListCustomerRepricingConfigsRequest, dict] = None, + *, + parent: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> pagers.ListCustomerRepricingConfigsAsyncPager: + r"""Lists information about how a Reseller modifies their bill + before sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - customer ID + - [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_list_customer_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.ListCustomerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_customer_repricing_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.ListCustomerRepricingConfigsRequest, dict]): + The request object. Request message for + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + parent (:class:`str`): + Required. The resource name of the customer. Parent uses + the format: + accounts/{account_id}/customers/{customer_id}. Supports + accounts/{account_id}/customers/- to retrieve configs + for all customers. + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsAsyncPager: + Response message for + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + + Iterating over this object will yield results and + resolve additional pages automatically. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.ListCustomerRepricingConfigsRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.list_customer_repricing_configs, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__aiter__` convenience method. + response = pagers.ListCustomerRepricingConfigsAsyncPager( + method=rpc, + request=request, + response=response, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def create_customer_repricing_config( + self, + request: Union[service.CreateCustomerRepricingConfigRequest, dict] = None, + *, + parent: str = None, + customer_repricing_config: repricing.CustomerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.CustomerRepricingConfig: + r"""Creates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_create_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateCustomerRepricingConfigRequest( + parent="parent_value", + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = client.create_customer_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.CreateCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig]. + parent (:class:`str`): + Required. The resource name of the customer that will + receive this repricing config. Parent uses the format: + accounts/{account_id}/customers/{customer_id} + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + customer_repricing_config (:class:`google.cloud.channel_v1.types.CustomerRepricingConfig`): + Required. The CustomerRepricingConfig + object to update. + + This corresponds to the ``customer_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.CustomerRepricingConfig: + Configuration for how a reseller will + reprice a Customer. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent, customer_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.CreateCustomerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if customer_repricing_config is not None: + request.customer_repricing_config = customer_repricing_config + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.create_customer_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def update_customer_repricing_config( + self, + request: Union[service.UpdateCustomerRepricingConfigRequest, dict] = None, + *, + customer_repricing_config: repricing.CustomerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.CustomerRepricingConfig: + r"""Updates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_update_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateCustomerRepricingConfigRequest( + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = client.update_customer_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.UpdateCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.UpdateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig]. + customer_repricing_config (:class:`google.cloud.channel_v1.types.CustomerRepricingConfig`): + Required. The CustomerRepricingConfig + object to update. + + This corresponds to the ``customer_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.CustomerRepricingConfig: + Configuration for how a reseller will + reprice a Customer. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([customer_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.UpdateCustomerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if customer_repricing_config is not None: + request.customer_repricing_config = customer_repricing_config + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.update_customer_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ( + "customer_repricing_config.name", + request.customer_repricing_config.name, + ), + ) + ), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def delete_customer_repricing_config( + self, + request: Union[service.DeleteCustomerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> None: + r"""Deletes the given + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + found for the name in the request. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_delete_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.DeleteCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_customer_repricing_config(request=request) + + Args: + request (Union[google.cloud.channel_v1.types.DeleteCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.DeleteCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig]. + name (:class:`str`): + Required. The resource name of the customer repricing + config rule to delete. Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.DeleteCustomerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.delete_customer_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + async def get_channel_partner_repricing_config( + self, + request: Union[service.GetChannelPartnerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.ChannelPartnerRepricingConfig: + r"""Gets information about how a Distributor modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_get_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.GetChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.GetChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.GetChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig] + name (:class:`str`): + Required. The resource name of the + ChannelPartnerRepricingConfig Format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.ChannelPartnerRepricingConfig: + Configuration for how a distributor + will rebill a channel partner (also + known as a distributor-authorized + reseller). + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.GetChannelPartnerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.get_channel_partner_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def list_channel_partner_repricing_configs( + self, + request: Union[service.ListChannelPartnerRepricingConfigsRequest, dict] = None, + *, + parent: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> pagers.ListChannelPartnerRepricingConfigsAsyncPager: + r"""Lists information about how a Reseller modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - channel partner ID + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_list_channel_partner_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.ListChannelPartnerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channel_partner_repricing_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsRequest, dict]): + The request object. Request message for + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs]. + parent (:class:`str`): + Required. The resource name of the account's + [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]. + Parent uses the format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. + Supports accounts/{account_id}/channelPartnerLinks/- to + retrieve configs for all channel partners. + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerRepricingConfigsAsyncPager: + Response message for + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs]. + + Iterating over this object will yield results and + resolve additional pages automatically. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.ListChannelPartnerRepricingConfigsRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.list_channel_partner_repricing_configs, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__aiter__` convenience method. + response = pagers.ListChannelPartnerRepricingConfigsAsyncPager( + method=rpc, + request=request, + response=response, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def create_channel_partner_repricing_config( + self, + request: Union[service.CreateChannelPartnerRepricingConfigRequest, dict] = None, + *, + parent: str = None, + channel_partner_repricing_config: repricing.ChannelPartnerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.ChannelPartnerRepricingConfig: + r"""Creates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any ChannelPartner or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_create_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateChannelPartnerRepricingConfigRequest( + parent="parent_value", + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = client.create_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.CreateChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig]. + parent (:class:`str`): + Required. The resource name of the ChannelPartner that + will receive the repricing config. Parent uses the + format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id} + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + channel_partner_repricing_config (:class:`google.cloud.channel_v1.types.ChannelPartnerRepricingConfig`): + Required. The + ChannelPartnerRepricingConfig object to + update. + + This corresponds to the ``channel_partner_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.ChannelPartnerRepricingConfig: + Configuration for how a distributor + will rebill a channel partner (also + known as a distributor-authorized + reseller). + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent, channel_partner_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.CreateChannelPartnerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if channel_partner_repricing_config is not None: + request.channel_partner_repricing_config = channel_partner_repricing_config + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.create_channel_partner_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def update_channel_partner_repricing_config( + self, + request: Union[service.UpdateChannelPartnerRepricingConfigRequest, dict] = None, + *, + channel_partner_repricing_config: repricing.ChannelPartnerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.ChannelPartnerRepricingConfig: + r"""Updates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_update_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateChannelPartnerRepricingConfigRequest( + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = client.update_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.UpdateChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.UpdateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig]. + channel_partner_repricing_config (:class:`google.cloud.channel_v1.types.ChannelPartnerRepricingConfig`): + Required. The + ChannelPartnerRepricingConfig object to + update. + + This corresponds to the ``channel_partner_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.ChannelPartnerRepricingConfig: + Configuration for how a distributor + will rebill a channel partner (also + known as a distributor-authorized + reseller). + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([channel_partner_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.UpdateChannelPartnerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if channel_partner_repricing_config is not None: + request.channel_partner_repricing_config = channel_partner_repricing_config + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.update_channel_partner_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ( + "channel_partner_repricing_config.name", + request.channel_partner_repricing_config.name, + ), + ) + ), + ) + + # Send the request. + response = await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + async def delete_channel_partner_repricing_config( + self, + request: Union[service.DeleteChannelPartnerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> None: + r"""Deletes the given + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + found for the name in the request. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_delete_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.DeleteChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_channel_partner_repricing_config(request=request) + + Args: + request (Union[google.cloud.channel_v1.types.DeleteChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + DeleteChannelPartnerRepricingConfig. + name (:class:`str`): + Required. The resource name of the + channel partner repricing config rule to + delete. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + request = service.DeleteChannelPartnerRepricingConfigRequest(request) + + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = gapic_v1.method_async.wrap_method( + self._client._transport.delete_channel_partner_repricing_config, + default_timeout=None, + client_info=DEFAULT_CLIENT_INFO, + ) + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + await rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + async def lookup_offer( self, request: Union[service.LookupOfferRequest, dict] = None, 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 6d7a1a7..74e027a 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/client.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/client.py @@ -49,6 +49,7 @@ offers, operations, products, + repricing, service, ) @@ -221,6 +222,28 @@ def parse_channel_partner_link_path(path: str) -> Dict[str, str]: ) return m.groupdict() if m else {} + @staticmethod + def channel_partner_repricing_config_path( + account: str, + channel_partner: str, + channel_partner_repricing_config: str, + ) -> str: + """Returns a fully-qualified channel_partner_repricing_config string.""" + return "accounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}".format( + account=account, + channel_partner=channel_partner, + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + @staticmethod + def parse_channel_partner_repricing_config_path(path: str) -> Dict[str, str]: + """Parses a channel_partner_repricing_config path into its component segments.""" + m = re.match( + r"^accounts/(?P.+?)/channelPartnerLinks/(?P.+?)/channelPartnerRepricingConfigs/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def customer_path( account: str, @@ -238,6 +261,28 @@ def parse_customer_path(path: str) -> Dict[str, str]: m = re.match(r"^accounts/(?P.+?)/customers/(?P.+?)$", path) return m.groupdict() if m else {} + @staticmethod + def customer_repricing_config_path( + account: str, + customer: str, + customer_repricing_config: str, + ) -> str: + """Returns a fully-qualified customer_repricing_config string.""" + return "accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}".format( + account=account, + customer=customer, + customer_repricing_config=customer_repricing_config, + ) + + @staticmethod + def parse_customer_repricing_config_path(path: str) -> Dict[str, str]: + """Parses a customer_repricing_config path into its component segments.""" + m = re.match( + r"^accounts/(?P.+?)/customers/(?P.+?)/customerRepricingConfigs/(?P.+?)$", + path, + ) + return m.groupdict() if m else {} + @staticmethod def entitlement_path( account: str, @@ -3371,6 +3416,1316 @@ def sample_update_channel_partner_link(): # Done; return the response. return response + def get_customer_repricing_config( + self, + request: Union[service.GetCustomerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.CustomerRepricingConfig: + r"""Gets information about how a Reseller modifies their bill before + sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_get_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.GetCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_customer_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.GetCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.GetCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig]. + name (str): + Required. The resource name of the + CustomerRepricingConfig. Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.CustomerRepricingConfig: + Configuration for how a reseller will + reprice a Customer. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.GetCustomerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.GetCustomerRepricingConfigRequest): + request = service.GetCustomerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.get_customer_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def list_customer_repricing_configs( + self, + request: Union[service.ListCustomerRepricingConfigsRequest, dict] = None, + *, + parent: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> pagers.ListCustomerRepricingConfigsPager: + r"""Lists information about how a Reseller modifies their bill + before sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - customer ID + - [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_list_customer_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.ListCustomerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_customer_repricing_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.ListCustomerRepricingConfigsRequest, dict]): + The request object. Request message for + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + parent (str): + Required. The resource name of the customer. Parent uses + the format: + accounts/{account_id}/customers/{customer_id}. Supports + accounts/{account_id}/customers/- to retrieve configs + for all customers. + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsPager: + Response message for + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + + Iterating over this object will yield results and + resolve additional pages automatically. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.ListCustomerRepricingConfigsRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.ListCustomerRepricingConfigsRequest): + request = service.ListCustomerRepricingConfigsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.list_customer_repricing_configs + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListCustomerRepricingConfigsPager( + method=rpc, + request=request, + response=response, + metadata=metadata, + ) + + # Done; return the response. + return response + + def create_customer_repricing_config( + self, + request: Union[service.CreateCustomerRepricingConfigRequest, dict] = None, + *, + parent: str = None, + customer_repricing_config: repricing.CustomerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.CustomerRepricingConfig: + r"""Creates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_create_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateCustomerRepricingConfigRequest( + parent="parent_value", + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = client.create_customer_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.CreateCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig]. + parent (str): + Required. The resource name of the customer that will + receive this repricing config. Parent uses the format: + accounts/{account_id}/customers/{customer_id} + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + customer_repricing_config (google.cloud.channel_v1.types.CustomerRepricingConfig): + Required. The CustomerRepricingConfig + object to update. + + This corresponds to the ``customer_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.CustomerRepricingConfig: + Configuration for how a reseller will + reprice a Customer. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent, customer_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.CreateCustomerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.CreateCustomerRepricingConfigRequest): + request = service.CreateCustomerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if customer_repricing_config is not None: + request.customer_repricing_config = customer_repricing_config + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.create_customer_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update_customer_repricing_config( + self, + request: Union[service.UpdateCustomerRepricingConfigRequest, dict] = None, + *, + customer_repricing_config: repricing.CustomerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.CustomerRepricingConfig: + r"""Updates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_update_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateCustomerRepricingConfigRequest( + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = client.update_customer_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.UpdateCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.UpdateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig]. + customer_repricing_config (google.cloud.channel_v1.types.CustomerRepricingConfig): + Required. The CustomerRepricingConfig + object to update. + + This corresponds to the ``customer_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.CustomerRepricingConfig: + Configuration for how a reseller will + reprice a Customer. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([customer_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.UpdateCustomerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.UpdateCustomerRepricingConfigRequest): + request = service.UpdateCustomerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if customer_repricing_config is not None: + request.customer_repricing_config = customer_repricing_config + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.update_customer_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ( + "customer_repricing_config.name", + request.customer_repricing_config.name, + ), + ) + ), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_customer_repricing_config( + self, + request: Union[service.DeleteCustomerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> None: + r"""Deletes the given + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + found for the name in the request. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_delete_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.DeleteCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_customer_repricing_config(request=request) + + Args: + request (Union[google.cloud.channel_v1.types.DeleteCustomerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.DeleteCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig]. + name (str): + Required. The resource name of the customer repricing + config rule to delete. Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.DeleteCustomerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.DeleteCustomerRepricingConfigRequest): + request = service.DeleteCustomerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.delete_customer_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + def get_channel_partner_repricing_config( + self, + request: Union[service.GetChannelPartnerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.ChannelPartnerRepricingConfig: + r"""Gets information about how a Distributor modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_get_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.GetChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.GetChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.GetChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig] + name (str): + Required. The resource name of the + ChannelPartnerRepricingConfig Format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.ChannelPartnerRepricingConfig: + Configuration for how a distributor + will rebill a channel partner (also + known as a distributor-authorized + reseller). + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.GetChannelPartnerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.GetChannelPartnerRepricingConfigRequest): + request = service.GetChannelPartnerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.get_channel_partner_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def list_channel_partner_repricing_configs( + self, + request: Union[service.ListChannelPartnerRepricingConfigsRequest, dict] = None, + *, + parent: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> pagers.ListChannelPartnerRepricingConfigsPager: + r"""Lists information about how a Reseller modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - channel partner ID + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_list_channel_partner_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.ListChannelPartnerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channel_partner_repricing_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsRequest, dict]): + The request object. Request message for + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs]. + parent (str): + Required. The resource name of the account's + [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]. + Parent uses the format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. + Supports accounts/{account_id}/channelPartnerLinks/- to + retrieve configs for all channel partners. + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerRepricingConfigsPager: + Response message for + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs]. + + Iterating over this object will yield results and + resolve additional pages automatically. + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.ListChannelPartnerRepricingConfigsRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.ListChannelPartnerRepricingConfigsRequest): + request = service.ListChannelPartnerRepricingConfigsRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.list_channel_partner_repricing_configs + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # This method is paged; wrap the response in a pager, which provides + # an `__iter__` convenience method. + response = pagers.ListChannelPartnerRepricingConfigsPager( + method=rpc, + request=request, + response=response, + metadata=metadata, + ) + + # Done; return the response. + return response + + def create_channel_partner_repricing_config( + self, + request: Union[service.CreateChannelPartnerRepricingConfigRequest, dict] = None, + *, + parent: str = None, + channel_partner_repricing_config: repricing.ChannelPartnerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.ChannelPartnerRepricingConfig: + r"""Creates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any ChannelPartner or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_create_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateChannelPartnerRepricingConfigRequest( + parent="parent_value", + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = client.create_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.CreateChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig]. + parent (str): + Required. The resource name of the ChannelPartner that + will receive the repricing config. Parent uses the + format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id} + + This corresponds to the ``parent`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + channel_partner_repricing_config (google.cloud.channel_v1.types.ChannelPartnerRepricingConfig): + Required. The + ChannelPartnerRepricingConfig object to + update. + + This corresponds to the ``channel_partner_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.ChannelPartnerRepricingConfig: + Configuration for how a distributor + will rebill a channel partner (also + known as a distributor-authorized + reseller). + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([parent, channel_partner_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.CreateChannelPartnerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.CreateChannelPartnerRepricingConfigRequest): + request = service.CreateChannelPartnerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if parent is not None: + request.parent = parent + if channel_partner_repricing_config is not None: + request.channel_partner_repricing_config = ( + channel_partner_repricing_config + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.create_channel_partner_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def update_channel_partner_repricing_config( + self, + request: Union[service.UpdateChannelPartnerRepricingConfigRequest, dict] = None, + *, + channel_partner_repricing_config: repricing.ChannelPartnerRepricingConfig = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> repricing.ChannelPartnerRepricingConfig: + r"""Updates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_update_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateChannelPartnerRepricingConfigRequest( + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = client.update_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + + Args: + request (Union[google.cloud.channel_v1.types.UpdateChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + [CloudChannelService.UpdateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig]. + channel_partner_repricing_config (google.cloud.channel_v1.types.ChannelPartnerRepricingConfig): + Required. The + ChannelPartnerRepricingConfig object to + update. + + This corresponds to the ``channel_partner_repricing_config`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + + Returns: + google.cloud.channel_v1.types.ChannelPartnerRepricingConfig: + Configuration for how a distributor + will rebill a channel partner (also + known as a distributor-authorized + reseller). + + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([channel_partner_repricing_config]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.UpdateChannelPartnerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.UpdateChannelPartnerRepricingConfigRequest): + request = service.UpdateChannelPartnerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if channel_partner_repricing_config is not None: + request.channel_partner_repricing_config = ( + channel_partner_repricing_config + ) + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.update_channel_partner_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata( + ( + ( + "channel_partner_repricing_config.name", + request.channel_partner_repricing_config.name, + ), + ) + ), + ) + + # Send the request. + response = rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + + # Done; return the response. + return response + + def delete_channel_partner_repricing_config( + self, + request: Union[service.DeleteChannelPartnerRepricingConfigRequest, dict] = None, + *, + name: str = None, + retry: OptionalRetry = gapic_v1.method.DEFAULT, + timeout: float = None, + metadata: Sequence[Tuple[str, str]] = (), + ) -> None: + r"""Deletes the given + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + found for the name in the request. + + .. code-block:: python + + from google.cloud import channel_v1 + + def sample_delete_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.DeleteChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_channel_partner_repricing_config(request=request) + + Args: + request (Union[google.cloud.channel_v1.types.DeleteChannelPartnerRepricingConfigRequest, dict]): + The request object. Request message for + DeleteChannelPartnerRepricingConfig. + name (str): + Required. The resource name of the + channel partner repricing config rule to + delete. + + This corresponds to the ``name`` field + on the ``request`` instance; if ``request`` is provided, this + should not be set. + retry (google.api_core.retry.Retry): Designation of what errors, if any, + should be retried. + timeout (float): The timeout for this request. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + # Create or coerce a protobuf request object. + # Quick check: If we got a request object, we should *not* have + # gotten any keyword arguments that map to the request. + has_flattened_params = any([name]) + if request is not None and has_flattened_params: + raise ValueError( + "If the `request` argument is set, then none of " + "the individual field arguments should be set." + ) + + # Minor optimization to avoid making a copy if the user passes + # in a service.DeleteChannelPartnerRepricingConfigRequest. + # There's no risk of modifying the input as we've already verified + # there are no flattened fields. + if not isinstance(request, service.DeleteChannelPartnerRepricingConfigRequest): + request = service.DeleteChannelPartnerRepricingConfigRequest(request) + # If we have keyword arguments corresponding to fields on the + # request, apply these. + if name is not None: + request.name = name + + # Wrap the RPC method; this adds retry and timeout information, + # and friendly error handling. + rpc = self._transport._wrapped_methods[ + self._transport.delete_channel_partner_repricing_config + ] + + # Certain fields should be provided within the metadata header; + # add these here. + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), + ) + + # Send the request. + rpc( + request, + retry=retry, + timeout=timeout, + metadata=metadata, + ) + def lookup_offer( self, request: Union[service.LookupOfferRequest, dict] = None, diff --git a/google/cloud/channel_v1/services/cloud_channel_service/pagers.py b/google/cloud/channel_v1/services/cloud_channel_service/pagers.py index bf82506..749b0ef 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/pagers.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/pagers.py @@ -30,6 +30,7 @@ entitlements, offers, products, + repricing, service, ) @@ -674,6 +675,268 @@ def __repr__(self) -> str: return "{0}<{1!r}>".format(self.__class__.__name__, self._response) +class ListCustomerRepricingConfigsPager: + """A pager for iterating through ``list_customer_repricing_configs`` requests. + + This class thinly wraps an initial + :class:`google.cloud.channel_v1.types.ListCustomerRepricingConfigsResponse` object, and + provides an ``__iter__`` method to iterate through its + ``customer_repricing_configs`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``ListCustomerRepricingConfigs`` requests and continue to iterate + through the ``customer_repricing_configs`` field on the + corresponding responses. + + All the usual :class:`google.cloud.channel_v1.types.ListCustomerRepricingConfigsResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., service.ListCustomerRepricingConfigsResponse], + request: service.ListCustomerRepricingConfigsRequest, + response: service.ListCustomerRepricingConfigsResponse, + *, + metadata: Sequence[Tuple[str, str]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.channel_v1.types.ListCustomerRepricingConfigsRequest): + The initial request object. + response (google.cloud.channel_v1.types.ListCustomerRepricingConfigsResponse): + The initial response object. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + self._method = method + self._request = service.ListCustomerRepricingConfigsRequest(request) + self._response = response + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[service.ListCustomerRepricingConfigsResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method(self._request, metadata=self._metadata) + yield self._response + + def __iter__(self) -> Iterator[repricing.CustomerRepricingConfig]: + for page in self.pages: + yield from page.customer_repricing_configs + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListCustomerRepricingConfigsAsyncPager: + """A pager for iterating through ``list_customer_repricing_configs`` requests. + + This class thinly wraps an initial + :class:`google.cloud.channel_v1.types.ListCustomerRepricingConfigsResponse` object, and + provides an ``__aiter__`` method to iterate through its + ``customer_repricing_configs`` field. + + If there are more pages, the ``__aiter__`` method will make additional + ``ListCustomerRepricingConfigs`` requests and continue to iterate + through the ``customer_repricing_configs`` field on the + corresponding responses. + + All the usual :class:`google.cloud.channel_v1.types.ListCustomerRepricingConfigsResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., Awaitable[service.ListCustomerRepricingConfigsResponse]], + request: service.ListCustomerRepricingConfigsRequest, + response: service.ListCustomerRepricingConfigsResponse, + *, + metadata: Sequence[Tuple[str, str]] = () + ): + """Instantiates the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.channel_v1.types.ListCustomerRepricingConfigsRequest): + The initial request object. + response (google.cloud.channel_v1.types.ListCustomerRepricingConfigsResponse): + The initial response object. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + self._method = method + self._request = service.ListCustomerRepricingConfigsRequest(request) + self._response = response + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + async def pages( + self, + ) -> AsyncIterator[service.ListCustomerRepricingConfigsResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = await self._method(self._request, metadata=self._metadata) + yield self._response + + def __aiter__(self) -> AsyncIterator[repricing.CustomerRepricingConfig]: + async def async_generator(): + async for page in self.pages: + for response in page.customer_repricing_configs: + yield response + + return async_generator() + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListChannelPartnerRepricingConfigsPager: + """A pager for iterating through ``list_channel_partner_repricing_configs`` requests. + + This class thinly wraps an initial + :class:`google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsResponse` object, and + provides an ``__iter__`` method to iterate through its + ``channel_partner_repricing_configs`` field. + + If there are more pages, the ``__iter__`` method will make additional + ``ListChannelPartnerRepricingConfigs`` requests and continue to iterate + through the ``channel_partner_repricing_configs`` field on the + corresponding responses. + + All the usual :class:`google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[..., service.ListChannelPartnerRepricingConfigsResponse], + request: service.ListChannelPartnerRepricingConfigsRequest, + response: service.ListChannelPartnerRepricingConfigsResponse, + *, + metadata: Sequence[Tuple[str, str]] = () + ): + """Instantiate the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsRequest): + The initial request object. + response (google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsResponse): + The initial response object. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + self._method = method + self._request = service.ListChannelPartnerRepricingConfigsRequest(request) + self._response = response + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + def pages(self) -> Iterator[service.ListChannelPartnerRepricingConfigsResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = self._method(self._request, metadata=self._metadata) + yield self._response + + def __iter__(self) -> Iterator[repricing.ChannelPartnerRepricingConfig]: + for page in self.pages: + yield from page.channel_partner_repricing_configs + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + +class ListChannelPartnerRepricingConfigsAsyncPager: + """A pager for iterating through ``list_channel_partner_repricing_configs`` requests. + + This class thinly wraps an initial + :class:`google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsResponse` object, and + provides an ``__aiter__`` method to iterate through its + ``channel_partner_repricing_configs`` field. + + If there are more pages, the ``__aiter__`` method will make additional + ``ListChannelPartnerRepricingConfigs`` requests and continue to iterate + through the ``channel_partner_repricing_configs`` field on the + corresponding responses. + + All the usual :class:`google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsResponse` + attributes are available on the pager. If multiple requests are made, only + the most recent response is retained, and thus used for attribute lookup. + """ + + def __init__( + self, + method: Callable[ + ..., Awaitable[service.ListChannelPartnerRepricingConfigsResponse] + ], + request: service.ListChannelPartnerRepricingConfigsRequest, + response: service.ListChannelPartnerRepricingConfigsResponse, + *, + metadata: Sequence[Tuple[str, str]] = () + ): + """Instantiates the pager. + + Args: + method (Callable): The method that was originally called, and + which instantiated this pager. + request (google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsRequest): + The initial request object. + response (google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsResponse): + The initial response object. + metadata (Sequence[Tuple[str, str]]): Strings which should be + sent along with the request as metadata. + """ + self._method = method + self._request = service.ListChannelPartnerRepricingConfigsRequest(request) + self._response = response + self._metadata = metadata + + def __getattr__(self, name: str) -> Any: + return getattr(self._response, name) + + @property + async def pages( + self, + ) -> AsyncIterator[service.ListChannelPartnerRepricingConfigsResponse]: + yield self._response + while self._response.next_page_token: + self._request.page_token = self._response.next_page_token + self._response = await self._method(self._request, metadata=self._metadata) + yield self._response + + def __aiter__(self) -> AsyncIterator[repricing.ChannelPartnerRepricingConfig]: + async def async_generator(): + async for page in self.pages: + for response in page.channel_partner_repricing_configs: + yield response + + return async_generator() + + def __repr__(self) -> str: + return "{0}<{1!r}>".format(self.__class__.__name__, self._response) + + class ListProductsPager: """A pager for iterating through ``list_products`` requests. diff --git a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py index 499b49f..24fcfb0 100644 --- a/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py +++ b/google/cloud/channel_v1/services/cloud_channel_service/transports/base.py @@ -32,6 +32,7 @@ customers, entitlements, offers, + repricing, service, ) @@ -259,6 +260,56 @@ def _prep_wrapped_messages(self, client_info): default_timeout=None, client_info=client_info, ), + self.get_customer_repricing_config: gapic_v1.method.wrap_method( + self.get_customer_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.list_customer_repricing_configs: gapic_v1.method.wrap_method( + self.list_customer_repricing_configs, + default_timeout=None, + client_info=client_info, + ), + self.create_customer_repricing_config: gapic_v1.method.wrap_method( + self.create_customer_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.update_customer_repricing_config: gapic_v1.method.wrap_method( + self.update_customer_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.delete_customer_repricing_config: gapic_v1.method.wrap_method( + self.delete_customer_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.get_channel_partner_repricing_config: gapic_v1.method.wrap_method( + self.get_channel_partner_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.list_channel_partner_repricing_configs: gapic_v1.method.wrap_method( + self.list_channel_partner_repricing_configs, + default_timeout=None, + client_info=client_info, + ), + self.create_channel_partner_repricing_config: gapic_v1.method.wrap_method( + self.create_channel_partner_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.update_channel_partner_repricing_config: gapic_v1.method.wrap_method( + self.update_channel_partner_repricing_config, + default_timeout=None, + client_info=client_info, + ), + self.delete_channel_partner_repricing_config: gapic_v1.method.wrap_method( + self.delete_channel_partner_repricing_config, + default_timeout=None, + client_info=client_info, + ), self.lookup_offer: gapic_v1.method.wrap_method( self.lookup_offer, default_timeout=None, @@ -578,6 +629,120 @@ def update_channel_partner_link( ]: raise NotImplementedError() + @property + def get_customer_repricing_config( + self, + ) -> Callable[ + [service.GetCustomerRepricingConfigRequest], + Union[ + repricing.CustomerRepricingConfig, + Awaitable[repricing.CustomerRepricingConfig], + ], + ]: + raise NotImplementedError() + + @property + def list_customer_repricing_configs( + self, + ) -> Callable[ + [service.ListCustomerRepricingConfigsRequest], + Union[ + service.ListCustomerRepricingConfigsResponse, + Awaitable[service.ListCustomerRepricingConfigsResponse], + ], + ]: + raise NotImplementedError() + + @property + def create_customer_repricing_config( + self, + ) -> Callable[ + [service.CreateCustomerRepricingConfigRequest], + Union[ + repricing.CustomerRepricingConfig, + Awaitable[repricing.CustomerRepricingConfig], + ], + ]: + raise NotImplementedError() + + @property + def update_customer_repricing_config( + self, + ) -> Callable[ + [service.UpdateCustomerRepricingConfigRequest], + Union[ + repricing.CustomerRepricingConfig, + Awaitable[repricing.CustomerRepricingConfig], + ], + ]: + raise NotImplementedError() + + @property + def delete_customer_repricing_config( + self, + ) -> Callable[ + [service.DeleteCustomerRepricingConfigRequest], + Union[empty_pb2.Empty, Awaitable[empty_pb2.Empty]], + ]: + raise NotImplementedError() + + @property + def get_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.GetChannelPartnerRepricingConfigRequest], + Union[ + repricing.ChannelPartnerRepricingConfig, + Awaitable[repricing.ChannelPartnerRepricingConfig], + ], + ]: + raise NotImplementedError() + + @property + def list_channel_partner_repricing_configs( + self, + ) -> Callable[ + [service.ListChannelPartnerRepricingConfigsRequest], + Union[ + service.ListChannelPartnerRepricingConfigsResponse, + Awaitable[service.ListChannelPartnerRepricingConfigsResponse], + ], + ]: + raise NotImplementedError() + + @property + def create_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.CreateChannelPartnerRepricingConfigRequest], + Union[ + repricing.ChannelPartnerRepricingConfig, + Awaitable[repricing.ChannelPartnerRepricingConfig], + ], + ]: + raise NotImplementedError() + + @property + def update_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.UpdateChannelPartnerRepricingConfigRequest], + Union[ + repricing.ChannelPartnerRepricingConfig, + Awaitable[repricing.ChannelPartnerRepricingConfig], + ], + ]: + raise NotImplementedError() + + @property + def delete_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.DeleteChannelPartnerRepricingConfigRequest], + Union[empty_pb2.Empty, Awaitable[empty_pb2.Empty]], + ]: + raise NotImplementedError() + @property def lookup_offer( self, 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 68352ab..96ceb45 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 @@ -29,6 +29,7 @@ customers, entitlements, offers, + repricing, service, ) @@ -1526,6 +1527,584 @@ def update_channel_partner_link( ) return self._stubs["update_channel_partner_link"] + @property + def get_customer_repricing_config( + self, + ) -> Callable[ + [service.GetCustomerRepricingConfigRequest], repricing.CustomerRepricingConfig + ]: + r"""Return a callable for the get customer repricing config method over gRPC. + + Gets information about how a Reseller modifies their bill before + sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.GetCustomerRepricingConfigRequest], + ~.CustomerRepricingConfig]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "get_customer_repricing_config" not in self._stubs: + self._stubs[ + "get_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/GetCustomerRepricingConfig", + request_serializer=service.GetCustomerRepricingConfigRequest.serialize, + response_deserializer=repricing.CustomerRepricingConfig.deserialize, + ) + return self._stubs["get_customer_repricing_config"] + + @property + def list_customer_repricing_configs( + self, + ) -> Callable[ + [service.ListCustomerRepricingConfigsRequest], + service.ListCustomerRepricingConfigsResponse, + ]: + r"""Return a callable for the list customer repricing + configs method over gRPC. + + Lists information about how a Reseller modifies their bill + before sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - customer ID + - [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + Returns: + Callable[[~.ListCustomerRepricingConfigsRequest], + ~.ListCustomerRepricingConfigsResponse]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "list_customer_repricing_configs" not in self._stubs: + self._stubs[ + "list_customer_repricing_configs" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/ListCustomerRepricingConfigs", + request_serializer=service.ListCustomerRepricingConfigsRequest.serialize, + response_deserializer=service.ListCustomerRepricingConfigsResponse.deserialize, + ) + return self._stubs["list_customer_repricing_configs"] + + @property + def create_customer_repricing_config( + self, + ) -> Callable[ + [service.CreateCustomerRepricingConfigRequest], + repricing.CustomerRepricingConfig, + ]: + r"""Return a callable for the create customer repricing + config method over gRPC. + + Creates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.CreateCustomerRepricingConfigRequest], + ~.CustomerRepricingConfig]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_customer_repricing_config" not in self._stubs: + self._stubs[ + "create_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/CreateCustomerRepricingConfig", + request_serializer=service.CreateCustomerRepricingConfigRequest.serialize, + response_deserializer=repricing.CustomerRepricingConfig.deserialize, + ) + return self._stubs["create_customer_repricing_config"] + + @property + def update_customer_repricing_config( + self, + ) -> Callable[ + [service.UpdateCustomerRepricingConfigRequest], + repricing.CustomerRepricingConfig, + ]: + r"""Return a callable for the update customer repricing + config method over gRPC. + + Updates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.UpdateCustomerRepricingConfigRequest], + ~.CustomerRepricingConfig]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "update_customer_repricing_config" not in self._stubs: + self._stubs[ + "update_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/UpdateCustomerRepricingConfig", + request_serializer=service.UpdateCustomerRepricingConfigRequest.serialize, + response_deserializer=repricing.CustomerRepricingConfig.deserialize, + ) + return self._stubs["update_customer_repricing_config"] + + @property + def delete_customer_repricing_config( + self, + ) -> Callable[[service.DeleteCustomerRepricingConfigRequest], empty_pb2.Empty]: + r"""Return a callable for the delete customer repricing + config method over gRPC. + + Deletes the given + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + found for the name in the request. + + Returns: + Callable[[~.DeleteCustomerRepricingConfigRequest], + ~.Empty]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "delete_customer_repricing_config" not in self._stubs: + self._stubs[ + "delete_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/DeleteCustomerRepricingConfig", + request_serializer=service.DeleteCustomerRepricingConfigRequest.serialize, + response_deserializer=empty_pb2.Empty.FromString, + ) + return self._stubs["delete_customer_repricing_config"] + + @property + def get_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.GetChannelPartnerRepricingConfigRequest], + repricing.ChannelPartnerRepricingConfig, + ]: + r"""Return a callable for the get channel partner repricing + config method over gRPC. + + Gets information about how a Distributor modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.GetChannelPartnerRepricingConfigRequest], + ~.ChannelPartnerRepricingConfig]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "get_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "get_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/GetChannelPartnerRepricingConfig", + request_serializer=service.GetChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=repricing.ChannelPartnerRepricingConfig.deserialize, + ) + return self._stubs["get_channel_partner_repricing_config"] + + @property + def list_channel_partner_repricing_configs( + self, + ) -> Callable[ + [service.ListChannelPartnerRepricingConfigsRequest], + service.ListChannelPartnerRepricingConfigsResponse, + ]: + r"""Return a callable for the list channel partner repricing + configs method over gRPC. + + Lists information about how a Reseller modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - channel partner ID + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + Returns: + Callable[[~.ListChannelPartnerRepricingConfigsRequest], + ~.ListChannelPartnerRepricingConfigsResponse]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "list_channel_partner_repricing_configs" not in self._stubs: + self._stubs[ + "list_channel_partner_repricing_configs" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/ListChannelPartnerRepricingConfigs", + request_serializer=service.ListChannelPartnerRepricingConfigsRequest.serialize, + response_deserializer=service.ListChannelPartnerRepricingConfigsResponse.deserialize, + ) + return self._stubs["list_channel_partner_repricing_configs"] + + @property + def create_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.CreateChannelPartnerRepricingConfigRequest], + repricing.ChannelPartnerRepricingConfig, + ]: + r"""Return a callable for the create channel partner + repricing config method over gRPC. + + Creates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any ChannelPartner or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.CreateChannelPartnerRepricingConfigRequest], + ~.ChannelPartnerRepricingConfig]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "create_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/CreateChannelPartnerRepricingConfig", + request_serializer=service.CreateChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=repricing.ChannelPartnerRepricingConfig.deserialize, + ) + return self._stubs["create_channel_partner_repricing_config"] + + @property + def update_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.UpdateChannelPartnerRepricingConfigRequest], + repricing.ChannelPartnerRepricingConfig, + ]: + r"""Return a callable for the update channel partner + repricing config method over gRPC. + + Updates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.UpdateChannelPartnerRepricingConfigRequest], + ~.ChannelPartnerRepricingConfig]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "update_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "update_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/UpdateChannelPartnerRepricingConfig", + request_serializer=service.UpdateChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=repricing.ChannelPartnerRepricingConfig.deserialize, + ) + return self._stubs["update_channel_partner_repricing_config"] + + @property + def delete_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.DeleteChannelPartnerRepricingConfigRequest], empty_pb2.Empty + ]: + r"""Return a callable for the delete channel partner + repricing config method over gRPC. + + Deletes the given + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + found for the name in the request. + + Returns: + Callable[[~.DeleteChannelPartnerRepricingConfigRequest], + ~.Empty]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "delete_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "delete_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/DeleteChannelPartnerRepricingConfig", + request_serializer=service.DeleteChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=empty_pb2.Empty.FromString, + ) + return self._stubs["delete_channel_partner_repricing_config"] + @property def lookup_offer(self) -> Callable[[service.LookupOfferRequest], offers.Offer]: r"""Return a callable for the lookup offer method over gRPC. 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 064bc3d..9ae59cd 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 @@ -29,6 +29,7 @@ customers, entitlements, offers, + repricing, service, ) @@ -1557,6 +1558,587 @@ def update_channel_partner_link( ) return self._stubs["update_channel_partner_link"] + @property + def get_customer_repricing_config( + self, + ) -> Callable[ + [service.GetCustomerRepricingConfigRequest], + Awaitable[repricing.CustomerRepricingConfig], + ]: + r"""Return a callable for the get customer repricing config method over gRPC. + + Gets information about how a Reseller modifies their bill before + sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.GetCustomerRepricingConfigRequest], + Awaitable[~.CustomerRepricingConfig]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "get_customer_repricing_config" not in self._stubs: + self._stubs[ + "get_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/GetCustomerRepricingConfig", + request_serializer=service.GetCustomerRepricingConfigRequest.serialize, + response_deserializer=repricing.CustomerRepricingConfig.deserialize, + ) + return self._stubs["get_customer_repricing_config"] + + @property + def list_customer_repricing_configs( + self, + ) -> Callable[ + [service.ListCustomerRepricingConfigsRequest], + Awaitable[service.ListCustomerRepricingConfigsResponse], + ]: + r"""Return a callable for the list customer repricing + configs method over gRPC. + + Lists information about how a Reseller modifies their bill + before sending it to a Customer. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - customer ID + - [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + Returns: + Callable[[~.ListCustomerRepricingConfigsRequest], + Awaitable[~.ListCustomerRepricingConfigsResponse]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "list_customer_repricing_configs" not in self._stubs: + self._stubs[ + "list_customer_repricing_configs" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/ListCustomerRepricingConfigs", + request_serializer=service.ListCustomerRepricingConfigsRequest.serialize, + response_deserializer=service.ListCustomerRepricingConfigsResponse.deserialize, + ) + return self._stubs["list_customer_repricing_configs"] + + @property + def create_customer_repricing_config( + self, + ) -> Callable[ + [service.CreateCustomerRepricingConfigRequest], + Awaitable[repricing.CustomerRepricingConfig], + ]: + r"""Return a callable for the create customer repricing + config method over gRPC. + + Creates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] + or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a + [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.CreateCustomerRepricingConfigRequest], + Awaitable[~.CustomerRepricingConfig]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_customer_repricing_config" not in self._stubs: + self._stubs[ + "create_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/CreateCustomerRepricingConfig", + request_serializer=service.CreateCustomerRepricingConfigRequest.serialize, + response_deserializer=repricing.CustomerRepricingConfig.deserialize, + ) + return self._stubs["create_customer_repricing_config"] + + @property + def update_customer_repricing_config( + self, + ) -> Callable[ + [service.UpdateCustomerRepricingConfigRequest], + Awaitable[repricing.CustomerRepricingConfig], + ]: + r"""Return a callable for the update customer repricing + config method over gRPC. + + Updates a CustomerRepricingConfig. Call this method to set + modifications for a specific customer's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.UpdateCustomerRepricingConfigRequest], + Awaitable[~.CustomerRepricingConfig]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "update_customer_repricing_config" not in self._stubs: + self._stubs[ + "update_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/UpdateCustomerRepricingConfig", + request_serializer=service.UpdateCustomerRepricingConfigRequest.serialize, + response_deserializer=repricing.CustomerRepricingConfig.deserialize, + ) + return self._stubs["update_customer_repricing_config"] + + @property + def delete_customer_repricing_config( + self, + ) -> Callable[ + [service.DeleteCustomerRepricingConfigRequest], Awaitable[empty_pb2.Empty] + ]: + r"""Return a callable for the delete customer repricing + config method over gRPC. + + Deletes the given + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] + found for the name in the request. + + Returns: + Callable[[~.DeleteCustomerRepricingConfigRequest], + Awaitable[~.Empty]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "delete_customer_repricing_config" not in self._stubs: + self._stubs[ + "delete_customer_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/DeleteCustomerRepricingConfig", + request_serializer=service.DeleteCustomerRepricingConfigRequest.serialize, + response_deserializer=empty_pb2.Empty.FromString, + ) + return self._stubs["delete_customer_repricing_config"] + + @property + def get_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.GetChannelPartnerRepricingConfigRequest], + Awaitable[repricing.ChannelPartnerRepricingConfig], + ]: + r"""Return a callable for the get channel partner repricing + config method over gRPC. + + Gets information about how a Distributor modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + was not found. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.GetChannelPartnerRepricingConfigRequest], + Awaitable[~.ChannelPartnerRepricingConfig]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "get_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "get_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/GetChannelPartnerRepricingConfig", + request_serializer=service.GetChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=repricing.ChannelPartnerRepricingConfig.deserialize, + ) + return self._stubs["get_channel_partner_repricing_config"] + + @property + def list_channel_partner_repricing_configs( + self, + ) -> Callable[ + [service.ListChannelPartnerRepricingConfigsRequest], + Awaitable[service.ListChannelPartnerRepricingConfigsResponse], + ]: + r"""Return a callable for the list channel partner repricing + configs method over gRPC. + + Lists information about how a Reseller modifies their bill + before sending it to a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resources. The data for each resource is displayed in the + ascending order of: + + - channel partner ID + - [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + - [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] + + If unsuccessful, returns an error. + + Returns: + Callable[[~.ListChannelPartnerRepricingConfigsRequest], + Awaitable[~.ListChannelPartnerRepricingConfigsResponse]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "list_channel_partner_repricing_configs" not in self._stubs: + self._stubs[ + "list_channel_partner_repricing_configs" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/ListChannelPartnerRepricingConfigs", + request_serializer=service.ListChannelPartnerRepricingConfigsRequest.serialize, + response_deserializer=service.ListChannelPartnerRepricingConfigsResponse.deserialize, + ) + return self._stubs["list_channel_partner_repricing_configs"] + + @property + def create_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.CreateChannelPartnerRepricingConfigRequest], + Awaitable[repricing.ChannelPartnerRepricingConfig], + ]: + r"""Return a callable for the create channel partner + repricing config method over gRPC. + + Creates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. You can only + create configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. If needed, you can create a config for the + current month, with some restrictions. + + When creating a config for a future month, make sure there are + no existing configs for that + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + The following restrictions are for creating configs in the + current month. + + - This functionality is reserved for recovering from an + erroneous config, and should not be used for regular business + cases. + - The new config will not modify exports used with other + configs. Changes to the config may be immediate, but may take + up to 24 hours. + - There is a limit of ten configs for any ChannelPartner or + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + - The contained + [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config] + vaule must be different from the value used in the current + config for a ChannelPartner. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.CreateChannelPartnerRepricingConfigRequest], + Awaitable[~.ChannelPartnerRepricingConfig]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "create_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/CreateChannelPartnerRepricingConfig", + request_serializer=service.CreateChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=repricing.ChannelPartnerRepricingConfig.deserialize, + ) + return self._stubs["create_channel_partner_repricing_config"] + + @property + def update_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.UpdateChannelPartnerRepricingConfigRequest], + Awaitable[repricing.ChannelPartnerRepricingConfig], + ]: + r"""Return a callable for the update channel partner + repricing config method over gRPC. + + Updates a ChannelPartnerRepricingConfig. Call this method to set + modifications for a specific ChannelPartner's bill. This method + overwrites the existing CustomerRepricingConfig. + + You can only update configs if the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is a future month. To make changes to configs for the current + month, use + [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig], + taking note of its restrictions. You cannot update the + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]. + + When updating a config in the future: + + - This config must already exist. + + Possible Error Codes: + + - PERMISSION_DENIED: If the account making the request and the + account being queried are different. + - INVALID_ARGUMENT: Missing or invalid required parameters in + the request. Also displays if the updated config is for the + current month or past months. + - NOT_FOUND: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + specified does not exist or is not associated with the given + account. + - INTERNAL: Any non-user error related to technical issues in + the backend. In this case, contact Cloud Channel support. + + Return Value: If successful, the updated + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + resource, otherwise returns an error. + + Returns: + Callable[[~.UpdateChannelPartnerRepricingConfigRequest], + Awaitable[~.ChannelPartnerRepricingConfig]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "update_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "update_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/UpdateChannelPartnerRepricingConfig", + request_serializer=service.UpdateChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=repricing.ChannelPartnerRepricingConfig.deserialize, + ) + return self._stubs["update_channel_partner_repricing_config"] + + @property + def delete_channel_partner_repricing_config( + self, + ) -> Callable[ + [service.DeleteChannelPartnerRepricingConfigRequest], Awaitable[empty_pb2.Empty] + ]: + r"""Return a callable for the delete channel partner + repricing config method over gRPC. + + Deletes the given + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + permanently. You can only delete configs if their + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + is set to a date after the current month. + + Possible error codes: + + - PERMISSION_DENIED: The account making the request does not + own this customer. + - INVALID_ARGUMENT: Required request parameters are missing or + invalid. + - FAILED_PRECONDITION: The + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + is active or in the past. + - NOT_FOUND: No + [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] + found for the name in the request. + + Returns: + Callable[[~.DeleteChannelPartnerRepricingConfigRequest], + Awaitable[~.Empty]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "delete_channel_partner_repricing_config" not in self._stubs: + self._stubs[ + "delete_channel_partner_repricing_config" + ] = self.grpc_channel.unary_unary( + "/google.cloud.channel.v1.CloudChannelService/DeleteChannelPartnerRepricingConfig", + request_serializer=service.DeleteChannelPartnerRepricingConfigRequest.serialize, + response_deserializer=empty_pb2.Empty.FromString, + ) + return self._stubs["delete_channel_partner_repricing_config"] + @property def lookup_offer( self, diff --git a/google/cloud/channel_v1/types/__init__.py b/google/cloud/channel_v1/types/__init__.py index 2fcd4e2..bdaddfc 100644 --- a/google/cloud/channel_v1/types/__init__.py +++ b/google/cloud/channel_v1/types/__init__.py @@ -50,6 +50,14 @@ ) from .operations import OperationMetadata from .products import MarketingInfo, Media, MediaType, Product, Sku +from .repricing import ( + ChannelPartnerRepricingConfig, + CustomerRepricingConfig, + PercentageAdjustment, + RebillingBasis, + RepricingAdjustment, + RepricingConfig, +) from .service import ( ActivateEntitlementRequest, CancelEntitlementRequest, @@ -60,15 +68,25 @@ CheckCloudIdentityAccountsExistResponse, CloudIdentityCustomerAccount, CreateChannelPartnerLinkRequest, + CreateChannelPartnerRepricingConfigRequest, + CreateCustomerRepricingConfigRequest, CreateCustomerRequest, CreateEntitlementRequest, + DeleteChannelPartnerRepricingConfigRequest, + DeleteCustomerRepricingConfigRequest, DeleteCustomerRequest, GetChannelPartnerLinkRequest, + GetChannelPartnerRepricingConfigRequest, + GetCustomerRepricingConfigRequest, GetCustomerRequest, GetEntitlementRequest, ImportCustomerRequest, ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, + ListChannelPartnerRepricingConfigsRequest, + ListChannelPartnerRepricingConfigsResponse, + ListCustomerRepricingConfigsRequest, + ListCustomerRepricingConfigsResponse, ListCustomersRequest, ListCustomersResponse, ListEntitlementsRequest, @@ -104,6 +122,8 @@ UnregisterSubscriberRequest, UnregisterSubscriberResponse, UpdateChannelPartnerLinkRequest, + UpdateChannelPartnerRepricingConfigRequest, + UpdateCustomerRepricingConfigRequest, UpdateCustomerRequest, ) from .subscriber_event import CustomerEvent, EntitlementEvent, SubscriberEvent @@ -148,6 +168,12 @@ "Product", "Sku", "MediaType", + "ChannelPartnerRepricingConfig", + "CustomerRepricingConfig", + "PercentageAdjustment", + "RepricingAdjustment", + "RepricingConfig", + "RebillingBasis", "ActivateEntitlementRequest", "CancelEntitlementRequest", "ChangeOfferRequest", @@ -157,15 +183,25 @@ "CheckCloudIdentityAccountsExistResponse", "CloudIdentityCustomerAccount", "CreateChannelPartnerLinkRequest", + "CreateChannelPartnerRepricingConfigRequest", + "CreateCustomerRepricingConfigRequest", "CreateCustomerRequest", "CreateEntitlementRequest", + "DeleteChannelPartnerRepricingConfigRequest", + "DeleteCustomerRepricingConfigRequest", "DeleteCustomerRequest", "GetChannelPartnerLinkRequest", + "GetChannelPartnerRepricingConfigRequest", + "GetCustomerRepricingConfigRequest", "GetCustomerRequest", "GetEntitlementRequest", "ImportCustomerRequest", "ListChannelPartnerLinksRequest", "ListChannelPartnerLinksResponse", + "ListChannelPartnerRepricingConfigsRequest", + "ListChannelPartnerRepricingConfigsResponse", + "ListCustomerRepricingConfigsRequest", + "ListCustomerRepricingConfigsResponse", "ListCustomersRequest", "ListCustomersResponse", "ListEntitlementsRequest", @@ -201,6 +237,8 @@ "UnregisterSubscriberRequest", "UnregisterSubscriberResponse", "UpdateChannelPartnerLinkRequest", + "UpdateChannelPartnerRepricingConfigRequest", + "UpdateCustomerRepricingConfigRequest", "UpdateCustomerRequest", "CustomerEvent", "EntitlementEvent", diff --git a/google/cloud/channel_v1/types/repricing.py b/google/cloud/channel_v1/types/repricing.py new file mode 100644 index 0000000..2d70eab --- /dev/null +++ b/google/cloud/channel_v1/types/repricing.py @@ -0,0 +1,245 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.protobuf import timestamp_pb2 # type: ignore +from google.type import date_pb2 # type: ignore +from google.type import decimal_pb2 # type: ignore +import proto # type: ignore + +__protobuf__ = proto.module( + package="google.cloud.channel.v1", + manifest={ + "RebillingBasis", + "CustomerRepricingConfig", + "ChannelPartnerRepricingConfig", + "RepricingConfig", + "RepricingAdjustment", + "PercentageAdjustment", + }, +) + + +class RebillingBasis(proto.Enum): + r"""Specifies the different costs that the modified bill can be + based on. + """ + REBILLING_BASIS_UNSPECIFIED = 0 + COST_AT_LIST = 1 + DIRECT_CUSTOMER_COST = 2 + + +class CustomerRepricingConfig(proto.Message): + r"""Configuration for how a reseller will reprice a Customer. + + Attributes: + name (str): + Output only. Resource name of the CustomerRepricingConfig. + Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + repricing_config (google.cloud.channel_v1.types.RepricingConfig): + Required. The configuration for bill + modifications made by a reseller before sending + it to customers. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp of an update to the repricing rule. + If ``update_time`` is after + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + then it indicates this was set mid-month. + """ + + name = proto.Field( + proto.STRING, + number=1, + ) + repricing_config = proto.Field( + proto.MESSAGE, + number=2, + message="RepricingConfig", + ) + update_time = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + + +class ChannelPartnerRepricingConfig(proto.Message): + r"""Configuration for how a distributor will rebill a channel + partner (also known as a distributor-authorized reseller). + + Attributes: + name (str): + Output only. Resource name of the + ChannelPartnerRepricingConfig. Format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}. + repricing_config (google.cloud.channel_v1.types.RepricingConfig): + Required. The configuration for bill + modifications made by a reseller before sending + it to ChannelPartner. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp of an update to the repricing rule. + If ``update_time`` is after + [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] + then it indicates this was set mid-month. + """ + + name = proto.Field( + proto.STRING, + number=1, + ) + repricing_config = proto.Field( + proto.MESSAGE, + number=2, + message="RepricingConfig", + ) + update_time = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + + +class RepricingConfig(proto.Message): + r"""Configuration for repricing a Google bill over a period of + time. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + entitlement_granularity (google.cloud.channel_v1.types.RepricingConfig.EntitlementGranularity): + Applies the repricing configuration at the + entitlement level. This is the only supported + value for CustomerRepricingConfig. + + This field is a member of `oneof`_ ``granularity``. + channel_partner_granularity (google.cloud.channel_v1.types.RepricingConfig.ChannelPartnerGranularity): + Applies the repricing configuration at the + channel partner level. This is the only + supported value for + ChannelPartnerRepricingConfig. + + This field is a member of `oneof`_ ``granularity``. + effective_invoice_month (google.type.date_pb2.Date): + Required. The YearMonth when these + adjustments activate. The Day field needs to be + "0" since we only accept YearMonth repricing + boundaries. + adjustment (google.cloud.channel_v1.types.RepricingAdjustment): + Required. Information about the adjustment. + rebilling_basis (google.cloud.channel_v1.types.RebillingBasis): + Required. The + [RebillingBasis][google.cloud.channel.v1.RebillingBasis] to + use for this bill. Specifies the relative cost based on + repricing costs you will apply. + """ + + class EntitlementGranularity(proto.Message): + r"""Applies the repricing configuration at the entitlement level. + + Attributes: + entitlement (str): + Resource name of the entitlement. Format: + accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + """ + + entitlement = proto.Field( + proto.STRING, + number=1, + ) + + class ChannelPartnerGranularity(proto.Message): + r"""Applies the repricing configuration at the channel partner + level. The channel partner value is derived from the resource + name. Takes an empty json object. + + """ + + entitlement_granularity = proto.Field( + proto.MESSAGE, + number=4, + oneof="granularity", + message=EntitlementGranularity, + ) + channel_partner_granularity = proto.Field( + proto.MESSAGE, + number=5, + oneof="granularity", + message=ChannelPartnerGranularity, + ) + effective_invoice_month = proto.Field( + proto.MESSAGE, + number=1, + message=date_pb2.Date, + ) + adjustment = proto.Field( + proto.MESSAGE, + number=2, + message="RepricingAdjustment", + ) + rebilling_basis = proto.Field( + proto.ENUM, + number=3, + enum="RebillingBasis", + ) + + +class RepricingAdjustment(proto.Message): + r"""A type that represents the various adjustments you can apply + to a bill. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + percentage_adjustment (google.cloud.channel_v1.types.PercentageAdjustment): + Flat markup or markdown on an entire bill. + + This field is a member of `oneof`_ ``adjustment``. + """ + + percentage_adjustment = proto.Field( + proto.MESSAGE, + number=2, + oneof="adjustment", + message="PercentageAdjustment", + ) + + +class PercentageAdjustment(proto.Message): + r"""An adjustment that applies a flat markup or markdown to an + entire bill. + + Attributes: + percentage (google.type.decimal_pb2.Decimal): + The percentage of the bill to adjust. + For example: + Mark down by 1% => "-1.00" + Mark up by 1% => "1.00" + Pass-Through => "0.00". + """ + + percentage = proto.Field( + proto.MESSAGE, + number=2, + message=decimal_pb2.Decimal, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/channel_v1/types/service.py b/google/cloud/channel_v1/types/service.py index e1d1083..2230786 100644 --- a/google/cloud/channel_v1/types/service.py +++ b/google/cloud/channel_v1/types/service.py @@ -24,6 +24,7 @@ from google.cloud.channel_v1.types import entitlements as gcc_entitlements from google.cloud.channel_v1.types import offers as gcc_offers from google.cloud.channel_v1.types import products as gcc_products +from google.cloud.channel_v1.types import repricing __protobuf__ = proto.module( package="google.cloud.channel.v1", @@ -52,6 +53,18 @@ "GetChannelPartnerLinkRequest", "CreateChannelPartnerLinkRequest", "UpdateChannelPartnerLinkRequest", + "GetCustomerRepricingConfigRequest", + "ListCustomerRepricingConfigsRequest", + "ListCustomerRepricingConfigsResponse", + "CreateCustomerRepricingConfigRequest", + "UpdateCustomerRepricingConfigRequest", + "DeleteCustomerRepricingConfigRequest", + "GetChannelPartnerRepricingConfigRequest", + "ListChannelPartnerRepricingConfigsRequest", + "ListChannelPartnerRepricingConfigsResponse", + "CreateChannelPartnerRepricingConfigRequest", + "UpdateChannelPartnerRepricingConfigRequest", + "DeleteChannelPartnerRepricingConfigRequest", "CreateEntitlementRequest", "TransferEntitlementsRequest", "TransferEntitlementsResponse", @@ -922,6 +935,323 @@ class UpdateChannelPartnerLinkRequest(proto.Message): ) +class GetCustomerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.GetCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig]. + + Attributes: + name (str): + Required. The resource name of the CustomerRepricingConfig. + Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + """ + + name = proto.Field( + proto.STRING, + number=1, + ) + + +class ListCustomerRepricingConfigsRequest(proto.Message): + r"""Request message for + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + + Attributes: + parent (str): + Required. The resource name of the customer. Parent uses the + format: accounts/{account_id}/customers/{customer_id}. + Supports accounts/{account_id}/customers/- to retrieve + configs for all customers. + page_size (int): + Optional. The maximum number of repricing + configs to return. The service may return fewer + than this value. If unspecified, returns a + maximum of 50 rules. The maximum value is 100; + values above 100 will be coerced to 100. + page_token (str): + Optional. A token identifying a page of results beyond the + first page. Obtained through + [ListCustomerRepricingConfigsResponse.next_page_token][google.cloud.channel.v1.ListCustomerRepricingConfigsResponse.next_page_token] + of the previous + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs] + call. + filter (str): + Optional. A filter for + [CloudChannelService.ListCustomerRepricingConfigs] results + (customer only). You can use this filter when you support a + BatchGet-like query. To use the filter, you must set + ``parent=accounts/{account_id}/customers/-``. + + Example: customer = accounts/account_id/customers/c1 OR + customer = accounts/account_id/customers/c2. + """ + + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + + +class ListCustomerRepricingConfigsResponse(proto.Message): + r"""Response message for + [CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs]. + + Attributes: + customer_repricing_configs (Sequence[google.cloud.channel_v1.types.CustomerRepricingConfig]): + The repricing configs for this channel + partner. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListCustomerRepricingConfigsRequest.page_token][google.cloud.channel.v1.ListCustomerRepricingConfigsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + customer_repricing_configs = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=repricing.CustomerRepricingConfig, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + + +class CreateCustomerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig]. + + Attributes: + parent (str): + Required. The resource name of the customer that will + receive this repricing config. Parent uses the format: + accounts/{account_id}/customers/{customer_id} + customer_repricing_config (google.cloud.channel_v1.types.CustomerRepricingConfig): + Required. The CustomerRepricingConfig object + to update. + """ + + parent = proto.Field( + proto.STRING, + number=1, + ) + customer_repricing_config = proto.Field( + proto.MESSAGE, + number=2, + message=repricing.CustomerRepricingConfig, + ) + + +class UpdateCustomerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.UpdateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig]. + + Attributes: + customer_repricing_config (google.cloud.channel_v1.types.CustomerRepricingConfig): + Required. The CustomerRepricingConfig object + to update. + """ + + customer_repricing_config = proto.Field( + proto.MESSAGE, + number=1, + message=repricing.CustomerRepricingConfig, + ) + + +class DeleteCustomerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.DeleteCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig]. + + Attributes: + name (str): + Required. The resource name of the customer repricing config + rule to delete. Format: + accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}. + """ + + name = proto.Field( + proto.STRING, + number=1, + ) + + +class GetChannelPartnerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.GetChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig] + + Attributes: + name (str): + Required. The resource name of the + ChannelPartnerRepricingConfig Format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}. + """ + + name = proto.Field( + proto.STRING, + number=1, + ) + + +class ListChannelPartnerRepricingConfigsRequest(proto.Message): + r"""Request message for + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs]. + + Attributes: + parent (str): + Required. The resource name of the account's + [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]. + Parent uses the format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. + Supports accounts/{account_id}/channelPartnerLinks/- to + retrieve configs for all channel partners. + page_size (int): + Optional. The maximum number of repricing + configs to return. The service may return fewer + than this value. If unspecified, returns a + maximum of 50 rules. The maximum value is 100; + values above 100 will be coerced to 100. + page_token (str): + Optional. A token identifying a page of results beyond the + first page. Obtained through + [ListChannelPartnerRepricingConfigsResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerRepricingConfigsResponse.next_page_token] + of the previous + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs] + call. + filter (str): + Optional. A filter for + [CloudChannelService.ListChannelPartnerRepricingConfigs] + results (channel_partner_link only). You can use this filter + when you support a BatchGet-like query. To use the filter, + you must set + ``parent=accounts/{account_id}/channelPartnerLinks/-``. + + Example: + ``channel_partner_link = accounts/account_id/channelPartnerLinks/c1`` + OR + ``channel_partner_link = accounts/account_id/channelPartnerLinks/c2``. + """ + + parent = proto.Field( + proto.STRING, + number=1, + ) + page_size = proto.Field( + proto.INT32, + number=2, + ) + page_token = proto.Field( + proto.STRING, + number=3, + ) + filter = proto.Field( + proto.STRING, + number=4, + ) + + +class ListChannelPartnerRepricingConfigsResponse(proto.Message): + r"""Response message for + [CloudChannelService.ListChannelPartnerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs]. + + Attributes: + channel_partner_repricing_configs (Sequence[google.cloud.channel_v1.types.ChannelPartnerRepricingConfig]): + The repricing configs for this channel + partner. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListChannelPartnerRepricingConfigsRequest.page_token][google.cloud.channel.v1.ListChannelPartnerRepricingConfigsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + channel_partner_repricing_configs = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=repricing.ChannelPartnerRepricingConfig, + ) + next_page_token = proto.Field( + proto.STRING, + number=2, + ) + + +class CreateChannelPartnerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig]. + + Attributes: + parent (str): + Required. The resource name of the ChannelPartner that will + receive the repricing config. Parent uses the format: + accounts/{account_id}/channelPartnerLinks/{channel_partner_id} + channel_partner_repricing_config (google.cloud.channel_v1.types.ChannelPartnerRepricingConfig): + Required. The ChannelPartnerRepricingConfig + object to update. + """ + + parent = proto.Field( + proto.STRING, + number=1, + ) + channel_partner_repricing_config = proto.Field( + proto.MESSAGE, + number=2, + message=repricing.ChannelPartnerRepricingConfig, + ) + + +class UpdateChannelPartnerRepricingConfigRequest(proto.Message): + r"""Request message for + [CloudChannelService.UpdateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig]. + + Attributes: + channel_partner_repricing_config (google.cloud.channel_v1.types.ChannelPartnerRepricingConfig): + Required. The ChannelPartnerRepricingConfig + object to update. + """ + + channel_partner_repricing_config = proto.Field( + proto.MESSAGE, + number=1, + message=repricing.ChannelPartnerRepricingConfig, + ) + + +class DeleteChannelPartnerRepricingConfigRequest(proto.Message): + r"""Request message for DeleteChannelPartnerRepricingConfig. + + Attributes: + name (str): + Required. The resource name of the channel + partner repricing config rule to delete. + """ + + name = proto.Field( + proto.STRING, + number=1, + ) + + class CreateEntitlementRequest(proto.Message): r"""Request message for [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_async.py new file mode 100644 index 0000000..99a3925 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_create_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateChannelPartnerRepricingConfigRequest( + parent="parent_value", + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = await client.create_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_sync.py new file mode 100644 index 0000000..2f87e4a --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_create_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateChannelPartnerRepricingConfigRequest( + parent="parent_value", + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = client.create_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_async.py new file mode 100644 index 0000000..add682f --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_create_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateCustomerRepricingConfigRequest( + parent="parent_value", + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = await client.create_customer_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_sync.py new file mode 100644 index 0000000..675a36d --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_create_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.CreateCustomerRepricingConfigRequest( + parent="parent_value", + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = client.create_customer_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_async.py new file mode 100644 index 0000000..dd46f29 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_delete_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + request = channel_v1.DeleteChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + await client.delete_channel_partner_repricing_config(request=request) + + +# [END cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_sync.py new file mode 100644 index 0000000..1f5766a --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_delete_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.DeleteChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_channel_partner_repricing_config(request=request) + + +# [END cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_async.py new file mode 100644 index 0000000..3e7a1eb --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_delete_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + request = channel_v1.DeleteCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + await client.delete_customer_repricing_config(request=request) + + +# [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_sync.py new file mode 100644 index 0000000..5319c6b --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_delete_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.DeleteCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + client.delete_customer_repricing_config(request=request) + + +# [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_async.py new file mode 100644 index 0000000..545fe7c --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_get_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + request = channel_v1.GetChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_sync.py new file mode 100644 index 0000000..d17cbe6 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_get_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.GetChannelPartnerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_async.py new file mode 100644 index 0000000..12e36ae --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_get_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + request = channel_v1.GetCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_customer_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_sync.py new file mode 100644 index 0000000..a9121a1 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_get_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.GetCustomerRepricingConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_customer_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_async.py new file mode 100644 index 0000000..b6882f1 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListChannelPartnerRepricingConfigs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_async] +from google.cloud import channel_v1 + + +async def sample_list_channel_partner_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + request = channel_v1.ListChannelPartnerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channel_partner_repricing_configs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_sync.py new file mode 100644 index 0000000..e58d33e --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListChannelPartnerRepricingConfigs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync] +from google.cloud import channel_v1 + + +def sample_list_channel_partner_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.ListChannelPartnerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channel_partner_repricing_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_async.py new file mode 100644 index 0000000..c6e3641 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListCustomerRepricingConfigs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_async] +from google.cloud import channel_v1 + + +async def sample_list_customer_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + request = channel_v1.ListCustomerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_customer_repricing_configs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_sync.py new file mode 100644 index 0000000..a911462 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListCustomerRepricingConfigs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync] +from google.cloud import channel_v1 + + +def sample_list_customer_repricing_configs(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + request = channel_v1.ListCustomerRepricingConfigsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_customer_repricing_configs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_async.py new file mode 100644 index 0000000..2fd21f2 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_update_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateChannelPartnerRepricingConfigRequest( + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = await client.update_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_sync.py new file mode 100644 index 0000000..e554bd8 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateChannelPartnerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_update_channel_partner_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() + channel_partner_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateChannelPartnerRepricingConfigRequest( + channel_partner_repricing_config=channel_partner_repricing_config, + ) + + # Make the request + response = client.update_channel_partner_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_async.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_async.py new file mode 100644 index 0000000..fc16d06 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_async] +from google.cloud import channel_v1 + + +async def sample_update_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceAsyncClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateCustomerRepricingConfigRequest( + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = await client.update_customer_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_async] diff --git a/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_sync.py b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_sync.py new file mode 100644 index 0000000..0dc44d5 --- /dev/null +++ b/samples/generated_samples/cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateCustomerRepricingConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-channel + + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync] +from google.cloud import channel_v1 + + +def sample_update_customer_repricing_config(): + # Create a client + client = channel_v1.CloudChannelServiceClient() + + # Initialize request argument(s) + customer_repricing_config = channel_v1.CustomerRepricingConfig() + customer_repricing_config.repricing_config.rebilling_basis = "DIRECT_CUSTOMER_COST" + + request = channel_v1.UpdateCustomerRepricingConfigRequest( + customer_repricing_config=customer_repricing_config, + ) + + # Make the request + response = client.update_customer_repricing_config(request=request) + + # Handle the response + print(response) + +# [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync] diff --git a/samples/generated_samples/snippet_metadata_channel_v1.json b/samples/generated_samples/snippet_metadata_channel_v1.json index c1934a2..cb44800 100644 --- a/samples/generated_samples/snippet_metadata_channel_v1.json +++ b/samples/generated_samples/snippet_metadata_channel_v1.json @@ -1089,19 +1089,27 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "CreateCustomer" + "shortName": "CreateChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.CreateCustomerRequest" + "type": "google.cloud.channel_v1.types.CreateChannelPartnerRepricingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "channel_partner_repricing_config", + "type": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig" }, { "name": "retry", @@ -1116,22 +1124,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Customer", - "shortName": "create_customer" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig", + "shortName": "create_channel_partner_repricing_config" }, - "description": "Sample for CreateCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_async.py", + "description": "Sample for CreateChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_async", "segments": [ { - "end": 49, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1141,22 +1149,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_async.py" }, { "canonical": true, @@ -1165,19 +1173,27 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "CreateCustomer" + "shortName": "CreateChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.CreateCustomerRequest" + "type": "google.cloud.channel_v1.types.CreateChannelPartnerRepricingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "channel_partner_repricing_config", + "type": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig" }, { "name": "retry", @@ -1192,22 +1208,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Customer", - "shortName": "create_customer" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig", + "shortName": "create_channel_partner_repricing_config" }, - "description": "Sample for CreateCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_sync.py", + "description": "Sample for CreateChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync", "segments": [ { - "end": 49, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1217,22 +1233,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_channel_partner_repricing_config_sync.py" }, { "canonical": true, @@ -1242,19 +1258,27 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_entitlement", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "CreateEntitlement" + "shortName": "CreateCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.CreateEntitlementRequest" + "type": "google.cloud.channel_v1.types.CreateCustomerRepricingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "customer_repricing_config", + "type": "google.cloud.channel_v1.types.CustomerRepricingConfig" }, { "name": "retry", @@ -1269,22 +1293,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "create_entitlement" + "resultType": "google.cloud.channel_v1.types.CustomerRepricingConfig", + "shortName": "create_customer_repricing_config" }, - "description": "Sample for CreateEntitlement", - "file": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_async.py", + "description": "Sample for CreateCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_async", "segments": [ { - "end": 52, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1299,17 +1323,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 49, + "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_async.py" }, { "canonical": true, @@ -1318,19 +1342,27 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_entitlement", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "CreateEntitlement" + "shortName": "CreateCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.CreateEntitlementRequest" + "type": "google.cloud.channel_v1.types.CreateCustomerRepricingConfigRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "customer_repricing_config", + "type": "google.cloud.channel_v1.types.CustomerRepricingConfig" }, { "name": "retry", @@ -1345,22 +1377,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "create_entitlement" + "resultType": "google.cloud.channel_v1.types.CustomerRepricingConfig", + "shortName": "create_customer_repricing_config" }, - "description": "Sample for CreateEntitlement", - "file": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_sync.py", + "description": "Sample for CreateCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync", "segments": [ { - "end": 52, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1375,17 +1407,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 49, + "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_repricing_config_sync.py" }, { "canonical": true, @@ -1395,23 +1427,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.delete_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "DeleteCustomer" + "shortName": "CreateCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.DeleteCustomerRequest" - }, - { - "name": "name", - "type": "str" + "type": "google.cloud.channel_v1.types.CreateCustomerRequest" }, { "name": "retry", @@ -1426,21 +1454,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "shortName": "delete_customer" + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "create_customer" }, - "description": "Sample for DeleteCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_async.py", + "description": "Sample for CreateCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_async", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, @@ -1450,20 +1479,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_async.py" }, { "canonical": true, @@ -1472,23 +1503,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.delete_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "DeleteCustomer" + "shortName": "CreateCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.DeleteCustomerRequest" - }, - { - "name": "name", - "type": "str" + "type": "google.cloud.channel_v1.types.CreateCustomerRequest" }, { "name": "retry", @@ -1503,21 +1530,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "shortName": "delete_customer" + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "create_customer" }, - "description": "Sample for DeleteCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_sync.py", + "description": "Sample for CreateCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_customer_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, @@ -1527,20 +1555,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_customer_sync.py" }, { "canonical": true, @@ -1550,19 +1580,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_channel_partner_link", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.create_entitlement", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "GetChannelPartnerLink" + "shortName": "CreateEntitlement" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.GetChannelPartnerLinkRequest" + "type": "google.cloud.channel_v1.types.CreateEntitlementRequest" }, { "name": "retry", @@ -1577,22 +1607,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", - "shortName": "get_channel_partner_link" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_entitlement" }, - "description": "Sample for GetChannelPartnerLink", - "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_async.py", + "description": "Sample for CreateEntitlement", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_async", "segments": [ { - "end": 44, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 52, "start": 27, "type": "SHORT" }, @@ -1602,22 +1632,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_async.py" }, { "canonical": true, @@ -1626,19 +1656,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_channel_partner_link", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.create_entitlement", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", + "fullName": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "GetChannelPartnerLink" + "shortName": "CreateEntitlement" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.GetChannelPartnerLinkRequest" + "type": "google.cloud.channel_v1.types.CreateEntitlementRequest" }, { "name": "retry", @@ -1653,22 +1683,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", - "shortName": "get_channel_partner_link" + "resultType": "google.api_core.operation.Operation", + "shortName": "create_entitlement" }, - "description": "Sample for GetChannelPartnerLink", - "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_sync.py", + "description": "Sample for CreateEntitlement", + "file": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync", "segments": [ { - "end": 44, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 52, "start": 27, "type": "SHORT" }, @@ -1678,22 +1708,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_create_entitlement_sync.py" }, { "canonical": true, @@ -1703,19 +1733,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.delete_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "GetCustomer" + "shortName": "DeleteChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.GetCustomerRequest" + "type": "google.cloud.channel_v1.types.DeleteChannelPartnerRepricingConfigRequest" }, { "name": "name", @@ -1734,22 +1764,21 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Customer", - "shortName": "get_customer" + "shortName": "delete_channel_partner_repricing_config" }, - "description": "Sample for GetCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_async.py", + "description": "Sample for DeleteChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_async", "segments": [ { - "end": 44, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 42, "start": 27, "type": "SHORT" }, @@ -1764,17 +1793,15 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_async.py" }, { "canonical": true, @@ -1783,19 +1810,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.delete_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "GetCustomer" + "shortName": "DeleteChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.GetCustomerRequest" + "type": "google.cloud.channel_v1.types.DeleteChannelPartnerRepricingConfigRequest" }, { "name": "name", @@ -1814,22 +1841,21 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Customer", - "shortName": "get_customer" + "shortName": "delete_channel_partner_repricing_config" }, - "description": "Sample for GetCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_sync.py", + "description": "Sample for DeleteChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync", "segments": [ { - "end": 44, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 42, "start": 27, "type": "SHORT" }, @@ -1844,17 +1870,15 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_channel_partner_repricing_config_sync.py" }, { "canonical": true, @@ -1864,19 +1888,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_entitlement", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.delete_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "GetEntitlement" + "shortName": "DeleteCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.GetEntitlementRequest" + "type": "google.cloud.channel_v1.types.DeleteCustomerRepricingConfigRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -1891,22 +1919,21 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Entitlement", - "shortName": "get_entitlement" + "shortName": "delete_customer_repricing_config" }, - "description": "Sample for GetEntitlement", - "file": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_async.py", + "description": "Sample for DeleteCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_async", "segments": [ { - "end": 44, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 42, "start": 27, "type": "SHORT" }, @@ -1921,17 +1948,15 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_async.py" }, { "canonical": true, @@ -1940,19 +1965,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_entitlement", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.delete_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "GetEntitlement" + "shortName": "DeleteCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.GetEntitlementRequest" + "type": "google.cloud.channel_v1.types.DeleteCustomerRepricingConfigRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -1967,22 +1996,21 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Entitlement", - "shortName": "get_entitlement" + "shortName": "delete_customer_repricing_config" }, - "description": "Sample for GetEntitlement", - "file": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_sync.py", + "description": "Sample for DeleteCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync", "segments": [ { - "end": 44, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 42, "start": 27, "type": "SHORT" }, @@ -1997,17 +2025,15 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_repricing_config_sync.py" }, { "canonical": true, @@ -2017,19 +2043,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.import_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.delete_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ImportCustomer" + "shortName": "DeleteCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ImportCustomerRequest" + "type": "google.cloud.channel_v1.types.DeleteCustomerRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2044,22 +2074,21 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Customer", - "shortName": "import_customer" + "shortName": "delete_customer" }, - "description": "Sample for ImportCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_import_customer_async.py", + "description": "Sample for DeleteCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_async", "segments": [ { - "end": 46, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 42, "start": 27, "type": "SHORT" }, @@ -2069,22 +2098,20 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 40, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 43, - "start": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, - "start": 44, + "end": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_import_customer_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_async.py" }, { "canonical": true, @@ -2093,19 +2120,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.import_customer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.delete_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", + "fullName": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ImportCustomer" + "shortName": "DeleteCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ImportCustomerRequest" + "type": "google.cloud.channel_v1.types.DeleteCustomerRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2120,22 +2151,21 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Customer", - "shortName": "import_customer" + "shortName": "delete_customer" }, - "description": "Sample for ImportCustomer", - "file": "cloudchannel_v1_generated_cloud_channel_service_import_customer_sync.py", + "description": "Sample for DeleteCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync", "segments": [ { - "end": 46, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 42, "start": 27, "type": "SHORT" }, @@ -2145,22 +2175,20 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 40, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 43, - "start": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, - "start": 44, + "end": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_import_customer_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_delete_customer_sync.py" }, { "canonical": true, @@ -2170,19 +2198,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_channel_partner_links", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_channel_partner_link", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListChannelPartnerLinks" + "shortName": "GetChannelPartnerLink" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListChannelPartnerLinksRequest" + "type": "google.cloud.channel_v1.types.GetChannelPartnerLinkRequest" }, { "name": "retry", @@ -2197,22 +2225,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksAsyncPager", - "shortName": "list_channel_partner_links" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "get_channel_partner_link" }, - "description": "Sample for ListChannelPartnerLinks", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_async.py", + "description": "Sample for GetChannelPartnerLink", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2232,12 +2260,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_async.py" }, { "canonical": true, @@ -2246,19 +2274,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_channel_partner_links", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_channel_partner_link", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListChannelPartnerLinks" + "shortName": "GetChannelPartnerLink" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListChannelPartnerLinksRequest" + "type": "google.cloud.channel_v1.types.GetChannelPartnerLinkRequest" }, { "name": "retry", @@ -2273,22 +2301,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksPager", - "shortName": "list_channel_partner_links" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "get_channel_partner_link" }, - "description": "Sample for ListChannelPartnerLinks", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_sync.py", + "description": "Sample for GetChannelPartnerLink", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2308,12 +2336,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_link_sync.py" }, { "canonical": true, @@ -2323,19 +2351,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_customers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomers", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListCustomers" + "shortName": "GetChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListCustomersRequest" + "type": "google.cloud.channel_v1.types.GetChannelPartnerRepricingConfigRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2350,22 +2382,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersAsyncPager", - "shortName": "list_customers" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig", + "shortName": "get_channel_partner_repricing_config" }, - "description": "Sample for ListCustomers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_customers_async.py", + "description": "Sample for GetChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2385,12 +2417,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_customers_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_async.py" }, { "canonical": true, @@ -2399,19 +2431,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_customers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomers", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListCustomers" + "shortName": "GetChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListCustomersRequest" + "type": "google.cloud.channel_v1.types.GetChannelPartnerRepricingConfigRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2426,22 +2462,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersPager", - "shortName": "list_customers" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig", + "shortName": "get_channel_partner_repricing_config" }, - "description": "Sample for ListCustomers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_customers_sync.py", + "description": "Sample for GetChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2461,12 +2497,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_customers_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_channel_partner_repricing_config_sync.py" }, { "canonical": true, @@ -2476,19 +2512,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_entitlements", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListEntitlements" + "shortName": "GetCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListEntitlementsRequest" + "type": "google.cloud.channel_v1.types.GetCustomerRepricingConfigRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2503,22 +2543,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsAsyncPager", - "shortName": "list_entitlements" + "resultType": "google.cloud.channel_v1.types.CustomerRepricingConfig", + "shortName": "get_customer_repricing_config" }, - "description": "Sample for ListEntitlements", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_async.py", + "description": "Sample for GetCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2538,12 +2578,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_async.py" }, { "canonical": true, @@ -2552,19 +2592,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_entitlements", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListEntitlements" + "shortName": "GetCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListEntitlementsRequest" + "type": "google.cloud.channel_v1.types.GetCustomerRepricingConfigRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2579,22 +2623,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsPager", - "shortName": "list_entitlements" + "resultType": "google.cloud.channel_v1.types.CustomerRepricingConfig", + "shortName": "get_customer_repricing_config" }, - "description": "Sample for ListEntitlements", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_sync.py", + "description": "Sample for GetCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2614,12 +2658,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_repricing_config_sync.py" }, { "canonical": true, @@ -2629,19 +2673,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_offers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListOffers", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListOffers" + "shortName": "GetCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListOffersRequest" + "type": "google.cloud.channel_v1.types.GetCustomerRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2656,22 +2704,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListOffersAsyncPager", - "shortName": "list_offers" + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "get_customer" }, - "description": "Sample for ListOffers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_offers_async.py", + "description": "Sample for GetCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2691,12 +2739,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_offers_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_async.py" }, { "canonical": true, @@ -2705,19 +2753,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_offers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListOffers", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListOffers" + "shortName": "GetCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListOffersRequest" + "type": "google.cloud.channel_v1.types.GetCustomerRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -2732,22 +2784,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListOffersPager", - "shortName": "list_offers" + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "get_customer" }, - "description": "Sample for ListOffers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_offers_sync.py", + "description": "Sample for GetCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_customer_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2767,12 +2819,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_offers_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_customer_sync.py" }, { "canonical": true, @@ -2782,19 +2834,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_products", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.get_entitlement", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListProducts", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListProducts" + "shortName": "GetEntitlement" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListProductsRequest" + "type": "google.cloud.channel_v1.types.GetEntitlementRequest" }, { "name": "retry", @@ -2809,22 +2861,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListProductsAsyncPager", - "shortName": "list_products" + "resultType": "google.cloud.channel_v1.types.Entitlement", + "shortName": "get_entitlement" }, - "description": "Sample for ListProducts", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_products_async.py", + "description": "Sample for GetEntitlement", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2844,12 +2896,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_products_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_async.py" }, { "canonical": true, @@ -2858,19 +2910,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_products", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.get_entitlement", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListProducts", + "fullName": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListProducts" + "shortName": "GetEntitlement" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListProductsRequest" + "type": "google.cloud.channel_v1.types.GetEntitlementRequest" }, { "name": "retry", @@ -2885,22 +2937,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListProductsPager", - "shortName": "list_products" + "resultType": "google.cloud.channel_v1.types.Entitlement", + "shortName": "get_entitlement" }, - "description": "Sample for ListProducts", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_products_sync.py", + "description": "Sample for GetEntitlement", + "file": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2920,12 +2972,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_products_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_get_entitlement_sync.py" }, { "canonical": true, @@ -2935,19 +2987,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_purchasable_offers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.import_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", + "fullName": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListPurchasableOffers" + "shortName": "ImportCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListPurchasableOffersRequest" + "type": "google.cloud.channel_v1.types.ImportCustomerRequest" }, { "name": "retry", @@ -2962,22 +3014,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableOffersAsyncPager", - "shortName": "list_purchasable_offers" + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "import_customer" }, - "description": "Sample for ListPurchasableOffers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_async.py", + "description": "Sample for ImportCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_import_customer_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_async", "segments": [ { - "end": 49, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2987,22 +3039,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 40, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 43, + "start": 41, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 46, + "end": 47, + "start": 44, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_import_customer_async.py" }, { "canonical": true, @@ -3011,19 +3063,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_purchasable_offers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.import_customer", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", + "fullName": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListPurchasableOffers" + "shortName": "ImportCustomer" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListPurchasableOffersRequest" + "type": "google.cloud.channel_v1.types.ImportCustomerRequest" }, { "name": "retry", @@ -3038,22 +3090,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableOffersPager", - "shortName": "list_purchasable_offers" + "resultType": "google.cloud.channel_v1.types.Customer", + "shortName": "import_customer" }, - "description": "Sample for ListPurchasableOffers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_sync.py", + "description": "Sample for ImportCustomer", + "file": "cloudchannel_v1_generated_cloud_channel_service_import_customer_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync", "segments": [ { - "end": 49, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 46, "start": 27, "type": "SHORT" }, @@ -3063,22 +3115,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 40, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 43, + "start": 41, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 46, + "end": 47, + "start": 44, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_import_customer_sync.py" }, { "canonical": true, @@ -3088,19 +3140,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_purchasable_skus", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_channel_partner_links", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListPurchasableSkus" + "shortName": "ListChannelPartnerLinks" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListPurchasableSkusRequest" + "type": "google.cloud.channel_v1.types.ListChannelPartnerLinksRequest" }, { "name": "retry", @@ -3115,22 +3167,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableSkusAsyncPager", - "shortName": "list_purchasable_skus" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksAsyncPager", + "shortName": "list_channel_partner_links" }, - "description": "Sample for ListPurchasableSkus", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_async.py", + "description": "Sample for ListChannelPartnerLinks", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_async", "segments": [ { - "end": 49, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3140,22 +3192,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 46, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_async.py" }, { "canonical": true, @@ -3164,19 +3216,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_purchasable_skus", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_channel_partner_links", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListPurchasableSkus" + "shortName": "ListChannelPartnerLinks" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListPurchasableSkusRequest" + "type": "google.cloud.channel_v1.types.ListChannelPartnerLinksRequest" }, { "name": "retry", @@ -3191,22 +3243,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableSkusPager", - "shortName": "list_purchasable_skus" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksPager", + "shortName": "list_channel_partner_links" }, - "description": "Sample for ListPurchasableSkus", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_sync.py", + "description": "Sample for ListChannelPartnerLinks", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync", "segments": [ { - "end": 49, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3216,22 +3268,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 46, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_links_sync.py" }, { "canonical": true, @@ -3241,19 +3293,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_skus", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_channel_partner_repricing_configs", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListSkus", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListSkus" + "shortName": "ListChannelPartnerRepricingConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListSkusRequest" + "type": "google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsRequest" + }, + { + "name": "parent", + "type": "str" }, { "name": "retry", @@ -3268,22 +3324,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSkusAsyncPager", - "shortName": "list_skus" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerRepricingConfigsAsyncPager", + "shortName": "list_channel_partner_repricing_configs" }, - "description": "Sample for ListSkus", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_skus_async.py", + "description": "Sample for ListChannelPartnerRepricingConfigs", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_async", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3293,22 +3349,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, - "start": 43, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_skus_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_async.py" }, { "canonical": true, @@ -3317,19 +3373,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_skus", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_channel_partner_repricing_configs", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListSkus", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListSkus" + "shortName": "ListChannelPartnerRepricingConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListSkusRequest" + "type": "google.cloud.channel_v1.types.ListChannelPartnerRepricingConfigsRequest" + }, + { + "name": "parent", + "type": "str" }, { "name": "retry", @@ -3344,22 +3404,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSkusPager", - "shortName": "list_skus" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerRepricingConfigsPager", + "shortName": "list_channel_partner_repricing_configs" }, - "description": "Sample for ListSkus", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_skus_sync.py", + "description": "Sample for ListChannelPartnerRepricingConfigs", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3369,22 +3429,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, - "start": 43, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_skus_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_channel_partner_repricing_configs_sync.py" }, { "canonical": true, @@ -3394,19 +3454,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_subscribers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_customer_repricing_configs", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListSubscribers" + "shortName": "ListCustomerRepricingConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListSubscribersRequest" + "type": "google.cloud.channel_v1.types.ListCustomerRepricingConfigsRequest" + }, + { + "name": "parent", + "type": "str" }, { "name": "retry", @@ -3421,14 +3485,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSubscribersAsyncPager", - "shortName": "list_subscribers" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsAsyncPager", + "shortName": "list_customer_repricing_configs" }, - "description": "Sample for ListSubscribers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_async.py", + "description": "Sample for ListCustomerRepricingConfigs", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_async", "segments": [ { "end": 45, @@ -3461,7 +3525,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_async.py" }, { "canonical": true, @@ -3470,19 +3534,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_subscribers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_customer_repricing_configs", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListSubscribers" + "shortName": "ListCustomerRepricingConfigs" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListSubscribersRequest" + "type": "google.cloud.channel_v1.types.ListCustomerRepricingConfigsRequest" + }, + { + "name": "parent", + "type": "str" }, { "name": "retry", @@ -3497,14 +3565,14 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSubscribersPager", - "shortName": "list_subscribers" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsPager", + "shortName": "list_customer_repricing_configs" }, - "description": "Sample for ListSubscribers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_sync.py", + "description": "Sample for ListCustomerRepricingConfigs", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync", "segments": [ { "end": 45, @@ -3537,7 +3605,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_customer_repricing_configs_sync.py" }, { "canonical": true, @@ -3547,19 +3615,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_transferable_offers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_customers", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomers", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListTransferableOffers" + "shortName": "ListCustomers" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListTransferableOffersRequest" + "type": "google.cloud.channel_v1.types.ListCustomersRequest" }, { "name": "retry", @@ -3574,22 +3642,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersAsyncPager", - "shortName": "list_transferable_offers" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersAsyncPager", + "shortName": "list_customers" }, - "description": "Sample for ListTransferableOffers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_async.py", + "description": "Sample for ListCustomers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_customers_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_async", "segments": [ { - "end": 47, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3599,22 +3667,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 40, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 43, - "start": 41, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_customers_async.py" }, { "canonical": true, @@ -3623,19 +3691,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_transferable_offers", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_customers", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListCustomers", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListTransferableOffers" + "shortName": "ListCustomers" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListTransferableOffersRequest" + "type": "google.cloud.channel_v1.types.ListCustomersRequest" }, { "name": "retry", @@ -3650,22 +3718,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersPager", - "shortName": "list_transferable_offers" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersPager", + "shortName": "list_customers" }, - "description": "Sample for ListTransferableOffers", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_sync.py", + "description": "Sample for ListCustomers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_customers_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync", "segments": [ { - "end": 47, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3675,22 +3743,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 40, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 43, - "start": 41, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_customers_sync.py" }, { "canonical": true, @@ -3700,19 +3768,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_transferable_skus", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_entitlements", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListTransferableSkus" + "shortName": "ListEntitlements" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListTransferableSkusRequest" + "type": "google.cloud.channel_v1.types.ListEntitlementsRequest" }, { "name": "retry", @@ -3727,22 +3795,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusAsyncPager", - "shortName": "list_transferable_skus" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsAsyncPager", + "shortName": "list_entitlements" }, - "description": "Sample for ListTransferableSkus", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_async.py", + "description": "Sample for ListEntitlements", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_async", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3752,22 +3820,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, - "start": 43, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_async.py" }, { "canonical": true, @@ -3776,19 +3844,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_transferable_skus", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_entitlements", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ListTransferableSkus" + "shortName": "ListEntitlements" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ListTransferableSkusRequest" + "type": "google.cloud.channel_v1.types.ListEntitlementsRequest" }, { "name": "retry", @@ -3803,22 +3871,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusPager", - "shortName": "list_transferable_skus" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsPager", + "shortName": "list_entitlements" }, - "description": "Sample for ListTransferableSkus", - "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_sync.py", + "description": "Sample for ListEntitlements", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3828,22 +3896,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, - "start": 43, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_entitlements_sync.py" }, { "canonical": true, @@ -3853,19 +3921,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.lookup_offer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_offers", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.LookupOffer", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListOffers", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "LookupOffer" + "shortName": "ListOffers" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.LookupOfferRequest" + "type": "google.cloud.channel_v1.types.ListOffersRequest" }, { "name": "retry", @@ -3880,22 +3948,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Offer", - "shortName": "lookup_offer" + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListOffersAsyncPager", + "shortName": "list_offers" }, - "description": "Sample for LookupOffer", - "file": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_async.py", + "description": "Sample for ListOffers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_offers_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_async", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3915,12 +3983,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 45, + "end": 46, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_list_offers_async.py" }, { "canonical": true, @@ -3929,14 +3997,1238 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.lookup_offer", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_offers", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.LookupOffer", + "fullName": "google.cloud.channel.v1.CloudChannelService.ListOffers", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "LookupOffer" + "shortName": "ListOffers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListOffersPager", + "shortName": "list_offers" + }, + "description": "Sample for ListOffers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_offers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_offers_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_products", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListProducts", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListProductsAsyncPager", + "shortName": "list_products" + }, + "description": "Sample for ListProducts", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_products_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_products_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_products", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListProducts", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListProducts" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListProductsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListProductsPager", + "shortName": "list_products" + }, + "description": "Sample for ListProducts", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_products_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_products_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_purchasable_offers", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListPurchasableOffers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableOffersAsyncPager", + "shortName": "list_purchasable_offers" + }, + "description": "Sample for ListPurchasableOffers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_purchasable_offers", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListPurchasableOffers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableOffersPager", + "shortName": "list_purchasable_offers" + }, + "description": "Sample for ListPurchasableOffers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_offers_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_purchasable_skus", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListPurchasableSkus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableSkusAsyncPager", + "shortName": "list_purchasable_skus" + }, + "description": "Sample for ListPurchasableSkus", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_purchasable_skus", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListPurchasableSkus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListPurchasableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListPurchasableSkusPager", + "shortName": "list_purchasable_skus" + }, + "description": "Sample for ListPurchasableSkus", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_purchasable_skus_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_skus", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSkus", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListSkus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSkusAsyncPager", + "shortName": "list_skus" + }, + "description": "Sample for ListSkus", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_skus_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_skus_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_skus", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSkus", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListSkus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSkusPager", + "shortName": "list_skus" + }, + "description": "Sample for ListSkus", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_skus_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_skus_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_subscribers", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListSubscribers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSubscribersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSubscribersAsyncPager", + "shortName": "list_subscribers" + }, + "description": "Sample for ListSubscribers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_subscribers", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListSubscribers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListSubscribersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListSubscribersPager", + "shortName": "list_subscribers" + }, + "description": "Sample for ListSubscribers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_subscribers_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_transferable_offers", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListTransferableOffers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersAsyncPager", + "shortName": "list_transferable_offers" + }, + "description": "Sample for ListTransferableOffers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 43, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 44, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_transferable_offers", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListTransferableOffers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableOffersRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersPager", + "shortName": "list_transferable_offers" + }, + "description": "Sample for ListTransferableOffers", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 40, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 43, + "start": 41, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 44, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_offers_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.list_transferable_skus", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListTransferableSkus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusAsyncPager", + "shortName": "list_transferable_skus" + }, + "description": "Sample for ListTransferableSkus", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.list_transferable_skus", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ListTransferableSkus" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ListTransferableSkusRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusPager", + "shortName": "list_transferable_skus" + }, + "description": "Sample for ListTransferableSkus", + "file": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_list_transferable_skus_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.lookup_offer", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.LookupOffer", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "LookupOffer" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.LookupOfferRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.Offer", + "shortName": "lookup_offer" + }, + "description": "Sample for LookupOffer", + "file": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.lookup_offer", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.LookupOffer", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "LookupOffer" }, "parameters": [ { @@ -3956,22 +5248,328 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.Offer", - "shortName": "lookup_offer" + "resultType": "google.cloud.channel_v1.types.Offer", + "shortName": "lookup_offer" + }, + "description": "Sample for LookupOffer", + "file": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.provision_cloud_identity", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ProvisionCloudIdentity" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ProvisionCloudIdentityRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "provision_cloud_identity" + }, + "description": "Sample for ProvisionCloudIdentity", + "file": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.provision_cloud_identity", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "ProvisionCloudIdentity" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.ProvisionCloudIdentityRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "provision_cloud_identity" + }, + "description": "Sample for ProvisionCloudIdentity", + "file": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", + "shortName": "CloudChannelServiceAsyncClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.register_subscriber", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "RegisterSubscriber" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.RegisterSubscriberRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.RegisterSubscriberResponse", + "shortName": "register_subscriber" + }, + "description": "Sample for RegisterSubscriber", + "file": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", + "shortName": "CloudChannelServiceClient" + }, + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.register_subscriber", + "method": { + "fullName": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", + "service": { + "fullName": "google.cloud.channel.v1.CloudChannelService", + "shortName": "CloudChannelService" + }, + "shortName": "RegisterSubscriber" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.channel_v1.types.RegisterSubscriberRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.channel_v1.types.RegisterSubscriberResponse", + "shortName": "register_subscriber" }, - "description": "Sample for LookupOffer", - "file": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_sync.py", + "description": "Sample for RegisterSubscriber", + "file": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, @@ -3981,22 +5579,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_lookup_offer_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_sync.py" }, { "canonical": true, @@ -4006,19 +5604,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.provision_cloud_identity", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.start_paid_service", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", + "fullName": "google.cloud.channel.v1.CloudChannelService.StartPaidService", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ProvisionCloudIdentity" + "shortName": "StartPaidService" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ProvisionCloudIdentityRequest" + "type": "google.cloud.channel_v1.types.StartPaidServiceRequest" }, { "name": "retry", @@ -4034,13 +5632,13 @@ } ], "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "provision_cloud_identity" + "shortName": "start_paid_service" }, - "description": "Sample for ProvisionCloudIdentity", - "file": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_async.py", + "description": "Sample for StartPaidService", + "file": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_async", "segments": [ { "end": 48, @@ -4073,7 +5671,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_async.py" }, { "canonical": true, @@ -4082,19 +5680,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.provision_cloud_identity", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.start_paid_service", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", + "fullName": "google.cloud.channel.v1.CloudChannelService.StartPaidService", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "ProvisionCloudIdentity" + "shortName": "StartPaidService" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.ProvisionCloudIdentityRequest" + "type": "google.cloud.channel_v1.types.StartPaidServiceRequest" }, { "name": "retry", @@ -4110,13 +5708,13 @@ } ], "resultType": "google.api_core.operation.Operation", - "shortName": "provision_cloud_identity" + "shortName": "start_paid_service" }, - "description": "Sample for ProvisionCloudIdentity", - "file": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_sync.py", + "description": "Sample for StartPaidService", + "file": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync", "segments": [ { "end": 48, @@ -4149,7 +5747,7 @@ "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_provision_cloud_identity_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_sync.py" }, { "canonical": true, @@ -4159,19 +5757,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.register_subscriber", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.suspend_entitlement", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", + "fullName": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "RegisterSubscriber" + "shortName": "SuspendEntitlement" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.RegisterSubscriberRequest" + "type": "google.cloud.channel_v1.types.SuspendEntitlementRequest" }, { "name": "retry", @@ -4186,22 +5784,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.RegisterSubscriberResponse", - "shortName": "register_subscriber" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "suspend_entitlement" }, - "description": "Sample for RegisterSubscriber", - "file": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_async.py", + "description": "Sample for SuspendEntitlement", + "file": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_async", "segments": [ { - "end": 45, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 48, "start": 27, "type": "SHORT" }, @@ -4211,22 +5809,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 45, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_async.py" }, { "canonical": true, @@ -4235,19 +5833,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.register_subscriber", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.suspend_entitlement", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", + "fullName": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "RegisterSubscriber" + "shortName": "SuspendEntitlement" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.RegisterSubscriberRequest" + "type": "google.cloud.channel_v1.types.SuspendEntitlementRequest" }, { "name": "retry", @@ -4262,22 +5860,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.RegisterSubscriberResponse", - "shortName": "register_subscriber" + "resultType": "google.api_core.operation.Operation", + "shortName": "suspend_entitlement" }, - "description": "Sample for RegisterSubscriber", - "file": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_sync.py", + "description": "Sample for SuspendEntitlement", + "file": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync", "segments": [ { - "end": 45, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 48, "start": 27, "type": "SHORT" }, @@ -4287,22 +5885,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 45, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_register_subscriber_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_sync.py" }, { "canonical": true, @@ -4312,19 +5910,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.start_paid_service", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.transfer_entitlements_to_google", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.StartPaidService", + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "StartPaidService" + "shortName": "TransferEntitlementsToGoogle" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.StartPaidServiceRequest" + "type": "google.cloud.channel_v1.types.TransferEntitlementsToGoogleRequest" }, { "name": "retry", @@ -4340,21 +5938,21 @@ } ], "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "start_paid_service" + "shortName": "transfer_entitlements_to_google" }, - "description": "Sample for StartPaidService", - "file": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_async.py", + "description": "Sample for TransferEntitlementsToGoogle", + "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_async", "segments": [ { - "end": 48, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 52, "start": 27, "type": "SHORT" }, @@ -4364,22 +5962,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 39, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_async.py" }, { "canonical": true, @@ -4388,19 +5986,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.start_paid_service", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.transfer_entitlements_to_google", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.StartPaidService", + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "StartPaidService" + "shortName": "TransferEntitlementsToGoogle" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.StartPaidServiceRequest" + "type": "google.cloud.channel_v1.types.TransferEntitlementsToGoogleRequest" }, { "name": "retry", @@ -4416,21 +6014,21 @@ } ], "resultType": "google.api_core.operation.Operation", - "shortName": "start_paid_service" + "shortName": "transfer_entitlements_to_google" }, - "description": "Sample for StartPaidService", - "file": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_sync.py", + "description": "Sample for TransferEntitlementsToGoogle", + "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync", "segments": [ { - "end": 48, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 52, "start": 27, "type": "SHORT" }, @@ -4440,22 +6038,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 39, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_start_paid_service_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_sync.py" }, { "canonical": true, @@ -4465,19 +6063,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.suspend_entitlement", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.transfer_entitlements", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "SuspendEntitlement" + "shortName": "TransferEntitlements" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.SuspendEntitlementRequest" + "type": "google.cloud.channel_v1.types.TransferEntitlementsRequest" }, { "name": "retry", @@ -4493,21 +6091,21 @@ } ], "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "suspend_entitlement" + "shortName": "transfer_entitlements" }, - "description": "Sample for SuspendEntitlement", - "file": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_async.py", + "description": "Sample for TransferEntitlements", + "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_async", "segments": [ { - "end": 48, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 52, "start": 27, "type": "SHORT" }, @@ -4517,22 +6115,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 39, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_async.py" }, { "canonical": true, @@ -4541,19 +6139,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.suspend_entitlement", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.transfer_entitlements", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", + "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "SuspendEntitlement" + "shortName": "TransferEntitlements" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.SuspendEntitlementRequest" + "type": "google.cloud.channel_v1.types.TransferEntitlementsRequest" }, { "name": "retry", @@ -4569,21 +6167,21 @@ } ], "resultType": "google.api_core.operation.Operation", - "shortName": "suspend_entitlement" + "shortName": "transfer_entitlements" }, - "description": "Sample for SuspendEntitlement", - "file": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_sync.py", + "description": "Sample for TransferEntitlements", + "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync", "segments": [ { - "end": 48, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 52, "start": 27, "type": "SHORT" }, @@ -4593,22 +6191,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 39, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_suspend_entitlement_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_sync.py" }, { "canonical": true, @@ -4618,19 +6216,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.transfer_entitlements_to_google", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.unregister_subscriber", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", + "fullName": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "TransferEntitlementsToGoogle" + "shortName": "UnregisterSubscriber" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.TransferEntitlementsToGoogleRequest" + "type": "google.cloud.channel_v1.types.UnregisterSubscriberRequest" }, { "name": "retry", @@ -4645,22 +6243,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "transfer_entitlements_to_google" + "resultType": "google.cloud.channel_v1.types.UnregisterSubscriberResponse", + "shortName": "unregister_subscriber" }, - "description": "Sample for TransferEntitlementsToGoogle", - "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_async.py", + "description": "Sample for UnregisterSubscriber", + "file": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_async", "segments": [ { - "end": 52, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 45, "start": 27, "type": "SHORT" }, @@ -4670,22 +6268,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_async.py" }, { "canonical": true, @@ -4694,19 +6292,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.transfer_entitlements_to_google", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.unregister_subscriber", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", + "fullName": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "TransferEntitlementsToGoogle" + "shortName": "UnregisterSubscriber" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.TransferEntitlementsToGoogleRequest" + "type": "google.cloud.channel_v1.types.UnregisterSubscriberRequest" }, { "name": "retry", @@ -4721,22 +6319,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "transfer_entitlements_to_google" + "resultType": "google.cloud.channel_v1.types.UnregisterSubscriberResponse", + "shortName": "unregister_subscriber" }, - "description": "Sample for TransferEntitlementsToGoogle", - "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_sync.py", + "description": "Sample for UnregisterSubscriber", + "file": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync", "segments": [ { - "end": 52, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 45, "start": 27, "type": "SHORT" }, @@ -4746,22 +6344,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_to_google_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_sync.py" }, { "canonical": true, @@ -4771,19 +6369,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.transfer_entitlements", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.update_channel_partner_link", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "TransferEntitlements" + "shortName": "UpdateChannelPartnerLink" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.TransferEntitlementsRequest" + "type": "google.cloud.channel_v1.types.UpdateChannelPartnerLinkRequest" }, { "name": "retry", @@ -4798,22 +6396,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "transfer_entitlements" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "update_channel_partner_link" }, - "description": "Sample for TransferEntitlements", - "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_async.py", + "description": "Sample for UpdateChannelPartnerLink", + "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_async", "segments": [ { - "end": 52, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 49, "start": 27, "type": "SHORT" }, @@ -4823,22 +6421,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_async.py" }, { "canonical": true, @@ -4847,19 +6445,19 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.transfer_entitlements", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.update_channel_partner_link", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "TransferEntitlements" + "shortName": "UpdateChannelPartnerLink" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.TransferEntitlementsRequest" + "type": "google.cloud.channel_v1.types.UpdateChannelPartnerLinkRequest" }, { "name": "retry", @@ -4874,22 +6472,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "transfer_entitlements" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", + "shortName": "update_channel_partner_link" }, - "description": "Sample for TransferEntitlements", - "file": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_sync.py", + "description": "Sample for UpdateChannelPartnerLink", + "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync", "segments": [ { - "end": 52, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 49, "start": 27, "type": "SHORT" }, @@ -4899,22 +6497,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_transfer_entitlements_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_sync.py" }, { "canonical": true, @@ -4924,19 +6522,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.unregister_subscriber", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.update_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "UnregisterSubscriber" + "shortName": "UpdateChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.UnregisterSubscriberRequest" + "type": "google.cloud.channel_v1.types.UpdateChannelPartnerRepricingConfigRequest" + }, + { + "name": "channel_partner_repricing_config", + "type": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig" }, { "name": "retry", @@ -4951,22 +6553,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.UnregisterSubscriberResponse", - "shortName": "unregister_subscriber" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig", + "shortName": "update_channel_partner_repricing_config" }, - "description": "Sample for UnregisterSubscriber", - "file": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_async.py", + "description": "Sample for UpdateChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_async", "segments": [ { - "end": 45, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 47, "start": 27, "type": "SHORT" }, @@ -4976,22 +6578,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_async.py" }, { "canonical": true, @@ -5000,19 +6602,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.unregister_subscriber", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.update_channel_partner_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "UnregisterSubscriber" + "shortName": "UpdateChannelPartnerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.UnregisterSubscriberRequest" + "type": "google.cloud.channel_v1.types.UpdateChannelPartnerRepricingConfigRequest" + }, + { + "name": "channel_partner_repricing_config", + "type": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig" }, { "name": "retry", @@ -5027,22 +6633,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.UnregisterSubscriberResponse", - "shortName": "unregister_subscriber" + "resultType": "google.cloud.channel_v1.types.ChannelPartnerRepricingConfig", + "shortName": "update_channel_partner_repricing_config" }, - "description": "Sample for UnregisterSubscriber", - "file": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_sync.py", + "description": "Sample for UpdateChannelPartnerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync", "segments": [ { - "end": 45, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 47, "start": 27, "type": "SHORT" }, @@ -5052,22 +6658,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_unregister_subscriber_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_repricing_config_sync.py" }, { "canonical": true, @@ -5077,19 +6683,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient", "shortName": "CloudChannelServiceAsyncClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.update_channel_partner_link", + "fullName": "google.cloud.channel_v1.CloudChannelServiceAsyncClient.update_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "UpdateChannelPartnerLink" + "shortName": "UpdateCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.UpdateChannelPartnerLinkRequest" + "type": "google.cloud.channel_v1.types.UpdateCustomerRepricingConfigRequest" + }, + { + "name": "customer_repricing_config", + "type": "google.cloud.channel_v1.types.CustomerRepricingConfig" }, { "name": "retry", @@ -5104,22 +6714,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", - "shortName": "update_channel_partner_link" + "resultType": "google.cloud.channel_v1.types.CustomerRepricingConfig", + "shortName": "update_customer_repricing_config" }, - "description": "Sample for UpdateChannelPartnerLink", - "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_async.py", + "description": "Sample for UpdateCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_async", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_async", "segments": [ { - "end": 49, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 47, "start": 27, "type": "SHORT" }, @@ -5129,22 +6739,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_async.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_async.py" }, { "canonical": true, @@ -5153,19 +6763,23 @@ "fullName": "google.cloud.channel_v1.CloudChannelServiceClient", "shortName": "CloudChannelServiceClient" }, - "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.update_channel_partner_link", + "fullName": "google.cloud.channel_v1.CloudChannelServiceClient.update_customer_repricing_config", "method": { - "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", + "fullName": "google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig", "service": { "fullName": "google.cloud.channel.v1.CloudChannelService", "shortName": "CloudChannelService" }, - "shortName": "UpdateChannelPartnerLink" + "shortName": "UpdateCustomerRepricingConfig" }, "parameters": [ { "name": "request", - "type": "google.cloud.channel_v1.types.UpdateChannelPartnerLinkRequest" + "type": "google.cloud.channel_v1.types.UpdateCustomerRepricingConfigRequest" + }, + { + "name": "customer_repricing_config", + "type": "google.cloud.channel_v1.types.CustomerRepricingConfig" }, { "name": "retry", @@ -5180,22 +6794,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.channel_v1.types.ChannelPartnerLink", - "shortName": "update_channel_partner_link" + "resultType": "google.cloud.channel_v1.types.CustomerRepricingConfig", + "shortName": "update_customer_repricing_config" }, - "description": "Sample for UpdateChannelPartnerLink", - "file": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_sync.py", + "description": "Sample for UpdateCustomerRepricingConfig", + "file": "cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync", + "regionTag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync", "segments": [ { - "end": 49, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 47, "start": 27, "type": "SHORT" }, @@ -5205,22 +6819,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ], - "title": "cloudchannel_v1_generated_cloud_channel_service_update_channel_partner_link_sync.py" + "title": "cloudchannel_v1_generated_cloud_channel_service_update_customer_repricing_config_sync.py" }, { "canonical": true, diff --git a/scripts/fixup_channel_v1_keywords.py b/scripts/fixup_channel_v1_keywords.py index 2734775..31f5ad4 100644 --- a/scripts/fixup_channel_v1_keywords.py +++ b/scripts/fixup_channel_v1_keywords.py @@ -46,14 +46,22 @@ class channelCallTransformer(cst.CSTTransformer): 'change_renewal_settings': ('name', 'renewal_settings', 'request_id', ), 'check_cloud_identity_accounts_exist': ('parent', 'domain', ), 'create_channel_partner_link': ('parent', 'channel_partner_link', ), + 'create_channel_partner_repricing_config': ('parent', 'channel_partner_repricing_config', ), 'create_customer': ('parent', 'customer', ), + 'create_customer_repricing_config': ('parent', 'customer_repricing_config', ), 'create_entitlement': ('parent', 'entitlement', 'request_id', ), + 'delete_channel_partner_repricing_config': ('name', ), 'delete_customer': ('name', ), + 'delete_customer_repricing_config': ('name', ), 'get_channel_partner_link': ('name', 'view', ), + 'get_channel_partner_repricing_config': ('name', ), 'get_customer': ('name', ), + 'get_customer_repricing_config': ('name', ), 'get_entitlement': ('name', ), 'import_customer': ('domain', 'cloud_identity_id', 'parent', 'overwrite_if_exists', 'auth_token', 'channel_partner_id', 'customer', ), 'list_channel_partner_links': ('parent', 'page_size', 'page_token', 'view', ), + 'list_channel_partner_repricing_configs': ('parent', 'page_size', 'page_token', 'filter', ), + 'list_customer_repricing_configs': ('parent', 'page_size', 'page_token', 'filter', ), 'list_customers': ('parent', 'page_size', 'page_token', 'filter', ), 'list_entitlements': ('parent', 'page_size', 'page_token', ), 'list_offers': ('parent', 'page_size', 'page_token', 'filter', 'language_code', ), @@ -73,7 +81,9 @@ class channelCallTransformer(cst.CSTTransformer): 'transfer_entitlements_to_google': ('parent', 'entitlements', 'request_id', ), 'unregister_subscriber': ('account', 'service_account', ), 'update_channel_partner_link': ('name', 'channel_partner_link', 'update_mask', ), + 'update_channel_partner_repricing_config': ('channel_partner_repricing_config', ), 'update_customer': ('customer', 'update_mask', ), + 'update_customer_repricing_config': ('customer_repricing_config', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: diff --git a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py index f1c58e9..f6e133b 100644 --- a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py +++ b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py @@ -36,6 +36,8 @@ from google.protobuf import any_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore +from google.type import date_pb2 # type: ignore +from google.type import decimal_pb2 # type: ignore from google.type import postal_address_pb2 # type: ignore import grpc from grpc.experimental import aio @@ -57,6 +59,7 @@ offers, operations, products, + repricing, service, ) @@ -5991,6 +5994,2904 @@ async def test_update_channel_partner_link_field_headers_async(): ) in kw["metadata"] +@pytest.mark.parametrize( + "request_type", + [ + service.GetCustomerRepricingConfigRequest, + dict, + ], +) +def test_get_customer_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig( + name="name_value", + ) + response = client.get_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.GetCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.CustomerRepricingConfig) + assert response.name == "name_value" + + +def test_get_customer_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + client.get_customer_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.GetCustomerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_get_customer_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.GetCustomerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig( + name="name_value", + ) + ) + response = await client.get_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.GetCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.CustomerRepricingConfig) + assert response.name == "name_value" + + +@pytest.mark.asyncio +async def test_get_customer_repricing_config_async_from_dict(): + await test_get_customer_repricing_config_async(request_type=dict) + + +def test_get_customer_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.GetCustomerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + call.return_value = repricing.CustomerRepricingConfig() + client.get_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_get_customer_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.GetCustomerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig() + ) + await client.get_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +def test_get_customer_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.get_customer_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +def test_get_customer_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_customer_repricing_config( + service.GetCustomerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.asyncio +async def test_get_customer_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.get_customer_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_get_customer_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.get_customer_repricing_config( + service.GetCustomerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.ListCustomerRepricingConfigsRequest, + dict, + ], +) +def test_list_customer_repricing_configs(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = service.ListCustomerRepricingConfigsResponse( + next_page_token="next_page_token_value", + ) + response = client.list_customer_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.ListCustomerRepricingConfigsRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListCustomerRepricingConfigsPager) + assert response.next_page_token == "next_page_token_value" + + +def test_list_customer_repricing_configs_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + client.list_customer_repricing_configs() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.ListCustomerRepricingConfigsRequest() + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_async( + transport: str = "grpc_asyncio", + request_type=service.ListCustomerRepricingConfigsRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + service.ListCustomerRepricingConfigsResponse( + next_page_token="next_page_token_value", + ) + ) + response = await client.list_customer_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.ListCustomerRepricingConfigsRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListCustomerRepricingConfigsAsyncPager) + assert response.next_page_token == "next_page_token_value" + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_async_from_dict(): + await test_list_customer_repricing_configs_async(request_type=dict) + + +def test_list_customer_repricing_configs_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.ListCustomerRepricingConfigsRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + call.return_value = service.ListCustomerRepricingConfigsResponse() + client.list_customer_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.ListCustomerRepricingConfigsRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + service.ListCustomerRepricingConfigsResponse() + ) + await client.list_customer_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +def test_list_customer_repricing_configs_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = service.ListCustomerRepricingConfigsResponse() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.list_customer_repricing_configs( + parent="parent_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + + +def test_list_customer_repricing_configs_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list_customer_repricing_configs( + service.ListCustomerRepricingConfigsRequest(), + parent="parent_value", + ) + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = service.ListCustomerRepricingConfigsResponse() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + service.ListCustomerRepricingConfigsResponse() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.list_customer_repricing_configs( + parent="parent_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.list_customer_repricing_configs( + service.ListCustomerRepricingConfigsRequest(), + parent="parent_value", + ) + + +def test_list_customer_repricing_configs_pager(transport_name: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[], + next_page_token="def", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + ), + RuntimeError, + ) + + metadata = () + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)), + ) + pager = client.list_customer_repricing_configs(request={}) + + assert pager._metadata == metadata + + results = [i for i in pager] + assert len(results) == 6 + assert all(isinstance(i, repricing.CustomerRepricingConfig) for i in results) + + +def test_list_customer_repricing_configs_pages(transport_name: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), "__call__" + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[], + next_page_token="def", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + ), + RuntimeError, + ) + pages = list(client.list_customer_repricing_configs(request={}).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_async_pager(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), + "__call__", + new_callable=mock.AsyncMock, + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[], + next_page_token="def", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + ), + RuntimeError, + ) + async_pager = await client.list_customer_repricing_configs( + request={}, + ) + assert async_pager.next_page_token == "abc" + responses = [] + async for response in async_pager: # pragma: no branch + responses.append(response) + + assert len(responses) == 6 + assert all(isinstance(i, repricing.CustomerRepricingConfig) for i in responses) + + +@pytest.mark.asyncio +async def test_list_customer_repricing_configs_async_pages(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_customer_repricing_configs), + "__call__", + new_callable=mock.AsyncMock, + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[], + next_page_token="def", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListCustomerRepricingConfigsResponse( + customer_repricing_configs=[ + repricing.CustomerRepricingConfig(), + repricing.CustomerRepricingConfig(), + ], + ), + RuntimeError, + ) + pages = [] + async for page_ in ( + await client.list_customer_repricing_configs(request={}) + ).pages: # pragma: no branch + pages.append(page_) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +@pytest.mark.parametrize( + "request_type", + [ + service.CreateCustomerRepricingConfigRequest, + dict, + ], +) +def test_create_customer_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig( + name="name_value", + ) + response = client.create_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.CustomerRepricingConfig) + assert response.name == "name_value" + + +def test_create_customer_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + client.create_customer_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateCustomerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_create_customer_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.CreateCustomerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig( + name="name_value", + ) + ) + response = await client.create_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.CustomerRepricingConfig) + assert response.name == "name_value" + + +@pytest.mark.asyncio +async def test_create_customer_repricing_config_async_from_dict(): + await test_create_customer_repricing_config_async(request_type=dict) + + +def test_create_customer_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateCustomerRepricingConfigRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + call.return_value = repricing.CustomerRepricingConfig() + client.create_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_create_customer_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateCustomerRepricingConfigRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig() + ) + await client.create_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +def test_create_customer_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.create_customer_repricing_config( + parent="parent_value", + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].customer_repricing_config + mock_val = repricing.CustomerRepricingConfig(name="name_value") + assert arg == mock_val + + +def test_create_customer_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.create_customer_repricing_config( + service.CreateCustomerRepricingConfigRequest(), + parent="parent_value", + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.asyncio +async def test_create_customer_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.create_customer_repricing_config( + parent="parent_value", + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].customer_repricing_config + mock_val = repricing.CustomerRepricingConfig(name="name_value") + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_create_customer_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.create_customer_repricing_config( + service.CreateCustomerRepricingConfigRequest(), + parent="parent_value", + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.UpdateCustomerRepricingConfigRequest, + dict, + ], +) +def test_update_customer_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig( + name="name_value", + ) + response = client.update_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.UpdateCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.CustomerRepricingConfig) + assert response.name == "name_value" + + +def test_update_customer_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + client.update_customer_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.UpdateCustomerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_update_customer_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.UpdateCustomerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig( + name="name_value", + ) + ) + response = await client.update_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.UpdateCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.CustomerRepricingConfig) + assert response.name == "name_value" + + +@pytest.mark.asyncio +async def test_update_customer_repricing_config_async_from_dict(): + await test_update_customer_repricing_config_async(request_type=dict) + + +def test_update_customer_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.UpdateCustomerRepricingConfigRequest() + + request.customer_repricing_config.name = "customer_repricing_config.name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + call.return_value = repricing.CustomerRepricingConfig() + client.update_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "customer_repricing_config.name=customer_repricing_config.name/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_update_customer_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.UpdateCustomerRepricingConfigRequest() + + request.customer_repricing_config.name = "customer_repricing_config.name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig() + ) + await client.update_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "customer_repricing_config.name=customer_repricing_config.name/value", + ) in kw["metadata"] + + +def test_update_customer_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.update_customer_repricing_config( + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].customer_repricing_config + mock_val = repricing.CustomerRepricingConfig(name="name_value") + assert arg == mock_val + + +def test_update_customer_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_customer_repricing_config( + service.UpdateCustomerRepricingConfigRequest(), + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.asyncio +async def test_update_customer_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.CustomerRepricingConfig() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.CustomerRepricingConfig() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.update_customer_repricing_config( + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].customer_repricing_config + mock_val = repricing.CustomerRepricingConfig(name="name_value") + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_update_customer_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.update_customer_repricing_config( + service.UpdateCustomerRepricingConfigRequest(), + customer_repricing_config=repricing.CustomerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.DeleteCustomerRepricingConfigRequest, + dict, + ], +) +def test_delete_customer_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = None + response = client.delete_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.DeleteCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert response is None + + +def test_delete_customer_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + client.delete_customer_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.DeleteCustomerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_delete_customer_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.DeleteCustomerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) + response = await client.delete_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.DeleteCustomerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert response is None + + +@pytest.mark.asyncio +async def test_delete_customer_repricing_config_async_from_dict(): + await test_delete_customer_repricing_config_async(request_type=dict) + + +def test_delete_customer_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.DeleteCustomerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + call.return_value = None + client.delete_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_delete_customer_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.DeleteCustomerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) + await client.delete_customer_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +def test_delete_customer_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = None + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.delete_customer_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +def test_delete_customer_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_customer_repricing_config( + service.DeleteCustomerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.asyncio +async def test_delete_customer_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_customer_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = None + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.delete_customer_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_delete_customer_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.delete_customer_repricing_config( + service.DeleteCustomerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.GetChannelPartnerRepricingConfigRequest, + dict, + ], +) +def test_get_channel_partner_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig( + name="name_value", + ) + response = client.get_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.GetChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.ChannelPartnerRepricingConfig) + assert response.name == "name_value" + + +def test_get_channel_partner_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + client.get_channel_partner_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.GetChannelPartnerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_get_channel_partner_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.GetChannelPartnerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig( + name="name_value", + ) + ) + response = await client.get_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.GetChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.ChannelPartnerRepricingConfig) + assert response.name == "name_value" + + +@pytest.mark.asyncio +async def test_get_channel_partner_repricing_config_async_from_dict(): + await test_get_channel_partner_repricing_config_async(request_type=dict) + + +def test_get_channel_partner_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.GetChannelPartnerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = repricing.ChannelPartnerRepricingConfig() + client.get_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_get_channel_partner_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.GetChannelPartnerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig() + ) + await client.get_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +def test_get_channel_partner_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.get_channel_partner_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +def test_get_channel_partner_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.get_channel_partner_repricing_config( + service.GetChannelPartnerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.asyncio +async def test_get_channel_partner_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.get_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.get_channel_partner_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_get_channel_partner_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.get_channel_partner_repricing_config( + service.GetChannelPartnerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.ListChannelPartnerRepricingConfigsRequest, + dict, + ], +) +def test_list_channel_partner_repricing_configs(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = service.ListChannelPartnerRepricingConfigsResponse( + next_page_token="next_page_token_value", + ) + response = client.list_channel_partner_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.ListChannelPartnerRepricingConfigsRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListChannelPartnerRepricingConfigsPager) + assert response.next_page_token == "next_page_token_value" + + +def test_list_channel_partner_repricing_configs_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + client.list_channel_partner_repricing_configs() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.ListChannelPartnerRepricingConfigsRequest() + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_async( + transport: str = "grpc_asyncio", + request_type=service.ListChannelPartnerRepricingConfigsRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + service.ListChannelPartnerRepricingConfigsResponse( + next_page_token="next_page_token_value", + ) + ) + response = await client.list_channel_partner_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.ListChannelPartnerRepricingConfigsRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, pagers.ListChannelPartnerRepricingConfigsAsyncPager) + assert response.next_page_token == "next_page_token_value" + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_async_from_dict(): + await test_list_channel_partner_repricing_configs_async(request_type=dict) + + +def test_list_channel_partner_repricing_configs_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.ListChannelPartnerRepricingConfigsRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + call.return_value = service.ListChannelPartnerRepricingConfigsResponse() + client.list_channel_partner_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.ListChannelPartnerRepricingConfigsRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + service.ListChannelPartnerRepricingConfigsResponse() + ) + await client.list_channel_partner_repricing_configs(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +def test_list_channel_partner_repricing_configs_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = service.ListChannelPartnerRepricingConfigsResponse() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.list_channel_partner_repricing_configs( + parent="parent_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + + +def test_list_channel_partner_repricing_configs_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.list_channel_partner_repricing_configs( + service.ListChannelPartnerRepricingConfigsRequest(), + parent="parent_value", + ) + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = service.ListChannelPartnerRepricingConfigsResponse() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + service.ListChannelPartnerRepricingConfigsResponse() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.list_channel_partner_repricing_configs( + parent="parent_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.list_channel_partner_repricing_configs( + service.ListChannelPartnerRepricingConfigsRequest(), + parent="parent_value", + ) + + +def test_list_channel_partner_repricing_configs_pager(transport_name: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[], + next_page_token="def", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + ), + RuntimeError, + ) + + metadata = () + metadata = tuple(metadata) + ( + gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)), + ) + pager = client.list_channel_partner_repricing_configs(request={}) + + assert pager._metadata == metadata + + results = [i for i in pager] + assert len(results) == 6 + assert all( + isinstance(i, repricing.ChannelPartnerRepricingConfig) for i in results + ) + + +def test_list_channel_partner_repricing_configs_pages(transport_name: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials, + transport=transport_name, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), "__call__" + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[], + next_page_token="def", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + ), + RuntimeError, + ) + pages = list(client.list_channel_partner_repricing_configs(request={}).pages) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_async_pager(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), + "__call__", + new_callable=mock.AsyncMock, + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[], + next_page_token="def", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + ), + RuntimeError, + ) + async_pager = await client.list_channel_partner_repricing_configs( + request={}, + ) + assert async_pager.next_page_token == "abc" + responses = [] + async for response in async_pager: # pragma: no branch + responses.append(response) + + assert len(responses) == 6 + assert all( + isinstance(i, repricing.ChannelPartnerRepricingConfig) for i in responses + ) + + +@pytest.mark.asyncio +async def test_list_channel_partner_repricing_configs_async_pages(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials, + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.list_channel_partner_repricing_configs), + "__call__", + new_callable=mock.AsyncMock, + ) as call: + # Set the response to a series of pages. + call.side_effect = ( + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="abc", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[], + next_page_token="def", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + ], + next_page_token="ghi", + ), + service.ListChannelPartnerRepricingConfigsResponse( + channel_partner_repricing_configs=[ + repricing.ChannelPartnerRepricingConfig(), + repricing.ChannelPartnerRepricingConfig(), + ], + ), + RuntimeError, + ) + pages = [] + async for page_ in ( + await client.list_channel_partner_repricing_configs(request={}) + ).pages: # pragma: no branch + pages.append(page_) + for page_, token in zip(pages, ["abc", "def", "ghi", ""]): + assert page_.raw_page.next_page_token == token + + +@pytest.mark.parametrize( + "request_type", + [ + service.CreateChannelPartnerRepricingConfigRequest, + dict, + ], +) +def test_create_channel_partner_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig( + name="name_value", + ) + response = client.create_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.ChannelPartnerRepricingConfig) + assert response.name == "name_value" + + +def test_create_channel_partner_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + client.create_channel_partner_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateChannelPartnerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_create_channel_partner_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.CreateChannelPartnerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig( + name="name_value", + ) + ) + response = await client.create_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.CreateChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.ChannelPartnerRepricingConfig) + assert response.name == "name_value" + + +@pytest.mark.asyncio +async def test_create_channel_partner_repricing_config_async_from_dict(): + await test_create_channel_partner_repricing_config_async(request_type=dict) + + +def test_create_channel_partner_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateChannelPartnerRepricingConfigRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = repricing.ChannelPartnerRepricingConfig() + client.create_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_create_channel_partner_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.CreateChannelPartnerRepricingConfigRequest() + + request.parent = "parent/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig() + ) + await client.create_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "parent=parent/value", + ) in kw["metadata"] + + +def test_create_channel_partner_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.create_channel_partner_repricing_config( + parent="parent_value", + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].channel_partner_repricing_config + mock_val = repricing.ChannelPartnerRepricingConfig(name="name_value") + assert arg == mock_val + + +def test_create_channel_partner_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.create_channel_partner_repricing_config( + service.CreateChannelPartnerRepricingConfigRequest(), + parent="parent_value", + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.asyncio +async def test_create_channel_partner_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.create_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.create_channel_partner_repricing_config( + parent="parent_value", + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].channel_partner_repricing_config + mock_val = repricing.ChannelPartnerRepricingConfig(name="name_value") + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_create_channel_partner_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.create_channel_partner_repricing_config( + service.CreateChannelPartnerRepricingConfigRequest(), + parent="parent_value", + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.UpdateChannelPartnerRepricingConfigRequest, + dict, + ], +) +def test_update_channel_partner_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig( + name="name_value", + ) + response = client.update_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.UpdateChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.ChannelPartnerRepricingConfig) + assert response.name == "name_value" + + +def test_update_channel_partner_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + client.update_channel_partner_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.UpdateChannelPartnerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_update_channel_partner_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.UpdateChannelPartnerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig( + name="name_value", + ) + ) + response = await client.update_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.UpdateChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert isinstance(response, repricing.ChannelPartnerRepricingConfig) + assert response.name == "name_value" + + +@pytest.mark.asyncio +async def test_update_channel_partner_repricing_config_async_from_dict(): + await test_update_channel_partner_repricing_config_async(request_type=dict) + + +def test_update_channel_partner_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.UpdateChannelPartnerRepricingConfigRequest() + + request.channel_partner_repricing_config.name = ( + "channel_partner_repricing_config.name/value" + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = repricing.ChannelPartnerRepricingConfig() + client.update_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "channel_partner_repricing_config.name=channel_partner_repricing_config.name/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_update_channel_partner_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.UpdateChannelPartnerRepricingConfigRequest() + + request.channel_partner_repricing_config.name = ( + "channel_partner_repricing_config.name/value" + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig() + ) + await client.update_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "channel_partner_repricing_config.name=channel_partner_repricing_config.name/value", + ) in kw["metadata"] + + +def test_update_channel_partner_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig() + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.update_channel_partner_repricing_config( + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].channel_partner_repricing_config + mock_val = repricing.ChannelPartnerRepricingConfig(name="name_value") + assert arg == mock_val + + +def test_update_channel_partner_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.update_channel_partner_repricing_config( + service.UpdateChannelPartnerRepricingConfigRequest(), + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.asyncio +async def test_update_channel_partner_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.update_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = repricing.ChannelPartnerRepricingConfig() + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( + repricing.ChannelPartnerRepricingConfig() + ) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.update_channel_partner_repricing_config( + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].channel_partner_repricing_config + mock_val = repricing.ChannelPartnerRepricingConfig(name="name_value") + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_update_channel_partner_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.update_channel_partner_repricing_config( + service.UpdateChannelPartnerRepricingConfigRequest(), + channel_partner_repricing_config=repricing.ChannelPartnerRepricingConfig( + name="name_value" + ), + ) + + +@pytest.mark.parametrize( + "request_type", + [ + service.DeleteChannelPartnerRepricingConfigRequest, + dict, + ], +) +def test_delete_channel_partner_repricing_config(request_type, transport: str = "grpc"): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = None + response = client.delete_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == service.DeleteChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert response is None + + +def test_delete_channel_partner_repricing_config_empty_call(): + # This test is a coverage failsafe to make sure that totally empty calls, + # i.e. request == None and no flattened fields passed, work. + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + transport="grpc", + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + client.delete_channel_partner_repricing_config() + call.assert_called() + _, args, _ = call.mock_calls[0] + assert args[0] == service.DeleteChannelPartnerRepricingConfigRequest() + + +@pytest.mark.asyncio +async def test_delete_channel_partner_repricing_config_async( + transport: str = "grpc_asyncio", + request_type=service.DeleteChannelPartnerRepricingConfigRequest, +): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + transport=transport, + ) + + # Everything is optional in proto3 as far as the runtime is concerned, + # and we are mocking out the actual API, so just send an empty request. + request = request_type() + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) + response = await client.delete_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == service.DeleteChannelPartnerRepricingConfigRequest() + + # Establish that the response is the type that we expect. + assert response is None + + +@pytest.mark.asyncio +async def test_delete_channel_partner_repricing_config_async_from_dict(): + await test_delete_channel_partner_repricing_config_async(request_type=dict) + + +def test_delete_channel_partner_repricing_config_field_headers(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.DeleteChannelPartnerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = None + client.delete_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +@pytest.mark.asyncio +async def test_delete_channel_partner_repricing_config_field_headers_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Any value that is part of the HTTP/1.1 URI should be sent as + # a field header. Set these to a non-empty value. + request = service.DeleteChannelPartnerRepricingConfigRequest() + + request.name = "name/value" + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) + await client.delete_channel_partner_repricing_config(request) + + # Establish that the underlying gRPC stub method was called. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + assert args[0] == request + + # Establish that the field header was sent. + _, _, kw = call.mock_calls[0] + assert ( + "x-goog-request-params", + "name=name/value", + ) in kw["metadata"] + + +def test_delete_channel_partner_repricing_config_flattened(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = None + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + client.delete_channel_partner_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) == 1 + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +def test_delete_channel_partner_repricing_config_flattened_error(): + client = CloudChannelServiceClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + client.delete_channel_partner_repricing_config( + service.DeleteChannelPartnerRepricingConfigRequest(), + name="name_value", + ) + + +@pytest.mark.asyncio +async def test_delete_channel_partner_repricing_config_flattened_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Mock the actual call within the gRPC stub, and fake the request. + with mock.patch.object( + type(client.transport.delete_channel_partner_repricing_config), "__call__" + ) as call: + # Designate an appropriate return value for the call. + call.return_value = None + + call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(None) + # Call the method with a truthy value for each flattened field, + # using the keyword arguments to the method. + response = await client.delete_channel_partner_repricing_config( + name="name_value", + ) + + # Establish that the underlying call was made with the expected + # request object values. + assert len(call.mock_calls) + _, args, _ = call.mock_calls[0] + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val + + +@pytest.mark.asyncio +async def test_delete_channel_partner_repricing_config_flattened_error_async(): + client = CloudChannelServiceAsyncClient( + credentials=ga_credentials.AnonymousCredentials(), + ) + + # Attempting to call a method with both a request object and flattened + # fields is an error. + with pytest.raises(ValueError): + await client.delete_channel_partner_repricing_config( + service.DeleteChannelPartnerRepricingConfigRequest(), + name="name_value", + ) + + @pytest.mark.parametrize( "request_type", [ @@ -8630,6 +11531,16 @@ def test_cloud_channel_service_base_transport(): "get_channel_partner_link", "create_channel_partner_link", "update_channel_partner_link", + "get_customer_repricing_config", + "list_customer_repricing_configs", + "create_customer_repricing_config", + "update_customer_repricing_config", + "delete_customer_repricing_config", + "get_channel_partner_repricing_config", + "list_channel_partner_repricing_configs", + "create_channel_partner_repricing_config", + "update_channel_partner_repricing_config", + "delete_channel_partner_repricing_config", "lookup_offer", "list_products", "list_skus", @@ -9028,9 +11939,37 @@ def test_parse_channel_partner_link_path(): assert expected == actual -def test_customer_path(): +def test_channel_partner_repricing_config_path(): account = "oyster" - customer = "nudibranch" + channel_partner = "nudibranch" + channel_partner_repricing_config = "cuttlefish" + expected = "accounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}".format( + account=account, + channel_partner=channel_partner, + channel_partner_repricing_config=channel_partner_repricing_config, + ) + actual = CloudChannelServiceClient.channel_partner_repricing_config_path( + account, channel_partner, channel_partner_repricing_config + ) + assert expected == actual + + +def test_parse_channel_partner_repricing_config_path(): + expected = { + "account": "mussel", + "channel_partner": "winkle", + "channel_partner_repricing_config": "nautilus", + } + path = CloudChannelServiceClient.channel_partner_repricing_config_path(**expected) + + # Check that the path construction is reversible. + actual = CloudChannelServiceClient.parse_channel_partner_repricing_config_path(path) + assert expected == actual + + +def test_customer_path(): + account = "scallop" + customer = "abalone" expected = "accounts/{account}/customers/{customer}".format( account=account, customer=customer, @@ -9041,8 +11980,8 @@ def test_customer_path(): def test_parse_customer_path(): expected = { - "account": "cuttlefish", - "customer": "mussel", + "account": "squid", + "customer": "clam", } path = CloudChannelServiceClient.customer_path(**expected) @@ -9051,6 +11990,34 @@ def test_parse_customer_path(): assert expected == actual +def test_customer_repricing_config_path(): + account = "whelk" + customer = "octopus" + customer_repricing_config = "oyster" + expected = "accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}".format( + account=account, + customer=customer, + customer_repricing_config=customer_repricing_config, + ) + actual = CloudChannelServiceClient.customer_repricing_config_path( + account, customer, customer_repricing_config + ) + assert expected == actual + + +def test_parse_customer_repricing_config_path(): + expected = { + "account": "nudibranch", + "customer": "cuttlefish", + "customer_repricing_config": "mussel", + } + path = CloudChannelServiceClient.customer_repricing_config_path(**expected) + + # Check that the path construction is reversible. + actual = CloudChannelServiceClient.parse_customer_repricing_config_path(path) + assert expected == actual + + def test_entitlement_path(): account = "winkle" customer = "nautilus" From f78e3632a439dd37bffa7efd6e919bb303948598 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 27 Apr 2022 09:48:31 -0400 Subject: [PATCH 14/15] chore: use gapic-generator-python 0.65.2 (#170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: https://github.com/googleapis/googleapis/commit/f91b6cf82e929280f6562f6110957c654bd9e2e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud_channel_service/async_client.py | 270 ++++++------- .../channel_v1/test_cloud_channel_service.py | 382 +++++++++--------- 2 files changed, 324 insertions(+), 328 deletions(-) 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 030c9fe..2ab26c2 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 @@ -296,9 +296,9 @@ async def list_customers( from google.cloud import channel_v1 - def sample_list_customers(): + async def sample_list_customers(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListCustomersRequest( @@ -309,7 +309,7 @@ def sample_list_customers(): page_result = client.list_customers(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -396,9 +396,9 @@ async def get_customer( from google.cloud import channel_v1 - def sample_get_customer(): + async def sample_get_customer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.GetCustomerRequest( @@ -406,7 +406,7 @@ def sample_get_customer(): ) # Make the request - response = client.get_customer(request=request) + response = await client.get_customer(request=request) # Handle the response print(response) @@ -510,9 +510,9 @@ async def check_cloud_identity_accounts_exist( from google.cloud import channel_v1 - def sample_check_cloud_identity_accounts_exist(): + async def sample_check_cloud_identity_accounts_exist(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.CheckCloudIdentityAccountsExistRequest( @@ -521,7 +521,7 @@ def sample_check_cloud_identity_accounts_exist(): ) # Make the request - response = client.check_cloud_identity_accounts_exist(request=request) + response = await client.check_cloud_identity_accounts_exist(request=request) # Handle the response print(response) @@ -597,9 +597,9 @@ async def create_customer( from google.cloud import channel_v1 - def sample_create_customer(): + async def sample_create_customer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) customer = channel_v1.Customer() @@ -612,7 +612,7 @@ def sample_create_customer(): ) # Make the request - response = client.create_customer(request=request) + response = await client.create_customer(request=request) # Handle the response print(response) @@ -688,9 +688,9 @@ async def update_customer( from google.cloud import channel_v1 - def sample_update_customer(): + async def sample_update_customer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) customer = channel_v1.Customer() @@ -702,7 +702,7 @@ def sample_update_customer(): ) # Make the request - response = client.update_customer(request=request) + response = await client.update_customer(request=request) # Handle the response print(response) @@ -779,9 +779,9 @@ async def delete_customer( from google.cloud import channel_v1 - def sample_delete_customer(): + async def sample_delete_customer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.DeleteCustomerRequest( @@ -789,7 +789,7 @@ def sample_delete_customer(): ) # Make the request - client.delete_customer(request=request) + await client.delete_customer(request=request) Args: request (Union[google.cloud.channel_v1.types.DeleteCustomerRequest, dict]): @@ -877,9 +877,9 @@ async def import_customer( from google.cloud import channel_v1 - def sample_import_customer(): + async def sample_import_customer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ImportCustomerRequest( @@ -889,7 +889,7 @@ def sample_import_customer(): ) # Make the request - response = client.import_customer(request=request) + response = await client.import_customer(request=request) # Handle the response print(response) @@ -974,9 +974,9 @@ async def provision_cloud_identity( from google.cloud import channel_v1 - def sample_provision_cloud_identity(): + async def sample_provision_cloud_identity(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ProvisionCloudIdentityRequest( @@ -988,7 +988,7 @@ def sample_provision_cloud_identity(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1073,9 +1073,9 @@ async def list_entitlements( from google.cloud import channel_v1 - def sample_list_entitlements(): + async def sample_list_entitlements(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListEntitlementsRequest( @@ -1086,7 +1086,7 @@ def sample_list_entitlements(): page_result = client.list_entitlements(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1181,9 +1181,9 @@ async def list_transferable_skus( from google.cloud import channel_v1 - def sample_list_transferable_skus(): + async def sample_list_transferable_skus(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListTransferableSkusRequest( @@ -1195,7 +1195,7 @@ def sample_list_transferable_skus(): page_result = client.list_transferable_skus(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1292,9 +1292,9 @@ async def list_transferable_offers( from google.cloud import channel_v1 - def sample_list_transferable_offers(): + async def sample_list_transferable_offers(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListTransferableOffersRequest( @@ -1307,7 +1307,7 @@ def sample_list_transferable_offers(): page_result = client.list_transferable_offers(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -1392,9 +1392,9 @@ async def get_entitlement( from google.cloud import channel_v1 - def sample_get_entitlement(): + async def sample_get_entitlement(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.GetEntitlementRequest( @@ -1402,7 +1402,7 @@ def sample_get_entitlement(): ) # Make the request - response = client.get_entitlement(request=request) + response = await client.get_entitlement(request=request) # Handle the response print(response) @@ -1509,9 +1509,9 @@ async def create_entitlement( from google.cloud import channel_v1 - def sample_create_entitlement(): + async def sample_create_entitlement(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) entitlement = channel_v1.Entitlement() @@ -1527,7 +1527,7 @@ def sample_create_entitlement(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1626,9 +1626,9 @@ async def change_parameters( from google.cloud import channel_v1 - def sample_change_parameters(): + async def sample_change_parameters(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ChangeParametersRequest( @@ -1640,7 +1640,7 @@ def sample_change_parameters(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1741,9 +1741,9 @@ async def change_renewal_settings( from google.cloud import channel_v1 - def sample_change_renewal_settings(): + async def sample_change_renewal_settings(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ChangeRenewalSettingsRequest( @@ -1755,7 +1755,7 @@ def sample_change_renewal_settings(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1852,9 +1852,9 @@ async def change_offer( from google.cloud import channel_v1 - def sample_change_offer(): + async def sample_change_offer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ChangeOfferRequest( @@ -1867,7 +1867,7 @@ def sample_change_offer(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -1967,9 +1967,9 @@ async def start_paid_service( from google.cloud import channel_v1 - def sample_start_paid_service(): + async def sample_start_paid_service(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.StartPaidServiceRequest( @@ -1981,7 +1981,7 @@ def sample_start_paid_service(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2078,9 +2078,9 @@ async def suspend_entitlement( from google.cloud import channel_v1 - def sample_suspend_entitlement(): + async def sample_suspend_entitlement(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.SuspendEntitlementRequest( @@ -2092,7 +2092,7 @@ def sample_suspend_entitlement(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2194,9 +2194,9 @@ async def cancel_entitlement( from google.cloud import channel_v1 - def sample_cancel_entitlement(): + async def sample_cancel_entitlement(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.CancelEntitlementRequest( @@ -2208,7 +2208,7 @@ def sample_cancel_entitlement(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2321,9 +2321,9 @@ async def activate_entitlement( from google.cloud import channel_v1 - def sample_activate_entitlement(): + async def sample_activate_entitlement(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ActivateEntitlementRequest( @@ -2335,7 +2335,7 @@ def sample_activate_entitlement(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2445,9 +2445,9 @@ async def transfer_entitlements( from google.cloud import channel_v1 - def sample_transfer_entitlements(): + async def sample_transfer_entitlements(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) entitlements = channel_v1.Entitlement() @@ -2463,7 +2463,7 @@ def sample_transfer_entitlements(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2572,9 +2572,9 @@ async def transfer_entitlements_to_google( from google.cloud import channel_v1 - def sample_transfer_entitlements_to_google(): + async def sample_transfer_entitlements_to_google(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) entitlements = channel_v1.Entitlement() @@ -2590,7 +2590,7 @@ def sample_transfer_entitlements_to_google(): print("Waiting for operation to complete...") - response = operation.result() + response = await operation.result() # Handle the response print(response) @@ -2688,9 +2688,9 @@ async def list_channel_partner_links( from google.cloud import channel_v1 - def sample_list_channel_partner_links(): + async def sample_list_channel_partner_links(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListChannelPartnerLinksRequest( @@ -2701,7 +2701,7 @@ def sample_list_channel_partner_links(): page_result = client.list_channel_partner_links(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -2789,9 +2789,9 @@ async def get_channel_partner_link( from google.cloud import channel_v1 - def sample_get_channel_partner_link(): + async def sample_get_channel_partner_link(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.GetChannelPartnerLinkRequest( @@ -2799,7 +2799,7 @@ def sample_get_channel_partner_link(): ) # Make the request - response = client.get_channel_partner_link(request=request) + response = await client.get_channel_partner_link(request=request) # Handle the response print(response) @@ -2887,9 +2887,9 @@ async def create_channel_partner_link( from google.cloud import channel_v1 - def sample_create_channel_partner_link(): + async def sample_create_channel_partner_link(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) channel_partner_link = channel_v1.ChannelPartnerLink() @@ -2902,7 +2902,7 @@ def sample_create_channel_partner_link(): ) # Make the request - response = client.create_channel_partner_link(request=request) + response = await client.create_channel_partner_link(request=request) # Handle the response print(response) @@ -2990,9 +2990,9 @@ async def update_channel_partner_link( from google.cloud import channel_v1 - def sample_update_channel_partner_link(): + async def sample_update_channel_partner_link(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) channel_partner_link = channel_v1.ChannelPartnerLink() @@ -3005,7 +3005,7 @@ def sample_update_channel_partner_link(): ) # Make the request - response = client.update_channel_partner_link(request=request) + response = await client.update_channel_partner_link(request=request) # Handle the response print(response) @@ -3085,9 +3085,9 @@ async def get_customer_repricing_config( from google.cloud import channel_v1 - def sample_get_customer_repricing_config(): + async def sample_get_customer_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.GetCustomerRepricingConfigRequest( @@ -3095,7 +3095,7 @@ def sample_get_customer_repricing_config(): ) # Make the request - response = client.get_customer_repricing_config(request=request) + response = await client.get_customer_repricing_config(request=request) # Handle the response print(response) @@ -3205,9 +3205,9 @@ async def list_customer_repricing_configs( from google.cloud import channel_v1 - def sample_list_customer_repricing_configs(): + async def sample_list_customer_repricing_configs(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListCustomerRepricingConfigsRequest( @@ -3218,7 +3218,7 @@ def sample_list_customer_repricing_configs(): page_result = client.list_customer_repricing_configs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -3363,9 +3363,9 @@ async def create_customer_repricing_config( from google.cloud import channel_v1 - def sample_create_customer_repricing_config(): + async def sample_create_customer_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) customer_repricing_config = channel_v1.CustomerRepricingConfig() @@ -3377,7 +3377,7 @@ def sample_create_customer_repricing_config(): ) # Make the request - response = client.create_customer_repricing_config(request=request) + response = await client.create_customer_repricing_config(request=request) # Handle the response print(response) @@ -3504,9 +3504,9 @@ async def update_customer_repricing_config( from google.cloud import channel_v1 - def sample_update_customer_repricing_config(): + async def sample_update_customer_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) customer_repricing_config = channel_v1.CustomerRepricingConfig() @@ -3517,7 +3517,7 @@ def sample_update_customer_repricing_config(): ) # Make the request - response = client.update_customer_repricing_config(request=request) + response = await client.update_customer_repricing_config(request=request) # Handle the response print(response) @@ -3626,9 +3626,9 @@ async def delete_customer_repricing_config( from google.cloud import channel_v1 - def sample_delete_customer_repricing_config(): + async def sample_delete_customer_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.DeleteCustomerRepricingConfigRequest( @@ -3636,7 +3636,7 @@ def sample_delete_customer_repricing_config(): ) # Make the request - client.delete_customer_repricing_config(request=request) + await client.delete_customer_repricing_config(request=request) Args: request (Union[google.cloud.channel_v1.types.DeleteCustomerRepricingConfigRequest, dict]): @@ -3725,9 +3725,9 @@ async def get_channel_partner_repricing_config( from google.cloud import channel_v1 - def sample_get_channel_partner_repricing_config(): + async def sample_get_channel_partner_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.GetChannelPartnerRepricingConfigRequest( @@ -3735,7 +3735,7 @@ def sample_get_channel_partner_repricing_config(): ) # Make the request - response = client.get_channel_partner_repricing_config(request=request) + response = await client.get_channel_partner_repricing_config(request=request) # Handle the response print(response) @@ -3846,9 +3846,9 @@ async def list_channel_partner_repricing_configs( from google.cloud import channel_v1 - def sample_list_channel_partner_repricing_configs(): + async def sample_list_channel_partner_repricing_configs(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListChannelPartnerRepricingConfigsRequest( @@ -3859,7 +3859,7 @@ def sample_list_channel_partner_repricing_configs(): page_result = client.list_channel_partner_repricing_configs(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4002,9 +4002,9 @@ async def create_channel_partner_repricing_config( from google.cloud import channel_v1 - def sample_create_channel_partner_repricing_config(): + async def sample_create_channel_partner_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() @@ -4016,7 +4016,7 @@ def sample_create_channel_partner_repricing_config(): ) # Make the request - response = client.create_channel_partner_repricing_config(request=request) + response = await client.create_channel_partner_repricing_config(request=request) # Handle the response print(response) @@ -4147,9 +4147,9 @@ async def update_channel_partner_repricing_config( from google.cloud import channel_v1 - def sample_update_channel_partner_repricing_config(): + async def sample_update_channel_partner_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) channel_partner_repricing_config = channel_v1.ChannelPartnerRepricingConfig() @@ -4160,7 +4160,7 @@ def sample_update_channel_partner_repricing_config(): ) # Make the request - response = client.update_channel_partner_repricing_config(request=request) + response = await client.update_channel_partner_repricing_config(request=request) # Handle the response print(response) @@ -4272,9 +4272,9 @@ async def delete_channel_partner_repricing_config( from google.cloud import channel_v1 - def sample_delete_channel_partner_repricing_config(): + async def sample_delete_channel_partner_repricing_config(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.DeleteChannelPartnerRepricingConfigRequest( @@ -4282,7 +4282,7 @@ def sample_delete_channel_partner_repricing_config(): ) # Make the request - client.delete_channel_partner_repricing_config(request=request) + await client.delete_channel_partner_repricing_config(request=request) Args: request (Union[google.cloud.channel_v1.types.DeleteChannelPartnerRepricingConfigRequest, dict]): @@ -4367,9 +4367,9 @@ async def lookup_offer( from google.cloud import channel_v1 - def sample_lookup_offer(): + async def sample_lookup_offer(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.LookupOfferRequest( @@ -4377,7 +4377,7 @@ def sample_lookup_offer(): ) # Make the request - response = client.lookup_offer(request=request) + response = await client.lookup_offer(request=request) # Handle the response print(response) @@ -4449,9 +4449,9 @@ async def list_products( from google.cloud import channel_v1 - def sample_list_products(): + async def sample_list_products(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListProductsRequest( @@ -4462,7 +4462,7 @@ def sample_list_products(): page_result = client.list_products(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4532,9 +4532,9 @@ async def list_skus( from google.cloud import channel_v1 - def sample_list_skus(): + async def sample_list_skus(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListSkusRequest( @@ -4546,7 +4546,7 @@ def sample_list_skus(): page_result = client.list_skus(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4622,9 +4622,9 @@ async def list_offers( from google.cloud import channel_v1 - def sample_list_offers(): + async def sample_list_offers(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListOffersRequest( @@ -4635,7 +4635,7 @@ def sample_list_offers(): page_result = client.list_offers(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4716,9 +4716,9 @@ async def list_purchasable_skus( from google.cloud import channel_v1 - def sample_list_purchasable_skus(): + async def sample_list_purchasable_skus(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) create_entitlement_purchase = channel_v1.CreateEntitlementPurchase() @@ -4733,7 +4733,7 @@ def sample_list_purchasable_skus(): page_result = client.list_purchasable_skus(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4816,9 +4816,9 @@ async def list_purchasable_offers( from google.cloud import channel_v1 - def sample_list_purchasable_offers(): + async def sample_list_purchasable_offers(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) create_entitlement_purchase = channel_v1.CreateEntitlementPurchase() @@ -4833,7 +4833,7 @@ def sample_list_purchasable_offers(): page_result = client.list_purchasable_offers(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: @@ -4924,9 +4924,9 @@ async def register_subscriber( from google.cloud import channel_v1 - def sample_register_subscriber(): + async def sample_register_subscriber(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.RegisterSubscriberRequest( @@ -4935,7 +4935,7 @@ def sample_register_subscriber(): ) # Make the request - response = client.register_subscriber(request=request) + response = await client.register_subscriber(request=request) # Handle the response print(response) @@ -5019,9 +5019,9 @@ async def unregister_subscriber( from google.cloud import channel_v1 - def sample_unregister_subscriber(): + async def sample_unregister_subscriber(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.UnregisterSubscriberRequest( @@ -5030,7 +5030,7 @@ def sample_unregister_subscriber(): ) # Make the request - response = client.unregister_subscriber(request=request) + response = await client.unregister_subscriber(request=request) # Handle the response print(response) @@ -5109,9 +5109,9 @@ async def list_subscribers( from google.cloud import channel_v1 - def sample_list_subscribers(): + async def sample_list_subscribers(): # Create a client - client = channel_v1.CloudChannelServiceClient() + client = channel_v1.CloudChannelServiceAsyncClient() # Initialize request argument(s) request = channel_v1.ListSubscribersRequest( @@ -5122,7 +5122,7 @@ def sample_list_subscribers(): page_result = client.list_subscribers(request=request) # Handle the response - for response in page_result: + async for response in page_result: print(response) Args: diff --git a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py index f6e133b..8fb406c 100644 --- a/tests/unit/gapic/channel_v1/test_cloud_channel_service.py +++ b/tests/unit/gapic/channel_v1/test_cloud_channel_service.py @@ -790,7 +790,7 @@ def test_list_customers_field_headers(): # a field header. Set these to a non-empty value. request = service.ListCustomersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_customers), "__call__") as call: @@ -806,7 +806,7 @@ def test_list_customers_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -820,7 +820,7 @@ async def test_list_customers_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListCustomersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_customers), "__call__") as call: @@ -838,7 +838,7 @@ async def test_list_customers_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -887,7 +887,7 @@ def test_list_customers_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, customers.Customer) for i in results) @@ -1152,7 +1152,7 @@ def test_get_customer_field_headers(): # a field header. Set these to a non-empty value. request = service.GetCustomerRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_customer), "__call__") as call: @@ -1168,7 +1168,7 @@ def test_get_customer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1182,7 +1182,7 @@ async def test_get_customer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetCustomerRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_customer), "__call__") as call: @@ -1198,7 +1198,7 @@ async def test_get_customer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1381,7 +1381,7 @@ def test_check_cloud_identity_accounts_exist_field_headers(): # a field header. Set these to a non-empty value. request = service.CheckCloudIdentityAccountsExistRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1399,7 +1399,7 @@ def test_check_cloud_identity_accounts_exist_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1413,7 +1413,7 @@ async def test_check_cloud_identity_accounts_exist_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CheckCloudIdentityAccountsExistRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1433,7 +1433,7 @@ async def test_check_cloud_identity_accounts_exist_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1559,7 +1559,7 @@ def test_create_customer_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateCustomerRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_customer), "__call__") as call: @@ -1575,7 +1575,7 @@ def test_create_customer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1589,7 +1589,7 @@ async def test_create_customer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateCustomerRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_customer), "__call__") as call: @@ -1605,7 +1605,7 @@ async def test_create_customer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1731,7 +1731,7 @@ def test_update_customer_field_headers(): # a field header. Set these to a non-empty value. request = service.UpdateCustomerRequest() - request.customer.name = "customer.name/value" + request.customer.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_customer), "__call__") as call: @@ -1747,7 +1747,7 @@ def test_update_customer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer.name=customer.name/value", + "customer.name=name_value", ) in kw["metadata"] @@ -1761,7 +1761,7 @@ async def test_update_customer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UpdateCustomerRequest() - request.customer.name = "customer.name/value" + request.customer.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_customer), "__call__") as call: @@ -1777,7 +1777,7 @@ async def test_update_customer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer.name=customer.name/value", + "customer.name=name_value", ) in kw["metadata"] @@ -1871,7 +1871,7 @@ def test_delete_customer_field_headers(): # a field header. Set these to a non-empty value. request = service.DeleteCustomerRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_customer), "__call__") as call: @@ -1887,7 +1887,7 @@ def test_delete_customer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1901,7 +1901,7 @@ async def test_delete_customer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.DeleteCustomerRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_customer), "__call__") as call: @@ -1917,7 +1917,7 @@ async def test_delete_customer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2123,7 +2123,7 @@ def test_import_customer_field_headers(): # a field header. Set these to a non-empty value. request = service.ImportCustomerRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.import_customer), "__call__") as call: @@ -2139,7 +2139,7 @@ def test_import_customer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2153,7 +2153,7 @@ async def test_import_customer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ImportCustomerRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.import_customer), "__call__") as call: @@ -2169,7 +2169,7 @@ async def test_import_customer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2271,7 +2271,7 @@ def test_provision_cloud_identity_field_headers(): # a field header. Set these to a non-empty value. request = service.ProvisionCloudIdentityRequest() - request.customer = "customer/value" + request.customer = "customer_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2289,7 +2289,7 @@ def test_provision_cloud_identity_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer=customer/value", + "customer=customer_value", ) in kw["metadata"] @@ -2303,7 +2303,7 @@ async def test_provision_cloud_identity_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ProvisionCloudIdentityRequest() - request.customer = "customer/value" + request.customer = "customer_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2323,7 +2323,7 @@ async def test_provision_cloud_identity_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer=customer/value", + "customer=customer_value", ) in kw["metadata"] @@ -2431,7 +2431,7 @@ def test_list_entitlements_field_headers(): # a field header. Set these to a non-empty value. request = service.ListEntitlementsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2449,7 +2449,7 @@ def test_list_entitlements_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2463,7 +2463,7 @@ async def test_list_entitlements_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListEntitlementsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2483,7 +2483,7 @@ async def test_list_entitlements_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2534,7 +2534,7 @@ def test_list_entitlements_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, entitlements.Entitlement) for i in results) @@ -2787,7 +2787,7 @@ def test_list_transferable_skus_field_headers(): # a field header. Set these to a non-empty value. request = service.ListTransferableSkusRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2805,7 +2805,7 @@ def test_list_transferable_skus_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2819,7 +2819,7 @@ async def test_list_transferable_skus_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListTransferableSkusRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2839,7 +2839,7 @@ async def test_list_transferable_skus_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2890,7 +2890,7 @@ def test_list_transferable_skus_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, entitlements.TransferableSku) for i in results) @@ -3143,7 +3143,7 @@ def test_list_transferable_offers_field_headers(): # a field header. Set these to a non-empty value. request = service.ListTransferableOffersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3161,7 +3161,7 @@ def test_list_transferable_offers_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3175,7 +3175,7 @@ async def test_list_transferable_offers_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListTransferableOffersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3195,7 +3195,7 @@ async def test_list_transferable_offers_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3246,7 +3246,7 @@ def test_list_transferable_offers_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, service.TransferableOffer) for i in results) @@ -3521,7 +3521,7 @@ def test_get_entitlement_field_headers(): # a field header. Set these to a non-empty value. request = service.GetEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_entitlement), "__call__") as call: @@ -3537,7 +3537,7 @@ def test_get_entitlement_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3551,7 +3551,7 @@ async def test_get_entitlement_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_entitlement), "__call__") as call: @@ -3569,7 +3569,7 @@ async def test_get_entitlement_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3671,7 +3671,7 @@ def test_create_entitlement_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateEntitlementRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3689,7 +3689,7 @@ def test_create_entitlement_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3703,7 +3703,7 @@ async def test_create_entitlement_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateEntitlementRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3723,7 +3723,7 @@ async def test_create_entitlement_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3825,7 +3825,7 @@ def test_change_parameters_field_headers(): # a field header. Set these to a non-empty value. request = service.ChangeParametersRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3843,7 +3843,7 @@ def test_change_parameters_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3857,7 +3857,7 @@ async def test_change_parameters_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ChangeParametersRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3877,7 +3877,7 @@ async def test_change_parameters_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3979,7 +3979,7 @@ def test_change_renewal_settings_field_headers(): # a field header. Set these to a non-empty value. request = service.ChangeRenewalSettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3997,7 +3997,7 @@ def test_change_renewal_settings_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4011,7 +4011,7 @@ async def test_change_renewal_settings_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ChangeRenewalSettingsRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4031,7 +4031,7 @@ async def test_change_renewal_settings_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4127,7 +4127,7 @@ def test_change_offer_field_headers(): # a field header. Set these to a non-empty value. request = service.ChangeOfferRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.change_offer), "__call__") as call: @@ -4143,7 +4143,7 @@ def test_change_offer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4157,7 +4157,7 @@ async def test_change_offer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ChangeOfferRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.change_offer), "__call__") as call: @@ -4175,7 +4175,7 @@ async def test_change_offer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4277,7 +4277,7 @@ def test_start_paid_service_field_headers(): # a field header. Set these to a non-empty value. request = service.StartPaidServiceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4295,7 +4295,7 @@ def test_start_paid_service_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4309,7 +4309,7 @@ async def test_start_paid_service_field_headers_async(): # a field header. Set these to a non-empty value. request = service.StartPaidServiceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4329,7 +4329,7 @@ async def test_start_paid_service_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4431,7 +4431,7 @@ def test_suspend_entitlement_field_headers(): # a field header. Set these to a non-empty value. request = service.SuspendEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4449,7 +4449,7 @@ def test_suspend_entitlement_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4463,7 +4463,7 @@ async def test_suspend_entitlement_field_headers_async(): # a field header. Set these to a non-empty value. request = service.SuspendEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4483,7 +4483,7 @@ async def test_suspend_entitlement_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4585,7 +4585,7 @@ def test_cancel_entitlement_field_headers(): # a field header. Set these to a non-empty value. request = service.CancelEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4603,7 +4603,7 @@ def test_cancel_entitlement_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4617,7 +4617,7 @@ async def test_cancel_entitlement_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CancelEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4637,7 +4637,7 @@ async def test_cancel_entitlement_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4739,7 +4739,7 @@ def test_activate_entitlement_field_headers(): # a field header. Set these to a non-empty value. request = service.ActivateEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4757,7 +4757,7 @@ def test_activate_entitlement_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4771,7 +4771,7 @@ async def test_activate_entitlement_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ActivateEntitlementRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4791,7 +4791,7 @@ async def test_activate_entitlement_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4893,7 +4893,7 @@ def test_transfer_entitlements_field_headers(): # a field header. Set these to a non-empty value. request = service.TransferEntitlementsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4911,7 +4911,7 @@ def test_transfer_entitlements_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4925,7 +4925,7 @@ async def test_transfer_entitlements_field_headers_async(): # a field header. Set these to a non-empty value. request = service.TransferEntitlementsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4945,7 +4945,7 @@ async def test_transfer_entitlements_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5048,7 +5048,7 @@ def test_transfer_entitlements_to_google_field_headers(): # a field header. Set these to a non-empty value. request = service.TransferEntitlementsToGoogleRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5066,7 +5066,7 @@ def test_transfer_entitlements_to_google_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5080,7 +5080,7 @@ async def test_transfer_entitlements_to_google_field_headers_async(): # a field header. Set these to a non-empty value. request = service.TransferEntitlementsToGoogleRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5100,7 +5100,7 @@ async def test_transfer_entitlements_to_google_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5208,7 +5208,7 @@ def test_list_channel_partner_links_field_headers(): # a field header. Set these to a non-empty value. request = service.ListChannelPartnerLinksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5226,7 +5226,7 @@ def test_list_channel_partner_links_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5240,7 +5240,7 @@ async def test_list_channel_partner_links_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListChannelPartnerLinksRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5260,7 +5260,7 @@ async def test_list_channel_partner_links_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5311,7 +5311,7 @@ def test_list_channel_partner_links_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all( isinstance(i, channel_partner_links.ChannelPartnerLink) for i in results @@ -5584,7 +5584,7 @@ def test_get_channel_partner_link_field_headers(): # a field header. Set these to a non-empty value. request = service.GetChannelPartnerLinkRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5602,7 +5602,7 @@ def test_get_channel_partner_link_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5616,7 +5616,7 @@ async def test_get_channel_partner_link_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetChannelPartnerLinkRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5636,7 +5636,7 @@ async def test_get_channel_partner_link_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5761,7 +5761,7 @@ def test_create_channel_partner_link_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateChannelPartnerLinkRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5779,7 +5779,7 @@ def test_create_channel_partner_link_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5793,7 +5793,7 @@ async def test_create_channel_partner_link_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateChannelPartnerLinkRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5813,7 +5813,7 @@ async def test_create_channel_partner_link_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5938,7 +5938,7 @@ def test_update_channel_partner_link_field_headers(): # a field header. Set these to a non-empty value. request = service.UpdateChannelPartnerLinkRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5956,7 +5956,7 @@ def test_update_channel_partner_link_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5970,7 +5970,7 @@ async def test_update_channel_partner_link_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UpdateChannelPartnerLinkRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5990,7 +5990,7 @@ async def test_update_channel_partner_link_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6099,7 +6099,7 @@ def test_get_customer_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.GetCustomerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6117,7 +6117,7 @@ def test_get_customer_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6131,7 +6131,7 @@ async def test_get_customer_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetCustomerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6151,7 +6151,7 @@ async def test_get_customer_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -6346,7 +6346,7 @@ def test_list_customer_repricing_configs_field_headers(): # a field header. Set these to a non-empty value. request = service.ListCustomerRepricingConfigsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6364,7 +6364,7 @@ def test_list_customer_repricing_configs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -6378,7 +6378,7 @@ async def test_list_customer_repricing_configs_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListCustomerRepricingConfigsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6398,7 +6398,7 @@ async def test_list_customer_repricing_configs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -6535,7 +6535,7 @@ def test_list_customer_repricing_configs_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, repricing.CustomerRepricingConfig) for i in results) @@ -6789,7 +6789,7 @@ def test_create_customer_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateCustomerRepricingConfigRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6807,7 +6807,7 @@ def test_create_customer_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -6821,7 +6821,7 @@ async def test_create_customer_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateCustomerRepricingConfigRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6841,7 +6841,7 @@ async def test_create_customer_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7054,7 +7054,7 @@ def test_update_customer_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.UpdateCustomerRepricingConfigRequest() - request.customer_repricing_config.name = "customer_repricing_config.name/value" + request.customer_repricing_config.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7072,7 +7072,7 @@ def test_update_customer_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer_repricing_config.name=customer_repricing_config.name/value", + "customer_repricing_config.name=name_value", ) in kw["metadata"] @@ -7086,7 +7086,7 @@ async def test_update_customer_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UpdateCustomerRepricingConfigRequest() - request.customer_repricing_config.name = "customer_repricing_config.name/value" + request.customer_repricing_config.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7106,7 +7106,7 @@ async def test_update_customer_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer_repricing_config.name=customer_repricing_config.name/value", + "customer_repricing_config.name=name_value", ) in kw["metadata"] @@ -7301,7 +7301,7 @@ def test_delete_customer_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.DeleteCustomerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7319,7 +7319,7 @@ def test_delete_customer_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7333,7 +7333,7 @@ async def test_delete_customer_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.DeleteCustomerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7351,7 +7351,7 @@ async def test_delete_customer_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7544,7 +7544,7 @@ def test_get_channel_partner_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.GetChannelPartnerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7562,7 +7562,7 @@ def test_get_channel_partner_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7576,7 +7576,7 @@ async def test_get_channel_partner_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.GetChannelPartnerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7596,7 +7596,7 @@ async def test_get_channel_partner_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -7791,7 +7791,7 @@ def test_list_channel_partner_repricing_configs_field_headers(): # a field header. Set these to a non-empty value. request = service.ListChannelPartnerRepricingConfigsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7809,7 +7809,7 @@ def test_list_channel_partner_repricing_configs_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7823,7 +7823,7 @@ async def test_list_channel_partner_repricing_configs_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListChannelPartnerRepricingConfigsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -7843,7 +7843,7 @@ async def test_list_channel_partner_repricing_configs_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -7980,7 +7980,7 @@ def test_list_channel_partner_repricing_configs_pager(transport_name: str = "grp assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all( isinstance(i, repricing.ChannelPartnerRepricingConfig) for i in results @@ -8238,7 +8238,7 @@ def test_create_channel_partner_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.CreateChannelPartnerRepricingConfigRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8256,7 +8256,7 @@ def test_create_channel_partner_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -8270,7 +8270,7 @@ async def test_create_channel_partner_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.CreateChannelPartnerRepricingConfigRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8290,7 +8290,7 @@ async def test_create_channel_partner_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -8503,9 +8503,7 @@ def test_update_channel_partner_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.UpdateChannelPartnerRepricingConfigRequest() - request.channel_partner_repricing_config.name = ( - "channel_partner_repricing_config.name/value" - ) + request.channel_partner_repricing_config.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8523,7 +8521,7 @@ def test_update_channel_partner_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "channel_partner_repricing_config.name=channel_partner_repricing_config.name/value", + "channel_partner_repricing_config.name=name_value", ) in kw["metadata"] @@ -8537,9 +8535,7 @@ async def test_update_channel_partner_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UpdateChannelPartnerRepricingConfigRequest() - request.channel_partner_repricing_config.name = ( - "channel_partner_repricing_config.name/value" - ) + request.channel_partner_repricing_config.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8559,7 +8555,7 @@ async def test_update_channel_partner_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "channel_partner_repricing_config.name=channel_partner_repricing_config.name/value", + "channel_partner_repricing_config.name=name_value", ) in kw["metadata"] @@ -8754,7 +8750,7 @@ def test_delete_channel_partner_repricing_config_field_headers(): # a field header. Set these to a non-empty value. request = service.DeleteChannelPartnerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8772,7 +8768,7 @@ def test_delete_channel_partner_repricing_config_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -8786,7 +8782,7 @@ async def test_delete_channel_partner_repricing_config_field_headers_async(): # a field header. Set these to a non-empty value. request = service.DeleteChannelPartnerRepricingConfigRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -8804,7 +8800,7 @@ async def test_delete_channel_partner_repricing_config_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -8990,7 +8986,7 @@ def test_lookup_offer_field_headers(): # a field header. Set these to a non-empty value. request = service.LookupOfferRequest() - request.entitlement = "entitlement/value" + request.entitlement = "entitlement_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.lookup_offer), "__call__") as call: @@ -9006,7 +9002,7 @@ def test_lookup_offer_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "entitlement=entitlement/value", + "entitlement=entitlement_value", ) in kw["metadata"] @@ -9020,7 +9016,7 @@ async def test_lookup_offer_field_headers_async(): # a field header. Set these to a non-empty value. request = service.LookupOfferRequest() - request.entitlement = "entitlement/value" + request.entitlement = "entitlement_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.lookup_offer), "__call__") as call: @@ -9036,7 +9032,7 @@ async def test_lookup_offer_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "entitlement=entitlement/value", + "entitlement=entitlement_value", ) in kw["metadata"] @@ -9171,7 +9167,7 @@ def test_list_products_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, products.Product) for i in results) @@ -9412,7 +9408,7 @@ def test_list_skus_field_headers(): # a field header. Set these to a non-empty value. request = service.ListSkusRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_skus), "__call__") as call: @@ -9428,7 +9424,7 @@ def test_list_skus_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -9442,7 +9438,7 @@ async def test_list_skus_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListSkusRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_skus), "__call__") as call: @@ -9460,7 +9456,7 @@ async def test_list_skus_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -9509,7 +9505,7 @@ def test_list_skus_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, products.Sku) for i in results) @@ -9750,7 +9746,7 @@ def test_list_offers_field_headers(): # a field header. Set these to a non-empty value. request = service.ListOffersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_offers), "__call__") as call: @@ -9766,7 +9762,7 @@ def test_list_offers_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -9780,7 +9776,7 @@ async def test_list_offers_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListOffersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_offers), "__call__") as call: @@ -9798,7 +9794,7 @@ async def test_list_offers_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -9847,7 +9843,7 @@ def test_list_offers_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, offers.Offer) for i in results) @@ -10094,7 +10090,7 @@ def test_list_purchasable_skus_field_headers(): # a field header. Set these to a non-empty value. request = service.ListPurchasableSkusRequest() - request.customer = "customer/value" + request.customer = "customer_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10112,7 +10108,7 @@ def test_list_purchasable_skus_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer=customer/value", + "customer=customer_value", ) in kw["metadata"] @@ -10126,7 +10122,7 @@ async def test_list_purchasable_skus_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListPurchasableSkusRequest() - request.customer = "customer/value" + request.customer = "customer_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10146,7 +10142,7 @@ async def test_list_purchasable_skus_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer=customer/value", + "customer=customer_value", ) in kw["metadata"] @@ -10197,7 +10193,7 @@ def test_list_purchasable_skus_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, service.PurchasableSku) for i in results) @@ -10450,7 +10446,7 @@ def test_list_purchasable_offers_field_headers(): # a field header. Set these to a non-empty value. request = service.ListPurchasableOffersRequest() - request.customer = "customer/value" + request.customer = "customer_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10468,7 +10464,7 @@ def test_list_purchasable_offers_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer=customer/value", + "customer=customer_value", ) in kw["metadata"] @@ -10482,7 +10478,7 @@ async def test_list_purchasable_offers_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListPurchasableOffersRequest() - request.customer = "customer/value" + request.customer = "customer_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10502,7 +10498,7 @@ async def test_list_purchasable_offers_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "customer=customer/value", + "customer=customer_value", ) in kw["metadata"] @@ -10553,7 +10549,7 @@ def test_list_purchasable_offers_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, service.PurchasableOffer) for i in results) @@ -10806,7 +10802,7 @@ def test_register_subscriber_field_headers(): # a field header. Set these to a non-empty value. request = service.RegisterSubscriberRequest() - request.account = "account/value" + request.account = "account_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10824,7 +10820,7 @@ def test_register_subscriber_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "account=account/value", + "account=account_value", ) in kw["metadata"] @@ -10838,7 +10834,7 @@ async def test_register_subscriber_field_headers_async(): # a field header. Set these to a non-empty value. request = service.RegisterSubscriberRequest() - request.account = "account/value" + request.account = "account_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10858,7 +10854,7 @@ async def test_register_subscriber_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "account=account/value", + "account=account_value", ) in kw["metadata"] @@ -10966,7 +10962,7 @@ def test_unregister_subscriber_field_headers(): # a field header. Set these to a non-empty value. request = service.UnregisterSubscriberRequest() - request.account = "account/value" + request.account = "account_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -10984,7 +10980,7 @@ def test_unregister_subscriber_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "account=account/value", + "account=account_value", ) in kw["metadata"] @@ -10998,7 +10994,7 @@ async def test_unregister_subscriber_field_headers_async(): # a field header. Set these to a non-empty value. request = service.UnregisterSubscriberRequest() - request.account = "account/value" + request.account = "account_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -11018,7 +11014,7 @@ async def test_unregister_subscriber_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "account=account/value", + "account=account_value", ) in kw["metadata"] @@ -11128,7 +11124,7 @@ def test_list_subscribers_field_headers(): # a field header. Set these to a non-empty value. request = service.ListSubscribersRequest() - request.account = "account/value" + request.account = "account_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_subscribers), "__call__") as call: @@ -11144,7 +11140,7 @@ def test_list_subscribers_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "account=account/value", + "account=account_value", ) in kw["metadata"] @@ -11158,7 +11154,7 @@ async def test_list_subscribers_field_headers_async(): # a field header. Set these to a non-empty value. request = service.ListSubscribersRequest() - request.account = "account/value" + request.account = "account_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_subscribers), "__call__") as call: @@ -11176,7 +11172,7 @@ async def test_list_subscribers_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "account=account/value", + "account=account_value", ) in kw["metadata"] @@ -11225,7 +11221,7 @@ def test_list_subscribers_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, str) for i in results) From d5e4ee805e8e9f167794a180113af523b93568da Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:57:23 -0400 Subject: [PATCH 15/15] chore(main): release 1.8.0 (#168) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3127df6..efc54aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.8.0](https://github.com/googleapis/python-channel/compare/v1.7.1...v1.8.0) (2022-04-27) + + +### Features + +* Add API definitions for Cloud Channel Repricing APIs ([#169](https://github.com/googleapis/python-channel/issues/169)) ([18db43c](https://github.com/googleapis/python-channel/commit/18db43c21a935ab9bc52539edf8f97556aa05819)) +* Add filter in ListCustomersRequest ([#167](https://github.com/googleapis/python-channel/issues/167)) ([2a88151](https://github.com/googleapis/python-channel/commit/2a881514bb8ecfbcbdec9dac15663f4caa00bd00)) + ### [1.7.1](https://github.com/googleapis/python-channel/compare/v1.7.0...v1.7.1) (2022-03-05) diff --git a/setup.py b/setup.py index bf1e7ff..057ba99 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ import setuptools # type: ignore -version = "1.7.1" +version = "1.8.0" package_root = os.path.abspath(os.path.dirname(__file__))