From 14abcdc99280e1219425dbd38a977eb356e94c90 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 1 Dec 2025 23:00:56 +0000 Subject: [PATCH 1/2] fix: Changed field behavior for an existing field `entitlement_granularity` in message `.google.cloud.channel.v1.RepricingConfig` docs: A comment for enum `CustomerAttestationState` is changed docs: A comment for field `customer_attestation_state` in message `.google.cloud.channel.v1.Customer` is changed docs: A comment for field `entitlement_granularity` in message `.google.cloud.channel.v1.RepricingConfig` is changed docs: A comment for method `RegisterSubscriber` in service `CloudChannelService` is changed docs: A comment for method `UnregisterSubscriber` in service `CloudChannelService` is changed docs: A comment for method `ListSubscribers` in service `CloudChannelService` is changed docs: A comment for field `owned` in message `.google.cloud.channel.v1.CloudIdentityCustomerAccount` is changed docs: A comment for field `page_token` in message `.google.cloud.channel.v1.ListSkuGroupsRequest` is changed docs: A comment for field `page_token` in message `.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest` is changed docs: A comment for field `next_page_token` in message `.google.cloud.channel.v1.ListSkuGroupsResponse` is changed docs: A comment for field `next_page_token` in message `.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse` is changed docs: A comment for message `ChangeParametersRequest` is changed docs: A comment for field `offers` in message `.google.cloud.channel.v1.ListOffersResponse` is changed docs: A comment for field `account` in message `.google.cloud.channel.v1.RegisterSubscriberRequest` is changed docs: A comment for field `account` in message `.google.cloud.channel.v1.UnregisterSubscriberRequest` is changed docs: A comment for field `account` in message `.google.cloud.channel.v1.ListSubscribersRequest` is changed docs: A comment for field `event_type` in message `.google.cloud.channel.v1.CustomerEvent` is changed docs: A comment for field `event_type` in message `.google.cloud.channel.v1.EntitlementEvent` is changed PiperOrigin-RevId: 838889186 Source-Link: https://github.com/googleapis/googleapis/commit/1c1b1ff7874ae3a9a4184afd7804c092777ce72a Source-Link: https://github.com/googleapis/googleapis-gen/commit/99a57b7c8f183651d80e9e5794a0cf81d27c6680 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNoYW5uZWwtdjEvLk93bEJvdC55YW1sIiwiaCI6Ijk5YTU3YjdjOGYxODM2NTFkODBlOWU1Nzk0YTBjZjgxZDI3YzY2ODAifQ== --- .../google-cloud-channel-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-channel-v1/.rubocop.yml | 33 + .../google-cloud-channel-v1/.toys.rb | 28 + .../google-cloud-channel-v1/.yardopts | 12 + .../google-cloud-channel-v1/AUTHENTICATION.md | 122 + .../google-cloud-channel-v1/CHANGELOG.md | 2 + .../google-cloud-channel-v1/Gemfile | 11 + .../google-cloud-channel-v1/LICENSE.md | 201 + .../google-cloud-channel-v1/README.md | 154 + .../google-cloud-channel-v1/Rakefile | 169 + .../gapic_metadata.json | 287 + .../google-cloud-channel-v1.gemspec | 28 + .../lib/google-cloud-channel-v1.rb | 21 + .../lib/google/cloud/channel/v1.rb | 46 + .../cloud/channel/v1/billing_accounts_pb.rb | 47 + .../channel/v1/channel_partner_links_pb.rb | 51 + .../v1/cloud_channel_reports_service.rb | 65 + .../cloud_channel_reports_service/client.rb | 805 ++ .../credentials.rb | 51 + .../operations.rb | 841 +++ .../v1/cloud_channel_reports_service/paths.rb | 67 + .../v1/cloud_channel_reports_service/rest.rb | 60 + .../rest/client.rb | 734 ++ .../rest/operations.rb | 925 +++ .../rest/service_stub.rb | 267 + .../cloud/channel/v1/cloud_channel_service.rb | 75 + .../v1/cloud_channel_service/client.rb | 6649 +++++++++++++++++ .../v1/cloud_channel_service/credentials.rb | 51 + .../v1/cloud_channel_service/operations.rb | 841 +++ .../channel/v1/cloud_channel_service/paths.rb | 186 + .../channel/v1/cloud_channel_service/rest.rb | 72 + .../v1/cloud_channel_service/rest/client.rb | 6271 ++++++++++++++++ .../cloud_channel_service/rest/operations.rb | 925 +++ .../rest/service_stub.rb | 3161 ++++++++ .../lib/google/cloud/channel/v1/common_pb.rb | 52 + .../google/cloud/channel/v1/customers_pb.rb | 53 + .../channel/v1/entitlement_changes_pb.rb | 53 + .../cloud/channel/v1/entitlements_pb.rb | 64 + .../lib/google/cloud/channel/v1/offers_pb.rb | 70 + .../google/cloud/channel/v1/operations_pb.rb | 43 + .../google/cloud/channel/v1/products_pb.rb | 48 + .../cloud/channel/v1/reports_service_pb.rb | 74 + .../channel/v1/reports_service_services_pb.rb | 94 + .../google/cloud/channel/v1/repricing_pb.rb | 61 + .../lib/google/cloud/channel/v1/rest.rb | 38 + .../lib/google/cloud/channel/v1/service_pb.rb | 152 + .../cloud/channel/v1/service_services_pb.rb | 1071 +++ .../cloud/channel/v1/subscriber_event_pb.rb | 48 + .../lib/google/cloud/channel/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../cloud/channel/v1/billing_accounts.rb | 48 + .../cloud/channel/v1/channel_partner_links.rb | 94 + .../google/cloud/channel/v1/common.rb | 172 + .../google/cloud/channel/v1/customers.rb | 132 + .../cloud/channel/v1/entitlement_changes.rb | 190 + .../google/cloud/channel/v1/entitlements.rb | 289 + .../google/cloud/channel/v1/offers.rb | 403 + .../google/cloud/channel/v1/operations.rb | 75 + .../google/cloud/channel/v1/products.rb | 98 + .../cloud/channel/v1/reports_service.rb | 424 ++ .../google/cloud/channel/v1/repricing.rb | 222 + .../google/cloud/channel/v1/service.rb | 1713 +++++ .../cloud/channel/v1/subscriber_event.rb | 126 + .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/datetime.rb | 103 + .../proto_docs/google/type/decimal.rb | 96 + .../proto_docs/google/type/money.rb | 43 + .../proto_docs/google/type/postal_address.rb | 135 + .../google-cloud-channel-v1/snippets/Gemfile | 32 + .../fetch_report_results.rb | 51 + .../list_reports.rb | 51 + .../run_report_job.rb | 54 + .../activate_entitlement.rb | 54 + .../cancel_entitlement.rb | 54 + .../cloud_channel_service/change_offer.rb | 54 + .../change_parameters.rb | 54 + .../change_renewal_settings.rb | 54 + .../check_cloud_identity_accounts_exist.rb | 47 + .../create_channel_partner_link.rb | 47 + ...create_channel_partner_repricing_config.rb | 47 + .../cloud_channel_service/create_customer.rb | 47 + .../create_customer_repricing_config.rb | 47 + .../create_entitlement.rb | 54 + ...delete_channel_partner_repricing_config.rb | 47 + .../cloud_channel_service/delete_customer.rb | 47 + .../delete_customer_repricing_config.rb | 47 + .../get_channel_partner_link.rb | 47 + .../get_channel_partner_repricing_config.rb | 47 + .../cloud_channel_service/get_customer.rb | 47 + .../get_customer_repricing_config.rb | 47 + .../cloud_channel_service/get_entitlement.rb | 47 + .../cloud_channel_service/import_customer.rb | 47 + .../list_channel_partner_links.rb | 51 + .../list_channel_partner_repricing_configs.rb | 51 + .../list_customer_repricing_configs.rb | 51 + .../cloud_channel_service/list_customers.rb | 51 + .../list_entitlement_changes.rb | 51 + .../list_entitlements.rb | 51 + .../cloud_channel_service/list_offers.rb | 51 + .../cloud_channel_service/list_products.rb | 51 + .../list_purchasable_offers.rb | 51 + .../list_purchasable_skus.rb | 51 + .../list_sku_group_billable_skus.rb | 51 + .../cloud_channel_service/list_sku_groups.rb | 51 + .../cloud_channel_service/list_skus.rb | 51 + .../cloud_channel_service/list_subscribers.rb | 47 + .../list_transferable_offers.rb | 51 + .../list_transferable_skus.rb | 51 + .../cloud_channel_service/lookup_offer.rb | 47 + .../provision_cloud_identity.rb | 54 + .../query_eligible_billing_accounts.rb | 47 + .../register_subscriber.rb | 47 + .../start_paid_service.rb | 54 + .../suspend_entitlement.rb | 54 + .../transfer_entitlements.rb | 54 + .../transfer_entitlements_to_google.rb | 54 + .../unregister_subscriber.rb | 47 + .../update_channel_partner_link.rb | 47 + ...update_channel_partner_repricing_config.rb | 47 + .../cloud_channel_service/update_customer.rb | 47 + .../update_customer_repricing_config.rb | 47 + ...ppet_metadata_google.cloud.channel.v1.json | 2095 ++++++ ...channel_reports_service_operations_test.rb | 400 + ...loud_channel_reports_service_paths_test.rb | 67 + ...cloud_channel_reports_service_rest_test.rb | 270 + .../v1/cloud_channel_reports_service_test.rb | 325 + .../cloud_channel_service_operations_test.rb | 400 + .../v1/cloud_channel_service_paths_test.rb | 151 + .../v1/cloud_channel_service_rest_test.rb | 2845 +++++++ .../channel/v1/cloud_channel_service_test.rb | 3298 ++++++++ .../google-cloud-channel-v1/test/helper.rb | 25 + 143 files changed, 43899 insertions(+) create mode 100644 owl-bot-staging/google-cloud-channel-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-channel-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-channel-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-channel-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-channel-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-channel-v1/README.md create mode 100644 owl-bot-staging/google-cloud-channel-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/subscriber_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb create mode 100644 owl-bot-staging/google-cloud-channel-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-channel-v1/.gitignore b/owl-bot-staging/google-cloud-channel-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json new file mode 100644 index 000000000000..75f715971955 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudchannel.googleapis.com", + "api_shortname": "cloudchannel", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest", + "distribution_name": "google-cloud-channel-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudchannel", + "name_pretty": "Cloud Channel V1 API", + "product_documentation": "https://cloud.google.com/channel", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "You can use Channel Services to manage your relationships with your partners and your customers. Channel Services include a console and APIs to view and provision links between distributors and resellers, customers and entitlements. Note that google-cloud-channel-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-channel instead. See the readme for more details.", + "ruby-cloud-env-prefix": "CHANNEL", + "ruby-cloud-product-url": "https://cloud.google.com/channel", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-channel-v1/.rubocop.yml b/owl-bot-staging/google-cloud-channel-v1/.rubocop.yml new file mode 100644 index 000000000000..443df9c4cf48 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-channel-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-channel-v1.rb" diff --git a/owl-bot-staging/google-cloud-channel-v1/.toys.rb b/owl-bot-staging/google-cloud-channel-v1/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-channel-v1/.yardopts b/owl-bot-staging/google-cloud-channel-v1/.yardopts new file mode 100644 index 000000000000..7c2ba14c6d1b --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Channel V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..cab30df4740d --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-channel-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-channel-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/channel/v1" + +client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/channel/v1" + +::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-channel-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/channel/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-channel-v1/Gemfile b/owl-bot-staging/google-cloud-channel-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-channel-v1/LICENSE.md b/owl-bot-staging/google-cloud-channel-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-cloud-channel-v1/README.md b/owl-bot-staging/google-cloud-channel-v1/README.md new file mode 100644 index 000000000000..6bc31623441f --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Channel V1 API + +The Cloud Channel API enables Google Cloud partners to have a single unified resale platform and APIs across all of Google Cloud including GCP, Workspace, Maps and Chrome. + +You can use Channel Services to manage your relationships with your partners and your customers. Channel Services include a console and APIs to view and provision links between distributors and resellers, customers and entitlements. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Channel V1 API. Most users should consider using +the main client gem, +[google-cloud-channel](https://rubygems.org/gems/google-cloud-channel). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-channel-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudchannel.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/channel/v1" + +client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new +request = ::Google::Cloud::Channel::V1::RunReportJobRequest.new # (request fields as keyword arguments...) +response = client.run_report_job request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/channel) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/channel/v1" +require "logger" + +client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-channel`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-channel-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-channel`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-channel-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-channel-v1/Rakefile b/owl-bot-staging/google-cloud-channel-v1/Rakefile new file mode 100644 index 000000000000..6ef427fc8482 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-channel-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["CHANNEL_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["CHANNEL_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["CHANNEL_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or CHANNEL_TEST_PROJECT=test123 CHANNEL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/channel/v1/cloud_channel_reports_service/credentials" + ::Google::Cloud::Channel::V1::CloudChannelReportsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["CHANNEL_PROJECT"] = project + ENV["CHANNEL_TEST_PROJECT"] = project + ENV["CHANNEL_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-channel-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-channel-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-channel-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-channel-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-channel-v1" + header "google-cloud-channel-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-channel-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-channel-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-channel-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-channel-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json new file mode 100644 index 000000000000..30e7fa2323e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json @@ -0,0 +1,287 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.channel.v1", + "libraryPackage": "::Google::Cloud::Channel::V1", + "services": { + "CloudChannelReportsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client", + "rpcs": { + "RunReportJob": { + "methods": [ + "run_report_job" + ] + }, + "FetchReportResults": { + "methods": [ + "fetch_report_results" + ] + }, + "ListReports": { + "methods": [ + "list_reports" + ] + } + } + } + } + }, + "CloudChannelService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Channel::V1::CloudChannelService::Client", + "rpcs": { + "ListCustomers": { + "methods": [ + "list_customers" + ] + }, + "GetCustomer": { + "methods": [ + "get_customer" + ] + }, + "CheckCloudIdentityAccountsExist": { + "methods": [ + "check_cloud_identity_accounts_exist" + ] + }, + "CreateCustomer": { + "methods": [ + "create_customer" + ] + }, + "UpdateCustomer": { + "methods": [ + "update_customer" + ] + }, + "DeleteCustomer": { + "methods": [ + "delete_customer" + ] + }, + "ImportCustomer": { + "methods": [ + "import_customer" + ] + }, + "ProvisionCloudIdentity": { + "methods": [ + "provision_cloud_identity" + ] + }, + "ListEntitlements": { + "methods": [ + "list_entitlements" + ] + }, + "ListTransferableSkus": { + "methods": [ + "list_transferable_skus" + ] + }, + "ListTransferableOffers": { + "methods": [ + "list_transferable_offers" + ] + }, + "GetEntitlement": { + "methods": [ + "get_entitlement" + ] + }, + "CreateEntitlement": { + "methods": [ + "create_entitlement" + ] + }, + "ChangeParameters": { + "methods": [ + "change_parameters" + ] + }, + "ChangeRenewalSettings": { + "methods": [ + "change_renewal_settings" + ] + }, + "ChangeOffer": { + "methods": [ + "change_offer" + ] + }, + "StartPaidService": { + "methods": [ + "start_paid_service" + ] + }, + "SuspendEntitlement": { + "methods": [ + "suspend_entitlement" + ] + }, + "CancelEntitlement": { + "methods": [ + "cancel_entitlement" + ] + }, + "ActivateEntitlement": { + "methods": [ + "activate_entitlement" + ] + }, + "TransferEntitlements": { + "methods": [ + "transfer_entitlements" + ] + }, + "TransferEntitlementsToGoogle": { + "methods": [ + "transfer_entitlements_to_google" + ] + }, + "ListChannelPartnerLinks": { + "methods": [ + "list_channel_partner_links" + ] + }, + "GetChannelPartnerLink": { + "methods": [ + "get_channel_partner_link" + ] + }, + "CreateChannelPartnerLink": { + "methods": [ + "create_channel_partner_link" + ] + }, + "UpdateChannelPartnerLink": { + "methods": [ + "update_channel_partner_link" + ] + }, + "GetCustomerRepricingConfig": { + "methods": [ + "get_customer_repricing_config" + ] + }, + "ListCustomerRepricingConfigs": { + "methods": [ + "list_customer_repricing_configs" + ] + }, + "CreateCustomerRepricingConfig": { + "methods": [ + "create_customer_repricing_config" + ] + }, + "UpdateCustomerRepricingConfig": { + "methods": [ + "update_customer_repricing_config" + ] + }, + "DeleteCustomerRepricingConfig": { + "methods": [ + "delete_customer_repricing_config" + ] + }, + "GetChannelPartnerRepricingConfig": { + "methods": [ + "get_channel_partner_repricing_config" + ] + }, + "ListChannelPartnerRepricingConfigs": { + "methods": [ + "list_channel_partner_repricing_configs" + ] + }, + "CreateChannelPartnerRepricingConfig": { + "methods": [ + "create_channel_partner_repricing_config" + ] + }, + "UpdateChannelPartnerRepricingConfig": { + "methods": [ + "update_channel_partner_repricing_config" + ] + }, + "DeleteChannelPartnerRepricingConfig": { + "methods": [ + "delete_channel_partner_repricing_config" + ] + }, + "ListSkuGroups": { + "methods": [ + "list_sku_groups" + ] + }, + "ListSkuGroupBillableSkus": { + "methods": [ + "list_sku_group_billable_skus" + ] + }, + "LookupOffer": { + "methods": [ + "lookup_offer" + ] + }, + "ListProducts": { + "methods": [ + "list_products" + ] + }, + "ListSkus": { + "methods": [ + "list_skus" + ] + }, + "ListOffers": { + "methods": [ + "list_offers" + ] + }, + "ListPurchasableSkus": { + "methods": [ + "list_purchasable_skus" + ] + }, + "ListPurchasableOffers": { + "methods": [ + "list_purchasable_offers" + ] + }, + "QueryEligibleBillingAccounts": { + "methods": [ + "query_eligible_billing_accounts" + ] + }, + "RegisterSubscriber": { + "methods": [ + "register_subscriber" + ] + }, + "UnregisterSubscriber": { + "methods": [ + "unregister_subscriber" + ] + }, + "ListSubscribers": { + "methods": [ + "list_subscribers" + ] + }, + "ListEntitlementChanges": { + "methods": [ + "list_entitlement_changes" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec b/owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec new file mode 100644 index 000000000000..83249dea356f --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/channel/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-channel-v1" + gem.version = Google::Cloud::Channel::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "You can use Channel Services to manage your relationships with your partners and your customers. Channel Services include a console and APIs to view and provision links between distributors and resellers, customers and entitlements. Note that google-cloud-channel-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-channel instead. See the readme for more details." + gem.summary = "The Cloud Channel API enables Google Cloud partners to have a single unified resale platform and APIs across all of Google Cloud including GCP, Workspace, Maps and Chrome." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb new file mode 100644 index 000000000000..2f158767968b --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/channel/v1" diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb new file mode 100644 index 000000000000..e21406966c69 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/channel/v1/cloud_channel_reports_service" +require "google/cloud/channel/v1/cloud_channel_service" +require "google/cloud/channel/v1/version" + +module Google + module Cloud + module Channel + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/channel/v1" + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/channel/v1" + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/channel/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb new file mode 100644 index 000000000000..5713df794012 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/billing_accounts.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/channel/v1/billing_accounts.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x02\n\x0e\x42illingAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x03:e\xea\x41\x62\n*cloudchannel.googleapis.com/BillingAccount\x12\x34\x61\x63\x63ounts/{account}/billingAccounts/{billing_account}Bl\n\x1b\x63om.google.cloud.channel.v1B\x14\x42illingAccountsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + BillingAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.BillingAccount").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb new file mode 100644 index 000000000000..56e577221a6d --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/channel_partner_links.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/channel/v1/channel_partner_links.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x04\n\x12\x43hannelPartnerLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1areseller_cloud_identity_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\nlink_state\x18\x03 \x01(\x0e\x32\x30.google.cloud.channel.v1.ChannelPartnerLinkStateB\x03\xe0\x41\x02\x12\x1c\n\x0finvite_link_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tpublic_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\\\n#channel_partner_cloud_identity_info\x18\x08 \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfoB\x03\xe0\x41\x03:r\xea\x41o\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12=accounts/{account}/channelPartnerLinks/{channel_partner_link}*>\n\x16\x43hannelPartnerLinkView\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02*z\n\x17\x43hannelPartnerLinkState\x12*\n&CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INVITED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07REVOKED\x10\x03\x12\r\n\tSUSPENDED\x10\x04\x42p\n\x1b\x63om.google.cloud.channel.v1B\x18\x43hannelPartnerLinksProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.channel.v1.CloudIdentityInfo", "google/cloud/channel/v1/common.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + ChannelPartnerLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerLink").msgclass + ChannelPartnerLinkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerLinkView").enummodule + ChannelPartnerLinkState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerLinkState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb new file mode 100644 index 000000000000..f61ee1243df9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/channel/v1/version" + +require "google/cloud/channel/v1/cloud_channel_reports_service/credentials" +require "google/cloud/channel/v1/cloud_channel_reports_service/paths" +require "google/cloud/channel/v1/cloud_channel_reports_service/operations" +require "google/cloud/channel/v1/cloud_channel_reports_service/client" +require "google/cloud/channel/v1/cloud_channel_reports_service/rest" + +module Google + module Cloud + module Channel + module V1 + ## + # CloudChannelReportsService lets Google Cloud resellers and + # distributors retrieve and combine a variety of data in Cloud Channel for + # multiple products (Google Cloud, Google Voice, and Google Workspace.) + # + # Deprecated: This service is being deprecated. Please use [Export Channel + # Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @deprecated This service is deprecated and may be removed in the next major version update. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/channel/v1/cloud_channel_reports_service" + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/channel/v1/cloud_channel_reports_service/rest" + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + module CloudChannelReportsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_channel_reports_service", "helpers.rb" +require "google/cloud/channel/v1/cloud_channel_reports_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb new file mode 100644 index 000000000000..effdd5beeb7a --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb @@ -0,0 +1,805 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/channel/v1/reports_service_pb" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + ## + # Client for the CloudChannelReportsService service. + # + # CloudChannelReportsService lets Google Cloud resellers and + # distributors retrieve and combine a variety of data in Cloud Channel for + # multiple products (Google Cloud, Google Voice, and Google Workspace.) + # + # Deprecated: This service is being deprecated. Please use [Export Channel + # Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_channel_reports_service_stub + + ## + # Configure the CloudChannelReportsService Client class. + # + # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration} + # for a description of the configuration fields. + # + # @deprecated This service is deprecated and may be removed in the next major version update. + # + # @example + # + # # Modify the configuration for all CloudChannelReportsService clients + # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Channel", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelReportsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_channel_reports_service_stub.universe_domain + end + + ## + # Create a new CloudChannelReportsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudChannelReportsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/channel/v1/reports_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cloud_channel_reports_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Channel::V1::CloudChannelReportsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_channel_reports_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_channel_reports_service_stub.logger + end + + # Service calls + + ## + # Begins generation of data for a given report. The report + # identifier is a UID (for example, `613bf59q`). + # + # Possible error codes: + # + # * PERMISSION_DENIED: The user doesn't have access to this report. + # * INVALID_ARGUMENT: Required request parameters are missing + # or invalid. + # * NOT_FOUND: The report identifier was not found. + # * INTERNAL: Any non-user error related to a technical issue + # in the backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue + # in the backend. Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata contains an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # To get the results of report generation, call + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} + # with the + # {::Google::Cloud::Channel::V1::RunReportJobResponse#report_job RunReportJobResponse.report_job}. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload run_report_job(request, options = nil) + # Pass arguments to `run_report_job` via a request object, either of type + # {::Google::Cloud::Channel::V1::RunReportJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::RunReportJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_report_job(name: nil, date_range: nil, filter: nil, language_code: nil) + # Pass arguments to `run_report_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The report's resource name. Specifies the account and report used + # to generate report data. The report_id identifier is a UID (for example, + # `613bf59q`). + # Name uses the format: + # accounts/\\{account_id}/reports/\\{report_id} + # @param date_range [::Google::Cloud::Channel::V1::DateRange, ::Hash] + # Optional. The range of usage or invoice dates to include in the result. + # @param filter [::String] + # Optional. A structured string that defines conditions on dimension columns + # to restrict the report output. + # + # Filters support logical operators (AND, OR, NOT) and conditional operators + # (=, !=, <, >, <=, and >=) using `column_id` as keys. + # + # For example: + # `(customer:"accounts/C123abc/customers/S456def" OR + # customer:"accounts/C123abc/customers/S789ghi") AND + # invoice_start_date.year >= 2022` + # @param language_code [::String] + # Optional. The BCP-47 language code, such as "en-US". If specified, the + # response is localized to the corresponding language code if the + # original data sources support it. + # Default is "en-US". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::RunReportJobRequest.new + # + # # Call the run_report_job method. + # result = client.run_report_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_report_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RunReportJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_report_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_report_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_report_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_reports_service_stub.call_rpc :run_report_job, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves data generated by + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload fetch_report_results(request, options = nil) + # Pass arguments to `fetch_report_results` via a request object, either of type + # {::Google::Cloud::Channel::V1::FetchReportResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::FetchReportResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_report_results(report_job: nil, page_size: nil, page_token: nil, partition_keys: nil) + # Pass arguments to `fetch_report_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param report_job [::String] + # Required. The report job created by + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # Report_job uses the format: + # accounts/\\{account_id}/reportJobs/\\{report_job_id} + # @param page_size [::Integer] + # Optional. Requested page size of the report. The server may return fewer + # results than requested. If you don't specify a page size, the server uses a + # sensible default (may change over time). + # + # The maximum value is 30,000; the server will change larger values to + # 30,000. + # @param page_token [::String] + # Optional. A token that specifies a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::FetchReportResultsResponse#next_page_token FetchReportResultsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} + # call. + # @param partition_keys [::Array<::String>] + # Optional. List of keys specifying which report partitions to return. + # If empty, returns all partitions. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new + # + # # Call the fetch_report_results method. + # result = client.fetch_report_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Row. + # p item + # end + # + def fetch_report_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::FetchReportResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_report_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.report_job + header_params["report_job"] = request.report_job + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_report_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_report_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_reports_service_stub.call_rpc :fetch_report_results, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_reports_service_stub, :fetch_report_results, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the reports that RunReportJob can run. These reports include an ID, + # a description, and the list of columns that will be in the result. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_reports(request, options = nil) + # Pass arguments to `list_reports` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListReportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListReportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_reports(parent: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_reports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the partner account to list available + # reports for. Parent uses the format: accounts/\\{account_id} + # @param page_size [::Integer] + # Optional. Requested page size of the report. The server might return fewer + # results than requested. If unspecified, returns 20 reports. The maximum + # value is 100. + # @param page_token [::String] + # Optional. A token that specifies a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListReportsResponse#next_page_token ListReportsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports} + # call. + # @param language_code [::String] + # Optional. The BCP-47 language code, such as "en-US". If specified, the + # response is localized to the corresponding language code if the + # original data sources support it. + # Default is "en-US". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListReportsRequest.new + # + # # Call the list_reports method. + # result = client.list_reports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Report. + # p item + # end + # + def list_reports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListReportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_reports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_reports.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_reports_service_stub.call_rpc :list_reports, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_reports_service_stub, :list_reports, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudChannelReportsService API. + # + # This class represents the configuration for CloudChannelReportsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # run_report_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.run_report_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.run_report_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CloudChannelReportsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `run_report_job` + # @return [::Gapic::Config::Method] + # + attr_reader :run_report_job + ## + # RPC-specific configuration for `fetch_report_results` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_report_results + ## + # RPC-specific configuration for `list_reports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reports + + # @private + def initialize parent_rpcs = nil + run_report_job_config = parent_rpcs.run_report_job if parent_rpcs.respond_to? :run_report_job + @run_report_job = ::Gapic::Config::Method.new run_report_job_config + fetch_report_results_config = parent_rpcs.fetch_report_results if parent_rpcs.respond_to? :fetch_report_results + @fetch_report_results = ::Gapic::Config::Method.new fetch_report_results_config + list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports + @list_reports = ::Gapic::Config::Method.new list_reports_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb new file mode 100644 index 000000000000..edd72d29cbb5 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + # Credentials for the CloudChannelReportsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/apps.reports.usage.readonly" + ] + self.env_vars = [ + "CHANNEL_CREDENTIALS", + "CHANNEL_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "CHANNEL_CREDENTIALS_JSON", + "CHANNEL_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb new file mode 100644 index 000000000000..761b0b866cbf --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudChannelReportsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelReportsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb new file mode 100644 index 000000000000..b3da3856081b --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + # Path helper methods for the CloudChannelReportsService API. + module Paths + ## + # Create a fully-qualified Report resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/reports/{report}` + # + # @param account [String] + # @param report [String] + # + # @return [::String] + def report_path account:, report: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/reports/#{report}" + end + + ## + # Create a fully-qualified ReportJob resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/reportJobs/{report_job}` + # + # @param account [String] + # @param report_job [String] + # + # @return [::String] + def report_job_path account:, report_job: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/reportJobs/#{report_job}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb new file mode 100644 index 000000000000..4b2d86be89b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/channel/v1/version" + +require "google/cloud/channel/v1/cloud_channel_reports_service/credentials" +require "google/cloud/channel/v1/cloud_channel_reports_service/paths" +require "google/cloud/channel/v1/cloud_channel_reports_service/rest/operations" +require "google/cloud/channel/v1/cloud_channel_reports_service/rest/client" + +module Google + module Cloud + module Channel + module V1 + ## + # CloudChannelReportsService lets Google Cloud resellers and + # distributors retrieve and combine a variety of data in Cloud Channel for + # multiple products (Google Cloud, Google Voice, and Google Workspace.) + # + # Deprecated: This service is being deprecated. Please use [Export Channel + # Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/channel/v1/cloud_channel_reports_service/rest" + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + module CloudChannelReportsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/channel/v1/cloud_channel_reports_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb new file mode 100644 index 000000000000..376bdc37fcef --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb @@ -0,0 +1,734 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/channel/v1/reports_service_pb" +require "google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + module Rest + ## + # REST client for the CloudChannelReportsService service. + # + # CloudChannelReportsService lets Google Cloud resellers and + # distributors retrieve and combine a variety of data in Cloud Channel for + # multiple products (Google Cloud, Google Voice, and Google Workspace.) + # + # Deprecated: This service is being deprecated. Please use [Export Channel + # Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_channel_reports_service_stub + + ## + # Configure the CloudChannelReportsService Client class. + # + # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # @deprecated This service is deprecated and may be removed in the next major version update. + # + # @example + # + # # Modify the configuration for all CloudChannelReportsService clients + # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Channel", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelReportsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_channel_reports_service_stub.universe_domain + end + + ## + # Create a new CloudChannelReportsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudChannelReportsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cloud_channel_reports_service_stub = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_channel_reports_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_channel_reports_service_stub.logger + end + + # Service calls + + ## + # Begins generation of data for a given report. The report + # identifier is a UID (for example, `613bf59q`). + # + # Possible error codes: + # + # * PERMISSION_DENIED: The user doesn't have access to this report. + # * INVALID_ARGUMENT: Required request parameters are missing + # or invalid. + # * NOT_FOUND: The report identifier was not found. + # * INTERNAL: Any non-user error related to a technical issue + # in the backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue + # in the backend. Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata contains an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # To get the results of report generation, call + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} + # with the + # {::Google::Cloud::Channel::V1::RunReportJobResponse#report_job RunReportJobResponse.report_job}. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @overload run_report_job(request, options = nil) + # Pass arguments to `run_report_job` via a request object, either of type + # {::Google::Cloud::Channel::V1::RunReportJobRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::RunReportJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_report_job(name: nil, date_range: nil, filter: nil, language_code: nil) + # Pass arguments to `run_report_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The report's resource name. Specifies the account and report used + # to generate report data. The report_id identifier is a UID (for example, + # `613bf59q`). + # Name uses the format: + # accounts/\\{account_id}/reports/\\{report_id} + # @param date_range [::Google::Cloud::Channel::V1::DateRange, ::Hash] + # Optional. The range of usage or invoice dates to include in the result. + # @param filter [::String] + # Optional. A structured string that defines conditions on dimension columns + # to restrict the report output. + # + # Filters support logical operators (AND, OR, NOT) and conditional operators + # (=, !=, <, >, <=, and >=) using `column_id` as keys. + # + # For example: + # `(customer:"accounts/C123abc/customers/S456def" OR + # customer:"accounts/C123abc/customers/S789ghi") AND + # invoice_start_date.year >= 2022` + # @param language_code [::String] + # Optional. The BCP-47 language code, such as "en-US". If specified, the + # response is localized to the corresponding language code if the + # original data sources support it. + # Default is "en-US". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::RunReportJobRequest.new + # + # # Call the run_report_job method. + # result = client.run_report_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_report_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RunReportJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.run_report_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.run_report_job.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_report_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_reports_service_stub.run_report_job request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Retrieves data generated by + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @overload fetch_report_results(request, options = nil) + # Pass arguments to `fetch_report_results` via a request object, either of type + # {::Google::Cloud::Channel::V1::FetchReportResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::FetchReportResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_report_results(report_job: nil, page_size: nil, page_token: nil, partition_keys: nil) + # Pass arguments to `fetch_report_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param report_job [::String] + # Required. The report job created by + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # Report_job uses the format: + # accounts/\\{account_id}/reportJobs/\\{report_job_id} + # @param page_size [::Integer] + # Optional. Requested page size of the report. The server may return fewer + # results than requested. If you don't specify a page size, the server uses a + # sensible default (may change over time). + # + # The maximum value is 30,000; the server will change larger values to + # 30,000. + # @param page_token [::String] + # Optional. A token that specifies a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::FetchReportResultsResponse#next_page_token FetchReportResultsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} + # call. + # @param partition_keys [::Array<::String>] + # Optional. List of keys specifying which report partitions to return. + # If empty, returns all partitions. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new + # + # # Call the fetch_report_results method. + # result = client.fetch_report_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Row. + # p item + # end + # + def fetch_report_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::FetchReportResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_report_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_report_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_report_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_reports_service_stub.fetch_report_results request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_reports_service_stub, :fetch_report_results, "rows", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the reports that RunReportJob can run. These reports include an ID, + # a description, and the list of columns that will be in the result. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + # + # @overload list_reports(request, options = nil) + # Pass arguments to `list_reports` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListReportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListReportsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_reports(parent: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_reports` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the partner account to list available + # reports for. Parent uses the format: accounts/\\{account_id} + # @param page_size [::Integer] + # Optional. Requested page size of the report. The server might return fewer + # results than requested. If unspecified, returns 20 reports. The maximum + # value is 100. + # @param page_token [::String] + # Optional. A token that specifies a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListReportsResponse#next_page_token ListReportsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#list_reports CloudChannelReportsService.ListReports} + # call. + # @param language_code [::String] + # Optional. The BCP-47 language code, such as "en-US". If specified, the + # response is localized to the corresponding language code if the + # original data sources support it. + # Default is "en-US". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListReportsRequest.new + # + # # Call the list_reports method. + # result = client.list_reports request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Report. + # p item + # end + # + def list_reports request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListReportsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_reports.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_reports.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reports.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_reports_service_stub.list_reports request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_reports_service_stub, :list_reports, "reports", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudChannelReportsService REST API. + # + # This class represents the configuration for CloudChannelReportsService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # run_report_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.run_report_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.run_report_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CloudChannelReportsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `run_report_job` + # @return [::Gapic::Config::Method] + # + attr_reader :run_report_job + ## + # RPC-specific configuration for `fetch_report_results` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_report_results + ## + # RPC-specific configuration for `list_reports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reports + + # @private + def initialize parent_rpcs = nil + run_report_job_config = parent_rpcs.run_report_job if parent_rpcs.respond_to? :run_report_job + @run_report_job = ::Gapic::Config::Method.new run_report_job_config + fetch_report_results_config = parent_rpcs.fetch_report_results if parent_rpcs.respond_to? :fetch_report_results + @fetch_report_results = ::Gapic::Config::Method.new fetch_report_results_config + list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports + @list_reports = ::Gapic::Config::Method.new list_reports_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb new file mode 100644 index 000000000000..a32efe8d57c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudChannelReportsService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelReportsService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb new file mode 100644 index 000000000000..93fae655e6ea --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/channel/v1/reports_service_pb" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + module Rest + ## + # REST service stub for the CloudChannelReportsService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + # @deprecated This service is deprecated and may be removed in the next major version update. + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the run_report_job REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::RunReportJobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def run_report_job request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_report_job_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "run_report_job", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_report_results REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::FetchReportResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::FetchReportResultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::FetchReportResultsResponse] + # A result object deserialized from the server's reply + def fetch_report_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_report_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_report_results", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::FetchReportResultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_reports REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListReportsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListReportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListReportsResponse] + # A result object deserialized from the server's reply + def list_reports request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reports_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_reports", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListReportsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the run_report_job REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::RunReportJobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_report_job_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/reports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_report_results REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::FetchReportResultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_report_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{report_job}:fetchReportResults", + body: "*", + matches: [ + ["report_job", %r{^accounts/[^/]+/reportJobs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reports REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListReportsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_reports_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/reports", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb new file mode 100644 index 000000000000..38c04b759706 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/channel/v1/version" + +require "google/cloud/channel/v1/cloud_channel_service/credentials" +require "google/cloud/channel/v1/cloud_channel_service/paths" +require "google/cloud/channel/v1/cloud_channel_service/operations" +require "google/cloud/channel/v1/cloud_channel_service/client" +require "google/cloud/channel/v1/cloud_channel_service/rest" + +module Google + module Cloud + module Channel + module V1 + ## + # CloudChannelService lets Google cloud resellers and distributors manage + # their customers, channel partners, entitlements, and reports. + # + # Using this service: + # 1. Resellers and distributors can manage a customer entity. + # 2. Distributors can register an authorized reseller in their channel and + # provide them with delegated admin access. + # 3. Resellers and distributors can manage customer entitlements. + # + # CloudChannelService exposes the following resources: + # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an + # enterprise-managed by a reseller or distributor. + # + # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that + # provides a customer with the means to use a service. Entitlements are created + # or updated as a result of a successful fulfillment. + # + # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An + # entity that identifies links between distributors and their indirect + # resellers in a channel. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/channel/v1/cloud_channel_service" + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/channel/v1/cloud_channel_service/rest" + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + module CloudChannelService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_channel_service", "helpers.rb" +require "google/cloud/channel/v1/cloud_channel_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb new file mode 100644 index 000000000000..45430aba1b4d --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb @@ -0,0 +1,6649 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/channel/v1/service_pb" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + ## + # Client for the CloudChannelService service. + # + # CloudChannelService lets Google cloud resellers and distributors manage + # their customers, channel partners, entitlements, and reports. + # + # Using this service: + # 1. Resellers and distributors can manage a customer entity. + # 2. Distributors can register an authorized reseller in their channel and + # provide them with delegated admin access. + # 3. Resellers and distributors can manage customer entitlements. + # + # CloudChannelService exposes the following resources: + # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an + # enterprise-managed by a reseller or distributor. + # + # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that + # provides a customer with the means to use a service. Entitlements are created + # or updated as a result of a successful fulfillment. + # + # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An + # entity that identifies links between distributors and their indirect + # resellers in a channel. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_channel_service_stub + + ## + # Configure the CloudChannelService Client class. + # + # See {::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudChannelService clients + # ::Google::Cloud::Channel::V1::CloudChannelService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Channel", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.provision_cloud_identity.timeout = 60.0 + + default_config.rpcs.create_entitlement.timeout = 60.0 + + default_config.rpcs.change_parameters.timeout = 60.0 + + default_config.rpcs.change_renewal_settings.timeout = 60.0 + + default_config.rpcs.change_offer.timeout = 60.0 + + default_config.rpcs.start_paid_service.timeout = 60.0 + + default_config.rpcs.suspend_entitlement.timeout = 60.0 + + default_config.rpcs.cancel_entitlement.timeout = 60.0 + + default_config.rpcs.activate_entitlement.timeout = 60.0 + + default_config.rpcs.transfer_entitlements.timeout = 60.0 + + default_config.rpcs.transfer_entitlements_to_google.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_channel_service_stub.universe_domain + end + + ## + # Create a new CloudChannelService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudChannelService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/channel/v1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cloud_channel_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Channel::V1::CloudChannelService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_channel_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Channel::V1::CloudChannelService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_channel_service_stub.logger + end + + # Service calls + + ## + # List {::Google::Cloud::Channel::V1::Customer Customer}s. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # List of {::Google::Cloud::Channel::V1::Customer Customer}s, or an empty list if + # there are no customers. + # + # @overload list_customers(request, options = nil) + # Pass arguments to `list_customers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_customers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller account to list customers from. + # Parent uses the format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. The maximum number of customers to return. The service may return + # fewer than this value. If unspecified, returns at most 10 customers. The + # maximum value is 50. + # @param page_token [::String] + # Optional. A token identifying a page of results other than the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} + # call. + # @param filter [::String] + # Optional. Filters applied to the [CloudChannelService.ListCustomers] + # results. See + # https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers + # for more information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListCustomersRequest.new + # + # # Call the list_customers method. + # result = client.list_customers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Customer. + # p item + # end + # + def list_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_customers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_customers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_customers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested {::Google::Cloud::Channel::V1::Customer Customer} + # resource. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer resource doesn't exist. Usually the result of an + # invalid name parameter. + # + # Return value: + # The {::Google::Cloud::Channel::V1::Customer Customer} resource. + # + # @overload get_customer(request, options = nil) + # Pass arguments to `get_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_customer(name: nil) + # Pass arguments to `get_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the customer to retrieve. + # Name uses the format: accounts/\\{account_id}/customers/\\{customer_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetCustomerRequest.new + # + # # Call the get_customer method. + # result = client.get_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def get_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :get_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Confirms the existence of Cloud Identity accounts based on the domain and + # if the Cloud Identity accounts are owned by the reseller. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * INVALID_VALUE: Invalid domain value in the request. + # + # Return value: + # A list of + # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} + # resources for the domain (may be empty) + # + # Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if + # no + # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} + # resources match the domain. + # + # @overload check_cloud_identity_accounts_exist(request, options = nil) + # Pass arguments to `check_cloud_identity_accounts_exist` via a request object, either of type + # {::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload check_cloud_identity_accounts_exist(parent: nil, domain: nil, primary_admin_email: nil) + # Pass arguments to `check_cloud_identity_accounts_exist` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The reseller account's resource name. + # Parent uses the format: accounts/\\{account_id} + # @param domain [::String] + # Required. Domain to fetch for Cloud Identity account customers, including + # domain and team customers. For team customers, please use the domain for + # their emails. + # @param primary_admin_email [::String] + # Optional. Primary admin email to fetch for Cloud Identity account team + # customer. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new + # + # # Call the check_cloud_identity_accounts_exist method. + # result = client.check_cloud_identity_accounts_exist request + # + # # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse. + # p result + # + def check_cloud_identity_accounts_exist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.check_cloud_identity_accounts_exist.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.check_cloud_identity_accounts_exist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.check_cloud_identity_accounts_exist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :check_cloud_identity_accounts_exist, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::Channel::V1::Customer Customer} resource under + # the reseller or distributor account. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The reseller account making the request is different from the + # reseller account in the API request. + # * You are not authorized to create a customer. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: + # * Required request parameters are missing or invalid. + # * Domain field value doesn't match the primary email domain. + # + # Return value: + # The newly created {::Google::Cloud::Channel::V1::Customer Customer} resource. + # + # @overload create_customer(request, options = nil) + # Pass arguments to `create_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_customer(parent: nil, customer: nil) + # Pass arguments to `create_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of reseller account in which to create the + # customer. Parent uses the format: accounts/\\{account_id} + # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] + # Required. The customer to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateCustomerRequest.new + # + # # Call the create_customer method. + # result = client.create_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def create_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :create_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing {::Google::Cloud::Channel::V1::Customer Customer} resource + # for the reseller or distributor. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found + # for the name in the request. + # + # Return value: + # The updated {::Google::Cloud::Channel::V1::Customer Customer} resource. + # + # @overload update_customer(request, options = nil) + # Pass arguments to `update_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_customer(customer: nil, update_mask: nil) + # Pass arguments to `update_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] + # Required. New contents of the customer. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask that applies to the resource. + # Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new + # + # # Call the update_customer method. + # result = client.update_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def update_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer&.name + header_params["customer.name"] = request.customer.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :update_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the given {::Google::Cloud::Channel::V1::Customer Customer} permanently. + # + # 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 customer has existing entitlements. + # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found + # for the name in the request. + # + # @overload delete_customer(request, options = nil) + # Pass arguments to `delete_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::DeleteCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_customer(name: nil) + # Pass arguments to `delete_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the customer to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new + # + # # Call the delete_customer method. + # result = client.delete_customer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :delete_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports a {::Google::Cloud::Channel::V1::Customer Customer} from the Cloud + # Identity associated with the provided Cloud Identity ID or domain before a + # TransferEntitlements call. If a linked Customer already exists and + # overwrite_if_exists is true, it will update that Customer's data. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The reseller account making the request is different from the + # reseller account in the API request. + # * You are not authorized to import the customer. See + # https://support.google.com/channelservices/answer/9759265 + # * NOT_FOUND: Cloud Identity doesn't exist or was deleted. + # * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is + # expired or invalid. + # * ALREADY_EXISTS: A customer already exists and has conflicting critical + # fields. Requires an overwrite. + # + # Return value: + # The {::Google::Cloud::Channel::V1::Customer Customer}. + # + # @overload import_customer(request, options = nil) + # Pass arguments to `import_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::ImportCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ImportCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_customer(domain: nil, cloud_identity_id: nil, primary_admin_email: nil, parent: nil, auth_token: nil, overwrite_if_exists: nil, channel_partner_id: nil, customer: nil) + # Pass arguments to `import_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param domain [::String] + # Required. Customer domain. + # + # Note: The following parameters are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param cloud_identity_id [::String] + # Required. Customer's Cloud Identity ID + # + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param primary_admin_email [::String] + # Required. Customer's primary admin email. + # + # Note: The following parameters are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The resource name of the reseller's account. + # Parent takes the format: accounts/\\{account_id} or + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} + # @param auth_token [::String] + # Optional. The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @param overwrite_if_exists [::Boolean] + # Required. Choose to overwrite an existing customer if found. + # This must be set to true if there is an existing customer with a + # conflicting region code or domain. + # @param channel_partner_id [::String] + # Optional. Cloud Identity ID of a channel partner who will be the direct + # reseller for the customer's order. This field is required for 2-tier + # transfer scenarios and can be provided via the request Parent binding as + # well. + # @param customer [::String] + # Optional. Specifies the customer that will receive imported Cloud Identity + # information. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ImportCustomerRequest.new + # + # # Call the import_customer method. + # result = client.import_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def import_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ImportCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :import_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Cloud Identity for the given customer using the customer's + # information, or the information provided here. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller. + # * You are not authorized to provision cloud identity id. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer was not found. + # * ALREADY_EXISTS: The customer's primary email already exists. Retry + # after changing the customer's primary contact email. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata contains an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload provision_cloud_identity(request, options = nil) + # Pass arguments to `provision_cloud_identity` via a request object, either of type + # {::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload provision_cloud_identity(customer: nil, cloud_identity_info: nil, user: nil, validate_only: nil) + # Pass arguments to `provision_cloud_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::String] + # Required. Resource name of the customer. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # @param cloud_identity_info [::Google::Cloud::Channel::V1::CloudIdentityInfo, ::Hash] + # CloudIdentity-specific customer information. + # @param user [::Google::Cloud::Channel::V1::AdminUser, ::Hash] + # Admin user information. + # @param validate_only [::Boolean] + # Validate the request and preview the review, but do not post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new + # + # # Call the provision_cloud_identity method. + # result = client.provision_cloud_identity request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def provision_cloud_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.provision_cloud_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer + header_params["customer"] = request.customer + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.provision_cloud_identity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.provision_cloud_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :provision_cloud_identity, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Channel::V1::Entitlement Entitlement}s belonging to a + # customer. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # A list of the customer's + # {::Google::Cloud::Channel::V1::Entitlement Entitlement}s. + # + # @overload list_entitlements(request, options = nil) + # Pass arguments to `list_entitlements` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListEntitlementsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListEntitlementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entitlements(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_entitlements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account to list + # entitlements for. + # Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id} + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, return at most 50 entitlements. The maximum + # value is 100; the server will coerce values above 100. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListEntitlementsResponse#next_page_token ListEntitlementsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements} + # call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new + # + # # Call the list_entitlements method. + # result = client.list_entitlements request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Entitlement. + # p item + # end + # + def list_entitlements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entitlements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entitlements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entitlements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_entitlements, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlements, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}s of a + # customer based on the Cloud Identity ID or Customer Name in the request. + # + # Use this method to list the entitlements information of an + # unowned customer. You should provide the customer's + # Cloud Identity ID or Customer Name. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller and has no auth token. + # * The supplied auth token is invalid. + # * The reseller account making the request is different + # from the reseller account in the query. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # A list of the customer's + # {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}. + # + # @overload list_transferable_skus(request, options = nil) + # Pass arguments to `list_transferable_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListTransferableSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListTransferableSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_transferable_skus(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, auth_token: nil, language_code: nil) + # Pass arguments to `list_transferable_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cloud_identity_id [::String] + # Customer's Cloud Identity ID + # + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer_name [::String] + # A reseller is required to create a customer and use the resource name of + # the created customer here. + # Customer_name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The reseller account's resource name. + # Parent uses the format: accounts/\\{account_id} + # @param page_size [::Integer] + # The requested page size. Server might return fewer results than requested. + # If unspecified, returns at most 100 SKUs. + # The maximum value is 1000; the server will coerce values above 1000. + # Optional. + # @param page_token [::String] + # A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListTransferableSkusResponse#next_page_token ListTransferableSkusResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} + # call. Optional. + # @param auth_token [::String] + # Optional. The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @param language_code [::String] + # The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new + # + # # Call the list_transferable_skus method. + # result = client.list_transferable_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku. + # p item + # end + # + def list_transferable_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_transferable_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_transferable_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transferable_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_transferable_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_skus, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer}s of a + # customer based on Cloud Identity ID or Customer Name in the request. + # + # Use this method when a reseller gets the entitlement information of an + # unowned customer. The reseller should provide the customer's + # Cloud Identity ID or Customer Name. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller and has no auth token. + # * The customer provided incorrect reseller information when generating + # auth token. + # * The reseller account making the request is different + # from the reseller account in the query. + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # List of {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer} for + # the given customer and SKU. + # + # @overload list_transferable_offers(request, options = nil) + # Pass arguments to `list_transferable_offers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListTransferableOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListTransferableOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil, billing_account: nil) + # Pass arguments to `list_transferable_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cloud_identity_id [::String] + # Customer's Cloud Identity ID + # + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer_name [::String] + # A reseller should create a customer and use the resource name of + # that customer here. + # + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The resource name of the reseller's account. + # @param page_size [::Integer] + # Requested page size. Server might return fewer results than requested. + # If unspecified, returns at most 100 offers. + # The maximum value is 1000; the server will coerce values above 1000. + # @param page_token [::String] + # A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListTransferableOffersResponse#next_page_token ListTransferableOffersResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} + # call. + # @param sku [::String] + # Required. The SKU to look up Offers for. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @param billing_account [::String] + # Optional. The Billing Account to look up Offers for. Format: + # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. + # + # This field is only relevant for multi-currency accounts. It should be left + # empty for single currency accounts. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new + # + # # Call the list_transferable_offers method. + # result = client.list_transferable_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer. + # p item + # end + # + def list_transferable_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_transferable_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_transferable_offers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transferable_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_transferable_offers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_offers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} + # resource. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer entitlement was not found. + # + # Return value: + # The requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} resource. + # + # @overload get_entitlement(request, options = nil) + # Pass arguments to `get_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_entitlement(name: nil) + # Pass arguments to `get_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to retrieve. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::Entitlement] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::Entitlement] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetEntitlementRequest.new + # + # # Call the get_entitlement method. + # result = client.get_entitlement request + # + # # The returned object is of type Google::Cloud::Channel::V1::Entitlement. + # p result + # + def get_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_entitlement.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :get_entitlement, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an entitlement for a customer. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller. + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: + # * Required request parameters are missing or invalid. + # * There is already a customer entitlement for a SKU from the same + # product family. + # * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact + # Google Channel support for further troubleshooting. + # * NOT_FOUND: The customer or offer resource was not found. + # * ALREADY_EXISTS: + # * The SKU was already purchased for the customer. + # * The customer's primary email already exists. Retry + # after changing the customer's primary contact email. + # * CONDITION_NOT_MET or FAILED_PRECONDITION: + # * The domain required for purchasing a SKU has not been verified. + # * A pre-requisite SKU required to purchase an Add-On SKU is missing. + # For example, Google Workspace Business Starter is required to purchase + # Vault or Drive. + # * (Developer accounts only) Reseller and resold domain must meet the + # following naming requirements: + # * Domain names must start with goog-test. + # * Domain names must include the reseller domain. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload create_entitlement(request, options = nil) + # Pass arguments to `create_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_entitlement(parent: nil, entitlement: nil, request_id: nil) + # Pass arguments to `create_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account in which to + # create the entitlement. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param entitlement [::Google::Cloud::Channel::V1::Entitlement, ::Hash] + # Required. The entitlement to create. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new + # + # # Call the create_entitlement method. + # result = client.create_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_entitlement.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :create_entitlement, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Change parameters of the entitlement. + # + # An entitlement update is a long-running operation and it updates the + # entitlement as a result of fulfillment. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # For example, the number of seats being changed is greater than the allowed + # number of max seats, or decreasing seats for a commitment based plan. + # * NOT_FOUND: Entitlement resource not found. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload change_parameters(request, options = nil) + # Pass arguments to `change_parameters` via a request object, either of type + # {::Google::Cloud::Channel::V1::ChangeParametersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ChangeParametersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload change_parameters(name: nil, parameters: nil, request_id: nil, purchase_order_id: nil) + # Pass arguments to `change_parameters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] + # Required. Entitlement parameters to update. You can only change editable + # parameters. + # + # To view the available Parameters for a request, refer to the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} + # from the desired offer. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @param purchase_order_id [::String] + # Optional. Purchase order ID provided by the reseller. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ChangeParametersRequest.new + # + # # Call the change_parameters method. + # result = client.change_parameters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def change_parameters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeParametersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.change_parameters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.change_parameters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.change_parameters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :change_parameters, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the renewal settings for an existing customer entitlement. + # + # An entitlement update is a long-running operation and it updates the + # entitlement as a result of fulfillment. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a + # commitment plan. Can't enable or disable renewals for non-commitment plans. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload change_renewal_settings(request, options = nil) + # Pass arguments to `change_renewal_settings` via a request object, either of type + # {::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload change_renewal_settings(name: nil, renewal_settings: nil, request_id: nil) + # Pass arguments to `change_renewal_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param renewal_settings [::Google::Cloud::Channel::V1::RenewalSettings, ::Hash] + # Required. New renewal settings. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new + # + # # Call the change_renewal_settings method. + # result = client.change_renewal_settings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def change_renewal_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.change_renewal_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.change_renewal_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.change_renewal_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :change_renewal_settings, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Offer for an existing customer entitlement. + # + # An entitlement update is a long-running operation and it updates the + # entitlement as a result of fulfillment. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Offer or Entitlement resource not found. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload change_offer(request, options = nil) + # Pass arguments to `change_offer` via a request object, either of type + # {::Google::Cloud::Channel::V1::ChangeOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ChangeOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil, price_reference_id: nil) + # Pass arguments to `change_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param offer [::String] + # Required. New Offer. + # Format: accounts/\\{account_id}/offers/\\{offer_id}. + # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] + # Optional. Parameters needed to purchase the Offer. To view the available + # Parameters refer to the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} + # from the desired offer. + # @param purchase_order_id [::String] + # Optional. Purchase order id provided by the reseller. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @param billing_account [::String] + # Optional. The billing account resource name that is used to pay for this + # entitlement when setting up billing on a trial subscription. + # + # This field is only relevant for multi-currency accounts. It should be + # left empty for single currency accounts. + # @param price_reference_id [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ChangeOfferRequest.new + # + # # Call the change_offer method. + # result = client.change_offer request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def change_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.change_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.change_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.change_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :change_offer, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts paid service for a trial entitlement. + # + # Starts paid service for a trial entitlement immediately. This method is + # only applicable if a plan is set up for a trial entitlement but has some + # trial days remaining. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for + # entitlement on trial plans. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload start_paid_service(request, options = nil) + # Pass arguments to `start_paid_service` via a request object, either of type + # {::Google::Cloud::Channel::V1::StartPaidServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::StartPaidServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_paid_service(name: nil, request_id: nil) + # Pass arguments to `start_paid_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the entitlement to start a paid service for. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new + # + # # Call the start_paid_service method. + # result = client.start_paid_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_paid_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::StartPaidServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_paid_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_paid_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_paid_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :start_paid_service, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Suspends a previously fulfilled entitlement. + # + # An entitlement suspension is a long-running operation. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * NOT_ACTIVE: Entitlement is not active. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload suspend_entitlement(request, options = nil) + # Pass arguments to `suspend_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::SuspendEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::SuspendEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload suspend_entitlement(name: nil, request_id: nil) + # Pass arguments to `suspend_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to suspend. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new + # + # # Call the suspend_entitlement method. + # result = client.suspend_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def suspend_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::SuspendEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.suspend_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suspend_entitlement.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suspend_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :suspend_entitlement, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels a previously fulfilled entitlement. + # + # An entitlement cancellation is a long-running operation. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * FAILED_PRECONDITION: There are Google Cloud projects linked to the + # Google Cloud entitlement's Cloud Billing subaccount. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace + # add-ons, or entitlements for Google Cloud's development platform. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The response will contain + # google.protobuf.Empty on success. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload cancel_entitlement(request, options = nil) + # Pass arguments to `cancel_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::CancelEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CancelEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_entitlement(name: nil, request_id: nil) + # Pass arguments to `cancel_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to cancel. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new + # + # # Call the cancel_entitlement method. + # result = client.cancel_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CancelEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_entitlement.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :cancel_entitlement, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activates a previously suspended entitlement. Entitlements suspended for + # pending ToS acceptance can't be activated using this method. + # + # An entitlement activation is a long-running operation and it updates + # the state of the customer entitlement. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated + # suspensions and entitlements that have accepted the TOS. + # * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE + # state. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload activate_entitlement(request, options = nil) + # Pass arguments to `activate_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::ActivateEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ActivateEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload activate_entitlement(name: nil, request_id: nil) + # Pass arguments to `activate_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to activate. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new + # + # # Call the activate_entitlement method. + # result = client.activate_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def activate_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ActivateEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.activate_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.activate_entitlement.timeout, + metadata: metadata, + retry_policy: @config.rpcs.activate_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :activate_entitlement, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Transfers customer entitlements to new reseller. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller. + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer or offer resource was not found. + # * ALREADY_EXISTS: The SKU was already transferred for the customer. + # * CONDITION_NOT_MET or FAILED_PRECONDITION: + # * The SKU requires domain verification to transfer, but the domain is + # not verified. + # * An Add-On SKU (example, Vault or Drive) is missing the + # pre-requisite SKU (example, G Suite Basic). + # * (Developer accounts only) Reseller and resold domain must meet the + # following naming requirements: + # * Domain names must start with goog-test. + # * Domain names must include the reseller domain. + # * Specify all transferring entitlements. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload transfer_entitlements(request, options = nil) + # Pass arguments to `transfer_entitlements` via a request object, either of type + # {::Google::Cloud::Channel::V1::TransferEntitlementsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload transfer_entitlements(parent: nil, entitlements: nil, auth_token: nil, request_id: nil) + # Pass arguments to `transfer_entitlements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account that will + # receive transferred entitlements. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] + # Required. The new entitlements to create or transfer. + # @param auth_token [::String] + # The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new + # + # # Call the transfer_entitlements method. + # result = client.transfer_entitlements request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def transfer_entitlements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.transfer_entitlements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.transfer_entitlements.timeout, + metadata: metadata, + retry_policy: @config.rpcs.transfer_entitlements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :transfer_entitlements, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Transfers customer entitlements from their current reseller to Google. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer or offer resource was not found. + # * ALREADY_EXISTS: The SKU was already transferred for the customer. + # * CONDITION_NOT_MET or FAILED_PRECONDITION: + # * The SKU requires domain verification to transfer, but the domain is + # not verified. + # * An Add-On SKU (example, Vault or Drive) is missing the + # pre-requisite SKU (example, G Suite Basic). + # * (Developer accounts only) Reseller and resold domain must meet the + # following naming requirements: + # * Domain names must start with goog-test. + # * Domain names must include the reseller domain. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The response will contain + # google.protobuf.Empty on success. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload transfer_entitlements_to_google(request, options = nil) + # Pass arguments to `transfer_entitlements_to_google` via a request object, either of type + # {::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload transfer_entitlements_to_google(parent: nil, entitlements: nil, request_id: nil) + # Pass arguments to `transfer_entitlements_to_google` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account where the + # entitlements transfer from. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] + # Required. The entitlements to transfer to Google. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new + # + # # Call the transfer_entitlements_to_google method. + # result = client.transfer_entitlements_to_google request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def transfer_entitlements_to_google request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.transfer_entitlements_to_google.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.transfer_entitlements_to_google.timeout, + metadata: metadata, + retry_policy: @config.rpcs.transfer_entitlements_to_google.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :transfer_entitlements_to_google, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s + # belonging to a distributor. You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # The list of the distributor account's + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resources. + # + # @overload list_channel_partner_links(request, options = nil) + # Pass arguments to `list_channel_partner_links` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_channel_partner_links(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_channel_partner_links` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller account for listing channel + # partner links. Parent uses the format: accounts/\\{account_id} + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, server will pick a default size (25). The + # maximum value is 200; the server will coerce values above 200. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse#next_page_token ListChannelPartnerLinksResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} + # call. + # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] + # Optional. The level of granularity the ChannelPartnerLink will display. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new + # + # # Call the list_channel_partner_links method. + # result = client.list_channel_partner_links request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink. + # p item + # end + # + def list_channel_partner_links request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_channel_partner_links.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_channel_partner_links.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_channel_partner_links.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_channel_partner_links, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_links, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. + # You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: ChannelPartnerLink resource not found because of an + # invalid channel partner link name. + # + # Return value: + # The {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} + # resource. + # + # @overload get_channel_partner_link(request, options = nil) + # Pass arguments to `get_channel_partner_link` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_channel_partner_link(name: nil, view: nil) + # Pass arguments to `get_channel_partner_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the channel partner link to retrieve. + # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} + # where \\{id} is the Cloud Identity ID of the partner. + # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] + # Optional. The level of granularity the ChannelPartnerLink will display. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new + # + # # Call the get_channel_partner_link method. + # result = client.get_channel_partner_link request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + # p result + # + def get_channel_partner_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_channel_partner_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_channel_partner_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_channel_partner_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :get_channel_partner_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initiates a channel partner link between a distributor and a reseller, or + # between resellers in an n-tier reseller channel. + # Invited partners need to follow the invite_link_uri provided in the + # response to accept. After accepting the invitation, a link is set up + # between the two parties. + # You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already + # exists. + # * NOT_FOUND: No Cloud Identity customer exists for provided domain. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The new {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} + # resource. + # + # @overload create_channel_partner_link(request, options = nil) + # Pass arguments to `create_channel_partner_link` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_channel_partner_link(parent: nil, channel_partner_link: nil) + # Pass arguments to `create_channel_partner_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Create a channel partner link for the provided reseller account's + # resource name. + # Parent uses the format: accounts/\\{account_id} + # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] + # Required. The channel partner link to create. + # Either channel_partner_link.reseller_cloud_identity_id or domain can be + # used to create a link. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new + # + # # Call the create_channel_partner_link method. + # result = client.create_channel_partner_link request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + # p result + # + def create_channel_partner_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_channel_partner_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_channel_partner_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_channel_partner_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :create_channel_partner_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a channel partner link. Distributors call this method to change a + # link's status. For example, to suspend a partner link. + # You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: + # * Required request parameters are missing or invalid. + # * Link state cannot change from invited to active or suspended. + # * Cannot send reseller_cloud_identity_id, invite_url, or name in update + # mask. + # * NOT_FOUND: ChannelPartnerLink resource not found. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The updated + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. + # + # @overload update_channel_partner_link(request, options = nil) + # Pass arguments to `update_channel_partner_link` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_channel_partner_link(name: nil, channel_partner_link: nil, update_mask: nil) + # Pass arguments to `update_channel_partner_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the channel partner link to cancel. + # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} + # where \\{id} is the Cloud Identity ID of the partner. + # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] + # Required. The channel partner link to update. Only + # channel_partner_link.link_state is allowed for updates. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask that applies to the resource. + # The only allowable value for an update mask is + # channel_partner_link.link_state. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new + # + # # Call the update_channel_partner_link method. + # result = client.update_channel_partner_link request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + # p result + # + def update_channel_partner_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_channel_partner_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_channel_partner_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_channel_partner_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :update_channel_partner_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload get_customer_repricing_config(request, options = nil) + # Pass arguments to `get_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_customer_repricing_config(name: nil) + # Pass arguments to `get_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the CustomerRepricingConfig. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new + # + # # Call the get_customer_repricing_config method. + # result = client.get_customer_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p result + # + def get_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :get_customer_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resources. The data for each resource is displayed in the ascending order + # of: + # + # * Customer ID + # * {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement} + # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # * {::Google::Cloud::Channel::V1::CustomerRepricingConfig#update_time CustomerRepricingConfig.update_time} + # + # If unsuccessful, returns an error. + # + # @overload list_customer_repricing_configs(request, options = nil) + # Pass arguments to `list_customer_repricing_configs` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_customer_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_customer_repricing_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} + # call. + # @param filter [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new + # + # # Call the list_customer_repricing_configs method. + # result = client.list_customer_repricing_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p item + # end + # + def list_customer_repricing_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_customer_repricing_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_customer_repricing_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_customer_repricing_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a CustomerRepricingConfig. Call this method to set modifications + # for a specific customer's bill. You can only create configs if the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, + # for any + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. + # * The contained + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config} + # value must be different from the value used in the current config for a + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload create_customer_repricing_config(request, options = nil) + # Pass arguments to `create_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_customer_repricing_config(parent: nil, customer_repricing_config: nil) + # Pass arguments to `create_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the customer that will receive this + # repricing config. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] + # Required. The CustomerRepricingConfig object to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new + # + # # Call the create_customer_repricing_config method. + # result = client.create_customer_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p result + # + def create_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :create_customer_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # is a future month. To make changes to configs for the current month, use + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config CreateCustomerRepricingConfig}, + # taking note of its restrictions. You cannot update the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload update_customer_repricing_config(request, options = nil) + # Pass arguments to `update_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_customer_repricing_config(customer_repricing_config: nil) + # Pass arguments to `update_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] + # Required. The CustomerRepricingConfig object to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new + # + # # Call the update_customer_repricing_config method. + # result = client.update_customer_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p result + # + def update_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_repricing_config&.name + header_params["customer_repricing_config.name"] = request.customer_repricing_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :update_customer_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the given + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # permanently. You can only delete configs if their + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # is active or in the past. + # * NOT_FOUND: No + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # found for the name in the request. + # + # @overload delete_customer_repricing_config(request, options = nil) + # Pass arguments to `delete_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_customer_repricing_config(name: nil) + # Pass arguments to `delete_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the customer repricing config rule to + # delete. Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new + # + # # Call the delete_customer_repricing_config method. + # result = client.delete_customer_repricing_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :delete_customer_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload get_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `get_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_channel_partner_repricing_config(name: nil) + # Pass arguments to `get_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the ChannelPartnerRepricingConfig + # Format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new + # + # # Call the get_channel_partner_repricing_config method. + # result = client.get_channel_partner_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p result + # + def get_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_channel_partner_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :get_channel_partner_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resources. The data for each resource is displayed in the ascending order + # of: + # + # * Channel Partner ID + # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # * {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#update_time ChannelPartnerRepricingConfig.update_time} + # + # If unsuccessful, returns an error. + # + # @overload list_channel_partner_repricing_configs(request, options = nil) + # Pass arguments to `list_channel_partner_repricing_configs` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_channel_partner_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_channel_partner_repricing_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account's + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}. Parent + # uses the format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}. + # Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs + # for all channel partners. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} + # call. + # @param filter [::String] + # 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`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new + # + # # Call the list_channel_partner_repricing_configs method. + # result = client.list_channel_partner_repricing_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p item + # end + # + def list_channel_partner_repricing_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_channel_partner_repricing_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_channel_partner_repricing_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_channel_partner_repricing_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_channel_partner_repricing_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a ChannelPartnerRepricingConfig. Call this method to set + # modifications for a specific ChannelPartner's bill. You can only create + # configs if the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, + # for any + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. + # * The contained + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config} + # value 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload create_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `create_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_channel_partner_repricing_config(parent: nil, channel_partner_repricing_config: nil) + # Pass arguments to `create_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the ChannelPartner that will receive the + # repricing config. Parent uses the format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} + # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] + # Required. The ChannelPartnerRepricingConfig object to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new + # + # # Call the create_channel_partner_repricing_config method. + # result = client.create_channel_partner_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p result + # + def create_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_channel_partner_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :create_channel_partner_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # is a future month. To make changes to configs for the current month, use + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config CreateChannelPartnerRepricingConfig}, + # taking note of its restrictions. You cannot update the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload update_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `update_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_channel_partner_repricing_config(channel_partner_repricing_config: nil) + # Pass arguments to `update_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] + # Required. The ChannelPartnerRepricingConfig object to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new + # + # # Call the update_channel_partner_repricing_config method. + # result = client.update_channel_partner_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p result + # + def update_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.channel_partner_repricing_config&.name + header_params["channel_partner_repricing_config.name"] = request.channel_partner_repricing_config.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_channel_partner_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :update_channel_partner_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the given + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # permanently. You can only delete configs if their + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # is active or in the past. + # * NOT_FOUND: No + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # found for the name in the request. + # + # @overload delete_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `delete_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_channel_partner_repricing_config(name: nil) + # Pass arguments to `delete_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the channel partner repricing config rule to + # delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new + # + # # Call the delete_channel_partner_repricing_config method. + # result = client.delete_channel_partner_repricing_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_channel_partner_repricing_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :delete_channel_partner_repricing_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Rebilling supported SKU groups the account is authorized to + # sell. + # Reference: https://cloud.google.com/skus/sku-groups + # + # Possible Error Codes: + # + # * PERMISSION_DENIED: If the account making the request and the account + # being queried are different, or the account doesn't exist. + # * INTERNAL: Any non-user error related to technical issues in the + # backend. In this case, contact Cloud Channel support. + # + # Return Value: + # If successful, the {::Google::Cloud::Channel::V1::SkuGroup SkuGroup} resources. + # The data for each resource is displayed in the alphabetical order of SKU + # group display name. + # The data for each resource is displayed in the ascending order of + # {::Google::Cloud::Channel::V1::SkuGroup#display_name SkuGroup.display_name} + # + # If unsuccessful, returns an error. + # + # @overload list_sku_groups(request, options = nil) + # Pass arguments to `list_sku_groups` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSkuGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sku_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account from which to list SKU groups. + # Parent uses the format: accounts/\\{account}. + # @param page_size [::Integer] + # Optional. The maximum number of SKU groups to return. The service may + # return fewer than this value. If unspecified, returns a maximum of 1000 SKU + # groups. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups} + # call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new + # + # # Call the list_sku_groups method. + # result = client.list_sku_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup. + # p item + # end + # + def list_sku_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sku_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sku_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_sku_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Billable SKUs in a given SKU group. + # + # Possible error codes: + # PERMISSION_DENIED: If the account making the request and the account + # being queried for are different, or the account doesn't exist. + # INVALID_ARGUMENT: Missing or invalid required parameters in the + # request. + # INTERNAL: Any non-user error related to technical issue in the + # backend. In this case, contact cloud channel support. + # + # Return Value: + # If successful, the {::Google::Cloud::Channel::V1::BillableSku BillableSku} + # resources. The data for each resource is displayed in the ascending order + # of: + # + # * {::Google::Cloud::Channel::V1::BillableSku#service_display_name BillableSku.service_display_name} + # * {::Google::Cloud::Channel::V1::BillableSku#sku_display_name BillableSku.sku_display_name} + # + # If unsuccessful, returns an error. + # + # @overload list_sku_group_billable_skus(request, options = nil) + # Pass arguments to `list_sku_group_billable_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sku_group_billable_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the SKU group. + # Format: accounts/\\{account}/skuGroups/\\{sku_group}. + # @param page_size [::Integer] + # Optional. The maximum number of SKUs to return. The service may return + # fewer than this value. If unspecified, returns a maximum of 100000 SKUs. + # The maximum value is 100000; values above 100000 will be coerced to 100000. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} + # call. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new + # + # # Call the list_sku_group_billable_skus method. + # result = client.list_sku_group_billable_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::BillableSku. + # p item + # end + # + def list_sku_group_billable_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sku_group_billable_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_sku_group_billable_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement or offer was not found. + # + # Return value: + # The {::Google::Cloud::Channel::V1::Offer Offer} resource. + # + # @overload lookup_offer(request, options = nil) + # Pass arguments to `lookup_offer` via a request object, either of type + # {::Google::Cloud::Channel::V1::LookupOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::LookupOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload lookup_offer(entitlement: nil) + # Pass arguments to `lookup_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entitlement [::String] + # Required. The resource name of the entitlement to retrieve the Offer. + # Entitlement uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::Offer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::Offer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::LookupOfferRequest.new + # + # # Call the lookup_offer method. + # result = client.lookup_offer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Offer. + # p result + # + def lookup_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::LookupOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.lookup_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.entitlement + header_params["entitlement"] = request.entitlement + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.lookup_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :lookup_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Products the reseller is authorized to sell. + # + # Possible error codes: + # + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_products(account: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Required. The resource name of the reseller account. + # Format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 Products. The maximum value + # is 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_products, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the SKUs for a product the reseller is authorized to sell. + # + # Possible error codes: + # + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_skus(parent: nil, account: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Product to list SKUs for. + # Parent uses the format: products/\\{product_id}. + # Supports products/- to retrieve SKUs for all products. + # @param account [::String] + # Required. Resource name of the reseller. + # Format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 SKUs. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # Optional. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Offers the reseller can sell. + # + # Possible error codes: + # + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_offers(request, options = nil) + # Pass arguments to `list_offers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, language_code: nil, show_future_offers: nil) + # Pass arguments to `list_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller account from which to list + # Offers. Parent uses the format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 500 Offers. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param filter [::String] + # Optional. The expression to filter results by name (name of + # the Offer), sku.name (name of the SKU), or sku.product.name (name of the + # Product). + # Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 + # Example 2: name=accounts/a1/offers/o1 + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @param show_future_offers [::Boolean] + # Optional. A boolean flag that determines if a response returns future + # offers 30 days from now. If the show_future_offers is true, the response + # will only contain offers that are scheduled to be available 30 days from + # now. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListOffersRequest.new + # + # # Call the list_offers method. + # result = client.list_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Offer. + # p item + # end + # + def list_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_offers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_offers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the following: + # + # * SKUs that you can purchase for a customer + # * SKUs that you can upgrade or downgrade for an entitlement. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_purchasable_skus(request, options = nil) + # Pass arguments to `list_purchasable_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListPurchasableSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_purchasable_skus(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_purchasable_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash] + # List SKUs for CreateEntitlement purchase. + # + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash] + # List SKUs for ChangeOffer purchase with a new SKU. + # + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer [::String] + # Required. The resource name of the customer to list SKUs for. + # Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 SKUs. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new + # + # # Call the list_purchasable_skus method. + # result = client.list_purchasable_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku. + # p item + # end + # + def list_purchasable_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_purchasable_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer + header_params["customer"] = request.customer + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_purchasable_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_purchasable_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_purchasable_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the following: + # + # * Offers that you can purchase for a customer. + # * Offers that you can change for an entitlement. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_purchasable_offers(request, options = nil) + # Pass arguments to `list_purchasable_offers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListPurchasableOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_purchasable_offers(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_purchasable_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase, ::Hash] + # List Offers for CreateEntitlement purchase. + # + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase, ::Hash] + # List Offers for ChangeOffer purchase. + # + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer [::String] + # Required. The resource name of the customer to list Offers for. + # Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 Offers. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new + # + # # Call the list_purchasable_offers method. + # result = client.list_purchasable_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer. + # p item + # end + # + def list_purchasable_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_purchasable_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer + header_params["customer"] = request.customer + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_purchasable_offers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_purchasable_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_purchasable_offers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_offers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the billing accounts that are eligible to purchase particular SKUs + # for a given customer. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # Based on the provided list of SKUs, returns a list of SKU groups that must + # be purchased using the same billing account and the billing accounts + # eligible to purchase each SKU group. + # + # @overload query_eligible_billing_accounts(request, options = nil) + # Pass arguments to `query_eligible_billing_accounts` via a request object, either of type + # {::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_eligible_billing_accounts(customer: nil, skus: nil) + # Pass arguments to `query_eligible_billing_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::String] + # Required. The resource name of the customer to list eligible billing + # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @param skus [::Array<::String>] + # Required. List of SKUs to list eligible billing accounts for. At least one + # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new + # + # # Call the query_eligible_billing_accounts method. + # result = client.query_eligible_billing_accounts request + # + # # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse. + # p result + # + def query_eligible_billing_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_eligible_billing_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer + header_params["customer"] = request.customer + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :query_eligible_billing_accounts, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Registers a service account with subscriber privileges on the Pub/Sub + # topic for this Channel Services account or integrator. After you create a + # subscriber, you get the events through + # {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent} + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different, or the impersonated user + # is not a super admin. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The topic name with the registered service email address. + # + # @overload register_subscriber(request, options = nil) + # Pass arguments to `register_subscriber` via a request object, either of type + # {::Google::Cloud::Channel::V1::RegisterSubscriberRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::RegisterSubscriberRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload register_subscriber(account: nil, service_account: nil, integrator: nil) + # Pass arguments to `register_subscriber` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @param service_account [::String] + # Required. Service account that provides subscriber access to the registered + # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new + # + # # Call the register_subscriber method. + # result = client.register_subscriber request + # + # # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse. + # p result + # + def register_subscriber request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RegisterSubscriberRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.register_subscriber.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account + header_params["account"] = request.account + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.register_subscriber.timeout, + metadata: metadata, + retry_policy: @config.rpcs.register_subscriber.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :register_subscriber, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unregisters a service account with subscriber privileges on the Pub/Sub + # topic created for this Channel Services account or integrator. If there are + # no service accounts left with subscriber privileges, this deletes the + # topic. You can call ListSubscribers to check for these accounts. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different, or the impersonated user + # is not a super admin. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The topic resource doesn't exist. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The topic name that unregistered the service email address. + # Returns a success response if the service email address wasn't registered + # with the topic. + # + # @overload unregister_subscriber(request, options = nil) + # Pass arguments to `unregister_subscriber` via a request object, either of type + # {::Google::Cloud::Channel::V1::UnregisterSubscriberRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unregister_subscriber(account: nil, service_account: nil, integrator: nil) + # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @param service_account [::String] + # Required. Service account to unregister from subscriber access to the + # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new + # + # # Call the unregister_subscriber method. + # result = client.unregister_subscriber request + # + # # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse. + # p result + # + def unregister_subscriber request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.unregister_subscriber.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account + header_params["account"] = request.account + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.unregister_subscriber.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unregister_subscriber.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :unregister_subscriber, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists service accounts with subscriber privileges on the Pub/Sub topic + # created for this Channel Services account or integrator. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different, or the impersonated user + # is not a super admin. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The topic resource doesn't exist. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # A list of service email addresses. + # + # @overload list_subscribers(request, options = nil) + # Pass arguments to `list_subscribers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSubscribersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSubscribersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_subscribers(account: nil, page_size: nil, page_token: nil, integrator: nil) + # Pass arguments to `list_subscribers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @param page_size [::Integer] + # Optional. The maximum number of service accounts to return. The service may + # return fewer than this value. If unspecified, returns at most 100 service + # accounts. The maximum value is 1000; the server will coerce values above + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListSubscribers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSubscribers` must + # match the call that provided the page token. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Channel::V1::ListSubscribersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSubscribersRequest.new + # + # # Call the list_subscribers method. + # result = client.list_subscribers request + # + # # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse. + # p result + # + def list_subscribers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSubscribersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_subscribers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.account + header_params["account"] = request.account + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_subscribers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_subscribers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_subscribers, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List entitlement history. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different. + # * INVALID_ARGUMENT: Missing or invalid required fields in the request. + # * NOT_FOUND: The parent resource doesn't exist. Usually the result of an + # invalid name parameter. + # * INTERNAL: Any non-user error related to a technical issue in the backend. + # In this case, contact CloudChannel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # In this case, contact Cloud Channel support. + # + # Return value: + # List of {::Google::Cloud::Channel::V1::EntitlementChange EntitlementChange}s. + # + # @overload list_entitlement_changes(request, options = nil) + # Pass arguments to `list_entitlement_changes` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListEntitlementChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_entitlement_changes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entitlement_changes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the entitlement for which to list + # entitlement changes. The `-` wildcard may be used to match entitlements + # across a customer. Formats: + # + # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/- + # @param page_size [::Integer] + # Optional. The maximum number of entitlement changes to return. The service + # may return fewer than this value. If unspecified, returns at most 10 + # entitlement changes. The maximum value is 50; the server will coerce values + # above 50. + # @param page_token [::String] + # Optional. A page token, received from a previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filters applied to the list results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new + # + # # Call the list_entitlement_changes method. + # result = client.list_entitlement_changes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::EntitlementChange. + # p item + # end + # + def list_entitlement_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_entitlement_changes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_entitlement_changes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_entitlement_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.call_rpc :list_entitlement_changes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlement_changes, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudChannelService API. + # + # This class represents the configuration for CloudChannelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_customers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Channel::V1::CloudChannelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_customers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_customers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CloudChannelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customers + ## + # RPC-specific configuration for `get_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer + ## + # RPC-specific configuration for `check_cloud_identity_accounts_exist` + # @return [::Gapic::Config::Method] + # + attr_reader :check_cloud_identity_accounts_exist + ## + # RPC-specific configuration for `create_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer + ## + # RPC-specific configuration for `update_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer + ## + # RPC-specific configuration for `delete_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer + ## + # RPC-specific configuration for `import_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :import_customer + ## + # RPC-specific configuration for `provision_cloud_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :provision_cloud_identity + ## + # RPC-specific configuration for `list_entitlements` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entitlements + ## + # RPC-specific configuration for `list_transferable_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transferable_skus + ## + # RPC-specific configuration for `list_transferable_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transferable_offers + ## + # RPC-specific configuration for `get_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entitlement + ## + # RPC-specific configuration for `create_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entitlement + ## + # RPC-specific configuration for `change_parameters` + # @return [::Gapic::Config::Method] + # + attr_reader :change_parameters + ## + # RPC-specific configuration for `change_renewal_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :change_renewal_settings + ## + # RPC-specific configuration for `change_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :change_offer + ## + # RPC-specific configuration for `start_paid_service` + # @return [::Gapic::Config::Method] + # + attr_reader :start_paid_service + ## + # RPC-specific configuration for `suspend_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :suspend_entitlement + ## + # RPC-specific configuration for `cancel_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_entitlement + ## + # RPC-specific configuration for `activate_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_entitlement + ## + # RPC-specific configuration for `transfer_entitlements` + # @return [::Gapic::Config::Method] + # + attr_reader :transfer_entitlements + ## + # RPC-specific configuration for `transfer_entitlements_to_google` + # @return [::Gapic::Config::Method] + # + attr_reader :transfer_entitlements_to_google + ## + # RPC-specific configuration for `list_channel_partner_links` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channel_partner_links + ## + # RPC-specific configuration for `get_channel_partner_link` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel_partner_link + ## + # RPC-specific configuration for `create_channel_partner_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel_partner_link + ## + # RPC-specific configuration for `update_channel_partner_link` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel_partner_link + ## + # RPC-specific configuration for `get_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer_repricing_config + ## + # RPC-specific configuration for `list_customer_repricing_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customer_repricing_configs + ## + # RPC-specific configuration for `create_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer_repricing_config + ## + # RPC-specific configuration for `update_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer_repricing_config + ## + # RPC-specific configuration for `delete_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer_repricing_config + ## + # RPC-specific configuration for `get_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel_partner_repricing_config + ## + # RPC-specific configuration for `list_channel_partner_repricing_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channel_partner_repricing_configs + ## + # RPC-specific configuration for `create_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel_partner_repricing_config + ## + # RPC-specific configuration for `update_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel_partner_repricing_config + ## + # RPC-specific configuration for `delete_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel_partner_repricing_config + ## + # RPC-specific configuration for `list_sku_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sku_groups + ## + # RPC-specific configuration for `list_sku_group_billable_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sku_group_billable_skus + ## + # RPC-specific configuration for `lookup_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_offer + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + ## + # RPC-specific configuration for `list_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_offers + ## + # RPC-specific configuration for `list_purchasable_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_purchasable_skus + ## + # RPC-specific configuration for `list_purchasable_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_purchasable_offers + ## + # RPC-specific configuration for `query_eligible_billing_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :query_eligible_billing_accounts + ## + # RPC-specific configuration for `register_subscriber` + # @return [::Gapic::Config::Method] + # + attr_reader :register_subscriber + ## + # RPC-specific configuration for `unregister_subscriber` + # @return [::Gapic::Config::Method] + # + attr_reader :unregister_subscriber + ## + # RPC-specific configuration for `list_subscribers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscribers + ## + # RPC-specific configuration for `list_entitlement_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entitlement_changes + + # @private + def initialize parent_rpcs = nil + list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers + @list_customers = ::Gapic::Config::Method.new list_customers_config + get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer + @get_customer = ::Gapic::Config::Method.new get_customer_config + check_cloud_identity_accounts_exist_config = parent_rpcs.check_cloud_identity_accounts_exist if parent_rpcs.respond_to? :check_cloud_identity_accounts_exist + @check_cloud_identity_accounts_exist = ::Gapic::Config::Method.new check_cloud_identity_accounts_exist_config + create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer + @create_customer = ::Gapic::Config::Method.new create_customer_config + update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer + @update_customer = ::Gapic::Config::Method.new update_customer_config + delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer + @delete_customer = ::Gapic::Config::Method.new delete_customer_config + import_customer_config = parent_rpcs.import_customer if parent_rpcs.respond_to? :import_customer + @import_customer = ::Gapic::Config::Method.new import_customer_config + provision_cloud_identity_config = parent_rpcs.provision_cloud_identity if parent_rpcs.respond_to? :provision_cloud_identity + @provision_cloud_identity = ::Gapic::Config::Method.new provision_cloud_identity_config + list_entitlements_config = parent_rpcs.list_entitlements if parent_rpcs.respond_to? :list_entitlements + @list_entitlements = ::Gapic::Config::Method.new list_entitlements_config + list_transferable_skus_config = parent_rpcs.list_transferable_skus if parent_rpcs.respond_to? :list_transferable_skus + @list_transferable_skus = ::Gapic::Config::Method.new list_transferable_skus_config + list_transferable_offers_config = parent_rpcs.list_transferable_offers if parent_rpcs.respond_to? :list_transferable_offers + @list_transferable_offers = ::Gapic::Config::Method.new list_transferable_offers_config + get_entitlement_config = parent_rpcs.get_entitlement if parent_rpcs.respond_to? :get_entitlement + @get_entitlement = ::Gapic::Config::Method.new get_entitlement_config + create_entitlement_config = parent_rpcs.create_entitlement if parent_rpcs.respond_to? :create_entitlement + @create_entitlement = ::Gapic::Config::Method.new create_entitlement_config + change_parameters_config = parent_rpcs.change_parameters if parent_rpcs.respond_to? :change_parameters + @change_parameters = ::Gapic::Config::Method.new change_parameters_config + change_renewal_settings_config = parent_rpcs.change_renewal_settings if parent_rpcs.respond_to? :change_renewal_settings + @change_renewal_settings = ::Gapic::Config::Method.new change_renewal_settings_config + change_offer_config = parent_rpcs.change_offer if parent_rpcs.respond_to? :change_offer + @change_offer = ::Gapic::Config::Method.new change_offer_config + start_paid_service_config = parent_rpcs.start_paid_service if parent_rpcs.respond_to? :start_paid_service + @start_paid_service = ::Gapic::Config::Method.new start_paid_service_config + suspend_entitlement_config = parent_rpcs.suspend_entitlement if parent_rpcs.respond_to? :suspend_entitlement + @suspend_entitlement = ::Gapic::Config::Method.new suspend_entitlement_config + cancel_entitlement_config = parent_rpcs.cancel_entitlement if parent_rpcs.respond_to? :cancel_entitlement + @cancel_entitlement = ::Gapic::Config::Method.new cancel_entitlement_config + activate_entitlement_config = parent_rpcs.activate_entitlement if parent_rpcs.respond_to? :activate_entitlement + @activate_entitlement = ::Gapic::Config::Method.new activate_entitlement_config + transfer_entitlements_config = parent_rpcs.transfer_entitlements if parent_rpcs.respond_to? :transfer_entitlements + @transfer_entitlements = ::Gapic::Config::Method.new transfer_entitlements_config + transfer_entitlements_to_google_config = parent_rpcs.transfer_entitlements_to_google if parent_rpcs.respond_to? :transfer_entitlements_to_google + @transfer_entitlements_to_google = ::Gapic::Config::Method.new transfer_entitlements_to_google_config + list_channel_partner_links_config = parent_rpcs.list_channel_partner_links if parent_rpcs.respond_to? :list_channel_partner_links + @list_channel_partner_links = ::Gapic::Config::Method.new list_channel_partner_links_config + get_channel_partner_link_config = parent_rpcs.get_channel_partner_link if parent_rpcs.respond_to? :get_channel_partner_link + @get_channel_partner_link = ::Gapic::Config::Method.new get_channel_partner_link_config + create_channel_partner_link_config = parent_rpcs.create_channel_partner_link if parent_rpcs.respond_to? :create_channel_partner_link + @create_channel_partner_link = ::Gapic::Config::Method.new create_channel_partner_link_config + update_channel_partner_link_config = parent_rpcs.update_channel_partner_link if parent_rpcs.respond_to? :update_channel_partner_link + @update_channel_partner_link = ::Gapic::Config::Method.new update_channel_partner_link_config + get_customer_repricing_config_config = parent_rpcs.get_customer_repricing_config if parent_rpcs.respond_to? :get_customer_repricing_config + @get_customer_repricing_config = ::Gapic::Config::Method.new get_customer_repricing_config_config + list_customer_repricing_configs_config = parent_rpcs.list_customer_repricing_configs if parent_rpcs.respond_to? :list_customer_repricing_configs + @list_customer_repricing_configs = ::Gapic::Config::Method.new list_customer_repricing_configs_config + create_customer_repricing_config_config = parent_rpcs.create_customer_repricing_config if parent_rpcs.respond_to? :create_customer_repricing_config + @create_customer_repricing_config = ::Gapic::Config::Method.new create_customer_repricing_config_config + update_customer_repricing_config_config = parent_rpcs.update_customer_repricing_config if parent_rpcs.respond_to? :update_customer_repricing_config + @update_customer_repricing_config = ::Gapic::Config::Method.new update_customer_repricing_config_config + delete_customer_repricing_config_config = parent_rpcs.delete_customer_repricing_config if parent_rpcs.respond_to? :delete_customer_repricing_config + @delete_customer_repricing_config = ::Gapic::Config::Method.new delete_customer_repricing_config_config + get_channel_partner_repricing_config_config = parent_rpcs.get_channel_partner_repricing_config if parent_rpcs.respond_to? :get_channel_partner_repricing_config + @get_channel_partner_repricing_config = ::Gapic::Config::Method.new get_channel_partner_repricing_config_config + list_channel_partner_repricing_configs_config = parent_rpcs.list_channel_partner_repricing_configs if parent_rpcs.respond_to? :list_channel_partner_repricing_configs + @list_channel_partner_repricing_configs = ::Gapic::Config::Method.new list_channel_partner_repricing_configs_config + create_channel_partner_repricing_config_config = parent_rpcs.create_channel_partner_repricing_config if parent_rpcs.respond_to? :create_channel_partner_repricing_config + @create_channel_partner_repricing_config = ::Gapic::Config::Method.new create_channel_partner_repricing_config_config + update_channel_partner_repricing_config_config = parent_rpcs.update_channel_partner_repricing_config if parent_rpcs.respond_to? :update_channel_partner_repricing_config + @update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config + delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config + @delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config + list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups + @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config + list_sku_group_billable_skus_config = parent_rpcs.list_sku_group_billable_skus if parent_rpcs.respond_to? :list_sku_group_billable_skus + @list_sku_group_billable_skus = ::Gapic::Config::Method.new list_sku_group_billable_skus_config + lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer + @lookup_offer = ::Gapic::Config::Method.new lookup_offer_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + list_offers_config = parent_rpcs.list_offers if parent_rpcs.respond_to? :list_offers + @list_offers = ::Gapic::Config::Method.new list_offers_config + list_purchasable_skus_config = parent_rpcs.list_purchasable_skus if parent_rpcs.respond_to? :list_purchasable_skus + @list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config + list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers + @list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config + query_eligible_billing_accounts_config = parent_rpcs.query_eligible_billing_accounts if parent_rpcs.respond_to? :query_eligible_billing_accounts + @query_eligible_billing_accounts = ::Gapic::Config::Method.new query_eligible_billing_accounts_config + register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber + @register_subscriber = ::Gapic::Config::Method.new register_subscriber_config + unregister_subscriber_config = parent_rpcs.unregister_subscriber if parent_rpcs.respond_to? :unregister_subscriber + @unregister_subscriber = ::Gapic::Config::Method.new unregister_subscriber_config + list_subscribers_config = parent_rpcs.list_subscribers if parent_rpcs.respond_to? :list_subscribers + @list_subscribers = ::Gapic::Config::Method.new list_subscribers_config + list_entitlement_changes_config = parent_rpcs.list_entitlement_changes if parent_rpcs.respond_to? :list_entitlement_changes + @list_entitlement_changes = ::Gapic::Config::Method.new list_entitlement_changes_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb new file mode 100644 index 000000000000..3c6eadfa3687 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + # Credentials for the CloudChannelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/apps.order" + ] + self.env_vars = [ + "CHANNEL_CREDENTIALS", + "CHANNEL_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "CHANNEL_CREDENTIALS_JSON", + "CHANNEL_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb new file mode 100644 index 000000000000..f78667841bbd --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudChannelService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb new file mode 100644 index 000000000000..b31ab215ff58 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb @@ -0,0 +1,186 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + # Path helper methods for the CloudChannelService API. + module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + + ## + # Create a fully-qualified ChannelPartnerLink resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/channelPartnerLinks/{channel_partner_link}` + # + # @param account [String] + # @param channel_partner_link [String] + # + # @return [::String] + def channel_partner_link_path account:, channel_partner_link: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/channelPartnerLinks/#{channel_partner_link}" + end + + ## + # Create a fully-qualified ChannelPartnerRepricingConfig resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}` + # + # @param account [String] + # @param channel_partner [String] + # @param channel_partner_repricing_config [String] + # + # @return [::String] + def channel_partner_repricing_config_path account:, channel_partner:, channel_partner_repricing_config: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "channel_partner cannot contain /" if channel_partner.to_s.include? "/" + + "accounts/#{account}/channelPartnerLinks/#{channel_partner}/channelPartnerRepricingConfigs/#{channel_partner_repricing_config}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/customers/{customer}` + # + # @param account [String] + # @param customer [String] + # + # @return [::String] + def customer_path account:, customer: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/customers/#{customer}" + end + + ## + # Create a fully-qualified CustomerRepricingConfig resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}` + # + # @param account [String] + # @param customer [String] + # @param customer_repricing_config [String] + # + # @return [::String] + def customer_repricing_config_path account:, customer:, customer_repricing_config: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "accounts/#{account}/customers/#{customer}/customerRepricingConfigs/#{customer_repricing_config}" + end + + ## + # Create a fully-qualified Entitlement resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/customers/{customer}/entitlements/{entitlement}` + # + # @param account [String] + # @param customer [String] + # @param entitlement [String] + # + # @return [::String] + def entitlement_path account:, customer:, entitlement: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "accounts/#{account}/customers/#{customer}/entitlements/#{entitlement}" + end + + ## + # Create a fully-qualified Offer resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/offers/{offer}` + # + # @param account [String] + # @param offer [String] + # + # @return [::String] + def offer_path account:, offer: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/offers/#{offer}" + end + + ## + # Create a fully-qualified Product resource string. + # + # The resource will be in the following format: + # + # `products/{product}` + # + # @param product [String] + # + # @return [::String] + def product_path product: + "products/#{product}" + end + + ## + # Create a fully-qualified SkuGroup resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}/skuGroups/{sku_group}` + # + # @param account [String] + # @param sku_group [String] + # + # @return [::String] + def sku_group_path account:, sku_group: + raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" + + "accounts/#{account}/skuGroups/#{sku_group}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb new file mode 100644 index 000000000000..dd938dd89369 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/channel/v1/version" + +require "google/cloud/channel/v1/cloud_channel_service/credentials" +require "google/cloud/channel/v1/cloud_channel_service/paths" +require "google/cloud/channel/v1/cloud_channel_service/rest/operations" +require "google/cloud/channel/v1/cloud_channel_service/rest/client" + +module Google + module Cloud + module Channel + module V1 + ## + # CloudChannelService lets Google cloud resellers and distributors manage + # their customers, channel partners, entitlements, and reports. + # + # Using this service: + # 1. Resellers and distributors can manage a customer entity. + # 2. Distributors can register an authorized reseller in their channel and + # provide them with delegated admin access. + # 3. Resellers and distributors can manage customer entitlements. + # + # CloudChannelService exposes the following resources: + # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an + # enterprise-managed by a reseller or distributor. + # + # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that + # provides a customer with the means to use a service. Entitlements are created + # or updated as a result of a successful fulfillment. + # + # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An + # entity that identifies links between distributors and their indirect + # resellers in a channel. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/channel/v1/cloud_channel_service/rest" + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + module CloudChannelService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/channel/v1/cloud_channel_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb new file mode 100644 index 000000000000..e4b74d4cdb7e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb @@ -0,0 +1,6271 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/channel/v1/service_pb" +require "google/cloud/channel/v1/cloud_channel_service/rest/service_stub" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + module Rest + ## + # REST client for the CloudChannelService service. + # + # CloudChannelService lets Google cloud resellers and distributors manage + # their customers, channel partners, entitlements, and reports. + # + # Using this service: + # 1. Resellers and distributors can manage a customer entity. + # 2. Distributors can register an authorized reseller in their channel and + # provide them with delegated admin access. + # 3. Resellers and distributors can manage customer entitlements. + # + # CloudChannelService exposes the following resources: + # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an + # enterprise-managed by a reseller or distributor. + # + # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that + # provides a customer with the means to use a service. Entitlements are created + # or updated as a result of a successful fulfillment. + # + # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An + # entity that identifies links between distributors and their indirect + # resellers in a channel. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_channel_service_stub + + ## + # Configure the CloudChannelService Client class. + # + # See {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudChannelService clients + # ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Channel", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.provision_cloud_identity.timeout = 60.0 + + default_config.rpcs.create_entitlement.timeout = 60.0 + + default_config.rpcs.change_parameters.timeout = 60.0 + + default_config.rpcs.change_renewal_settings.timeout = 60.0 + + default_config.rpcs.change_offer.timeout = 60.0 + + default_config.rpcs.start_paid_service.timeout = 60.0 + + default_config.rpcs.suspend_entitlement.timeout = 60.0 + + default_config.rpcs.cancel_entitlement.timeout = 60.0 + + default_config.rpcs.activate_entitlement.timeout = 60.0 + + default_config.rpcs.transfer_entitlements.timeout = 60.0 + + default_config.rpcs.transfer_entitlements_to_google.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_channel_service_stub.universe_domain + end + + ## + # Create a new CloudChannelService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudChannelService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @cloud_channel_service_stub = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_channel_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Channel::V1::CloudChannelService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_channel_service_stub.logger + end + + # Service calls + + ## + # List {::Google::Cloud::Channel::V1::Customer Customer}s. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # List of {::Google::Cloud::Channel::V1::Customer Customer}s, or an empty list if + # there are no customers. + # + # @overload list_customers(request, options = nil) + # Pass arguments to `list_customers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_customers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller account to list customers from. + # Parent uses the format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. The maximum number of customers to return. The service may return + # fewer than this value. If unspecified, returns at most 10 customers. The + # maximum value is 50. + # @param page_token [::String] + # Optional. A token identifying a page of results other than the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_customers CloudChannelService.ListCustomers} + # call. + # @param filter [::String] + # Optional. Filters applied to the [CloudChannelService.ListCustomers] + # results. See + # https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers + # for more information. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListCustomersRequest.new + # + # # Call the list_customers method. + # result = client.list_customers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Customer. + # p item + # end + # + def list_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_customers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_customers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_customers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_customers, "customers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested {::Google::Cloud::Channel::V1::Customer Customer} + # resource. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer resource doesn't exist. Usually the result of an + # invalid name parameter. + # + # Return value: + # The {::Google::Cloud::Channel::V1::Customer Customer} resource. + # + # @overload get_customer(request, options = nil) + # Pass arguments to `get_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_customer(name: nil) + # Pass arguments to `get_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the customer to retrieve. + # Name uses the format: accounts/\\{account_id}/customers/\\{customer_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetCustomerRequest.new + # + # # Call the get_customer method. + # result = client.get_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def get_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.get_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Confirms the existence of Cloud Identity accounts based on the domain and + # if the Cloud Identity accounts are owned by the reseller. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * INVALID_VALUE: Invalid domain value in the request. + # + # Return value: + # A list of + # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} + # resources for the domain (may be empty) + # + # Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if + # no + # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} + # resources match the domain. + # + # @overload check_cloud_identity_accounts_exist(request, options = nil) + # Pass arguments to `check_cloud_identity_accounts_exist` via a request object, either of type + # {::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload check_cloud_identity_accounts_exist(parent: nil, domain: nil, primary_admin_email: nil) + # Pass arguments to `check_cloud_identity_accounts_exist` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The reseller account's resource name. + # Parent uses the format: accounts/\\{account_id} + # @param domain [::String] + # Required. Domain to fetch for Cloud Identity account customers, including + # domain and team customers. For team customers, please use the domain for + # their emails. + # @param primary_admin_email [::String] + # Optional. Primary admin email to fetch for Cloud Identity account team + # customer. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new + # + # # Call the check_cloud_identity_accounts_exist method. + # result = client.check_cloud_identity_accounts_exist request + # + # # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse. + # p result + # + def check_cloud_identity_accounts_exist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.check_cloud_identity_accounts_exist.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.check_cloud_identity_accounts_exist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.check_cloud_identity_accounts_exist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.check_cloud_identity_accounts_exist request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new {::Google::Cloud::Channel::V1::Customer Customer} resource under + # the reseller or distributor account. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The reseller account making the request is different from the + # reseller account in the API request. + # * You are not authorized to create a customer. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: + # * Required request parameters are missing or invalid. + # * Domain field value doesn't match the primary email domain. + # + # Return value: + # The newly created {::Google::Cloud::Channel::V1::Customer Customer} resource. + # + # @overload create_customer(request, options = nil) + # Pass arguments to `create_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_customer(parent: nil, customer: nil) + # Pass arguments to `create_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of reseller account in which to create the + # customer. Parent uses the format: accounts/\\{account_id} + # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] + # Required. The customer to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateCustomerRequest.new + # + # # Call the create_customer method. + # result = client.create_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def create_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.create_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing {::Google::Cloud::Channel::V1::Customer Customer} resource + # for the reseller or distributor. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found + # for the name in the request. + # + # Return value: + # The updated {::Google::Cloud::Channel::V1::Customer Customer} resource. + # + # @overload update_customer(request, options = nil) + # Pass arguments to `update_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_customer(customer: nil, update_mask: nil) + # Pass arguments to `update_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] + # Required. New contents of the customer. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask that applies to the resource. + # Optional. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new + # + # # Call the update_customer method. + # result = client.update_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def update_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.update_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the given {::Google::Cloud::Channel::V1::Customer Customer} permanently. + # + # 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 customer has existing entitlements. + # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found + # for the name in the request. + # + # @overload delete_customer(request, options = nil) + # Pass arguments to `delete_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::DeleteCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_customer(name: nil) + # Pass arguments to `delete_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the customer to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new + # + # # Call the delete_customer method. + # result = client.delete_customer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.delete_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports a {::Google::Cloud::Channel::V1::Customer Customer} from the Cloud + # Identity associated with the provided Cloud Identity ID or domain before a + # TransferEntitlements call. If a linked Customer already exists and + # overwrite_if_exists is true, it will update that Customer's data. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The reseller account making the request is different from the + # reseller account in the API request. + # * You are not authorized to import the customer. See + # https://support.google.com/channelservices/answer/9759265 + # * NOT_FOUND: Cloud Identity doesn't exist or was deleted. + # * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is + # expired or invalid. + # * ALREADY_EXISTS: A customer already exists and has conflicting critical + # fields. Requires an overwrite. + # + # Return value: + # The {::Google::Cloud::Channel::V1::Customer Customer}. + # + # @overload import_customer(request, options = nil) + # Pass arguments to `import_customer` via a request object, either of type + # {::Google::Cloud::Channel::V1::ImportCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ImportCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_customer(domain: nil, cloud_identity_id: nil, primary_admin_email: nil, parent: nil, auth_token: nil, overwrite_if_exists: nil, channel_partner_id: nil, customer: nil) + # Pass arguments to `import_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param domain [::String] + # Required. Customer domain. + # + # Note: The following parameters are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param cloud_identity_id [::String] + # Required. Customer's Cloud Identity ID + # + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param primary_admin_email [::String] + # Required. Customer's primary admin email. + # + # Note: The following parameters are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The resource name of the reseller's account. + # Parent takes the format: accounts/\\{account_id} or + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} + # @param auth_token [::String] + # Optional. The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @param overwrite_if_exists [::Boolean] + # Required. Choose to overwrite an existing customer if found. + # This must be set to true if there is an existing customer with a + # conflicting region code or domain. + # @param channel_partner_id [::String] + # Optional. Cloud Identity ID of a channel partner who will be the direct + # reseller for the customer's order. This field is required for 2-tier + # transfer scenarios and can be provided via the request Parent binding as + # well. + # @param customer [::String] + # Optional. Specifies the customer that will receive imported Cloud Identity + # information. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ImportCustomerRequest.new + # + # # Call the import_customer method. + # result = client.import_customer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Customer. + # p result + # + def import_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ImportCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.import_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Cloud Identity for the given customer using the customer's + # information, or the information provided here. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller. + # * You are not authorized to provision cloud identity id. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer was not found. + # * ALREADY_EXISTS: The customer's primary email already exists. Retry + # after changing the customer's primary contact email. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata contains an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload provision_cloud_identity(request, options = nil) + # Pass arguments to `provision_cloud_identity` via a request object, either of type + # {::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload provision_cloud_identity(customer: nil, cloud_identity_info: nil, user: nil, validate_only: nil) + # Pass arguments to `provision_cloud_identity` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::String] + # Required. Resource name of the customer. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # @param cloud_identity_info [::Google::Cloud::Channel::V1::CloudIdentityInfo, ::Hash] + # CloudIdentity-specific customer information. + # @param user [::Google::Cloud::Channel::V1::AdminUser, ::Hash] + # Admin user information. + # @param validate_only [::Boolean] + # Validate the request and preview the review, but do not post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new + # + # # Call the provision_cloud_identity method. + # result = client.provision_cloud_identity request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def provision_cloud_identity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.provision_cloud_identity.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.provision_cloud_identity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.provision_cloud_identity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.provision_cloud_identity request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::Channel::V1::Entitlement Entitlement}s belonging to a + # customer. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # A list of the customer's + # {::Google::Cloud::Channel::V1::Entitlement Entitlement}s. + # + # @overload list_entitlements(request, options = nil) + # Pass arguments to `list_entitlements` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListEntitlementsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListEntitlementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entitlements(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_entitlements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account to list + # entitlements for. + # Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id} + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, return at most 50 entitlements. The maximum + # value is 100; the server will coerce values above 100. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListEntitlementsResponse#next_page_token ListEntitlementsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_entitlements CloudChannelService.ListEntitlements} + # call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new + # + # # Call the list_entitlements method. + # result = client.list_entitlements request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Entitlement. + # p item + # end + # + def list_entitlements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entitlements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entitlements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entitlements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_entitlements request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlements, "entitlements", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}s of a + # customer based on the Cloud Identity ID or Customer Name in the request. + # + # Use this method to list the entitlements information of an + # unowned customer. You should provide the customer's + # Cloud Identity ID or Customer Name. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller and has no auth token. + # * The supplied auth token is invalid. + # * The reseller account making the request is different + # from the reseller account in the query. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # A list of the customer's + # {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}. + # + # @overload list_transferable_skus(request, options = nil) + # Pass arguments to `list_transferable_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListTransferableSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListTransferableSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_transferable_skus(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, auth_token: nil, language_code: nil) + # Pass arguments to `list_transferable_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cloud_identity_id [::String] + # Customer's Cloud Identity ID + # + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer_name [::String] + # A reseller is required to create a customer and use the resource name of + # the created customer here. + # Customer_name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The reseller account's resource name. + # Parent uses the format: accounts/\\{account_id} + # @param page_size [::Integer] + # The requested page size. Server might return fewer results than requested. + # If unspecified, returns at most 100 SKUs. + # The maximum value is 1000; the server will coerce values above 1000. + # Optional. + # @param page_token [::String] + # A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListTransferableSkusResponse#next_page_token ListTransferableSkusResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} + # call. Optional. + # @param auth_token [::String] + # Optional. The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @param language_code [::String] + # The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # Optional. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new + # + # # Call the list_transferable_skus method. + # result = client.list_transferable_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku. + # p item + # end + # + def list_transferable_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_transferable_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_transferable_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transferable_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_transferable_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_skus, "transferable_skus", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer}s of a + # customer based on Cloud Identity ID or Customer Name in the request. + # + # Use this method when a reseller gets the entitlement information of an + # unowned customer. The reseller should provide the customer's + # Cloud Identity ID or Customer Name. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller and has no auth token. + # * The customer provided incorrect reseller information when generating + # auth token. + # * The reseller account making the request is different + # from the reseller account in the query. + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # List of {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer} for + # the given customer and SKU. + # + # @overload list_transferable_offers(request, options = nil) + # Pass arguments to `list_transferable_offers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListTransferableOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListTransferableOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil, billing_account: nil) + # Pass arguments to `list_transferable_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cloud_identity_id [::String] + # Customer's Cloud Identity ID + # + # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer_name [::String] + # A reseller should create a customer and use the resource name of + # that customer here. + # + # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The resource name of the reseller's account. + # @param page_size [::Integer] + # Requested page size. Server might return fewer results than requested. + # If unspecified, returns at most 100 offers. + # The maximum value is 1000; the server will coerce values above 1000. + # @param page_token [::String] + # A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListTransferableOffersResponse#next_page_token ListTransferableOffersResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} + # call. + # @param sku [::String] + # Required. The SKU to look up Offers for. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @param billing_account [::String] + # Optional. The Billing Account to look up Offers for. Format: + # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. + # + # This field is only relevant for multi-currency accounts. It should be left + # empty for single currency accounts. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new + # + # # Call the list_transferable_offers method. + # result = client.list_transferable_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer. + # p item + # end + # + def list_transferable_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_transferable_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_transferable_offers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transferable_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_transferable_offers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_offers, "transferable_offers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} + # resource. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer entitlement was not found. + # + # Return value: + # The requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} resource. + # + # @overload get_entitlement(request, options = nil) + # Pass arguments to `get_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_entitlement(name: nil) + # Pass arguments to `get_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to retrieve. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Entitlement] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Entitlement] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetEntitlementRequest.new + # + # # Call the get_entitlement method. + # result = client.get_entitlement request + # + # # The returned object is of type Google::Cloud::Channel::V1::Entitlement. + # p result + # + def get_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_entitlement.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.get_entitlement request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an entitlement for a customer. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller. + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: + # * Required request parameters are missing or invalid. + # * There is already a customer entitlement for a SKU from the same + # product family. + # * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact + # Google Channel support for further troubleshooting. + # * NOT_FOUND: The customer or offer resource was not found. + # * ALREADY_EXISTS: + # * The SKU was already purchased for the customer. + # * The customer's primary email already exists. Retry + # after changing the customer's primary contact email. + # * CONDITION_NOT_MET or FAILED_PRECONDITION: + # * The domain required for purchasing a SKU has not been verified. + # * A pre-requisite SKU required to purchase an Add-On SKU is missing. + # For example, Google Workspace Business Starter is required to purchase + # Vault or Drive. + # * (Developer accounts only) Reseller and resold domain must meet the + # following naming requirements: + # * Domain names must start with goog-test. + # * Domain names must include the reseller domain. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload create_entitlement(request, options = nil) + # Pass arguments to `create_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_entitlement(parent: nil, entitlement: nil, request_id: nil) + # Pass arguments to `create_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account in which to + # create the entitlement. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param entitlement [::Google::Cloud::Channel::V1::Entitlement, ::Hash] + # Required. The entitlement to create. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new + # + # # Call the create_entitlement method. + # result = client.create_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_entitlement.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.create_entitlement request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Change parameters of the entitlement. + # + # An entitlement update is a long-running operation and it updates the + # entitlement as a result of fulfillment. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # For example, the number of seats being changed is greater than the allowed + # number of max seats, or decreasing seats for a commitment based plan. + # * NOT_FOUND: Entitlement resource not found. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload change_parameters(request, options = nil) + # Pass arguments to `change_parameters` via a request object, either of type + # {::Google::Cloud::Channel::V1::ChangeParametersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ChangeParametersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload change_parameters(name: nil, parameters: nil, request_id: nil, purchase_order_id: nil) + # Pass arguments to `change_parameters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] + # Required. Entitlement parameters to update. You can only change editable + # parameters. + # + # To view the available Parameters for a request, refer to the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} + # from the desired offer. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @param purchase_order_id [::String] + # Optional. Purchase order ID provided by the reseller. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ChangeParametersRequest.new + # + # # Call the change_parameters method. + # result = client.change_parameters request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def change_parameters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeParametersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.change_parameters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.change_parameters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.change_parameters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.change_parameters request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the renewal settings for an existing customer entitlement. + # + # An entitlement update is a long-running operation and it updates the + # entitlement as a result of fulfillment. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a + # commitment plan. Can't enable or disable renewals for non-commitment plans. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload change_renewal_settings(request, options = nil) + # Pass arguments to `change_renewal_settings` via a request object, either of type + # {::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload change_renewal_settings(name: nil, renewal_settings: nil, request_id: nil) + # Pass arguments to `change_renewal_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param renewal_settings [::Google::Cloud::Channel::V1::RenewalSettings, ::Hash] + # Required. New renewal settings. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new + # + # # Call the change_renewal_settings method. + # result = client.change_renewal_settings request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def change_renewal_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.change_renewal_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.change_renewal_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.change_renewal_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.change_renewal_settings request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the Offer for an existing customer entitlement. + # + # An entitlement update is a long-running operation and it updates the + # entitlement as a result of fulfillment. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Offer or Entitlement resource not found. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload change_offer(request, options = nil) + # Pass arguments to `change_offer` via a request object, either of type + # {::Google::Cloud::Channel::V1::ChangeOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ChangeOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil, price_reference_id: nil) + # Pass arguments to `change_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param offer [::String] + # Required. New Offer. + # Format: accounts/\\{account_id}/offers/\\{offer_id}. + # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] + # Optional. Parameters needed to purchase the Offer. To view the available + # Parameters refer to the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} + # from the desired offer. + # @param purchase_order_id [::String] + # Optional. Purchase order id provided by the reseller. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @param billing_account [::String] + # Optional. The billing account resource name that is used to pay for this + # entitlement when setting up billing on a trial subscription. + # + # This field is only relevant for multi-currency accounts. It should be + # left empty for single currency accounts. + # @param price_reference_id [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ChangeOfferRequest.new + # + # # Call the change_offer method. + # result = client.change_offer request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def change_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.change_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.change_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.change_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.change_offer request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts paid service for a trial entitlement. + # + # Starts paid service for a trial entitlement immediately. This method is + # only applicable if a plan is set up for a trial entitlement but has some + # trial days remaining. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for + # entitlement on trial plans. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload start_paid_service(request, options = nil) + # Pass arguments to `start_paid_service` via a request object, either of type + # {::Google::Cloud::Channel::V1::StartPaidServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::StartPaidServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_paid_service(name: nil, request_id: nil) + # Pass arguments to `start_paid_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the entitlement to start a paid service for. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new + # + # # Call the start_paid_service method. + # result = client.start_paid_service request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def start_paid_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::StartPaidServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.start_paid_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_paid_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_paid_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.start_paid_service request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Suspends a previously fulfilled entitlement. + # + # An entitlement suspension is a long-running operation. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * NOT_ACTIVE: Entitlement is not active. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload suspend_entitlement(request, options = nil) + # Pass arguments to `suspend_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::SuspendEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::SuspendEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload suspend_entitlement(name: nil, request_id: nil) + # Pass arguments to `suspend_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to suspend. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new + # + # # Call the suspend_entitlement method. + # result = client.suspend_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def suspend_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::SuspendEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.suspend_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.suspend_entitlement.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.suspend_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.suspend_entitlement request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels a previously fulfilled entitlement. + # + # An entitlement cancellation is a long-running operation. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * FAILED_PRECONDITION: There are Google Cloud projects linked to the + # Google Cloud entitlement's Cloud Billing subaccount. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace + # add-ons, or entitlements for Google Cloud's development platform. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The response will contain + # google.protobuf.Empty on success. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload cancel_entitlement(request, options = nil) + # Pass arguments to `cancel_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::CancelEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CancelEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_entitlement(name: nil, request_id: nil) + # Pass arguments to `cancel_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to cancel. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new + # + # # Call the cancel_entitlement method. + # result = client.cancel_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CancelEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_entitlement.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.cancel_entitlement request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Activates a previously suspended entitlement. Entitlements suspended for + # pending ToS acceptance can't be activated using this method. + # + # An entitlement activation is a long-running operation and it updates + # the state of the customer entitlement. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement resource not found. + # * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated + # suspensions and entitlements that have accepted the TOS. + # * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE + # state. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload activate_entitlement(request, options = nil) + # Pass arguments to `activate_entitlement` via a request object, either of type + # {::Google::Cloud::Channel::V1::ActivateEntitlementRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ActivateEntitlementRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload activate_entitlement(name: nil, request_id: nil) + # Pass arguments to `activate_entitlement` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the entitlement to activate. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new + # + # # Call the activate_entitlement method. + # result = client.activate_entitlement request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def activate_entitlement request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ActivateEntitlementRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.activate_entitlement.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.activate_entitlement.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.activate_entitlement.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.activate_entitlement request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Transfers customer entitlements to new reseller. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller. + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer or offer resource was not found. + # * ALREADY_EXISTS: The SKU was already transferred for the customer. + # * CONDITION_NOT_MET or FAILED_PRECONDITION: + # * The SKU requires domain verification to transfer, but the domain is + # not verified. + # * An Add-On SKU (example, Vault or Drive) is missing the + # pre-requisite SKU (example, G Suite Basic). + # * (Developer accounts only) Reseller and resold domain must meet the + # following naming requirements: + # * Domain names must start with goog-test. + # * Domain names must include the reseller domain. + # * Specify all transferring entitlements. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload transfer_entitlements(request, options = nil) + # Pass arguments to `transfer_entitlements` via a request object, either of type + # {::Google::Cloud::Channel::V1::TransferEntitlementsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload transfer_entitlements(parent: nil, entitlements: nil, auth_token: nil, request_id: nil) + # Pass arguments to `transfer_entitlements` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account that will + # receive transferred entitlements. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] + # Required. The new entitlements to create or transfer. + # @param auth_token [::String] + # The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new + # + # # Call the transfer_entitlements method. + # result = client.transfer_entitlements request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def transfer_entitlements request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.transfer_entitlements.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.transfer_entitlements.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.transfer_entitlements.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.transfer_entitlements request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Transfers customer entitlements from their current reseller to Google. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The customer or offer resource was not found. + # * ALREADY_EXISTS: The SKU was already transferred for the customer. + # * CONDITION_NOT_MET or FAILED_PRECONDITION: + # * The SKU requires domain verification to transfer, but the domain is + # not verified. + # * An Add-On SKU (example, Vault or Drive) is missing the + # pre-requisite SKU (example, G Suite Basic). + # * (Developer accounts only) Reseller and resold domain must meet the + # following naming requirements: + # * Domain names must start with goog-test. + # * Domain names must include the reseller domain. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The response will contain + # google.protobuf.Empty on success. The Operation metadata will contain an + # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. + # + # @overload transfer_entitlements_to_google(request, options = nil) + # Pass arguments to `transfer_entitlements_to_google` via a request object, either of type + # {::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload transfer_entitlements_to_google(parent: nil, entitlements: nil, request_id: nil) + # Pass arguments to `transfer_entitlements_to_google` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller's customer account where the + # entitlements transfer from. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] + # Required. The entitlements to transfer to Google. + # @param request_id [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new + # + # # Call the transfer_entitlements_to_google method. + # result = client.transfer_entitlements_to_google request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def transfer_entitlements_to_google request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.transfer_entitlements_to_google.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.transfer_entitlements_to_google.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.transfer_entitlements_to_google.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.transfer_entitlements_to_google request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s + # belonging to a distributor. You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # The list of the distributor account's + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resources. + # + # @overload list_channel_partner_links(request, options = nil) + # Pass arguments to `list_channel_partner_links` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_channel_partner_links(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_channel_partner_links` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller account for listing channel + # partner links. Parent uses the format: accounts/\\{account_id} + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, server will pick a default size (25). The + # maximum value is 200; the server will coerce values above 200. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse#next_page_token ListChannelPartnerLinksResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} + # call. + # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] + # Optional. The level of granularity the ChannelPartnerLink will display. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new + # + # # Call the list_channel_partner_links method. + # result = client.list_channel_partner_links request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink. + # p item + # end + # + def list_channel_partner_links request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_channel_partner_links.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_channel_partner_links.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_channel_partner_links.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_channel_partner_links request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_links, "channel_partner_links", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. + # You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: ChannelPartnerLink resource not found because of an + # invalid channel partner link name. + # + # Return value: + # The {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} + # resource. + # + # @overload get_channel_partner_link(request, options = nil) + # Pass arguments to `get_channel_partner_link` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_channel_partner_link(name: nil, view: nil) + # Pass arguments to `get_channel_partner_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the channel partner link to retrieve. + # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} + # where \\{id} is the Cloud Identity ID of the partner. + # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] + # Optional. The level of granularity the ChannelPartnerLink will display. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new + # + # # Call the get_channel_partner_link method. + # result = client.get_channel_partner_link request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + # p result + # + def get_channel_partner_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_channel_partner_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_channel_partner_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_channel_partner_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.get_channel_partner_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Initiates a channel partner link between a distributor and a reseller, or + # between resellers in an n-tier reseller channel. + # Invited partners need to follow the invite_link_uri provided in the + # response to accept. After accepting the invitation, a link is set up + # between the two parties. + # You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already + # exists. + # * NOT_FOUND: No Cloud Identity customer exists for provided domain. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The new {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} + # resource. + # + # @overload create_channel_partner_link(request, options = nil) + # Pass arguments to `create_channel_partner_link` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_channel_partner_link(parent: nil, channel_partner_link: nil) + # Pass arguments to `create_channel_partner_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Create a channel partner link for the provided reseller account's + # resource name. + # Parent uses the format: accounts/\\{account_id} + # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] + # Required. The channel partner link to create. + # Either channel_partner_link.reseller_cloud_identity_id or domain can be + # used to create a link. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new + # + # # Call the create_channel_partner_link method. + # result = client.create_channel_partner_link request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + # p result + # + def create_channel_partner_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_channel_partner_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_channel_partner_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_channel_partner_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.create_channel_partner_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a channel partner link. Distributors call this method to change a + # link's status. For example, to suspend a partner link. + # You must be a distributor to call this method. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request is different + # from the reseller account in the API request. + # * INVALID_ARGUMENT: + # * Required request parameters are missing or invalid. + # * Link state cannot change from invited to active or suspended. + # * Cannot send reseller_cloud_identity_id, invite_url, or name in update + # mask. + # * NOT_FOUND: ChannelPartnerLink resource not found. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The updated + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. + # + # @overload update_channel_partner_link(request, options = nil) + # Pass arguments to `update_channel_partner_link` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_channel_partner_link(name: nil, channel_partner_link: nil, update_mask: nil) + # Pass arguments to `update_channel_partner_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the channel partner link to cancel. + # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} + # where \\{id} is the Cloud Identity ID of the partner. + # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] + # Required. The channel partner link to update. Only + # channel_partner_link.link_state is allowed for updates. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask that applies to the resource. + # The only allowable value for an update mask is + # channel_partner_link.link_state. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new + # + # # Call the update_channel_partner_link method. + # result = client.update_channel_partner_link request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + # p result + # + def update_channel_partner_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_channel_partner_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_channel_partner_link.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_channel_partner_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.update_channel_partner_link request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload get_customer_repricing_config(request, options = nil) + # Pass arguments to `get_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_customer_repricing_config(name: nil) + # Pass arguments to `get_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the CustomerRepricingConfig. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new + # + # # Call the get_customer_repricing_config method. + # result = client.get_customer_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p result + # + def get_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.get_customer_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resources. The data for each resource is displayed in the ascending order + # of: + # + # * Customer ID + # * {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement} + # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # * {::Google::Cloud::Channel::V1::CustomerRepricingConfig#update_time CustomerRepricingConfig.update_time} + # + # If unsuccessful, returns an error. + # + # @overload list_customer_repricing_configs(request, options = nil) + # Pass arguments to `list_customer_repricing_configs` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_customer_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_customer_repricing_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # 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. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} + # call. + # @param filter [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new + # + # # Call the list_customer_repricing_configs method. + # result = client.list_customer_repricing_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p item + # end + # + def list_customer_repricing_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_customer_repricing_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_customer_repricing_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_customer_repricing_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, "customer_repricing_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a CustomerRepricingConfig. Call this method to set modifications + # for a specific customer's bill. You can only create configs if the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, + # for any + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. + # * The contained + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config} + # value must be different from the value used in the current config for a + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload create_customer_repricing_config(request, options = nil) + # Pass arguments to `create_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_customer_repricing_config(parent: nil, customer_repricing_config: nil) + # Pass arguments to `create_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the customer that will receive this + # repricing config. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] + # Required. The CustomerRepricingConfig object to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new + # + # # Call the create_customer_repricing_config method. + # result = client.create_customer_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p result + # + def create_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.create_customer_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # is a future month. To make changes to configs for the current month, use + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#create_customer_repricing_config CreateCustomerRepricingConfig}, + # taking note of its restrictions. You cannot update the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload update_customer_repricing_config(request, options = nil) + # Pass arguments to `update_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_customer_repricing_config(customer_repricing_config: nil) + # Pass arguments to `update_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] + # Required. The CustomerRepricingConfig object to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new + # + # # Call the update_customer_repricing_config method. + # result = client.update_customer_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + # p result + # + def update_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.update_customer_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the given + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # permanently. You can only delete configs if their + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # is active or in the past. + # * NOT_FOUND: No + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # found for the name in the request. + # + # @overload delete_customer_repricing_config(request, options = nil) + # Pass arguments to `delete_customer_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_customer_repricing_config(name: nil) + # Pass arguments to `delete_customer_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the customer repricing config rule to + # delete. Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new + # + # # Call the delete_customer_repricing_config method. + # result = client.delete_customer_repricing_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_customer_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.delete_customer_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload get_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `get_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_channel_partner_repricing_config(name: nil) + # Pass arguments to `get_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the ChannelPartnerRepricingConfig + # Format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new + # + # # Call the get_channel_partner_repricing_config method. + # result = client.get_channel_partner_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p result + # + def get_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_channel_partner_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.get_channel_partner_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resources. The data for each resource is displayed in the ascending order + # of: + # + # * Channel Partner ID + # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # * {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#update_time ChannelPartnerRepricingConfig.update_time} + # + # If unsuccessful, returns an error. + # + # @overload list_channel_partner_repricing_configs(request, options = nil) + # Pass arguments to `list_channel_partner_repricing_configs` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_channel_partner_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_channel_partner_repricing_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account's + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}. Parent + # uses the format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}. + # Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs + # for all channel partners. + # @param page_size [::Integer] + # 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. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} + # call. + # @param filter [::String] + # 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`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new + # + # # Call the list_channel_partner_repricing_configs method. + # result = client.list_channel_partner_repricing_configs request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p item + # end + # + def list_channel_partner_repricing_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_channel_partner_repricing_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_channel_partner_repricing_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_channel_partner_repricing_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_channel_partner_repricing_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, "channel_partner_repricing_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a ChannelPartnerRepricingConfig. Call this method to set + # modifications for a specific ChannelPartner's bill. You can only create + # configs if the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, + # for any + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. + # * The contained + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config} + # value 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload create_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `create_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_channel_partner_repricing_config(parent: nil, channel_partner_repricing_config: nil) + # Pass arguments to `create_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the ChannelPartner that will receive the + # repricing config. Parent uses the format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} + # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] + # Required. The ChannelPartnerRepricingConfig object to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new + # + # # Call the create_channel_partner_repricing_config method. + # result = client.create_channel_partner_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p result + # + def create_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_channel_partner_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.create_channel_partner_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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 + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # is a future month. To make changes to configs for the current month, use + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#create_channel_partner_repricing_config CreateChannelPartnerRepricingConfig}, + # taking note of its restrictions. You cannot update the + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # resource, otherwise returns an error. + # + # @overload update_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `update_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_channel_partner_repricing_config(channel_partner_repricing_config: nil) + # Pass arguments to `update_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] + # Required. The ChannelPartnerRepricingConfig object to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new + # + # # Call the update_channel_partner_repricing_config method. + # result = client.update_channel_partner_repricing_config request + # + # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + # p result + # + def update_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_channel_partner_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.update_channel_partner_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the given + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # permanently. You can only delete configs if their + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # is active or in the past. + # * NOT_FOUND: No + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # found for the name in the request. + # + # @overload delete_channel_partner_repricing_config(request, options = nil) + # Pass arguments to `delete_channel_partner_repricing_config` via a request object, either of type + # {::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_channel_partner_repricing_config(name: nil) + # Pass arguments to `delete_channel_partner_repricing_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the channel partner repricing config rule to + # delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new + # + # # Call the delete_channel_partner_repricing_config method. + # result = client.delete_channel_partner_repricing_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_channel_partner_repricing_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_channel_partner_repricing_config.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_channel_partner_repricing_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_channel_partner_repricing_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.delete_channel_partner_repricing_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Rebilling supported SKU groups the account is authorized to + # sell. + # Reference: https://cloud.google.com/skus/sku-groups + # + # Possible Error Codes: + # + # * PERMISSION_DENIED: If the account making the request and the account + # being queried are different, or the account doesn't exist. + # * INTERNAL: Any non-user error related to technical issues in the + # backend. In this case, contact Cloud Channel support. + # + # Return Value: + # If successful, the {::Google::Cloud::Channel::V1::SkuGroup SkuGroup} resources. + # The data for each resource is displayed in the alphabetical order of SKU + # group display name. + # The data for each resource is displayed in the ascending order of + # {::Google::Cloud::Channel::V1::SkuGroup#display_name SkuGroup.display_name} + # + # If unsuccessful, returns an error. + # + # @overload list_sku_groups(request, options = nil) + # Pass arguments to `list_sku_groups` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSkuGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sku_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the account from which to list SKU groups. + # Parent uses the format: accounts/\\{account}. + # @param page_size [::Integer] + # Optional. The maximum number of SKU groups to return. The service may + # return fewer than this value. If unspecified, returns a maximum of 1000 SKU + # groups. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_groups CloudChannelService.ListSkuGroups} + # call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new + # + # # Call the list_sku_groups method. + # result = client.list_sku_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup. + # p item + # end + # + def list_sku_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sku_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sku_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_sku_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, "sku_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Billable SKUs in a given SKU group. + # + # Possible error codes: + # PERMISSION_DENIED: If the account making the request and the account + # being queried for are different, or the account doesn't exist. + # INVALID_ARGUMENT: Missing or invalid required parameters in the + # request. + # INTERNAL: Any non-user error related to technical issue in the + # backend. In this case, contact cloud channel support. + # + # Return Value: + # If successful, the {::Google::Cloud::Channel::V1::BillableSku BillableSku} + # resources. The data for each resource is displayed in the ascending order + # of: + # + # * {::Google::Cloud::Channel::V1::BillableSku#service_display_name BillableSku.service_display_name} + # * {::Google::Cloud::Channel::V1::BillableSku#sku_display_name BillableSku.sku_display_name} + # + # If unsuccessful, returns an error. + # + # @overload list_sku_group_billable_skus(request, options = nil) + # Pass arguments to `list_sku_group_billable_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sku_group_billable_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the SKU group. + # Format: accounts/\\{account}/skuGroups/\\{sku_group}. + # @param page_size [::Integer] + # Optional. The maximum number of SKUs to return. The service may return + # fewer than this value. If unspecified, returns a maximum of 100000 SKUs. + # The maximum value is 100000; values above 100000 will be coerced to 100000. + # @param page_token [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} + # call. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new + # + # # Call the list_sku_group_billable_skus method. + # result = client.list_sku_group_billable_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::BillableSku. + # p item + # end + # + def list_sku_group_billable_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sku_group_billable_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_sku_group_billable_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, "billable_skus", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: Entitlement or offer was not found. + # + # Return value: + # The {::Google::Cloud::Channel::V1::Offer Offer} resource. + # + # @overload lookup_offer(request, options = nil) + # Pass arguments to `lookup_offer` via a request object, either of type + # {::Google::Cloud::Channel::V1::LookupOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::LookupOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload lookup_offer(entitlement: nil) + # Pass arguments to `lookup_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param entitlement [::String] + # Required. The resource name of the entitlement to retrieve the Offer. + # Entitlement uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Offer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Offer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::LookupOfferRequest.new + # + # # Call the lookup_offer method. + # result = client.lookup_offer request + # + # # The returned object is of type Google::Cloud::Channel::V1::Offer. + # p result + # + def lookup_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::LookupOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.lookup_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.lookup_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.lookup_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Products the reseller is authorized to sell. + # + # Possible error codes: + # + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_products(request, options = nil) + # Pass arguments to `list_products` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_products(account: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Required. The resource name of the reseller account. + # Format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 Products. The maximum value + # is 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListProductsRequest.new + # + # # Call the list_products method. + # result = client.list_products request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Product. + # p item + # end + # + def list_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_products, "products", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the SKUs for a product the reseller is authorized to sell. + # + # Possible error codes: + # + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_skus(parent: nil, account: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the Product to list SKUs for. + # Parent uses the format: products/\\{product_id}. + # Supports products/- to retrieve SKUs for all products. + # @param account [::String] + # Required. Resource name of the reseller. + # Format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 SKUs. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # Optional. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, "skus", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the Offers the reseller can sell. + # + # Possible error codes: + # + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_offers(request, options = nil) + # Pass arguments to `list_offers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, language_code: nil, show_future_offers: nil) + # Pass arguments to `list_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the reseller account from which to list + # Offers. Parent uses the format: accounts/\\{account_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 500 Offers. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param filter [::String] + # Optional. The expression to filter results by name (name of + # the Offer), sku.name (name of the SKU), or sku.product.name (name of the + # Product). + # Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 + # Example 2: name=accounts/a1/offers/o1 + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @param show_future_offers [::Boolean] + # Optional. A boolean flag that determines if a response returns future + # offers 30 days from now. If the show_future_offers is true, the response + # will only contain offers that are scheduled to be available 30 days from + # now. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListOffersRequest.new + # + # # Call the list_offers method. + # result = client.list_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::Offer. + # p item + # end + # + def list_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_offers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_offers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, "offers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the following: + # + # * SKUs that you can purchase for a customer + # * SKUs that you can upgrade or downgrade for an entitlement. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_purchasable_skus(request, options = nil) + # Pass arguments to `list_purchasable_skus` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListPurchasableSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_purchasable_skus(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_purchasable_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash] + # List SKUs for CreateEntitlement purchase. + # + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash] + # List SKUs for ChangeOffer purchase with a new SKU. + # + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer [::String] + # Required. The resource name of the customer to list SKUs for. + # Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 SKUs. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new + # + # # Call the list_purchasable_skus method. + # result = client.list_purchasable_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku. + # p item + # end + # + def list_purchasable_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_purchasable_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_purchasable_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_purchasable_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_purchasable_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, "purchasable_skus", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the following: + # + # * Offers that you can purchase for a customer. + # * Offers that you can change for an entitlement. + # + # Possible error codes: + # + # * PERMISSION_DENIED: + # * The customer doesn't belong to the reseller + # * The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # @overload list_purchasable_offers(request, options = nil) + # Pass arguments to `list_purchasable_offers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListPurchasableOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_purchasable_offers(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) + # Pass arguments to `list_purchasable_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase, ::Hash] + # List Offers for CreateEntitlement purchase. + # + # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase, ::Hash] + # List Offers for ChangeOffer purchase. + # + # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param customer [::String] + # Required. The resource name of the customer to list Offers for. + # Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @param page_size [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 Offers. The maximum value is + # 1000; the server will coerce values above 1000. + # @param page_token [::String] + # Optional. A token for a page of results other than the first page. + # @param language_code [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new + # + # # Call the list_purchasable_offers method. + # result = client.list_purchasable_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer. + # p item + # end + # + def list_purchasable_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_purchasable_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_purchasable_offers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_purchasable_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_purchasable_offers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_offers, "purchasable_offers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the billing accounts that are eligible to purchase particular SKUs + # for a given customer. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The customer doesn't belong to the reseller. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # + # Return value: + # Based on the provided list of SKUs, returns a list of SKU groups that must + # be purchased using the same billing account and the billing accounts + # eligible to purchase each SKU group. + # + # @overload query_eligible_billing_accounts(request, options = nil) + # Pass arguments to `query_eligible_billing_accounts` via a request object, either of type + # {::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_eligible_billing_accounts(customer: nil, skus: nil) + # Pass arguments to `query_eligible_billing_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::String] + # Required. The resource name of the customer to list eligible billing + # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @param skus [::Array<::String>] + # Required. List of SKUs to list eligible billing accounts for. At least one + # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new + # + # # Call the query_eligible_billing_accounts method. + # result = client.query_eligible_billing_accounts request + # + # # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse. + # p result + # + def query_eligible_billing_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.query_eligible_billing_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.query_eligible_billing_accounts request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Registers a service account with subscriber privileges on the Pub/Sub + # topic for this Channel Services account or integrator. After you create a + # subscriber, you get the events through + # {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent} + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different, or the impersonated user + # is not a super admin. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The topic name with the registered service email address. + # + # @overload register_subscriber(request, options = nil) + # Pass arguments to `register_subscriber` via a request object, either of type + # {::Google::Cloud::Channel::V1::RegisterSubscriberRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::RegisterSubscriberRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload register_subscriber(account: nil, service_account: nil, integrator: nil) + # Pass arguments to `register_subscriber` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @param service_account [::String] + # Required. Service account that provides subscriber access to the registered + # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new + # + # # Call the register_subscriber method. + # result = client.register_subscriber request + # + # # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse. + # p result + # + def register_subscriber request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RegisterSubscriberRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.register_subscriber.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.register_subscriber.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.register_subscriber.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.register_subscriber request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Unregisters a service account with subscriber privileges on the Pub/Sub + # topic created for this Channel Services account or integrator. If there are + # no service accounts left with subscriber privileges, this deletes the + # topic. You can call ListSubscribers to check for these accounts. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different, or the impersonated user + # is not a super admin. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The topic resource doesn't exist. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # The topic name that unregistered the service email address. + # Returns a success response if the service email address wasn't registered + # with the topic. + # + # @overload unregister_subscriber(request, options = nil) + # Pass arguments to `unregister_subscriber` via a request object, either of type + # {::Google::Cloud::Channel::V1::UnregisterSubscriberRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unregister_subscriber(account: nil, service_account: nil, integrator: nil) + # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @param service_account [::String] + # Required. Service account to unregister from subscriber access to the + # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new + # + # # Call the unregister_subscriber method. + # result = client.unregister_subscriber request + # + # # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse. + # p result + # + def unregister_subscriber request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.unregister_subscriber.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.unregister_subscriber.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unregister_subscriber.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.unregister_subscriber request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists service accounts with subscriber privileges on the Pub/Sub topic + # created for this Channel Services account or integrator. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different, or the impersonated user + # is not a super admin. + # * INVALID_ARGUMENT: Required request parameters are missing or invalid. + # * NOT_FOUND: The topic resource doesn't exist. + # * INTERNAL: Any non-user error related to a technical issue in the + # backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # Contact Cloud Channel support. + # + # Return value: + # A list of service email addresses. + # + # @overload list_subscribers(request, options = nil) + # Pass arguments to `list_subscribers` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListSubscribersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListSubscribersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_subscribers(account: nil, page_size: nil, page_token: nil, integrator: nil) + # Pass arguments to `list_subscribers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param account [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @param page_size [::Integer] + # Optional. The maximum number of service accounts to return. The service may + # return fewer than this value. If unspecified, returns at most 100 service + # accounts. The maximum value is 1000; the server will coerce values above + # 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListSubscribers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSubscribers` must + # match the call that provided the page token. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListSubscribersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListSubscribersRequest.new + # + # # Call the list_subscribers method. + # result = client.list_subscribers request + # + # # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse. + # p result + # + def list_subscribers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSubscribersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_subscribers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_subscribers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_subscribers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_subscribers request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List entitlement history. + # + # Possible error codes: + # + # * PERMISSION_DENIED: The reseller account making the request and the + # provided reseller account are different. + # * INVALID_ARGUMENT: Missing or invalid required fields in the request. + # * NOT_FOUND: The parent resource doesn't exist. Usually the result of an + # invalid name parameter. + # * INTERNAL: Any non-user error related to a technical issue in the backend. + # In this case, contact CloudChannel support. + # * UNKNOWN: Any non-user error related to a technical issue in the backend. + # In this case, contact Cloud Channel support. + # + # Return value: + # List of {::Google::Cloud::Channel::V1::EntitlementChange EntitlementChange}s. + # + # @overload list_entitlement_changes(request, options = nil) + # Pass arguments to `list_entitlement_changes` via a request object, either of type + # {::Google::Cloud::Channel::V1::ListEntitlementChangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_entitlement_changes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_entitlement_changes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the entitlement for which to list + # entitlement changes. The `-` wildcard may be used to match entitlements + # across a customer. Formats: + # + # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/- + # @param page_size [::Integer] + # Optional. The maximum number of entitlement changes to return. The service + # may return fewer than this value. If unspecified, returns at most 10 + # entitlement changes. The maximum value is 50; the server will coerce values + # above 50. + # @param page_token [::String] + # Optional. A page token, received from a previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Filters applied to the list results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/channel/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new + # + # # Call the list_entitlement_changes method. + # result = client.list_entitlement_changes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Channel::V1::EntitlementChange. + # p item + # end + # + def list_entitlement_changes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_entitlement_changes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_entitlement_changes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_entitlement_changes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_channel_service_stub.list_entitlement_changes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlement_changes, "entitlement_changes", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudChannelService REST API. + # + # This class represents the configuration for CloudChannelService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_customers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_customers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_customers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CloudChannelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customers + ## + # RPC-specific configuration for `get_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer + ## + # RPC-specific configuration for `check_cloud_identity_accounts_exist` + # @return [::Gapic::Config::Method] + # + attr_reader :check_cloud_identity_accounts_exist + ## + # RPC-specific configuration for `create_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer + ## + # RPC-specific configuration for `update_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer + ## + # RPC-specific configuration for `delete_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer + ## + # RPC-specific configuration for `import_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :import_customer + ## + # RPC-specific configuration for `provision_cloud_identity` + # @return [::Gapic::Config::Method] + # + attr_reader :provision_cloud_identity + ## + # RPC-specific configuration for `list_entitlements` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entitlements + ## + # RPC-specific configuration for `list_transferable_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transferable_skus + ## + # RPC-specific configuration for `list_transferable_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transferable_offers + ## + # RPC-specific configuration for `get_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :get_entitlement + ## + # RPC-specific configuration for `create_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :create_entitlement + ## + # RPC-specific configuration for `change_parameters` + # @return [::Gapic::Config::Method] + # + attr_reader :change_parameters + ## + # RPC-specific configuration for `change_renewal_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :change_renewal_settings + ## + # RPC-specific configuration for `change_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :change_offer + ## + # RPC-specific configuration for `start_paid_service` + # @return [::Gapic::Config::Method] + # + attr_reader :start_paid_service + ## + # RPC-specific configuration for `suspend_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :suspend_entitlement + ## + # RPC-specific configuration for `cancel_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_entitlement + ## + # RPC-specific configuration for `activate_entitlement` + # @return [::Gapic::Config::Method] + # + attr_reader :activate_entitlement + ## + # RPC-specific configuration for `transfer_entitlements` + # @return [::Gapic::Config::Method] + # + attr_reader :transfer_entitlements + ## + # RPC-specific configuration for `transfer_entitlements_to_google` + # @return [::Gapic::Config::Method] + # + attr_reader :transfer_entitlements_to_google + ## + # RPC-specific configuration for `list_channel_partner_links` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channel_partner_links + ## + # RPC-specific configuration for `get_channel_partner_link` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel_partner_link + ## + # RPC-specific configuration for `create_channel_partner_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel_partner_link + ## + # RPC-specific configuration for `update_channel_partner_link` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel_partner_link + ## + # RPC-specific configuration for `get_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer_repricing_config + ## + # RPC-specific configuration for `list_customer_repricing_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customer_repricing_configs + ## + # RPC-specific configuration for `create_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer_repricing_config + ## + # RPC-specific configuration for `update_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer_repricing_config + ## + # RPC-specific configuration for `delete_customer_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer_repricing_config + ## + # RPC-specific configuration for `get_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel_partner_repricing_config + ## + # RPC-specific configuration for `list_channel_partner_repricing_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channel_partner_repricing_configs + ## + # RPC-specific configuration for `create_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel_partner_repricing_config + ## + # RPC-specific configuration for `update_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel_partner_repricing_config + ## + # RPC-specific configuration for `delete_channel_partner_repricing_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel_partner_repricing_config + ## + # RPC-specific configuration for `list_sku_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sku_groups + ## + # RPC-specific configuration for `list_sku_group_billable_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sku_group_billable_skus + ## + # RPC-specific configuration for `lookup_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_offer + ## + # RPC-specific configuration for `list_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_products + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + ## + # RPC-specific configuration for `list_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_offers + ## + # RPC-specific configuration for `list_purchasable_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_purchasable_skus + ## + # RPC-specific configuration for `list_purchasable_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_purchasable_offers + ## + # RPC-specific configuration for `query_eligible_billing_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :query_eligible_billing_accounts + ## + # RPC-specific configuration for `register_subscriber` + # @return [::Gapic::Config::Method] + # + attr_reader :register_subscriber + ## + # RPC-specific configuration for `unregister_subscriber` + # @return [::Gapic::Config::Method] + # + attr_reader :unregister_subscriber + ## + # RPC-specific configuration for `list_subscribers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_subscribers + ## + # RPC-specific configuration for `list_entitlement_changes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_entitlement_changes + + # @private + def initialize parent_rpcs = nil + list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers + @list_customers = ::Gapic::Config::Method.new list_customers_config + get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer + @get_customer = ::Gapic::Config::Method.new get_customer_config + check_cloud_identity_accounts_exist_config = parent_rpcs.check_cloud_identity_accounts_exist if parent_rpcs.respond_to? :check_cloud_identity_accounts_exist + @check_cloud_identity_accounts_exist = ::Gapic::Config::Method.new check_cloud_identity_accounts_exist_config + create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer + @create_customer = ::Gapic::Config::Method.new create_customer_config + update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer + @update_customer = ::Gapic::Config::Method.new update_customer_config + delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer + @delete_customer = ::Gapic::Config::Method.new delete_customer_config + import_customer_config = parent_rpcs.import_customer if parent_rpcs.respond_to? :import_customer + @import_customer = ::Gapic::Config::Method.new import_customer_config + provision_cloud_identity_config = parent_rpcs.provision_cloud_identity if parent_rpcs.respond_to? :provision_cloud_identity + @provision_cloud_identity = ::Gapic::Config::Method.new provision_cloud_identity_config + list_entitlements_config = parent_rpcs.list_entitlements if parent_rpcs.respond_to? :list_entitlements + @list_entitlements = ::Gapic::Config::Method.new list_entitlements_config + list_transferable_skus_config = parent_rpcs.list_transferable_skus if parent_rpcs.respond_to? :list_transferable_skus + @list_transferable_skus = ::Gapic::Config::Method.new list_transferable_skus_config + list_transferable_offers_config = parent_rpcs.list_transferable_offers if parent_rpcs.respond_to? :list_transferable_offers + @list_transferable_offers = ::Gapic::Config::Method.new list_transferable_offers_config + get_entitlement_config = parent_rpcs.get_entitlement if parent_rpcs.respond_to? :get_entitlement + @get_entitlement = ::Gapic::Config::Method.new get_entitlement_config + create_entitlement_config = parent_rpcs.create_entitlement if parent_rpcs.respond_to? :create_entitlement + @create_entitlement = ::Gapic::Config::Method.new create_entitlement_config + change_parameters_config = parent_rpcs.change_parameters if parent_rpcs.respond_to? :change_parameters + @change_parameters = ::Gapic::Config::Method.new change_parameters_config + change_renewal_settings_config = parent_rpcs.change_renewal_settings if parent_rpcs.respond_to? :change_renewal_settings + @change_renewal_settings = ::Gapic::Config::Method.new change_renewal_settings_config + change_offer_config = parent_rpcs.change_offer if parent_rpcs.respond_to? :change_offer + @change_offer = ::Gapic::Config::Method.new change_offer_config + start_paid_service_config = parent_rpcs.start_paid_service if parent_rpcs.respond_to? :start_paid_service + @start_paid_service = ::Gapic::Config::Method.new start_paid_service_config + suspend_entitlement_config = parent_rpcs.suspend_entitlement if parent_rpcs.respond_to? :suspend_entitlement + @suspend_entitlement = ::Gapic::Config::Method.new suspend_entitlement_config + cancel_entitlement_config = parent_rpcs.cancel_entitlement if parent_rpcs.respond_to? :cancel_entitlement + @cancel_entitlement = ::Gapic::Config::Method.new cancel_entitlement_config + activate_entitlement_config = parent_rpcs.activate_entitlement if parent_rpcs.respond_to? :activate_entitlement + @activate_entitlement = ::Gapic::Config::Method.new activate_entitlement_config + transfer_entitlements_config = parent_rpcs.transfer_entitlements if parent_rpcs.respond_to? :transfer_entitlements + @transfer_entitlements = ::Gapic::Config::Method.new transfer_entitlements_config + transfer_entitlements_to_google_config = parent_rpcs.transfer_entitlements_to_google if parent_rpcs.respond_to? :transfer_entitlements_to_google + @transfer_entitlements_to_google = ::Gapic::Config::Method.new transfer_entitlements_to_google_config + list_channel_partner_links_config = parent_rpcs.list_channel_partner_links if parent_rpcs.respond_to? :list_channel_partner_links + @list_channel_partner_links = ::Gapic::Config::Method.new list_channel_partner_links_config + get_channel_partner_link_config = parent_rpcs.get_channel_partner_link if parent_rpcs.respond_to? :get_channel_partner_link + @get_channel_partner_link = ::Gapic::Config::Method.new get_channel_partner_link_config + create_channel_partner_link_config = parent_rpcs.create_channel_partner_link if parent_rpcs.respond_to? :create_channel_partner_link + @create_channel_partner_link = ::Gapic::Config::Method.new create_channel_partner_link_config + update_channel_partner_link_config = parent_rpcs.update_channel_partner_link if parent_rpcs.respond_to? :update_channel_partner_link + @update_channel_partner_link = ::Gapic::Config::Method.new update_channel_partner_link_config + get_customer_repricing_config_config = parent_rpcs.get_customer_repricing_config if parent_rpcs.respond_to? :get_customer_repricing_config + @get_customer_repricing_config = ::Gapic::Config::Method.new get_customer_repricing_config_config + list_customer_repricing_configs_config = parent_rpcs.list_customer_repricing_configs if parent_rpcs.respond_to? :list_customer_repricing_configs + @list_customer_repricing_configs = ::Gapic::Config::Method.new list_customer_repricing_configs_config + create_customer_repricing_config_config = parent_rpcs.create_customer_repricing_config if parent_rpcs.respond_to? :create_customer_repricing_config + @create_customer_repricing_config = ::Gapic::Config::Method.new create_customer_repricing_config_config + update_customer_repricing_config_config = parent_rpcs.update_customer_repricing_config if parent_rpcs.respond_to? :update_customer_repricing_config + @update_customer_repricing_config = ::Gapic::Config::Method.new update_customer_repricing_config_config + delete_customer_repricing_config_config = parent_rpcs.delete_customer_repricing_config if parent_rpcs.respond_to? :delete_customer_repricing_config + @delete_customer_repricing_config = ::Gapic::Config::Method.new delete_customer_repricing_config_config + get_channel_partner_repricing_config_config = parent_rpcs.get_channel_partner_repricing_config if parent_rpcs.respond_to? :get_channel_partner_repricing_config + @get_channel_partner_repricing_config = ::Gapic::Config::Method.new get_channel_partner_repricing_config_config + list_channel_partner_repricing_configs_config = parent_rpcs.list_channel_partner_repricing_configs if parent_rpcs.respond_to? :list_channel_partner_repricing_configs + @list_channel_partner_repricing_configs = ::Gapic::Config::Method.new list_channel_partner_repricing_configs_config + create_channel_partner_repricing_config_config = parent_rpcs.create_channel_partner_repricing_config if parent_rpcs.respond_to? :create_channel_partner_repricing_config + @create_channel_partner_repricing_config = ::Gapic::Config::Method.new create_channel_partner_repricing_config_config + update_channel_partner_repricing_config_config = parent_rpcs.update_channel_partner_repricing_config if parent_rpcs.respond_to? :update_channel_partner_repricing_config + @update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config + delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config + @delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config + list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups + @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config + list_sku_group_billable_skus_config = parent_rpcs.list_sku_group_billable_skus if parent_rpcs.respond_to? :list_sku_group_billable_skus + @list_sku_group_billable_skus = ::Gapic::Config::Method.new list_sku_group_billable_skus_config + lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer + @lookup_offer = ::Gapic::Config::Method.new lookup_offer_config + list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products + @list_products = ::Gapic::Config::Method.new list_products_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + list_offers_config = parent_rpcs.list_offers if parent_rpcs.respond_to? :list_offers + @list_offers = ::Gapic::Config::Method.new list_offers_config + list_purchasable_skus_config = parent_rpcs.list_purchasable_skus if parent_rpcs.respond_to? :list_purchasable_skus + @list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config + list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers + @list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config + query_eligible_billing_accounts_config = parent_rpcs.query_eligible_billing_accounts if parent_rpcs.respond_to? :query_eligible_billing_accounts + @query_eligible_billing_accounts = ::Gapic::Config::Method.new query_eligible_billing_accounts_config + register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber + @register_subscriber = ::Gapic::Config::Method.new register_subscriber_config + unregister_subscriber_config = parent_rpcs.unregister_subscriber if parent_rpcs.respond_to? :unregister_subscriber + @unregister_subscriber = ::Gapic::Config::Method.new unregister_subscriber_config + list_subscribers_config = parent_rpcs.list_subscribers if parent_rpcs.respond_to? :list_subscribers + @list_subscribers = ::Gapic::Config::Method.new list_subscribers_config + list_entitlement_changes_config = parent_rpcs.list_entitlement_changes if parent_rpcs.respond_to? :list_entitlement_changes + @list_entitlement_changes = ::Gapic::Config::Method.new list_entitlement_changes_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb new file mode 100644 index 000000000000..daa4756e5695 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudChannelService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudChannelService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Channel::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb new file mode 100644 index 000000000000..2cff684e71ea --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb @@ -0,0 +1,3161 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/channel/v1/service_pb" + +module Google + module Cloud + module Channel + module V1 + module CloudChannelService + module Rest + ## + # REST service stub for the CloudChannelService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_customers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListCustomersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListCustomersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListCustomersResponse] + # A result object deserialized from the server's reply + def list_customers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_customers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_customers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListCustomersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # A result object deserialized from the server's reply + def get_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the check_cloud_identity_accounts_exist REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] + # A result object deserialized from the server's reply + def check_cloud_identity_accounts_exist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_check_cloud_identity_accounts_exist_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "check_cloud_identity_accounts_exist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # A result object deserialized from the server's reply + def create_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # A result object deserialized from the server's reply + def update_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the import_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ImportCustomerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Customer] + # A result object deserialized from the server's reply + def import_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_customer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the provision_cloud_identity REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def provision_cloud_identity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_provision_cloud_identity_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "provision_cloud_identity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_entitlements REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListEntitlementsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListEntitlementsResponse] + # A result object deserialized from the server's reply + def list_entitlements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entitlements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_entitlements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListEntitlementsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_transferable_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListTransferableSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListTransferableSkusResponse] + # A result object deserialized from the server's reply + def list_transferable_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transferable_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_transferable_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListTransferableSkusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_transferable_offers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableOffersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListTransferableOffersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListTransferableOffersResponse] + # A result object deserialized from the server's reply + def list_transferable_offers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transferable_offers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_transferable_offers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListTransferableOffersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetEntitlementRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Entitlement] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Entitlement] + # A result object deserialized from the server's reply + def get_entitlement request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_entitlement_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_entitlement", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::Entitlement.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateEntitlementRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_entitlement request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_entitlement_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_entitlement", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the change_parameters REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ChangeParametersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def change_parameters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_change_parameters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "change_parameters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the change_renewal_settings REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def change_renewal_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_change_renewal_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "change_renewal_settings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the change_offer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ChangeOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def change_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_change_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "change_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_paid_service REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::StartPaidServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def start_paid_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_paid_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_paid_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the suspend_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::SuspendEntitlementRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def suspend_entitlement request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_suspend_entitlement_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "suspend_entitlement", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CancelEntitlementRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def cancel_entitlement request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_entitlement_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_entitlement", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the activate_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ActivateEntitlementRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def activate_entitlement request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_activate_entitlement_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "activate_entitlement", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the transfer_entitlements REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def transfer_entitlements request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_transfer_entitlements_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "transfer_entitlements", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the transfer_entitlements_to_google REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def transfer_entitlements_to_google request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_transfer_entitlements_to_google_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "transfer_entitlements_to_google", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_channel_partner_links REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse] + # A result object deserialized from the server's reply + def list_channel_partner_links request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_partner_links_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_channel_partner_links", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_channel_partner_link REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # A result object deserialized from the server's reply + def get_channel_partner_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_partner_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_channel_partner_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_channel_partner_link REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # A result object deserialized from the server's reply + def create_channel_partner_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_partner_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_channel_partner_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_channel_partner_link REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # A result object deserialized from the server's reply + def update_channel_partner_link request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_partner_link_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_channel_partner_link", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # A result object deserialized from the server's reply + def get_customer_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_customer_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_customer_repricing_configs REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse] + # A result object deserialized from the server's reply + def list_customer_repricing_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_customer_repricing_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_customer_repricing_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # A result object deserialized from the server's reply + def create_customer_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_customer_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # A result object deserialized from the server's reply + def update_customer_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_customer_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_customer_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_customer_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # A result object deserialized from the server's reply + def get_channel_partner_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_partner_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_channel_partner_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_channel_partner_repricing_configs REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse] + # A result object deserialized from the server's reply + def list_channel_partner_repricing_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_partner_repricing_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_channel_partner_repricing_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # A result object deserialized from the server's reply + def create_channel_partner_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_partner_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_channel_partner_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # A result object deserialized from the server's reply + def update_channel_partner_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_partner_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_channel_partner_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_channel_partner_repricing_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_partner_repricing_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_channel_partner_repricing_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sku_groups REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListSkuGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListSkuGroupsResponse] + # A result object deserialized from the server's reply + def list_sku_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sku_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sku_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListSkuGroupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sku_group_billable_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse] + # A result object deserialized from the server's reply + def list_sku_group_billable_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sku_group_billable_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sku_group_billable_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_offer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::LookupOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::Offer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::Offer] + # A result object deserialized from the server's reply + def lookup_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "lookup_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::Offer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_products REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListProductsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListProductsResponse] + # A result object deserialized from the server's reply + def list_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListProductsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListSkusResponse] + # A result object deserialized from the server's reply + def list_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListSkusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_offers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListOffersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListOffersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListOffersResponse] + # A result object deserialized from the server's reply + def list_offers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_offers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_offers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListOffersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_purchasable_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListPurchasableSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusResponse] + # A result object deserialized from the server's reply + def list_purchasable_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_purchasable_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_purchasable_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListPurchasableSkusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_purchasable_offers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListPurchasableOffersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListPurchasableOffersResponse] + # A result object deserialized from the server's reply + def list_purchasable_offers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_purchasable_offers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_purchasable_offers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_eligible_billing_accounts REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] + # A result object deserialized from the server's reply + def query_eligible_billing_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_eligible_billing_accounts_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "query_eligible_billing_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the register_subscriber REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::RegisterSubscriberRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] + # A result object deserialized from the server's reply + def register_subscriber request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_register_subscriber_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "register_subscriber", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::RegisterSubscriberResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the unregister_subscriber REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] + # A result object deserialized from the server's reply + def unregister_subscriber request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unregister_subscriber_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "unregister_subscriber", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_subscribers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSubscribersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListSubscribersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse] + # A result object deserialized from the server's reply + def list_subscribers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_subscribers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_subscribers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListSubscribersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_entitlement_changes REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Channel::V1::ListEntitlementChangesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Channel::V1::ListEntitlementChangesResponse] + # A result object deserialized from the server's reply + def list_entitlement_changes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_entitlement_changes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_entitlement_changes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Channel::V1::ListEntitlementChangesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_customers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListCustomersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_customers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customers", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customers", + matches: [ + ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the check_cloud_identity_accounts_exist REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_check_cloud_identity_accounts_exist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:checkCloudIdentityAccountsExist", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customers", + body: "customer", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customers", + body: "customer", + matches: [ + ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{customer.name}", + body: "customer", + matches: [ + ["customer.name", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{customer.name}", + body: "customer", + matches: [ + ["customer.name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_customer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ImportCustomerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customers:import", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customers:import", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the provision_cloud_identity REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_provision_cloud_identity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{customer}:provisionCloudIdentity", + body: "*", + matches: [ + ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entitlements REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entitlements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/entitlements", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transferable_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableSkusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_transferable_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:listTransferableSkus", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transferable_offers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableOffersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_transferable_offers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:listTransferableOffers", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetEntitlementRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_entitlement_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateEntitlementRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_entitlement_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/entitlements", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the change_parameters REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ChangeParametersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_change_parameters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:changeParameters", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the change_renewal_settings REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_change_renewal_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:changeRenewalSettings", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the change_offer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ChangeOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_change_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:changeOffer", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_paid_service REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::StartPaidServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_paid_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:startPaidService", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the suspend_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::SuspendEntitlementRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_suspend_entitlement_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:suspend", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CancelEntitlementRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_entitlement_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the activate_entitlement REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ActivateEntitlementRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_activate_entitlement_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:activate", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the transfer_entitlements REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_transfer_entitlements_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:transferEntitlements", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the transfer_entitlements_to_google REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_transfer_entitlements_to_google_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:transferEntitlementsToGoogle", + body: "*", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_channel_partner_links REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_channel_partner_links_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/channelPartnerLinks", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_channel_partner_link REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_channel_partner_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_channel_partner_link REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_channel_partner_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/channelPartnerLinks", + body: "channel_partner_link", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_channel_partner_link REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_channel_partner_link_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "*", + matches: [ + ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_customer_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_customer_repricing_configs REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_customer_repricing_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customerRepricingConfigs", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_customer_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customerRepricingConfigs", + body: "customer_repricing_config", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_customer_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{customer_repricing_config.name}", + body: "customer_repricing_config", + matches: [ + ["customer_repricing_config.name", %r{^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_customer_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_customer_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_channel_partner_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_channel_partner_repricing_configs REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_channel_partner_repricing_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/channelPartnerRepricingConfigs", + matches: [ + ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_channel_partner_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/channelPartnerRepricingConfigs", + body: "channel_partner_repricing_config", + matches: [ + ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_channel_partner_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{channel_partner_repricing_config.name}", + body: "channel_partner_repricing_config", + matches: [ + ["channel_partner_repricing_config.name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_channel_partner_repricing_config REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_channel_partner_repricing_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sku_groups REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sku_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/skuGroups", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sku_group_billable_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sku_group_billable_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/billableSkus", + matches: [ + ["parent", %r{^accounts/[^/]+/skuGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_offer REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::LookupOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{entitlement}:lookupOffer", + matches: [ + ["entitlement", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_products REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListProductsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/products", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSkusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/skus", + matches: [ + ["parent", %r{^products/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_offers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListOffersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_offers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/offers", + matches: [ + ["parent", %r{^accounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_purchasable_skus REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_purchasable_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{customer}:listPurchasableSkus", + matches: [ + ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_purchasable_offers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_purchasable_offers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{customer}:listPurchasableOffers", + matches: [ + ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_eligible_billing_accounts REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_eligible_billing_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{customer}:queryEligibleBillingAccounts", + matches: [ + ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the register_subscriber REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::RegisterSubscriberRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_register_subscriber_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{account}:register", + body: "*", + matches: [ + ["account", %r{^accounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{integrator}:registerSubscriber", + body: "*", + matches: [ + ["integrator", %r{^integrators/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unregister_subscriber REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unregister_subscriber_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{account}:unregister", + body: "*", + matches: [ + ["account", %r{^accounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{integrator}:unregisterSubscriber", + body: "*", + matches: [ + ["integrator", %r{^integrators/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_subscribers REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListSubscribersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_subscribers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{account}:listSubscribers", + matches: [ + ["account", %r{^accounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{integrator}:listSubscribers", + matches: [ + ["integrator", %r{^integrators/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_entitlement_changes REST call + # + # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_entitlement_changes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:listEntitlementChanges", + matches: [ + ["parent", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb new file mode 100644 index 000000000000..0055a7f454b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' + + +descriptor_data = "\n$google/cloud/channel/v1/common.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\"\xb0\x03\n\x07\x45\x64uData\x12\x46\n\x0einstitute_type\x18\x01 \x01(\x0e\x32..google.cloud.channel.v1.EduData.InstituteType\x12\x46\n\x0einstitute_size\x18\x02 \x01(\x0e\x32..google.cloud.channel.v1.EduData.InstituteSize\x12\x0f\n\x07website\x18\x03 \x01(\t\"H\n\rInstituteType\x12\x1e\n\x1aINSTITUTE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03K12\x10\x01\x12\x0e\n\nUNIVERSITY\x10\x02\"\xb9\x01\n\rInstituteSize\x12\x1e\n\x1aINSTITUTE_SIZE_UNSPECIFIED\x10\x00\x12\x0e\n\nSIZE_1_100\x10\x01\x12\x10\n\x0cSIZE_101_500\x10\x02\x12\x11\n\rSIZE_501_1000\x10\x03\x12\x12\n\x0eSIZE_1001_2000\x10\x04\x12\x12\n\x0eSIZE_2001_5000\x10\x05\x12\x13\n\x0fSIZE_5001_10000\x10\x06\x12\x16\n\x12SIZE_10001_OR_MORE\x10\x07\"\x80\x03\n\x11\x43loudIdentityInfo\x12N\n\rcustomer_type\x18\x01 \x01(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12\x1b\n\x0eprimary_domain\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12is_domain_verified\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x17\n\x0f\x61lternate_email\x18\x06 \x01(\t\x12\x14\n\x0cphone_number\x18\x07 \x01(\t\x12\x15\n\rlanguage_code\x18\x08 \x01(\t\x12\x1e\n\x11\x61\x64min_console_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x32\n\x08\x65\x64u_data\x18\x16 \x01(\x0b\x32 .google.cloud.channel.v1.EduData\"C\n\x0c\x43ustomerType\x12\x1d\n\x19\x43USTOMER_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OMAIN\x10\x01\x12\x08\n\x04TEAM\x10\x02\"\x99\x01\n\x05Value\x12\x15\n\x0bint64_value\x18\x01 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12+\n\x0bproto_value\x18\x04 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x14\n\nbool_value\x18\x05 \x01(\x08H\x00\x42\x06\n\x04kind\"C\n\tAdminUser\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x12\n\ngiven_name\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61mily_name\x18\x03 \x01(\tBc\n\x1b\x63om.google.cloud.channel.v1B\x0b\x43ommonProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Any", "google/protobuf/any.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + EduData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EduData").msgclass + EduData::InstituteType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EduData.InstituteType").enummodule + EduData::InstituteSize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EduData.InstituteSize").enummodule + CloudIdentityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CloudIdentityInfo").msgclass + CloudIdentityInfo::CustomerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CloudIdentityInfo.CustomerType").enummodule + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Value").msgclass + AdminUser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.AdminUser").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb new file mode 100644 index 000000000000..e072fb6b13c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/customers.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/common_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/postal_address_pb' + + +descriptor_data = "\n\'google/cloud/channel/v1/customers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\"\xc9\x06\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10org_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\x12org_postal_address\x18\x03 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x02\x12\x42\n\x14primary_contact_info\x18\x04 \x01(\x0b\x32$.google.cloud.channel.v1.ContactInfo\x12\x17\n\x0f\x61lternate_email\x18\x05 \x01(\t\x12\x13\n\x06\x64omain\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_identity_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\n \x01(\tB\x03\xe0\x41\x01\x12L\n\x13\x63loud_identity_info\x18\x0c \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfoB\x03\xe0\x41\x03\x12\x1a\n\x12\x63hannel_partner_id\x18\r \x01(\t\x12\x1b\n\x0e\x63orrelation_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x63\n\x1a\x63ustomer_attestation_state\x18\x10 \x01(\x0e\x32:.google.cloud.channel.v1.Customer.CustomerAttestationStateB\x03\xe0\x41\x01\"t\n\x18\x43ustomerAttestationState\x12*\n&CUSTOMER_ATTESTATION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45XEMPT\x10\x01\x12 \n\x1cNON_EXEMPT_AND_INFO_VERIFIED\x10\x02:R\xea\x41O\n$cloudchannel.googleapis.com/Customer\x12\'accounts/{account}/customers/{customer}\"\x81\x01\n\x0b\x43ontactInfo\x12\x12\n\nfirst_name\x18\x01 \x01(\t\x12\x11\n\tlast_name\x18\x02 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\r\n\x05phone\x18\x07 \x01(\tBf\n\x1b\x63om.google.cloud.channel.v1B\x0e\x43ustomersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.PostalAddress", "google/type/postal_address.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.channel.v1.CloudIdentityInfo", "google/cloud/channel/v1/common.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Customer").msgclass + Customer::CustomerAttestationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Customer.CustomerAttestationState").enummodule + ContactInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ContactInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb new file mode 100644 index 000000000000..e2a8821e32a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/entitlement_changes.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/entitlements_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/channel/v1/entitlement_changes.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/channel/v1/entitlements.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0c\n\x11\x45ntitlementChange\x12R\n\x11suspension_reason\x18\t \x01(\x0e\x32\x35.google.cloud.channel.v1.Entitlement.SuspensionReasonH\x00\x12\\\n\x13\x63\x61ncellation_reason\x18\n \x01(\x0e\x32=.google.cloud.channel.v1.EntitlementChange.CancellationReasonH\x00\x12X\n\x11\x61\x63tivation_reason\x18\x0b \x01(\x0e\x32;.google.cloud.channel.v1.EntitlementChange.ActivationReasonH\x00\x12\x1d\n\x13other_change_reason\x18\x64 \x01(\tH\x00\x12\x44\n\x0b\x65ntitlement\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x12\x38\n\x05offer\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12H\n\x13provisioned_service\x18\x03 \x01(\x0b\x32+.google.cloud.channel.v1.ProvisionedService\x12J\n\x0b\x63hange_type\x18\x04 \x01(\x0e\x32\x35.google.cloud.channel.v1.EntitlementChange.ChangeType\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\roperator_type\x18\x06 \x01(\x0e\x32\x37.google.cloud.channel.v1.EntitlementChange.OperatorType\x12\x36\n\nparameters\x18\x08 \x03(\x0b\x32\".google.cloud.channel.v1.Parameter\x12\x10\n\x08operator\x18\x0c \x01(\t\"\xd7\x02\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x17\n\x13PRICE_PLAN_SWITCHED\x10\x03\x12\x16\n\x12\x43OMMITMENT_CHANGED\x10\x04\x12\x0b\n\x07RENEWED\x10\x05\x12\r\n\tSUSPENDED\x10\x06\x12\r\n\tACTIVATED\x10\x07\x12\r\n\tCANCELLED\x10\x08\x12\x0f\n\x0bSKU_CHANGED\x10\t\x12\x1b\n\x17RENEWAL_SETTING_CHANGED\x10\n\x12\x1d\n\x19PAID_SUBSCRIPTION_STARTED\x10\x0b\x12\x17\n\x13LICENSE_CAP_CHANGED\x10\x0c\x12\x1e\n\x1aSUSPENSION_DETAILS_CHANGED\x10\r\x12\x1b\n\x17TRIAL_END_DATE_EXTENDED\x10\x0e\x12\x11\n\rTRIAL_STARTED\x10\x0f\"z\n\x0cOperatorType\x12\x1d\n\x19OPERATOR_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1f\x43USTOMER_SERVICE_REPRESENTATIVE\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0c\n\x08\x43USTOMER\x10\x03\x12\x0c\n\x08RESELLER\x10\x04\"\x7f\n\x12\x43\x61ncellationReason\x12#\n\x1f\x43\x41NCELLATION_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_TERMINATED\x10\x01\x12\x16\n\x12RELATIONSHIP_ENDED\x10\x02\x12\x14\n\x10PARTIAL_TRANSFER\x10\x03\"\xb4\x01\n\x10\x41\x63tivationReason\x12!\n\x1d\x41\x43TIVATION_REASON_UNSPECIFIED\x10\x00\x12\x1f\n\x1bRESELLER_REVOKED_SUSPENSION\x10\x01\x12!\n\x1d\x43USTOMER_ACCEPTED_PENDING_TOS\x10\x02\x12\x1c\n\x18RENEWAL_SETTINGS_CHANGED\x10\x03\x12\x1b\n\x17OTHER_ACTIVATION_REASON\x10\x64\x42\x0f\n\rchange_reasonBo\n\x1b\x63om.google.cloud.channel.v1B\x17\x45ntitlementChangesProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.channel.v1.ProvisionedService", "google/cloud/channel/v1/entitlements.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + EntitlementChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange").msgclass + EntitlementChange::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.ChangeType").enummodule + EntitlementChange::OperatorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.OperatorType").enummodule + EntitlementChange::CancellationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.CancellationReason").enummodule + EntitlementChange::ActivationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.ActivationReason").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb new file mode 100644 index 000000000000..e6a13ea30c7b --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/entitlements.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/common_pb' +require 'google/cloud/channel/v1/offers_pb' +require 'google/cloud/channel/v1/products_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/channel/v1/entitlements.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a$google/cloud/channel/v1/offers.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\t\n\x0b\x45ntitlement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x05offer\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12H\n\x13\x63ommitment_settings\x18\x0c \x01(\x0b\x32+.google.cloud.channel.v1.CommitmentSettings\x12W\n\x12provisioning_state\x18\r \x01(\x0e\x32\x36.google.cloud.channel.v1.Entitlement.ProvisioningStateB\x03\xe0\x41\x03\x12M\n\x13provisioned_service\x18\x10 \x01(\x0b\x32+.google.cloud.channel.v1.ProvisionedServiceB\x03\xe0\x41\x03\x12V\n\x12suspension_reasons\x18\x12 \x03(\x0e\x32\x35.google.cloud.channel.v1.Entitlement.SuspensionReasonB\x03\xe0\x41\x03\x12\x1e\n\x11purchase_order_id\x18\x13 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0etrial_settings\x18\x15 \x01(\x0b\x32&.google.cloud.channel.v1.TrialSettingsB\x03\xe0\x41\x03\x12\x42\n\x10\x61ssociation_info\x18\x17 \x01(\x0b\x32(.google.cloud.channel.v1.AssociationInfo\x12\x36\n\nparameters\x18\x1a \x03(\x0b\x32\".google.cloud.channel.v1.Parameter\x12\x1c\n\x0f\x62illing_account\x18\x1c \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12price_reference_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\"R\n\x11ProvisioningState\x12\"\n\x1ePROVISIONING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x05\"\xa3\x01\n\x10SuspensionReason\x12!\n\x1dSUSPENSION_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12RESELLER_INITIATED\x10\x01\x12\x0f\n\x0bTRIAL_ENDED\x10\x02\x12\x1c\n\x18RENEWAL_WITH_TYPE_CANCEL\x10\x03\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x04\x12\t\n\x05OTHER\x10\x64:p\xea\x41m\n\'cloudchannel.googleapis.com/Entitlement\x12\x42\x61\x63\x63ounts/{account}/customers/{customer}/entitlements/{entitlement}\"_\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x15\n\x08\x65\x64itable\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"Y\n\x0f\x41ssociationInfo\x12\x46\n\x10\x62\x61se_entitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"`\n\x12ProvisionedService\x12\x1c\n\x0fprovisioning_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06sku_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc5\x01\n\x12\x43ommitmentSettings\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x01\"\xb8\x01\n\x0fRenewalSettings\x12\x16\n\x0e\x65nable_renewal\x18\x01 \x01(\x08\x12\x19\n\x11resize_unit_count\x18\x02 \x01(\x08\x12:\n\x0cpayment_plan\x18\x05 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12\x36\n\rpayment_cycle\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\"L\n\rTrialSettings\x12\r\n\x05trial\x18\x01 \x01(\x08\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbf\x01\n\x0fTransferableSku\x12J\n\x14transfer_eligibility\x18\t \x01(\x0b\x32,.google.cloud.channel.v1.TransferEligibility\x12)\n\x03sku\x18\x0b \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x35\n\nlegacy_sku\x18\x0c \x01(\x0b\x32\x1c.google.cloud.channel.v1.SkuB\x03\xe0\x41\x01\"\xa6\x02\n\x13TransferEligibility\x12\x13\n\x0bis_eligible\x18\x01 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12Q\n\x14ineligibility_reason\x18\x03 \x01(\x0e\x32\x33.google.cloud.channel.v1.TransferEligibility.Reason\"\x91\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x01\x12\x14\n\x10SKU_NOT_ELIGIBLE\x10\x02\x12\x11\n\rSKU_SUSPENDED\x10\x03\x12*\n&CHANNEL_PARTNER_NOT_AUTHORIZED_FOR_SKU\x10\x04\x42i\n\x1b\x63om.google.cloud.channel.v1B\x11\x45ntitlementsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.channel.v1.Value", "google/cloud/channel/v1/common.proto"], + ["google.cloud.channel.v1.Period", "google/cloud/channel/v1/offers.proto"], + ["google.cloud.channel.v1.Sku", "google/cloud/channel/v1/products.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + Entitlement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Entitlement").msgclass + Entitlement::ProvisioningState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Entitlement.ProvisioningState").enummodule + Entitlement::SuspensionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Entitlement.SuspensionReason").enummodule + Parameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Parameter").msgclass + AssociationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.AssociationInfo").msgclass + ProvisionedService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ProvisionedService").msgclass + CommitmentSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CommitmentSettings").msgclass + RenewalSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RenewalSettings").msgclass + TrialSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TrialSettings").msgclass + TransferableSku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TransferableSku").msgclass + TransferEligibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TransferEligibility").msgclass + TransferEligibility::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TransferEligibility.Reason").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb new file mode 100644 index 000000000000..b09e795cf707 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/offers.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/common_pb' +require 'google/cloud/channel/v1/products_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n$google/cloud/channel/v1/offers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\xbc\x04\n\x05Offer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo\x12)\n\x03sku\x18\x03 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12+\n\x04plan\x18\x04 \x01(\x0b\x32\x1d.google.cloud.channel.v1.Plan\x12\x39\n\x0b\x63onstraints\x18\x05 \x01(\x0b\x32$.google.cloud.channel.v1.Constraints\x12\x44\n\x12price_by_resources\x18\x06 \x03(\x0b\x32(.google.cloud.channel.v1.PriceByResource\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x15parameter_definitions\x18\t \x03(\x0b\x32,.google.cloud.channel.v1.ParameterDefinition\x12\x11\n\tdeal_code\x18\x0c \x01(\t:I\xea\x41\x46\n!cloudchannel.googleapis.com/Offer\x12!accounts/{account}/offers/{offer}\"\x88\x03\n\x13ParameterDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0eparameter_type\x18\x02 \x01(\x0e\x32:.google.cloud.channel.v1.ParameterDefinition.ParameterType\x12\x31\n\tmin_value\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x31\n\tmax_value\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x36\n\x0e\x61llowed_values\x18\x05 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x10\n\x08optional\x18\x06 \x01(\x08\"_\n\rParameterType\x12\x1e\n\x1aPARAMETER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\n\n\x06STRING\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\"Y\n\x0b\x43onstraints\x12J\n\x14\x63ustomer_constraints\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.CustomerConstraints\"\xd7\x01\n\x13\x43ustomerConstraints\x12\x17\n\x0f\x61llowed_regions\x18\x01 \x03(\t\x12W\n\x16\x61llowed_customer_types\x18\x02 \x03(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12N\n\x17promotional_order_types\x18\x03 \x03(\x0e\x32-.google.cloud.channel.v1.PromotionalOrderType\"\x86\x02\n\x04Plan\x12:\n\x0cpayment_plan\x18\x01 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12:\n\x0cpayment_type\x18\x02 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentType\x12\x36\n\rpayment_cycle\x18\x03 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x35\n\x0ctrial_period\x18\x04 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x17\n\x0f\x62illing_account\x18\x05 \x01(\t\"\xb9\x01\n\x0fPriceByResource\x12<\n\rresource_type\x18\x01 \x01(\x0e\x32%.google.cloud.channel.v1.ResourceType\x12-\n\x05price\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x39\n\x0cprice_phases\x18\x03 \x03(\x0b\x32#.google.cloud.channel.v1.PricePhase\"\x8a\x02\n\x05Price\x12&\n\nbase_price\x18\x01 \x01(\x0b\x32\x12.google.type.Money\x12\x10\n\x08\x64iscount\x18\x02 \x01(\x01\x12+\n\x0f\x65\x66\x66\x65\x63tive_price\x18\x03 \x01(\x0b\x32\x12.google.type.Money\x12\x35\n\x0cprice_period\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x1a\n\x12\x65xternal_price_uri\x18\x04 \x01(\t\x12G\n\x13\x64iscount_components\x18\x05 \x03(\x0b\x32*.google.cloud.channel.v1.DiscountComponent\"\xd9\x01\n\nPricePhase\x12\x38\n\x0bperiod_type\x18\x01 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\x12\x14\n\x0c\x66irst_period\x18\x02 \x01(\x05\x12\x13\n\x0blast_period\x18\x03 \x01(\x05\x12-\n\x05price\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x37\n\x0bprice_tiers\x18\x05 \x03(\x0b\x32\".google.cloud.channel.v1.PriceTier\"i\n\tPriceTier\x12\x16\n\x0e\x66irst_resource\x18\x01 \x01(\x05\x12\x15\n\rlast_resource\x18\x02 \x01(\x05\x12-\n\x05price\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\"T\n\x06Period\x12\x10\n\x08\x64uration\x18\x01 \x01(\x05\x12\x38\n\x0bperiod_type\x18\x02 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\"\xb3\x01\n\x11\x44iscountComponent\x12\x1d\n\x13\x64iscount_percentage\x18\x03 \x01(\x01H\x00\x12/\n\x11\x64iscount_absolute\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12<\n\rdiscount_type\x18\x02 \x01(\x0e\x32%.google.cloud.channel.v1.DiscountTypeB\x10\n\x0e\x64iscount_value*m\n\x14PromotionalOrderType\x12 \n\x1cPROMOTIONAL_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_UPGRADE\x10\x01\x12\x0c\n\x08TRANSFER\x10\x02\x12\x14\n\x10PROMOTION_SWITCH\x10\x03*k\n\x0bPaymentPlan\x12\x1c\n\x18PAYMENT_PLAN_UNSPECIFIED\x10\x00\x12\x0e\n\nCOMMITMENT\x10\x01\x12\x0c\n\x08\x46LEXIBLE\x10\x02\x12\x08\n\x04\x46REE\x10\x03\x12\t\n\x05TRIAL\x10\x04\x12\x0b\n\x07OFFLINE\x10\x05*D\n\x0bPaymentType\x12\x1c\n\x18PAYMENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PREPAY\x10\x01\x12\x0b\n\x07POSTPAY\x10\x02*\x8a\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04SEAT\x10\x01\x12\x07\n\x03MAU\x10\x02\x12\x06\n\x02GB\x10\x03\x12\x11\n\rLICENSED_USER\x10\x04\x12\x0b\n\x07MINUTES\x10\x05\x12\x0e\n\nIAAS_USAGE\x10\x06\x12\x10\n\x0cSUBSCRIPTION\x10\x07*G\n\nPeriodType\x12\x1b\n\x17PERIOD_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44\x41Y\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x08\n\x04YEAR\x10\x03*\x96\x01\n\x0c\x44iscountType\x12\x1d\n\x19\x44ISCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11REGIONAL_DISCOUNT\x10\x01\x12\x18\n\x14PROMOTIONAL_DISCOUNT\x10\x02\x12\x12\n\x0eSALES_DISCOUNT\x10\x03\x12\x13\n\x0fRESELLER_MARGIN\x10\x04\x12\r\n\tDEAL_CODE\x10\x05\x42\x63\n\x1b\x63om.google.cloud.channel.v1B\x0bOffersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.channel.v1.MarketingInfo", "google/cloud/channel/v1/products.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.channel.v1.Value", "google/cloud/channel/v1/common.proto"], + ["google.type.Money", "google/type/money.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + Offer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Offer").msgclass + ParameterDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ParameterDefinition").msgclass + ParameterDefinition::ParameterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ParameterDefinition.ParameterType").enummodule + Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Constraints").msgclass + CustomerConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CustomerConstraints").msgclass + Plan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Plan").msgclass + PriceByResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PriceByResource").msgclass + Price = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Price").msgclass + PricePhase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PricePhase").msgclass + PriceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PriceTier").msgclass + Period = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Period").msgclass + DiscountComponent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DiscountComponent").msgclass + PromotionalOrderType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PromotionalOrderType").enummodule + PaymentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PaymentPlan").enummodule + PaymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PaymentType").enummodule + ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ResourceType").enummodule + PeriodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PeriodType").enummodule + DiscountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DiscountType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb new file mode 100644 index 000000000000..ad71508f4e02 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/operations.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/cloud/channel/v1/operations.proto\x12\x17google.cloud.channel.v1\"\xb6\x03\n\x11OperationMetadata\x12P\n\x0eoperation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.channel.v1.OperationMetadata.OperationType\"\xce\x02\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43REATE_ENTITLEMENT\x10\x01\x12\x1b\n\x17\x43HANGE_RENEWAL_SETTINGS\x10\x03\x12\x16\n\x12START_PAID_SERVICE\x10\x05\x12\x18\n\x14\x41\x43TIVATE_ENTITLEMENT\x10\x07\x12\x17\n\x13SUSPEND_ENTITLEMENT\x10\x08\x12\x16\n\x12\x43\x41NCEL_ENTITLEMENT\x10\t\x12\x19\n\x15TRANSFER_ENTITLEMENTS\x10\n\x12#\n\x1fTRANSFER_ENTITLEMENTS_TO_GOOGLE\x10\x0b\x12\x10\n\x0c\x43HANGE_OFFER\x10\x0e\x12\x15\n\x11\x43HANGE_PARAMETERS\x10\x0f\x12\x1c\n\x18PROVISION_CLOUD_IDENTITY\x10\x10\x42g\n\x1b\x63om.google.cloud.channel.v1B\x0fOperationsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.OperationMetadata").msgclass + OperationMetadata::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.OperationMetadata.OperationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb new file mode 100644 index 000000000000..b86c7982c900 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/products.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n&google/cloud/channel/v1/products.proto\x12\x17google.cloud.channel.v1\x1a\x19google/api/resource.proto\"\x95\x01\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo:<\xea\x41\x39\n#cloudchannel.googleapis.com/Product\x12\x12products/{product}\"\xcb\x01\n\x03Sku\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo\x12\x31\n\x07product\x18\x03 \x01(\x0b\x32 .google.cloud.channel.v1.Product:C\xea\x41@\n\x1f\x63loudchannel.googleapis.com/Sku\x12\x1dproducts/{product}/skus/{sku}\"p\n\rMarketingInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0c\x64\x65\x66\x61ult_logo\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Media\"Y\n\x05Media\x12\r\n\x05title\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x30\n\x04type\x18\x03 \x01(\x0e\x32\".google.cloud.channel.v1.MediaType*=\n\tMediaType\x12\x1a\n\x16MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10MEDIA_TYPE_IMAGE\x10\x01\x42\x65\n\x1b\x63om.google.cloud.channel.v1B\rProductsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Product").msgclass + Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Sku").msgclass + MarketingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.MarketingInfo").msgclass + Media = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Media").msgclass + MediaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.MediaType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb new file mode 100644 index 000000000000..869e0d5e9a90 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/reports_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/operations_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/datetime_pb' +require 'google/type/decimal_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n-google/cloud/channel/v1/reports_service.proto\x12\x17google.cloud.channel.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/channel/v1/operations.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/datetime.proto\x1a\x19google/type/decimal.proto\x1a\x17google/type/money.proto\"\xc1\x01\n\x13RunReportJobRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"cloudchannel.googleapis.com/Report\x12;\n\ndate_range\x18\x02 \x01(\x0b\x32\".google.cloud.channel.v1.DateRangeB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x02\x18\x01\"\x9b\x01\n\x14RunReportJobResponse\x12\x36\n\nreport_job\x18\x01 \x01(\x0b\x32\".google.cloud.channel.v1.ReportJob\x12G\n\x0freport_metadata\x18\x02 \x01(\x0b\x32..google.cloud.channel.v1.ReportResultsMetadata:\x02\x18\x01\"\xb0\x01\n\x19\x46\x65tchReportResultsRequest\x12\x41\n\nreport_job\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudchannel.googleapis.com/ReportJob\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0epartition_keys\x18\x04 \x03(\tB\x03\xe0\x41\x01:\x02\x18\x01\"\xae\x01\n\x1a\x46\x65tchReportResultsResponse\x12G\n\x0freport_metadata\x18\x01 \x01(\x0b\x32..google.cloud.channel.v1.ReportResultsMetadata\x12*\n\x04rows\x18\x02 \x03(\x0b\x32\x1c.google.cloud.channel.v1.Row\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t:\x02\x18\x01\"z\n\x12ListReportsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x02\x18\x01\"d\n\x13ListReportsResponse\x12\x30\n\x07reports\x18\x01 \x03(\x0b\x32\x1f.google.cloud.channel.v1.Report\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t:\x02\x18\x01\"\xb6\x01\n\tReportJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\rreport_status\x18\x02 \x01(\x0b\x32%.google.cloud.channel.v1.ReportStatus:X\x18\x01\xea\x41S\n%cloudchannel.googleapis.com/ReportJob\x12*accounts/{account}/reportJobs/{report_job}\"\xd9\x01\n\x15ReportResultsMetadata\x12/\n\x06report\x18\x01 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Report\x12\x11\n\trow_count\x18\x02 \x01(\x03\x12\x36\n\ndate_range\x18\x03 \x01(\x0b\x32\".google.cloud.channel.v1.DateRange\x12@\n\x14preceding_date_range\x18\x04 \x01(\x0b\x32\".google.cloud.channel.v1.DateRange:\x02\x18\x01\"\xdf\x01\n\x06\x43olumn\x12\x11\n\tcolumn_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12;\n\tdata_type\x18\x03 \x01(\x0e\x32(.google.cloud.channel.v1.Column.DataType\"k\n\x08\x44\x61taType\x12\x19\n\x15\x44\x41TA_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x03\x12\t\n\x05MONEY\x10\x04\x12\x08\n\x04\x44\x41TE\x10\x05\x12\r\n\tDATE_TIME\x10\x06:\x02\x18\x01\"\xd5\x01\n\tDateRange\x12\x34\n\x15usage_start_date_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTime\x12\x32\n\x13usage_end_date_time\x18\x02 \x01(\x0b\x32\x15.google.type.DateTime\x12-\n\x12invoice_start_date\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x10invoice_end_date\x18\x04 \x01(\x0b\x32\x11.google.type.Date:\x02\x18\x01\"V\n\x03Row\x12\x34\n\x06values\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.ReportValue\x12\x15\n\rpartition_key\x18\x02 \x01(\t:\x02\x18\x01\"\xfc\x01\n\x0bReportValue\x12\x16\n\x0cstring_value\x18\x01 \x01(\tH\x00\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12-\n\rdecimal_value\x18\x03 \x01(\x0b\x32\x14.google.type.DecimalH\x00\x12)\n\x0bmoney_value\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\'\n\ndate_value\x18\x05 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x30\n\x0f\x64\x61te_time_value\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeH\x00:\x02\x18\x01\x42\x07\n\x05value\"\x81\x02\n\x0cReportStatus\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.channel.v1.ReportStatus.State\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\x0b\n\x07WRITING\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x02\x18\x01\"\xc8\x01\n\x06Report\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x30\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x1f.google.cloud.channel.v1.Column\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t:N\x18\x01\xea\x41I\n\"cloudchannel.googleapis.com/Report\x12#accounts/{account}/reports/{report}2\xb2\x05\n\x1a\x43loudChannelReportsService\x12\xba\x01\n\x0cRunReportJob\x12,.google.cloud.channel.v1.RunReportJobRequest\x1a\x1d.google.longrunning.Operation\"]\x88\x02\x01\xca\x41)\n\x14RunReportJobResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02(\"#/v1/{name=accounts/*/reports/*}:run:\x01*\x12\xd5\x01\n\x12\x46\x65tchReportResults\x12\x32.google.cloud.channel.v1.FetchReportResultsRequest\x1a\x33.google.cloud.channel.v1.FetchReportResultsResponse\"V\x88\x02\x01\xda\x41\nreport_job\x82\xd3\xe4\x93\x02@\";/v1/{report_job=accounts/*/reportJobs/*}:fetchReportResults:\x01*\x12\x9d\x01\n\x0bListReports\x12+.google.cloud.channel.v1.ListReportsRequest\x1a,.google.cloud.channel.v1.ListReportsResponse\"3\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=accounts/*}/reports\x1a_\x88\x02\x01\xca\x41\x1b\x63loudchannel.googleapis.com\xd2\x41;https://www.googleapis.com/auth/apps.reports.usage.readonlyBk\n\x1b\x63om.google.cloud.channel.v1B\x13ReportsServiceProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.type.DateTime", "google/type/datetime.proto"], + ["google.type.Date", "google/type/date.proto"], + ["google.type.Decimal", "google/type/decimal.proto"], + ["google.type.Money", "google/type/money.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + RunReportJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RunReportJobRequest").msgclass + RunReportJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RunReportJobResponse").msgclass + FetchReportResultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.FetchReportResultsRequest").msgclass + FetchReportResultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.FetchReportResultsResponse").msgclass + ListReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListReportsRequest").msgclass + ListReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListReportsResponse").msgclass + ReportJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportJob").msgclass + ReportResultsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportResultsMetadata").msgclass + Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Column").msgclass + Column::DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Column.DataType").enummodule + DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DateRange").msgclass + Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Row").msgclass + ReportValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportValue").msgclass + ReportStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportStatus").msgclass + ReportStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportStatus.State").enummodule + Report = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Report").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb new file mode 100644 index 000000000000..926af73da2ac --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb @@ -0,0 +1,94 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/channel/v1/reports_service.proto for package 'google.cloud.channel.v1' +# Original file comments: +# Copyright 2025 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. +# + +require 'grpc' +require 'google/cloud/channel/v1/reports_service_pb' + +module Google + module Cloud + module Channel + module V1 + module CloudChannelReportsService + # CloudChannelReportsService lets Google Cloud resellers and + # distributors retrieve and combine a variety of data in Cloud Channel for + # multiple products (Google Cloud, Google Voice, and Google Workspace.) + # + # Deprecated: This service is being deprecated. Please use [Export Channel + # Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.channel.v1.CloudChannelReportsService' + + # Begins generation of data for a given report. The report + # identifier is a UID (for example, `613bf59q`). + # + # Possible error codes: + # + # * PERMISSION_DENIED: The user doesn't have access to this report. + # * INVALID_ARGUMENT: Required request parameters are missing + # or invalid. + # * NOT_FOUND: The report identifier was not found. + # * INTERNAL: Any non-user error related to a technical issue + # in the backend. Contact Cloud Channel support. + # * UNKNOWN: Any non-user error related to a technical issue + # in the backend. Contact Cloud Channel support. + # + # Return value: + # The ID of a long-running operation. + # + # To get the results of the operation, call the GetOperation method of + # CloudChannelOperationsService. The Operation metadata contains an + # instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + # + # To get the results of report generation, call + # [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] + # with the + # [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job]. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + rpc :RunReportJob, ::Google::Cloud::Channel::V1::RunReportJobRequest, ::Google::Longrunning::Operation + # Retrieves data generated by + # [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + rpc :FetchReportResults, ::Google::Cloud::Channel::V1::FetchReportResultsRequest, ::Google::Cloud::Channel::V1::FetchReportResultsResponse + # Lists the reports that RunReportJob can run. These reports include an ID, + # a description, and the list of columns that will be in the result. + # + # Deprecated: Please use [Export Channel Services data to + # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) + # instead. + rpc :ListReports, ::Google::Cloud::Channel::V1::ListReportsRequest, ::Google::Cloud::Channel::V1::ListReportsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb new file mode 100644 index 000000000000..cfebb4537f92 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/repricing.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/decimal_pb' + + +descriptor_data = "\n\'google/cloud/channel/v1/repricing.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x19google/type/decimal.proto\"\xc5\x02\n\x17\x43ustomerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x97\x01\xea\x41\x93\x01\n3cloudchannel.googleapis.com/CustomerRepricingConfig\x12\\accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}\"\xef\x02\n\x1d\x43hannelPartnerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xbb\x01\xea\x41\xb7\x01\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\x12zaccounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}\"\x8a\x05\n\x0fRepricingConfig\x12g\n\x17\x65ntitlement_granularity\x18\x04 \x01(\x0b\x32?.google.cloud.channel.v1.RepricingConfig.EntitlementGranularityB\x03\xe0\x41\x02H\x00\x12m\n\x1b\x63hannel_partner_granularity\x18\x05 \x01(\x0b\x32\x42.google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularityB\x02\x18\x01H\x00\x12\x37\n\x17\x65\x66\x66\x65\x63tive_invoice_month\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12\x45\n\nadjustment\x18\x02 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x03 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12K\n\x15\x63onditional_overrides\x18\x06 \x03(\x0b\x32,.google.cloud.channel.v1.ConditionalOverride\x1a[\n\x16\x45ntitlementGranularity\x12\x41\n\x0b\x65ntitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x1a\x1f\n\x19\x43hannelPartnerGranularity:\x02\x18\x01\x42\r\n\x0bgranularity\"s\n\x13RepricingAdjustment\x12N\n\x15percentage_adjustment\x18\x02 \x01(\x0b\x32-.google.cloud.channel.v1.PercentageAdjustmentH\x00\x42\x0c\n\nadjustment\"@\n\x14PercentageAdjustment\x12(\n\npercentage\x18\x02 \x01(\x0b\x32\x14.google.type.Decimal\"\xf2\x01\n\x13\x43onditionalOverride\x12\x45\n\nadjustment\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x02 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12M\n\x13repricing_condition\x18\x03 \x01(\x0b\x32+.google.cloud.channel.v1.RepricingConditionB\x03\xe0\x41\x02\"l\n\x12RepricingCondition\x12I\n\x13sku_group_condition\x18\x01 \x01(\x0b\x32*.google.cloud.channel.v1.SkuGroupConditionH\x00\x42\x0b\n\tcondition\"&\n\x11SkuGroupCondition\x12\x11\n\tsku_group\x18\x01 \x01(\t*]\n\x0eRebillingBasis\x12\x1f\n\x1bREBILLING_BASIS_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43OST_AT_LIST\x10\x01\x12\x18\n\x14\x44IRECT_CUSTOMER_COST\x10\x02\x42\x66\n\x1b\x63om.google.cloud.channel.v1B\x0eRepricingProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Date", "google/type/date.proto"], + ["google.type.Decimal", "google/type/decimal.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Channel + module V1 + CustomerRepricingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CustomerRepricingConfig").msgclass + ChannelPartnerRepricingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerRepricingConfig").msgclass + RepricingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingConfig").msgclass + RepricingConfig::EntitlementGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingConfig.EntitlementGranularity").msgclass + RepricingConfig::ChannelPartnerGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularity").msgclass + RepricingAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingAdjustment").msgclass + PercentageAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PercentageAdjustment").msgclass + ConditionalOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ConditionalOverride").msgclass + RepricingCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingCondition").msgclass + SkuGroupCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.SkuGroupCondition").msgclass + RebillingBasis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RebillingBasis").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb new file mode 100644 index 000000000000..4c458d3817ce --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/channel/v1/cloud_channel_reports_service/rest" +require "google/cloud/channel/v1/cloud_channel_service/rest" +require "google/cloud/channel/v1/version" + +module Google + module Cloud + module Channel + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/channel/v1/rest" + # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb new file mode 100644 index 000000000000..2fdc38b53a6b --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb @@ -0,0 +1,152 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/channel/v1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/channel/v1/billing_accounts_pb' +require 'google/cloud/channel/v1/channel_partner_links_pb' +require 'google/cloud/channel/v1/common_pb' +require 'google/cloud/channel/v1/customers_pb' +require 'google/cloud/channel/v1/entitlement_changes_pb' +require 'google/cloud/channel/v1/entitlements_pb' +require 'google/cloud/channel/v1/offers_pb' +require 'google/cloud/channel/v1/operations_pb' +require 'google/cloud/channel/v1/products_pb' +require 'google/cloud/channel/v1/repricing_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n%google/cloud/channel/v1/service.proto\x12\x17google.cloud.channel.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/channel/v1/billing_accounts.proto\x1a\x33google/cloud/channel/v1/channel_partner_links.proto\x1a$google/cloud/channel/v1/common.proto\x1a\'google/cloud/channel/v1/customers.proto\x1a\x31google/cloud/channel/v1/entitlement_changes.proto\x1a*google/cloud/channel/v1/entitlements.proto\x1a$google/cloud/channel/v1/offers.proto\x1a(google/cloud/channel/v1/operations.proto\x1a&google/cloud/channel/v1/products.proto\x1a\'google/cloud/channel/v1/repricing.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"t\n&CheckCloudIdentityAccountsExistRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x64omain\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13primary_admin_email\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf5\x01\n\x1c\x43loudIdentityCustomerAccount\x12\x10\n\x08\x65xisting\x18\x01 \x01(\x08\x12\r\n\x05owned\x18\x02 \x01(\x08\x12\x15\n\rcustomer_name\x18\x03 \x01(\t\x12\"\n\x1a\x63ustomer_cloud_identity_id\x18\x04 \x01(\t\x12N\n\rcustomer_type\x18\x05 \x01(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12)\n!channel_partner_cloud_identity_id\x18\x06 \x01(\t\"\x81\x01\n\'CheckCloudIdentityAccountsExistResponse\x12V\n\x17\x63loud_identity_accounts\x18\x01 \x03(\x0b\x32\x35.google.cloud.channel.v1.CloudIdentityCustomerAccount\"q\n\x14ListCustomersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x15ListCustomersResponse\x12\x34\n\tcustomers\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x12GetCustomerRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\"f\n\x15\x43reateCustomerRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32!.google.cloud.channel.v1.CustomerB\x03\xe0\x41\x02\"\x82\x01\n\x15UpdateCustomerRequest\x12\x38\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32!.google.cloud.channel.v1.CustomerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x15\x44\x65leteCustomerRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\"\xba\x02\n\x15ImportCustomerRequest\x12\x15\n\x06\x64omain\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x12 \n\x11\x63loud_identity_id\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x00\x12\"\n\x13primary_admin_email\x18\x08 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nauth_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13overwrite_if_exists\x18\x05 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1f\n\x12\x63hannel_partner_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12>\n\x08\x63ustomer\x18\x07 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudchannel.googleapis.com/CustomerB\x13\n\x11\x63ustomer_identity\"\xf1\x01\n\x1dProvisionCloudIdentityRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12G\n\x13\x63loud_identity_info\x18\x02 \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfo\x12\x30\n\x04user\x18\x03 \x01(\x0b\x32\".google.cloud.channel.v1.AdminUser\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x88\x01\n\x17ListEntitlementsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n\x18ListEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe0\x01\n\x1bListTransferableSkusRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x07 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x17\n\nauth_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rlanguage_code\x18\x06 \x01(\tB\x1f\n\x1dtransferred_customer_identity\"|\n\x1cListTransferableSkusResponse\x12\x43\n\x11transferable_skus\x18\x01 \x03(\x0b\x32(.google.cloud.channel.v1.TransferableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xfe\x01\n\x1dListTransferableOffersRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x05 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x03sku\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\x42\x1f\n\x1dtransferred_customer_identity\"\x82\x01\n\x1eListTransferableOffersResponse\x12G\n\x13transferable_offers\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.TransferableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x11TransferableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x1f\n\x12price_reference_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"V\n\x15GetEntitlementRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"\xaa\x01\n\x1eListChannelPartnerLinksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04view\x18\x04 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1fListChannelPartnerLinksResponse\x12J\n\x15\x63hannel_partner_links\x18\x01 \x03(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"u\n\x1cGetChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1f\x43reateChannelPartnerLinkRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\"\xba\x01\n\x1fUpdateChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"n\n!GetCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"\xa9\x01\n#ListCustomerRepricingConfigsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n$ListCustomerRepricingConfigsResponse\x12T\n\x1a\x63ustomer_repricing_configs\x18\x01 \x03(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbe\x01\n$CreateCustomerRepricingConfigRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12X\n\x19\x63ustomer_repricing_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"\x80\x01\n$UpdateCustomerRepricingConfigRequest\x12X\n\x19\x63ustomer_repricing_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"q\n$DeleteCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"z\n\'GetChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\xb9\x01\n)ListChannelPartnerRepricingConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n*ListChannelPartnerRepricingConfigsResponse\x12\x61\n!channel_partner_repricing_configs\x18\x01 \x03(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdb\x01\n*CreateChannelPartnerRepricingConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x65\n channel_partner_repricing_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"\x93\x01\n*UpdateChannelPartnerRepricingConfigRequest\x12\x65\n channel_partner_repricing_config\x18\x01 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"}\n*DeleteChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\\\n\x14ListSkuGroupsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x1fListSkuGroupBillableSkusRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x15ListSkuGroupsResponse\x12\x35\n\nsku_groups\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n ListSkuGroupBillableSkusResponse\x12;\n\rbillable_skus\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.BillableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x08SkuGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t:S\xea\x41P\n$cloudchannel.googleapis.com/SkuGroup\x12(accounts/{account}/skuGroups/{sku_group}\"c\n\x0b\x42illableSku\x12\x0b\n\x03sku\x18\x01 \x01(\t\x12\x18\n\x10sku_display_name\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x1c\n\x14service_display_name\x18\x04 \x01(\t\"\xb1\x01\n\x18\x43reateEntitlementRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12>\n\x0b\x65ntitlement\x18\x02 \x01(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1bTransferEntitlementsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x12\n\nauth_token\x18\x04 \x01(\t\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1cTransferEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\"\x94\x01\n#TransferEntitlementsToGoogleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x17\x43hangeParametersRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\nparameters\x18\x02 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1c\x43hangeRenewalSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x02\n\x12\x43hangeOfferRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05offer\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12;\n\nparameters\x18\x03 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12price_reference_id\x18\x08 \x01(\tB\x03\xe0\x41\x01\"E\n\x17StartPaidServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x18\x43\x61ncelEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"G\n\x19SuspendEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"H\n\x1a\x41\x63tivateEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x12LookupOfferRequest\x12\x44\n\x0b\x65ntitlement\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"x\n\x13ListProductsRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x14ListProductsResponse\x12\x32\n\x08products\x18\x01 \x03(\x0b\x32 .google.cloud.channel.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudchannel.googleapis.com/Product\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x10ListSkusResponse\x12*\n\x04skus\x18\x01 \x03(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xab\x01\n\x11ListOffersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12show_future_offers\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"]\n\x12ListOffersResponse\x12.\n\x06offers\x18\x01 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x05\n\x1aListPurchasableSkusRequest\x12t\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32M.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseH\x00\x12h\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32G.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x19\x43reateEntitlementPurchase\x12\x14\n\x07product\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe4\x01\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n\x0b\x63hange_type\x18\x02 \x01(\x0e\x32R.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeTypeB\x03\xe0\x41\x02\"E\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UPGRADE\x10\x01\x12\r\n\tDOWNGRADE\x10\x02\x42\x11\n\x0fpurchase_option\"y\n\x1bListPurchasableSkusResponse\x12\x41\n\x10purchasable_skus\x18\x01 \x03(\x0b\x32\'.google.cloud.channel.v1.PurchasableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\";\n\x0ePurchasableSku\x12)\n\x03sku\x18\x01 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\"\xd4\x04\n\x1cListPurchasableOffersRequest\x12v\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32O.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchaseH\x00\x12j\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32I.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1aK\n\x19\x43reateEntitlementPurchase\x12\x10\n\x03sku\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x62illing_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x63\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07new_sku\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0fpurchase_option\"\x7f\n\x1dListPurchasableOffersResponse\x12\x45\n\x12purchasable_offers\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.PurchasableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x10PurchasableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x1f\n\x12price_reference_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"x\n#QueryEligibleBillingAccountsRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x11\n\x04skus\x18\x02 \x03(\tB\x03\xe0\x41\x02\"n\n$QueryEligibleBillingAccountsResponse\x12\x46\n\x13sku_purchase_groups\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.SkuPurchaseGroup\"}\n\x10SkuPurchaseGroup\x12\x0c\n\x04skus\x18\x01 \x03(\t\x12[\n\x1e\x62illing_account_purchase_infos\x18\x02 \x03(\x0b\x32\x33.google.cloud.channel.v1.BillingAccountPurchaseInfo\"^\n\x1a\x42illingAccountPurchaseInfo\x12@\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.channel.v1.BillingAccount\"\xa4\x01\n\x19RegisterSubscriberRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nintegrator\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"+\n\x1aRegisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"\xa6\x01\n\x1bUnregisterSubscriberRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nintegrator\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"-\n\x1cUnregisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"\xb4\x01\n\x16ListSubscribersRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\nintegrator\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"[\n\x17ListSubscribersResponse\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x18\n\x10service_accounts\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xa6\x01\n\x1dListEntitlementChangesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1eListEntitlementChangesResponse\x12G\n\x13\x65ntitlement_changes\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.EntitlementChange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe9S\n\x13\x43loudChannelService\x12\xd4\x01\n\rListCustomers\x12-.google.cloud.channel.v1.ListCustomersRequest\x1a..google.cloud.channel.v1.ListCustomersResponse\"d\x82\xd3\xe4\x93\x02^\x12!/v1/{parent=accounts/*}/customersZ9\x12\x37/v1/{parent=accounts/*/channelPartnerLinks/*}/customers\x12\xca\x01\n\x0bGetCustomer\x12+.google.cloud.channel.v1.GetCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12!/v1/{name=accounts/*/customers/*}Z9\x12\x37/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xe8\x01\n\x1f\x43heckCloudIdentityAccountsExist\x12?.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest\x1a@.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist:\x01*\x12\xdd\x01\n\x0e\x43reateCustomer\x12..google.cloud.channel.v1.CreateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"!/v1/{parent=accounts/*}/customers:\x08\x63ustomerZC\"7/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:\x08\x63ustomer\x12\xf1\x01\n\x0eUpdateCustomer\x12..google.cloud.channel.v1.UpdateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01\x32*/v1/{customer.name=accounts/*/customers/*}:\x08\x63ustomerZL2@/v1/{customer.name=accounts/*/channelPartnerLinks/*/customers/*}:\x08\x63ustomer\x12\xc5\x01\n\x0e\x44\x65leteCustomer\x12..google.cloud.channel.v1.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^*!/v1/{name=accounts/*/customers/*}Z9*7/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xdd\x01\n\x0eImportCustomer\x12..google.cloud.channel.v1.ImportCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"(/v1/{parent=accounts/*}/customers:import:\x01*ZC\">/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:import:\x01*\x12\xd8\x01\n\x16ProvisionCloudIdentity\x12\x36.google.cloud.channel.v1.ProvisionCloudIdentityRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1d\n\x08\x43ustomer\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x41\"\"9/v1/{name=accounts/*/customers/*/entitlements/*}:activate:\x01*\x12\xe4\x01\n\x14TransferEntitlements\x12\x34.google.cloud.channel.v1.TransferEntitlementsRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\x31\n\x1cTransferEntitlementsResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{parent=accounts/*/customers/*}:transferEntitlements:\x01*\x12\xf5\x01\n\x1cTransferEntitlementsToGoogle\x12<.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle:\x01*\x12\xc1\x01\n\x17ListChannelPartnerLinks\x12\x37.google.cloud.channel.v1.ListChannelPartnerLinksRequest\x1a\x38.google.cloud.channel.v1.ListChannelPartnerLinksResponse\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=accounts/*}/channelPartnerLinks\x12\xb0\x01\n\x15GetChannelPartnerLink\x12\x35.google.cloud.channel.v1.GetChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{name=accounts/*/channelPartnerLinks/*}\x12\xcc\x01\n\x18\x43reateChannelPartnerLink\x12\x38.google.cloud.channel.v1.CreateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"I\x82\xd3\xe4\x93\x02\x43\"+/v1/{parent=accounts/*}/channelPartnerLinks:\x14\x63hannel_partner_link\x12\xb9\x01\n\x18UpdateChannelPartnerLink\x12\x38.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"6\x82\xd3\xe4\x93\x02\x30\x32+/v1/{name=accounts/*/channelPartnerLinks/*}:\x01*\x12\xd7\x01\n\x1aGetCustomerRepricingConfig\x12:.google.cloud.channel.v1.GetCustomerRepricingConfigRequest\x1a\x30.google.cloud.channel.v1.CustomerRepricingConfig\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\x12\x12*] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb new file mode 100644 index 000000000000..80c83c230b7e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Represents a billing account. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the billing account. + # Format: accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the billing account. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when this billing account was created. + # @!attribute [r] currency_code + # @return [::String] + # Output only. The 3-letter currency code defined in ISO 4217. + # @!attribute [r] region_code + # @return [::String] + # Output only. The CLDR region code. + class BillingAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb new file mode 100644 index 000000000000..4d607895e4f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Entity representing a link between distributors and their indirect + # resellers in an n-tier resale channel. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name for the channel partner link, in the format + # accounts/\\{account_id}/channelPartnerLinks/\\{id}. + # @!attribute [rw] reseller_cloud_identity_id + # @return [::String] + # Required. Cloud Identity ID of the linked reseller. + # @!attribute [rw] link_state + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLinkState] + # Required. State of the channel partner link. + # @!attribute [r] invite_link_uri + # @return [::String] + # Output only. URI of the web page where partner accepts the link invitation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of when the channel partner link is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of when the channel partner link is updated. + # @!attribute [r] public_id + # @return [::String] + # Output only. Public identifier that a customer must use to generate a + # transfer token to move to this distributor-reseller combination. + # @!attribute [r] channel_partner_cloud_identity_info + # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo] + # Output only. Cloud Identity info of the channel partner (IR). + class ChannelPartnerLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The level of granularity the + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} will + # display. + module ChannelPartnerLinkView + # The default / unset value. + # The API will default to the BASIC view. + UNSPECIFIED = 0 + + # Includes all fields except the + # {::Google::Cloud::Channel::V1::ChannelPartnerLink#channel_partner_cloud_identity_info ChannelPartnerLink.channel_partner_cloud_identity_info}. + BASIC = 1 + + # Includes all fields. + FULL = 2 + end + + # ChannelPartnerLinkState represents state of a channel partner link. + module ChannelPartnerLinkState + # Not used. + CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0 + + # An invitation has been sent to the reseller to create a channel partner + # link. + INVITED = 1 + + # Status when the reseller is active. + ACTIVE = 2 + + # Status when the reseller has been revoked by the distributor. + REVOKED = 3 + + # Status when the reseller is suspended by Google or distributor. + SUSPENDED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb new file mode 100644 index 000000000000..7a71e4ceec10 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb @@ -0,0 +1,172 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Required Edu Attributes + # @!attribute [rw] institute_type + # @return [::Google::Cloud::Channel::V1::EduData::InstituteType] + # Designated institute type of customer. + # @!attribute [rw] institute_size + # @return [::Google::Cloud::Channel::V1::EduData::InstituteSize] + # Size of the institute. + # @!attribute [rw] website + # @return [::String] + # Web address for the edu customer's institution. + class EduData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to specify the institute type. + module InstituteType + # Not used. + INSTITUTE_TYPE_UNSPECIFIED = 0 + + # Elementary/Secondary Schools & Districts + K12 = 1 + + # Higher Education Universities & Colleges + UNIVERSITY = 2 + end + + # Number of students and staff the institute has. + module InstituteSize + # Not used. + INSTITUTE_SIZE_UNSPECIFIED = 0 + + # 1 - 100 + SIZE_1_100 = 1 + + # 101 - 500 + SIZE_101_500 = 2 + + # 501 - 1,000 + SIZE_501_1000 = 3 + + # 1,001 - 2,000 + SIZE_1001_2000 = 4 + + # 2,001 - 5,000 + SIZE_2001_5000 = 5 + + # 5,001 - 10,000 + SIZE_5001_10000 = 6 + + # 10,001 + + SIZE_10001_OR_MORE = 7 + end + end + + # Cloud Identity information for the Cloud Channel Customer. + # @!attribute [rw] customer_type + # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo::CustomerType] + # CustomerType indicates verification type needed for using services. + # @!attribute [r] primary_domain + # @return [::String] + # Output only. The primary domain name. + # @!attribute [r] is_domain_verified + # @return [::Boolean] + # Output only. Whether the domain is verified. + # This field is not returned for a Customer's cloud_identity_info resource. + # Partners can use the domains.get() method of the Workspace SDK's + # Directory API, or listen to the PRIMARY_DOMAIN_VERIFIED Pub/Sub event in + # to track domain verification of their resolve Workspace customers. + # @!attribute [rw] alternate_email + # @return [::String] + # The alternate email. + # @!attribute [rw] phone_number + # @return [::String] + # Phone number associated with the Cloud Identity. + # @!attribute [rw] language_code + # @return [::String] + # Language code. + # @!attribute [r] admin_console_uri + # @return [::String] + # Output only. URI of Customer's Admin console dashboard. + # @!attribute [rw] edu_data + # @return [::Google::Cloud::Channel::V1::EduData] + # Edu information about the customer. + class CloudIdentityInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # CustomerType of the customer + module CustomerType + # Not used. + CUSTOMER_TYPE_UNSPECIFIED = 0 + + # Domain-owning customer which needs domain verification to use services. + DOMAIN = 1 + + # Team customer which needs email verification to use services. + TEAM = 2 + end + end + + # Data type and value of a parameter. + # @!attribute [rw] int64_value + # @return [::Integer] + # Represents an int64 value. + # + # Note: The following fields are mutually exclusive: `int64_value`, `string_value`, `double_value`, `proto_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `int64_value`, `double_value`, `proto_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `double_value`, `int64_value`, `string_value`, `proto_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_value + # @return [::Google::Protobuf::Any] + # Represents an 'Any' proto value. + # + # Note: The following fields are mutually exclusive: `proto_value`, `int64_value`, `string_value`, `double_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `string_value`, `double_value`, `proto_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information needed to create an Admin User for Google Workspace. + # @!attribute [rw] email + # @return [::String] + # Primary email of the admin user. + # @!attribute [rw] given_name + # @return [::String] + # Given name of the admin user. + # @!attribute [rw] family_name + # @return [::String] + # Family name of the admin user. + class AdminUser + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb new file mode 100644 index 000000000000..3597cacdb3d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Entity representing a customer of a reseller or distributor. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the customer. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] org_display_name + # @return [::String] + # Required. Name of the organization that the customer entity represents. + # @!attribute [rw] org_postal_address + # @return [::Google::Type::PostalAddress] + # Required. The organization address for the customer. To enforce US laws and + # embargoes, we require a region, postal code, and address lines. You must + # provide valid addresses for every customer. To set the customer's + # language, use the Customer-level language code. + # @!attribute [rw] primary_contact_info + # @return [::Google::Cloud::Channel::V1::ContactInfo] + # Primary contact info. + # @!attribute [rw] alternate_email + # @return [::String] + # Secondary contact email. You need to provide an alternate email to create + # different domains if a primary contact email already exists. Users will + # receive a notification with credentials when you create an admin.google.com + # account. Secondary emails are also recovery email addresses. Alternate + # emails are optional when you create Team customers. + # @!attribute [rw] domain + # @return [::String] + # Required. The customer's primary domain. Must match the primary contact + # email's domain. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the customer was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the customer was updated. + # @!attribute [r] cloud_identity_id + # @return [::String] + # Output only. The customer's Cloud Identity ID if the customer has a Cloud + # Identity resource. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # @!attribute [r] cloud_identity_info + # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo] + # Output only. Cloud Identity information for the customer. + # Populated only if a Cloud Identity account exists for this customer. + # @!attribute [rw] channel_partner_id + # @return [::String] + # Cloud Identity ID of the customer's channel partner. + # Populated only if a channel partner exists for this customer. + # @!attribute [rw] correlation_id + # @return [::String] + # Optional. External CRM ID for the customer. + # Populated only if a CRM ID exists for this customer. + # @!attribute [rw] customer_attestation_state + # @return [::Google::Cloud::Channel::V1::Customer::CustomerAttestationState] + # Optional. Indicate if a customer is attesting about the correctness of + # provided information. Only required if creating a GCP Entitlement. + class Customer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enum represents if a customer belongs to public sector + module CustomerAttestationState + # Default value if not set yet + CUSTOMER_ATTESTATION_STATE_UNSPECIFIED = 0 + + # Customer is exempt from attesting based on exemption list at + # https://cloud.google.com/terms/direct-tos-exemptions. Contact information + # of customer will be mandatory. + EXEMPT = 1 + + # Customer is not exempt and has verified the information provided is + # correct. Contact information of customer will be mandatory. + NON_EXEMPT_AND_INFO_VERIFIED = 2 + end + end + + # Contact information for a customer account. + # @!attribute [rw] first_name + # @return [::String] + # The customer account contact's first name. Optional for Team customers. + # @!attribute [rw] last_name + # @return [::String] + # The customer account contact's last name. Optional for Team customers. + # @!attribute [r] display_name + # @return [::String] + # Output only. The customer account contact's display name, formatted as a + # combination of the customer's first and last name. + # @!attribute [rw] email + # @return [::String] + # The customer account's contact email. Required for entitlements that create + # admin.google.com accounts, and serves as the customer's username for those + # accounts. Use this email to invite Team customers. + # @!attribute [rw] title + # @return [::String] + # Optional. The customer account contact's job title. + # @!attribute [rw] phone + # @return [::String] + # The customer account's contact phone number. + class ContactInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb new file mode 100644 index 000000000000..ac50baa50950 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb @@ -0,0 +1,190 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Change event entry for Entitlement order history + # @!attribute [rw] suspension_reason + # @return [::Google::Cloud::Channel::V1::Entitlement::SuspensionReason] + # Suspension reason for the Entitlement. + # + # Note: The following fields are mutually exclusive: `suspension_reason`, `cancellation_reason`, `activation_reason`, `other_change_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cancellation_reason + # @return [::Google::Cloud::Channel::V1::EntitlementChange::CancellationReason] + # Cancellation reason for the Entitlement. + # + # Note: The following fields are mutually exclusive: `cancellation_reason`, `suspension_reason`, `activation_reason`, `other_change_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] activation_reason + # @return [::Google::Cloud::Channel::V1::EntitlementChange::ActivationReason] + # The Entitlement's activation reason + # + # Note: The following fields are mutually exclusive: `activation_reason`, `suspension_reason`, `cancellation_reason`, `other_change_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] other_change_reason + # @return [::String] + # e.g. purchase_number change reason, entered by CRS. + # + # Note: The following fields are mutually exclusive: `other_change_reason`, `suspension_reason`, `cancellation_reason`, `activation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entitlement + # @return [::String] + # Required. Resource name of an entitlement in the form: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] offer + # @return [::String] + # Required. Resource name of the Offer at the time of change. + # Takes the form: accounts/\\{account_id}/offers/\\{offer_id}. + # @!attribute [rw] provisioned_service + # @return [::Google::Cloud::Channel::V1::ProvisionedService] + # Service provisioned for an Entitlement. + # @!attribute [rw] change_type + # @return [::Google::Cloud::Channel::V1::EntitlementChange::ChangeType] + # The change action type. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The submitted time of the change. + # @!attribute [rw] operator_type + # @return [::Google::Cloud::Channel::V1::EntitlementChange::OperatorType] + # Operator type responsible for the change. + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] + # Extended parameters, such as: + # purchase_order_number, gcp_details; + # internal_correlation_id, long_running_operation_id, order_id; + # etc. + # @!attribute [rw] operator + # @return [::String] + # Human-readable identifier that shows what operator made a change. + # When the operator_type is RESELLER, this is the user's email address. + # For all other operator types, this is empty. + class EntitlementChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the type of change action + module ChangeType + # Not used. + CHANGE_TYPE_UNSPECIFIED = 0 + + # New Entitlement was created. + CREATED = 1 + + # Price plan associated with an Entitlement was changed. + PRICE_PLAN_SWITCHED = 3 + + # Number of seats committed for a commitment Entitlement was changed. + COMMITMENT_CHANGED = 4 + + # An annual Entitlement was renewed. + RENEWED = 5 + + # Entitlement was suspended. + SUSPENDED = 6 + + # Entitlement was activated. + ACTIVATED = 7 + + # Entitlement was cancelled. + CANCELLED = 8 + + # Entitlement was upgraded or downgraded for ex. from Google Workspace + # Business Standard to Google Workspace Business Plus. + SKU_CHANGED = 9 + + # The settings for renewal of an Entitlement have changed. + RENEWAL_SETTING_CHANGED = 10 + + # Use for Google Workspace subscription. + # Either a trial was converted to a paid subscription or a new subscription + # with no trial is created. + PAID_SUBSCRIPTION_STARTED = 11 + + # License cap was changed for the entitlement. + LICENSE_CAP_CHANGED = 12 + + # The suspension details have changed (but it is still suspended). + SUSPENSION_DETAILS_CHANGED = 13 + + # The trial end date was extended. + TRIAL_END_DATE_EXTENDED = 14 + + # Entitlement started trial. + TRIAL_STARTED = 15 + end + + # Specifies the type of operator responsible for the change + module OperatorType + # Not used. + OPERATOR_TYPE_UNSPECIFIED = 0 + + # Customer service representative. + CUSTOMER_SERVICE_REPRESENTATIVE = 1 + + # System auto job. + SYSTEM = 2 + + # Customer user. + CUSTOMER = 3 + + # Reseller user. + RESELLER = 4 + end + + # Cancellation reason for the entitlement + module CancellationReason + # Not used. + CANCELLATION_REASON_UNSPECIFIED = 0 + + # Reseller triggered a cancellation of the service. + SERVICE_TERMINATED = 1 + + # Relationship between the reseller and customer has ended due to a + # transfer. + RELATIONSHIP_ENDED = 2 + + # Entitlement transferred away from reseller while still keeping other + # entitlement(s) with the reseller. + PARTIAL_TRANSFER = 3 + end + + # The Entitlement's activation reason + module ActivationReason + # Not used. + ACTIVATION_REASON_UNSPECIFIED = 0 + + # Reseller reactivated a suspended Entitlement. + RESELLER_REVOKED_SUSPENSION = 1 + + # Customer accepted pending terms of service. + CUSTOMER_ACCEPTED_PENDING_TOS = 2 + + # Reseller updated the renewal settings on an entitlement that was + # suspended due to cancellation, and this update reactivated the + # entitlement. + RENEWAL_SETTINGS_CHANGED = 3 + + # Other reasons (Activated temporarily for cancellation, added a payment + # plan to a trial entitlement, etc.) + OTHER_ACTIVATION_REASON = 100 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb new file mode 100644 index 000000000000..50727ce7f3b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # An entitlement is a representation of a customer's ability to use a service. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of an entitlement in the form: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id}. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the entitlement is created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the entitlement is updated. + # @!attribute [rw] offer + # @return [::String] + # Required. The offer resource name for which the entitlement is to be + # created. Takes the form: accounts/\\{account_id}/offers/\\{offer_id}. + # @!attribute [rw] commitment_settings + # @return [::Google::Cloud::Channel::V1::CommitmentSettings] + # Commitment settings for a commitment-based Offer. + # Required for commitment based offers. + # @!attribute [r] provisioning_state + # @return [::Google::Cloud::Channel::V1::Entitlement::ProvisioningState] + # Output only. Current provisioning state of the entitlement. + # @!attribute [r] provisioned_service + # @return [::Google::Cloud::Channel::V1::ProvisionedService] + # Output only. Service provisioning details for the entitlement. + # @!attribute [r] suspension_reasons + # @return [::Array<::Google::Cloud::Channel::V1::Entitlement::SuspensionReason>] + # Output only. Enumerable of all current suspension reasons for an + # entitlement. + # @!attribute [rw] purchase_order_id + # @return [::String] + # Optional. This purchase order (PO) information is for resellers to use for + # their 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. This is only supported for Google + # Workspace entitlements. + # @!attribute [r] trial_settings + # @return [::Google::Cloud::Channel::V1::TrialSettings] + # Output only. Settings for trial offers. + # @!attribute [rw] association_info + # @return [::Google::Cloud::Channel::V1::AssociationInfo] + # Association information to other entitlements. + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] + # Extended entitlement parameters. When creating an entitlement, valid + # parameter names and values are defined in the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions}. + # + # For Google Workspace, the following Parameters may be accepted as input: + # + # - max_units: The maximum assignable units for a flexible offer + # + # OR + # + # - num_units: The total commitment for commitment-based offers + # + # The response may additionally include the following output-only Parameters: + # + # - assigned_units: The number of licenses assigned to users. + # + # For Google Cloud billing subaccounts, the following Parameter may be + # accepted as input: + # + # - display_name: The display name of the billing subaccount. + # @!attribute [rw] billing_account + # @return [::String] + # Optional. The billing account resource name that is used to pay for this + # entitlement. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. + class Entitlement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Indicates the current provisioning state of the entitlement. + module ProvisioningState + # Not used. + PROVISIONING_STATE_UNSPECIFIED = 0 + + # The entitlement is currently active. + ACTIVE = 1 + + # The entitlement is currently suspended. + SUSPENDED = 5 + end + + # Suspension reason for an entitlement if + # {::Google::Cloud::Channel::V1::Entitlement#provisioning_state provisioning_state} + # = SUSPENDED. + module SuspensionReason + # Not used. + SUSPENSION_REASON_UNSPECIFIED = 0 + + # Entitlement was manually suspended by the Reseller. + RESELLER_INITIATED = 1 + + # Trial ended. + TRIAL_ENDED = 2 + + # Entitlement renewal was canceled. + RENEWAL_WITH_TYPE_CANCEL = 3 + + # Entitlement was automatically suspended on creation for pending ToS + # acceptance on customer. + PENDING_TOS_ACCEPTANCE = 4 + + # Other reasons (internal reasons, abuse, etc.). + OTHER = 100 + end + end + + # Definition for extended entitlement parameters. + # @!attribute [rw] name + # @return [::String] + # Name of the parameter. + # @!attribute [rw] value + # @return [::Google::Cloud::Channel::V1::Value] + # Value of the parameter. + # @!attribute [r] editable + # @return [::Boolean] + # Output only. Specifies whether this parameter is allowed to be changed. For + # example, for a Google Workspace Business Starter entitlement in commitment + # plan, num_units is editable when entitlement is active. + class Parameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Association links that an entitlement has to other entitlements. + # @!attribute [rw] base_entitlement + # @return [::String] + # The name of the base entitlement, for which this entitlement is an add-on. + class AssociationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Service provisioned for an entitlement. + # @!attribute [r] provisioning_id + # @return [::String] + # Output only. Provisioning ID of the entitlement. For Google Workspace, this + # is the underlying Subscription ID. For Google Cloud, this is the Billing + # Account ID of the billing subaccount. + # @!attribute [r] product_id + # @return [::String] + # Output only. The product pertaining to the provisioning resource as + # specified in the Offer. + # @!attribute [r] sku_id + # @return [::String] + # Output only. The SKU pertaining to the provisioning resource as specified + # in the Offer. + class ProvisionedService + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Commitment settings for commitment-based offers. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Commitment start timestamp. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Commitment end timestamp. + # @!attribute [rw] renewal_settings + # @return [::Google::Cloud::Channel::V1::RenewalSettings] + # Optional. Renewal settings applicable for a commitment-based Offer. + class CommitmentSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Renewal settings for renewable Offers. + # @!attribute [rw] enable_renewal + # @return [::Boolean] + # If false, the plan will be completed at the end date. + # @!attribute [rw] resize_unit_count + # @return [::Boolean] + # If true and enable_renewal = true, the unit (for example seats or licenses) + # will be set to the number of active units at renewal time. + # @!attribute [rw] payment_plan + # @return [::Google::Cloud::Channel::V1::PaymentPlan] + # Describes how a reseller will be billed. + # @!attribute [rw] payment_cycle + # @return [::Google::Cloud::Channel::V1::Period] + # Describes how frequently the reseller will be billed, such as + # once per month. + class RenewalSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for trial offers. + # @!attribute [rw] trial + # @return [::Boolean] + # Determines if the entitlement is in a trial or not: + # + # * `true` - The entitlement is in trial. + # * `false` - The entitlement is not in trial. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Date when the trial ends. The value is in milliseconds + # using the UNIX Epoch format. See an example [Epoch + # converter](https://www.epochconverter.com). + class TrialSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TransferableSku represents information a reseller needs to view existing + # provisioned services for a customer that they do not own. + # Read-only. + # @!attribute [rw] transfer_eligibility + # @return [::Google::Cloud::Channel::V1::TransferEligibility] + # Describes the transfer eligibility of a SKU. + # @!attribute [rw] sku + # @return [::Google::Cloud::Channel::V1::Sku] + # The SKU pertaining to the provisioning resource as specified in the Offer. + # @!attribute [rw] legacy_sku + # @return [::Google::Cloud::Channel::V1::Sku] + # Optional. The customer to transfer has an entitlement with the populated + # legacy SKU. + class TransferableSku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies transfer eligibility of a SKU. + # @!attribute [rw] is_eligible + # @return [::Boolean] + # Whether reseller is eligible to transfer the SKU. + # @!attribute [rw] description + # @return [::String] + # Localized description if reseller is not eligible to transfer the SKU. + # @!attribute [rw] ineligibility_reason + # @return [::Google::Cloud::Channel::V1::TransferEligibility::Reason] + # Specified the reason for ineligibility. + class TransferEligibility + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reason of ineligibility. + module Reason + # Not used. + REASON_UNSPECIFIED = 0 + + # Reseller needs to accept TOS before transferring the SKU. + PENDING_TOS_ACCEPTANCE = 1 + + # Reseller not eligible to sell the SKU. + SKU_NOT_ELIGIBLE = 2 + + # SKU subscription is suspended + SKU_SUSPENDED = 3 + + # The reseller is not authorized to transact on this Product. See + # https://support.google.com/channelservices/answer/9759265 + CHANNEL_PARTNER_NOT_AUTHORIZED_FOR_SKU = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb new file mode 100644 index 000000000000..b69d45c143b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Represents an offer made to resellers for purchase. + # An offer is associated with a {::Google::Cloud::Channel::V1::Sku Sku}, has a plan + # for payment, a price, and defines the constraints for buying. + # @!attribute [rw] name + # @return [::String] + # Resource Name of the Offer. + # Format: accounts/\\{account_id}/offers/\\{offer_id} + # @!attribute [rw] marketing_info + # @return [::Google::Cloud::Channel::V1::MarketingInfo] + # Marketing information for the Offer. + # @!attribute [rw] sku + # @return [::Google::Cloud::Channel::V1::Sku] + # SKU the offer is associated with. + # @!attribute [rw] plan + # @return [::Google::Cloud::Channel::V1::Plan] + # Describes the payment plan for the Offer. + # @!attribute [rw] constraints + # @return [::Google::Cloud::Channel::V1::Constraints] + # Constraints on transacting the Offer. + # @!attribute [rw] price_by_resources + # @return [::Array<::Google::Cloud::Channel::V1::PriceByResource>] + # Price for each monetizable resource type. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start of the Offer validity time. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. End of the Offer validity time. + # @!attribute [rw] parameter_definitions + # @return [::Array<::Google::Cloud::Channel::V1::ParameterDefinition>] + # Parameters required to use current Offer to purchase. + # @!attribute [rw] deal_code + # @return [::String] + # The deal code of the offer to get a special promotion or discount. + class Offer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameter's definition. Specifies what parameter is required to use the + # current Offer to purchase. + # @!attribute [rw] name + # @return [::String] + # Name of the parameter. + # @!attribute [rw] parameter_type + # @return [::Google::Cloud::Channel::V1::ParameterDefinition::ParameterType] + # Data type of the parameter. Minimal value, Maximum value and allowed values + # will use specified data type here. + # @!attribute [rw] min_value + # @return [::Google::Cloud::Channel::V1::Value] + # Minimal value of the parameter, if applicable. Inclusive. For example, + # minimal commitment when purchasing Anthos is 0.01. + # Applicable to INT64 and DOUBLE parameter types. + # @!attribute [rw] max_value + # @return [::Google::Cloud::Channel::V1::Value] + # Maximum value of the parameter, if applicable. Inclusive. For example, + # maximum seats when purchasing Google Workspace Business Standard. + # Applicable to INT64 and DOUBLE parameter types. + # @!attribute [rw] allowed_values + # @return [::Array<::Google::Cloud::Channel::V1::Value>] + # If not empty, parameter values must be drawn from this list. + # For example, [us-west1, us-west2, ...] + # Applicable to STRING parameter type. + # @!attribute [rw] optional + # @return [::Boolean] + # If set to true, parameter is optional to purchase this Offer. + class ParameterDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Data type of the parameter. + module ParameterType + # Not used. + PARAMETER_TYPE_UNSPECIFIED = 0 + + # Int64 type. + INT64 = 1 + + # String type. + STRING = 2 + + # Double type. + DOUBLE = 3 + + # Boolean type. + BOOLEAN = 4 + end + end + + # Represents the constraints for buying the Offer. + # @!attribute [rw] customer_constraints + # @return [::Google::Cloud::Channel::V1::CustomerConstraints] + # Represents constraints required to purchase the Offer for a customer. + class Constraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents constraints required to purchase the Offer for a customer. + # @!attribute [rw] allowed_regions + # @return [::Array<::String>] + # Allowed geographical regions of the customer. + # @!attribute [rw] allowed_customer_types + # @return [::Array<::Google::Cloud::Channel::V1::CloudIdentityInfo::CustomerType>] + # Allowed Customer Type. + # @!attribute [rw] promotional_order_types + # @return [::Array<::Google::Cloud::Channel::V1::PromotionalOrderType>] + # Allowed Promotional Order Type. Present for Promotional offers. + class CustomerConstraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The payment plan for the Offer. Describes how to make a payment. + # @!attribute [rw] payment_plan + # @return [::Google::Cloud::Channel::V1::PaymentPlan] + # Describes how a reseller will be billed. + # @!attribute [rw] payment_type + # @return [::Google::Cloud::Channel::V1::PaymentType] + # Specifies when the payment needs to happen. + # @!attribute [rw] payment_cycle + # @return [::Google::Cloud::Channel::V1::Period] + # Describes how frequently the reseller will be billed, such as + # once per month. + # @!attribute [rw] trial_period + # @return [::Google::Cloud::Channel::V1::Period] + # Present for Offers with a trial period. + # For trial-only Offers, a paid service needs to start before the trial + # period ends for continued service. + # For Regular Offers with a trial period, the regular pricing goes into + # effect when trial period ends, or if paid service is started before the end + # of the trial period. + # @!attribute [rw] billing_account + # @return [::String] + # Reseller Billing account to charge after an offer transaction. + # Only present for Google Cloud offers. + class Plan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents price by resource type. + # @!attribute [rw] resource_type + # @return [::Google::Cloud::Channel::V1::ResourceType] + # Resource Type. Example: SEAT + # @!attribute [rw] price + # @return [::Google::Cloud::Channel::V1::Price] + # Price of the Offer. Present if there are no price phases. + # @!attribute [rw] price_phases + # @return [::Array<::Google::Cloud::Channel::V1::PricePhase>] + # Specifies the price by time range. + class PriceByResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the price of the Offer. + # @!attribute [rw] base_price + # @return [::Google::Type::Money] + # Base price. + # @!attribute [rw] discount + # @return [::Float] + # Discount percentage, represented as decimal. + # For example, a 20% discount will be represent as 0.2. + # @!attribute [rw] effective_price + # @return [::Google::Type::Money] + # Effective Price after applying the discounts. + # @!attribute [rw] price_period + # @return [::Google::Cloud::Channel::V1::Period] + # The time period with respect to which base and effective prices are + # defined. + # Example: 1 month, 6 months, 1 year, etc. + # @!attribute [rw] external_price_uri + # @return [::String] + # Link to external price list, such as link to Google Voice rate card. + # @!attribute [rw] discount_components + # @return [::Array<::Google::Cloud::Channel::V1::DiscountComponent>] + # Breakdown of the discount into its components. + # This will be empty if there is no discount present. + class Price + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the price by the duration of months. + # For example, a 20% discount for the first six months, then a 10% discount + # starting on the seventh month. + # @!attribute [rw] period_type + # @return [::Google::Cloud::Channel::V1::PeriodType] + # Defines the phase period type. + # @!attribute [rw] first_period + # @return [::Integer] + # Defines first period for the phase. + # @!attribute [rw] last_period + # @return [::Integer] + # Defines first period for the phase. + # @!attribute [rw] price + # @return [::Google::Cloud::Channel::V1::Price] + # Price of the phase. Present if there are no price tiers. + # @!attribute [rw] price_tiers + # @return [::Array<::Google::Cloud::Channel::V1::PriceTier>] + # Price by the resource tiers. + class PricePhase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines price at resource tier level. + # For example, an offer with following definition : + # + # * Tier 1: Provide 25% discount for all seats between 1 and 25. + # * Tier 2: Provide 10% discount for all seats between 26 and 100. + # * Tier 3: Provide flat 15% discount for all seats above 100. + # + # Each of these tiers is represented as a PriceTier. + # @!attribute [rw] first_resource + # @return [::Integer] + # First resource for which the tier price applies. + # @!attribute [rw] last_resource + # @return [::Integer] + # Last resource for which the tier price applies. + # @!attribute [rw] price + # @return [::Google::Cloud::Channel::V1::Price] + # Price of the tier. + class PriceTier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents period in days/months/years. + # @!attribute [rw] duration + # @return [::Integer] + # Total duration of Period Type defined. + # @!attribute [rw] period_type + # @return [::Google::Cloud::Channel::V1::PeriodType] + # Period Type. + class Period + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a single component of the total discount applicable on a Price. + # @!attribute [rw] discount_percentage + # @return [::Float] + # Discount percentage, represented as decimal. + # For example, a 20% discount will be represented as 0.2. + # + # Note: The following fields are mutually exclusive: `discount_percentage`, `discount_absolute`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discount_absolute + # @return [::Google::Type::Money] + # Fixed value discount. + # + # Note: The following fields are mutually exclusive: `discount_absolute`, `discount_percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discount_type + # @return [::Google::Cloud::Channel::V1::DiscountType] + # Type of the discount. + class DiscountComponent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Constraints type for Promotional offers. + module PromotionalOrderType + # Not used. + PROMOTIONAL_TYPE_UNSPECIFIED = 0 + + # Order used for new customers, trial conversions and upgrades. + NEW_UPGRADE = 1 + + # All orders for transferring an existing customer. + TRANSFER = 2 + + # Orders for modifying an existing customer's promotion on the same SKU. + PROMOTION_SWITCH = 3 + end + + # Describes how the reseller will be billed. + module PaymentPlan + # Not used. + PAYMENT_PLAN_UNSPECIFIED = 0 + + # Commitment. + COMMITMENT = 1 + + # No commitment. + FLEXIBLE = 2 + + # Free. + FREE = 3 + + # Trial. + TRIAL = 4 + + # Price and ordering not available through API. + OFFLINE = 5 + end + + # Specifies when the payment needs to happen. + module PaymentType + # Not used. + PAYMENT_TYPE_UNSPECIFIED = 0 + + # Prepay. Amount has to be paid before service is rendered. + PREPAY = 1 + + # Postpay. Reseller is charged at the end of the Payment cycle. + POSTPAY = 2 + end + + # Represents the type for a monetizable resource(any entity on which billing + # happens). For example, this could be MINUTES for Google Voice and GB for + # Google Drive. One SKU can map to multiple monetizable resources. + module ResourceType + # Not used. + RESOURCE_TYPE_UNSPECIFIED = 0 + + # Seat. + SEAT = 1 + + # Monthly active user. + MAU = 2 + + # GB (used for storage SKUs). + GB = 3 + + # Active licensed users(for Voice SKUs). + LICENSED_USER = 4 + + # Voice usage. + MINUTES = 5 + + # For IaaS SKUs like Google Cloud, monetization is based on usage accrued on + # your billing account irrespective of the type of monetizable resource. This + # enum represents an aggregated resource/container for all usage SKUs on a + # billing account. Currently, only applicable to Google Cloud. + IAAS_USAGE = 6 + + # For Google Cloud subscriptions like Anthos or SAP. + SUBSCRIPTION = 7 + end + + # Period Type. + module PeriodType + # Not used. + PERIOD_TYPE_UNSPECIFIED = 0 + + # Day. + DAY = 1 + + # Month. + MONTH = 2 + + # Year. + YEAR = 3 + end + + # Discount Type. + module DiscountType + # Not used. + DISCOUNT_TYPE_UNSPECIFIED = 0 + + # Regional discount. + REGIONAL_DISCOUNT = 1 + + # Promotional discount. + PROMOTIONAL_DISCOUNT = 2 + + # Sales-provided discount. + SALES_DISCOUNT = 3 + + # Reseller margin. + RESELLER_MARGIN = 4 + + # Deal code discount. + DEAL_CODE = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb new file mode 100644 index 000000000000..5e23dfe6b887 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Provides contextual information about a + # {::Google::Longrunning::Operation google.longrunning.Operation}. + # @!attribute [rw] operation_type + # @return [::Google::Cloud::Channel::V1::OperationMetadata::OperationType] + # The RPC that initiated this Long Running Operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # RPCs that return a Long Running Operation. + module OperationType + # Not used. + OPERATION_TYPE_UNSPECIFIED = 0 + + # Long Running Operation was triggered by CreateEntitlement. + CREATE_ENTITLEMENT = 1 + + # Long Running Operation was triggered by ChangeRenewalSettings. + CHANGE_RENEWAL_SETTINGS = 3 + + # Long Running Operation was triggered by StartPaidService. + START_PAID_SERVICE = 5 + + # Long Running Operation was triggered by ActivateEntitlement. + ACTIVATE_ENTITLEMENT = 7 + + # Long Running Operation was triggered by SuspendEntitlement. + SUSPEND_ENTITLEMENT = 8 + + # Long Running Operation was triggered by CancelEntitlement. + CANCEL_ENTITLEMENT = 9 + + # Long Running Operation was triggered by TransferEntitlements. + TRANSFER_ENTITLEMENTS = 10 + + # Long Running Operation was triggered by TransferEntitlementsToGoogle. + TRANSFER_ENTITLEMENTS_TO_GOOGLE = 11 + + # Long Running Operation was triggered by ChangeOffer. + CHANGE_OFFER = 14 + + # Long Running Operation was triggered by ChangeParameters. + CHANGE_PARAMETERS = 15 + + # Long Running Operation was triggered by ProvisionCloudIdentity. + PROVISION_CLOUD_IDENTITY = 16 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb new file mode 100644 index 000000000000..ab3128fa7835 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # A Product is the entity a customer uses when placing an order. For example, + # Google Workspace, Google Voice, etc. + # @!attribute [rw] name + # @return [::String] + # Resource Name of the Product. + # Format: products/\\{product_id} + # @!attribute [rw] marketing_info + # @return [::Google::Cloud::Channel::V1::MarketingInfo] + # Marketing information for the product. + class Product + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a product's purchasable Stock Keeping Unit (SKU). + # SKUs represent the different variations of the product. For example, Google + # Workspace Business Standard and Google Workspace Business Plus are Google + # Workspace product SKUs. + # @!attribute [rw] name + # @return [::String] + # Resource Name of the SKU. + # Format: products/\\{product_id}/skus/\\{sku_id} + # @!attribute [rw] marketing_info + # @return [::Google::Cloud::Channel::V1::MarketingInfo] + # Marketing information for the SKU. + # @!attribute [rw] product + # @return [::Google::Cloud::Channel::V1::Product] + # Product the SKU is associated with. + class Sku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the marketing information for a Product, SKU or Offer. + # @!attribute [rw] display_name + # @return [::String] + # Human readable name. + # @!attribute [rw] description + # @return [::String] + # Human readable description. Description can contain HTML. + # @!attribute [rw] default_logo + # @return [::Google::Cloud::Channel::V1::Media] + # Default logo. + class MarketingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents media information. + # @!attribute [rw] title + # @return [::String] + # Title of the media. + # @!attribute [rw] content + # @return [::String] + # URL of the media. + # @!attribute [rw] type + # @return [::Google::Cloud::Channel::V1::MediaType] + # Type of the media. + class Media + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of media used. + module MediaType + # Not used. + MEDIA_TYPE_UNSPECIFIED = 0 + + # Type of image. + MEDIA_TYPE_IMAGE = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb new file mode 100644 index 000000000000..cf1c42abf4e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb @@ -0,0 +1,424 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] name + # @return [::String] + # Required. The report's resource name. Specifies the account and report used + # to generate report data. The report_id identifier is a UID (for example, + # `613bf59q`). + # Name uses the format: + # accounts/\\{account_id}/reports/\\{report_id} + # @!attribute [rw] date_range + # @return [::Google::Cloud::Channel::V1::DateRange] + # Optional. The range of usage or invoice dates to include in the result. + # @!attribute [rw] filter + # @return [::String] + # Optional. A structured string that defines conditions on dimension columns + # to restrict the report output. + # + # Filters support logical operators (AND, OR, NOT) and conditional operators + # (=, !=, <, >, <=, and >=) using `column_id` as keys. + # + # For example: + # `(customer:"accounts/C123abc/customers/S456def" OR + # customer:"accounts/C123abc/customers/S789ghi") AND + # invoice_start_date.year >= 2022` + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code, such as "en-US". If specified, the + # response is localized to the corresponding language code if the + # original data sources support it. + # Default is "en-US". + class RunReportJobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] report_job + # @return [::Google::Cloud::Channel::V1::ReportJob] + # Pass `report_job.name` to + # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#report_job FetchReportResultsRequest.report_job} + # to retrieve the report's results. + # @!attribute [rw] report_metadata + # @return [::Google::Cloud::Channel::V1::ReportResultsMetadata] + # The metadata for the report's results (display name, columns, row count, + # and date range). If you view this before the operation finishes, + # you may see incomplete data. + class RunReportJobResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults}. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] report_job + # @return [::String] + # Required. The report job created by + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. + # Report_job uses the format: + # accounts/\\{account_id}/reportJobs/\\{report_job_id} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size of the report. The server may return fewer + # results than requested. If you don't specify a page size, the server uses a + # sensible default (may change over time). + # + # The maximum value is 30,000; the server will change larger values to + # 30,000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that specifies a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::FetchReportResultsResponse#next_page_token FetchReportResultsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} + # call. + # @!attribute [rw] partition_keys + # @return [::Array<::String>] + # Optional. List of keys specifying which report partitions to return. + # If empty, returns all partitions. + class FetchReportResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults}. + # Contains a tabular representation of the report results. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] report_metadata + # @return [::Google::Cloud::Channel::V1::ReportResultsMetadata] + # The metadata for the report results (display name, columns, row count, and + # date ranges). + # @!attribute [rw] rows + # @return [::Array<::Google::Cloud::Channel::V1::Row>] + # The report's lists of values. Each row follows the settings and ordering + # of the columns from `report_metadata`. + # @!attribute [rw] next_page_token + # @return [::String] + # Pass this token to + # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#page_token FetchReportResultsRequest.page_token} + # to retrieve the next page of results. + class FetchReportResultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports}. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the partner account to list available + # reports for. Parent uses the format: accounts/\\{account_id} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size of the report. The server might return fewer + # results than requested. If unspecified, returns 20 reports. The maximum + # value is 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that specifies a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListReportsResponse#next_page_token ListReportsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports} + # call. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code, such as "en-US". If specified, the + # response is localized to the corresponding language code if the + # original data sources support it. + # Default is "en-US". + class ListReportsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports}. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] reports + # @return [::Array<::Google::Cloud::Channel::V1::Report>] + # The reports available to the partner. + # @!attribute [rw] next_page_token + # @return [::String] + # Pass this token to + # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#page_token FetchReportResultsRequest.page_token} + # to retrieve the next page of results. + class ListReportsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of a [RunReportJob][] operation. Contains the name to use in + # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#report_job FetchReportResultsRequest.report_job} + # and the status of the operation. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of a report job. + # Name uses the format: + # `accounts/{account_id}/reportJobs/{report_job_id}` + # @!attribute [rw] report_status + # @return [::Google::Cloud::Channel::V1::ReportStatus] + # The current status of report generation. + class ReportJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The features describing the data. Returned by + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob} + # and + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults}. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] report + # @return [::Google::Cloud::Channel::V1::Report] + # Details of the completed report. + # @!attribute [rw] row_count + # @return [::Integer] + # The total number of rows of data in the final report. + # @!attribute [rw] date_range + # @return [::Google::Cloud::Channel::V1::DateRange] + # The date range of reported usage. + # @!attribute [rw] preceding_date_range + # @return [::Google::Cloud::Channel::V1::DateRange] + # The usage dates immediately preceding `date_range` with the same duration. + # Use this to calculate trending usage and costs. This is only populated if + # you request trending data. + # + # For example, if `date_range` is July 1-15, `preceding_date_range` will be + # June 16-30. + class ReportResultsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The definition of a report column. Specifies the data properties + # in the corresponding position of the report rows. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] column_id + # @return [::String] + # The unique name of the column (for example, customer_domain, + # channel_partner, customer_cost). You can use column IDs in + # {::Google::Cloud::Channel::V1::RunReportJobRequest#filter RunReportJobRequest.filter}. + # To see all reports and their columns, call + # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports}. + # @!attribute [rw] display_name + # @return [::String] + # The column's display name. + # @!attribute [rw] data_type + # @return [::Google::Cloud::Channel::V1::Column::DataType] + # The type of the values for this column. + class Column + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available data types for columns. Corresponds to the fields in the + # ReportValue `oneof` field. + module DataType + # Not used. + DATA_TYPE_UNSPECIFIED = 0 + + # ReportValues for this column will use string_value. + STRING = 1 + + # ReportValues for this column will use int_value. + INT = 2 + + # ReportValues for this column will use decimal_value. + DECIMAL = 3 + + # ReportValues for this column will use money_value. + MONEY = 4 + + # ReportValues for this column will use date_value. + DATE = 5 + + # ReportValues for this column will use date_time_value. + DATE_TIME = 6 + end + end + + # A representation of usage or invoice date ranges. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] usage_start_date_time + # @return [::Google::Type::DateTime] + # The earliest usage date time (inclusive). + # + # If you use time groupings (daily, weekly, etc), each group uses + # midnight to midnight (Pacific time). The usage start date is + # rounded down to include all usage from the specified date. We recommend + # that clients pass `usage_start_date_time` in Pacific time. + # @!attribute [rw] usage_end_date_time + # @return [::Google::Type::DateTime] + # The latest usage date time (exclusive). + # + # If you use time groupings (daily, weekly, etc), each group uses + # midnight to midnight (Pacific time). The usage end date is + # rounded down to include all usage from the specified date. We recommend + # that clients pass `usage_start_date_time` in Pacific time. + # @!attribute [rw] invoice_start_date + # @return [::Google::Type::Date] + # The earliest invoice date (inclusive). + # + # If this value is not the first day of a month, this will move it back to + # the first day of the given month. + # @!attribute [rw] invoice_end_date + # @return [::Google::Type::Date] + # The latest invoice date (inclusive). + # + # If this value is not the last day of a month, this will move it forward to + # the last day of the given month. + class DateRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A row of report values. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Channel::V1::ReportValue>] + # The list of values in the row. + # @!attribute [rw] partition_key + # @return [::String] + # The key for the partition this row belongs to. This field is empty + # if the report is not partitioned. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single report value. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] string_value + # @return [::String] + # A value of type `string`. + # + # Note: The following fields are mutually exclusive: `string_value`, `int_value`, `decimal_value`, `money_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int_value + # @return [::Integer] + # A value of type `int`. + # + # Note: The following fields are mutually exclusive: `int_value`, `string_value`, `decimal_value`, `money_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] decimal_value + # @return [::Google::Type::Decimal] + # A value of type `google.type.Decimal`, representing non-integer numeric + # values. + # + # Note: The following fields are mutually exclusive: `decimal_value`, `string_value`, `int_value`, `money_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] money_value + # @return [::Google::Type::Money] + # A value of type `google.type.Money` (currency code, whole units, decimal + # units). + # + # Note: The following fields are mutually exclusive: `money_value`, `string_value`, `int_value`, `decimal_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_value + # @return [::Google::Type::Date] + # A value of type `google.type.Date` (year, month, day). + # + # Note: The following fields are mutually exclusive: `date_value`, `string_value`, `int_value`, `decimal_value`, `money_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_time_value + # @return [::Google::Type::DateTime] + # A value of type `google.type.DateTime` (year, month, day, hour, minute, + # second, and UTC offset or timezone.) + # + # Note: The following fields are mutually exclusive: `date_time_value`, `string_value`, `int_value`, `decimal_value`, `money_value`, `date_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ReportValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Status of a report generation process. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] state + # @return [::Google::Cloud::Channel::V1::ReportStatus::State] + # The current state of the report generation process. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The report generation's start time. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The report generation's completion time. + class ReportStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available states of report generation. + module State + # Not used. + STATE_UNSPECIFIED = 0 + + # Report processing started. + STARTED = 1 + + # Data generated from the report is being staged. + WRITING = 2 + + # Report data is available for access. + AVAILABLE = 3 + + # Report failed. + FAILED = 4 + end + end + + # The ID and description of a report that was used to generate report data. + # For example, "Google Cloud Daily Spend", "Google Workspace License Activity", + # etc. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] name + # @return [::String] + # Required. The report's resource name. Specifies the account and report used + # to generate report data. The report_id identifier is a UID (for example, + # `613bf59q`). + # + # Name uses the format: + # accounts/\\{account_id}/reports/\\{report_id} + # @!attribute [rw] display_name + # @return [::String] + # A human-readable name for this report. + # @!attribute [rw] columns + # @return [::Array<::Google::Cloud::Channel::V1::Column>] + # The list of columns included in the report. This defines the schema of + # the report results. + # @!attribute [rw] description + # @return [::String] + # A description of other aspects of the report, such as the products + # it supports. + class Report + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb new file mode 100644 index 000000000000..07c960fc8aff --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Configuration for how a reseller will reprice a Customer. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the CustomerRepricingConfig. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + # @!attribute [rw] repricing_config + # @return [::Google::Cloud::Channel::V1::RepricingConfig] + # Required. The configuration for bill modifications made by a reseller + # before sending it to customers. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of an update to the repricing rule. If `update_time` + # is after + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # then it indicates this was set mid-month. + class CustomerRepricingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for how a distributor will rebill a channel partner + # (also known as a distributor-authorized reseller). + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the ChannelPartnerRepricingConfig. + # Format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. + # @!attribute [rw] repricing_config + # @return [::Google::Cloud::Channel::V1::RepricingConfig] + # Required. The configuration for bill modifications made by a reseller + # before sending it to ChannelPartner. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of an update to the repricing rule. If `update_time` + # is after + # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} + # then it indicates this was set mid-month. + class ChannelPartnerRepricingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for repricing a Google bill over a period of time. + # @!attribute [rw] entitlement_granularity + # @return [::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity] + # Required. Applies the repricing configuration at the entitlement level. + # + # Note: If a + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # using + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity RepricingConfig.EntitlementGranularity} + # becomes effective, then no existing or future + # {::Google::Cloud::Channel::V1::RepricingConfig::ChannelPartnerGranularity RepricingConfig.ChannelPartnerGranularity} + # will apply to the + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}. + # This is the recommended value for both + # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} + # and + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig}. + # + # Note: The following fields are mutually exclusive: `entitlement_granularity`, `channel_partner_granularity`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] channel_partner_granularity + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Channel::V1::RepricingConfig::ChannelPartnerGranularity] + # Applies the repricing configuration at the channel partner level. + # Only + # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} + # supports this value. Deprecated: This is no longer supported. Use + # {::Google::Cloud::Channel::V1::RepricingConfig#entitlement_granularity RepricingConfig.entitlement_granularity} + # instead. + # + # Note: The following fields are mutually exclusive: `channel_partner_granularity`, `entitlement_granularity`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] effective_invoice_month + # @return [::Google::Type::Date] + # Required. The YearMonth when these adjustments activate. The Day field + # needs to be "0" since we only accept YearMonth repricing boundaries. + # @!attribute [rw] adjustment + # @return [::Google::Cloud::Channel::V1::RepricingAdjustment] + # Required. Information about the adjustment. + # @!attribute [rw] rebilling_basis + # @return [::Google::Cloud::Channel::V1::RebillingBasis] + # Required. The {::Google::Cloud::Channel::V1::RebillingBasis RebillingBasis} to + # use for this bill. Specifies the relative cost based on repricing costs you + # will apply. + # @!attribute [rw] conditional_overrides + # @return [::Array<::Google::Cloud::Channel::V1::ConditionalOverride>] + # The conditional overrides to apply for this configuration. If you list + # multiple overrides, only the first valid override is used. If you don't + # list any overrides, the API uses the normal adjustment and rebilling basis. + class RepricingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Applies the repricing configuration at the entitlement level. + # @!attribute [rw] entitlement + # @return [::String] + # Resource name of the entitlement. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + class EntitlementGranularity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Applies the repricing configuration at the channel partner level. + # The channel partner value is derived from the resource name. Takes an + # empty json object. + # Deprecated: This is no longer supported. Use + # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity RepricingConfig.EntitlementGranularity} + # instead. + # @deprecated This message is deprecated and may be removed in the next major version update. + class ChannelPartnerGranularity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A type that represents the various adjustments you can apply to a bill. + # @!attribute [rw] percentage_adjustment + # @return [::Google::Cloud::Channel::V1::PercentageAdjustment] + # Flat markup or markdown on an entire bill. + class RepricingAdjustment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An adjustment that applies a flat markup or markdown to an entire bill. + # @!attribute [rw] percentage + # @return [::Google::Type::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" + class PercentageAdjustment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the override to conditionally apply. + # @!attribute [rw] adjustment + # @return [::Google::Cloud::Channel::V1::RepricingAdjustment] + # Required. Information about the applied override's adjustment. + # @!attribute [rw] rebilling_basis + # @return [::Google::Cloud::Channel::V1::RebillingBasis] + # Required. The {::Google::Cloud::Channel::V1::RebillingBasis RebillingBasis} to + # use for the applied override. Shows the relative cost based on your + # repricing costs. + # @!attribute [rw] repricing_condition + # @return [::Google::Cloud::Channel::V1::RepricingCondition] + # Required. Specifies the condition which, if met, will apply the override. + class ConditionalOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the various repricing conditions you can use for a conditional + # override. + # @!attribute [rw] sku_group_condition + # @return [::Google::Cloud::Channel::V1::SkuGroupCondition] + # SKU Group condition for override. + class RepricingCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A condition that applies the override if a line item SKU is found in the SKU + # group. + # @!attribute [rw] sku_group + # @return [::String] + # Specifies a SKU group (https://cloud.google.com/skus/sku-groups). + # Resource name of SKU group. Format: + # accounts/\\{account}/skuGroups/\\{sku_group}. + # Example: + # "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". + class SkuGroupCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the different costs that the modified bill can be based on. + module RebillingBasis + # Not used. + REBILLING_BASIS_UNSPECIFIED = 0 + + # Use the list cost, also known as the MSRP. + COST_AT_LIST = 1 + + # Pass through all discounts except the Reseller Program Discount. If this is + # the default cost base and no adjustments are specified, the output cost + # will be exactly what the customer would see if they viewed the bill in the + # Google Cloud Console. + DIRECT_CUSTOMER_COST = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb new file mode 100644 index 000000000000..abb787be273f --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb @@ -0,0 +1,1713 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist CloudChannelService.CheckCloudIdentityAccountsExist}. + # @!attribute [rw] parent + # @return [::String] + # Required. The reseller account's resource name. + # Parent uses the format: accounts/\\{account_id} + # @!attribute [rw] domain + # @return [::String] + # Required. Domain to fetch for Cloud Identity account customers, including + # domain and team customers. For team customers, please use the domain for + # their emails. + # @!attribute [rw] primary_admin_email + # @return [::String] + # Optional. Primary admin email to fetch for Cloud Identity account team + # customer. + class CheckCloudIdentityAccountsExistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Entity representing a Cloud Identity account that may be + # associated with a Channel Services API partner. + # @!attribute [rw] existing + # @return [::Boolean] + # Returns true if a Cloud Identity account exists for a specific domain. + # @!attribute [rw] owned + # @return [::Boolean] + # Returns true if the Cloud Identity account is associated with a customer + # of the Channel Services partner (with active subscriptions or purchase + # consents). + # @!attribute [rw] customer_name + # @return [::String] + # If owned = true, the name of the customer that owns the Cloud Identity + # account. + # Customer_name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] customer_cloud_identity_id + # @return [::String] + # If existing = true, the Cloud Identity ID of the customer. + # @!attribute [rw] customer_type + # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo::CustomerType] + # If existing = true, the type of the customer. + # @!attribute [rw] channel_partner_cloud_identity_id + # @return [::String] + # If existing = true, and is 2-tier customer, the channel partner of the + # customer. + class CloudIdentityCustomerAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist CloudChannelService.CheckCloudIdentityAccountsExist}. + # @!attribute [rw] cloud_identity_accounts + # @return [::Array<::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount>] + # The Cloud Identity accounts associated with the domain. + class CheckCloudIdentityAccountsExistResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller account to list customers from. + # Parent uses the format: accounts/\\{account_id}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of customers to return. The service may return + # fewer than this value. If unspecified, returns at most 10 customers. The + # maximum value is 50. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results other than the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} + # call. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filters applied to the [CloudChannelService.ListCustomers] + # results. See + # https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers + # for more information. + class ListCustomersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers}. + # @!attribute [rw] customers + # @return [::Array<::Google::Cloud::Channel::V1::Customer>] + # The customers belonging to a reseller or distributor. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListCustomersRequest#page_token ListCustomersRequest.page_token} + # to obtain that page. + class ListCustomersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer CloudChannelService.GetCustomer}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the customer to retrieve. + # Name uses the format: accounts/\\{account_id}/customers/\\{customer_id} + class GetCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer CloudChannelService.CreateCustomer} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of reseller account in which to create the + # customer. Parent uses the format: accounts/\\{account_id} + # @!attribute [rw] customer + # @return [::Google::Cloud::Channel::V1::Customer] + # Required. The customer to create. + class CreateCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer CloudChannelService.UpdateCustomer}. + # @!attribute [rw] customer + # @return [::Google::Cloud::Channel::V1::Customer] + # Required. New contents of the customer. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask that applies to the resource. + # Optional. + class UpdateCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer CloudChannelService.DeleteCustomer}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the customer to delete. + class DeleteCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer CloudChannelService.ImportCustomer} + # @!attribute [rw] domain + # @return [::String] + # Required. Customer domain. + # + # Note: The following fields are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_identity_id + # @return [::String] + # Required. Customer's Cloud Identity ID + # + # Note: The following fields are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] primary_admin_email + # @return [::String] + # Required. Customer's primary admin email. + # + # Note: The following fields are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller's account. + # Parent takes the format: accounts/\\{account_id} or + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} + # @!attribute [rw] auth_token + # @return [::String] + # Optional. The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @!attribute [rw] overwrite_if_exists + # @return [::Boolean] + # Required. Choose to overwrite an existing customer if found. + # This must be set to true if there is an existing customer with a + # conflicting region code or domain. + # @!attribute [rw] channel_partner_id + # @return [::String] + # Optional. Cloud Identity ID of a channel partner who will be the direct + # reseller for the customer's order. This field is required for 2-tier + # transfer scenarios and can be provided via the request Parent binding as + # well. + # @!attribute [rw] customer + # @return [::String] + # Optional. Specifies the customer that will receive imported Cloud Identity + # information. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + class ImportCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity CloudChannelService.ProvisionCloudIdentity} + # @!attribute [rw] customer + # @return [::String] + # Required. Resource name of the customer. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] cloud_identity_info + # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo] + # CloudIdentity-specific customer information. + # @!attribute [rw] user + # @return [::Google::Cloud::Channel::V1::AdminUser] + # Admin user information. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Validate the request and preview the review, but do not post it. + class ProvisionCloudIdentityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller's customer account to list + # entitlements for. + # Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, return at most 50 entitlements. The maximum + # value is 100; the server will coerce values above 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListEntitlementsResponse#next_page_token ListEntitlementsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements} + # call. + class ListEntitlementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements}. + # @!attribute [rw] entitlements + # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] + # The reseller customer's entitlements. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to list the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListEntitlementsRequest#page_token ListEntitlementsRequest.page_token} + # to obtain that page. + class ListEntitlementsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} + # @!attribute [rw] cloud_identity_id + # @return [::String] + # Customer's Cloud Identity ID + # + # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] customer_name + # @return [::String] + # A reseller is required to create a customer and use the resource name of + # the created customer here. + # Customer_name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # + # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The reseller account's resource name. + # Parent uses the format: accounts/\\{account_id} + # @!attribute [rw] page_size + # @return [::Integer] + # The requested page size. Server might return fewer results than requested. + # If unspecified, returns at most 100 SKUs. + # The maximum value is 1000; the server will coerce values above 1000. + # Optional. + # @!attribute [rw] page_token + # @return [::String] + # A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListTransferableSkusResponse#next_page_token ListTransferableSkusResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} + # call. Optional. + # @!attribute [rw] auth_token + # @return [::String] + # Optional. The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @!attribute [rw] language_code + # @return [::String] + # The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # Optional. + class ListTransferableSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus}. + # @!attribute [rw] transferable_skus + # @return [::Array<::Google::Cloud::Channel::V1::TransferableSku>] + # Information about existing SKUs for a customer that needs a transfer. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListTransferableSkusRequest#page_token ListTransferableSkusRequest.page_token} + # to obtain that page. + class ListTransferableSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} + # @!attribute [rw] cloud_identity_id + # @return [::String] + # Customer's Cloud Identity ID + # + # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] customer_name + # @return [::String] + # A reseller should create a customer and use the resource name of + # that customer here. + # + # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller's account. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Server might return fewer results than requested. + # If unspecified, returns at most 100 offers. + # The maximum value is 1000; the server will coerce values above 1000. + # @!attribute [rw] page_token + # @return [::String] + # A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListTransferableOffersResponse#next_page_token ListTransferableOffersResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} + # call. + # @!attribute [rw] sku + # @return [::String] + # Required. The SKU to look up Offers for. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @!attribute [rw] billing_account + # @return [::String] + # Optional. The Billing Account to look up Offers for. Format: + # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. + # + # This field is only relevant for multi-currency accounts. It should be left + # empty for single currency accounts. + class ListTransferableOffersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers}. + # @!attribute [rw] transferable_offers + # @return [::Array<::Google::Cloud::Channel::V1::TransferableOffer>] + # Information about Offers for a customer that can be used for + # transfer. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListTransferableOffersRequest#page_token ListTransferableOffersRequest.page_token} + # to obtain that page. + class ListTransferableOffersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TransferableOffer represents an Offer that can be used in Transfer. + # Read-only. + # @!attribute [rw] offer + # @return [::Google::Cloud::Channel::V1::Offer] + # Offer with parameter constraints updated to allow the Transfer. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. + class TransferableOffer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement CloudChannelService.GetEntitlement}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entitlement to retrieve. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + class GetEntitlementRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller account for listing channel + # partner links. Parent uses the format: accounts/\\{account_id} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, server will pick a default size (25). The + # maximum value is 200; the server will coerce values above 200. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # Obtained using + # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse#next_page_token ListChannelPartnerLinksResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} + # call. + # @!attribute [rw] view + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] + # Optional. The level of granularity the ChannelPartnerLink will display. + class ListChannelPartnerLinksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks}. + # @!attribute [rw] channel_partner_links + # @return [::Array<::Google::Cloud::Channel::V1::ChannelPartnerLink>] + # The Channel partner links for a reseller. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest#page_token ListChannelPartnerLinksRequest.page_token} + # to obtain that page. + class ListChannelPartnerLinksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link CloudChannelService.GetChannelPartnerLink}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the channel partner link to retrieve. + # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} + # where \\{id} is the Cloud Identity ID of the partner. + # @!attribute [rw] view + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] + # Optional. The level of granularity the ChannelPartnerLink will display. + class GetChannelPartnerLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link CloudChannelService.CreateChannelPartnerLink} + # @!attribute [rw] parent + # @return [::String] + # Required. Create a channel partner link for the provided reseller account's + # resource name. + # Parent uses the format: accounts/\\{account_id} + # @!attribute [rw] channel_partner_link + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # Required. The channel partner link to create. + # Either channel_partner_link.reseller_cloud_identity_id or domain can be + # used to create a link. + class CreateChannelPartnerLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link CloudChannelService.UpdateChannelPartnerLink} + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the channel partner link to cancel. + # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} + # where \\{id} is the Cloud Identity ID of the partner. + # @!attribute [rw] channel_partner_link + # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] + # Required. The channel partner link to update. Only + # channel_partner_link.link_state is allowed for updates. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask that applies to the resource. + # The only allowable value for an update mask is + # channel_partner_link.link_state. + class UpdateChannelPartnerLinkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config CloudChannelService.GetCustomerRepricingConfig}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the CustomerRepricingConfig. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + class GetCustomerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs}. + # @!attribute [rw] parent + # @return [::String] + # 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. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} + # call. + # @!attribute [rw] filter + # @return [::String] + # 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. + class ListCustomerRepricingConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs}. + # @!attribute [rw] customer_repricing_configs + # @return [::Array<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] + # The repricing configs for this channel partner. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest#page_token ListCustomerRepricingConfigsRequest.page_token} + # to obtain that page. + class ListCustomerRepricingConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config CloudChannelService.CreateCustomerRepricingConfig}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the customer that will receive this + # repricing config. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] customer_repricing_config + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # Required. The CustomerRepricingConfig object to update. + class CreateCustomerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config CloudChannelService.UpdateCustomerRepricingConfig}. + # @!attribute [rw] customer_repricing_config + # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] + # Required. The CustomerRepricingConfig object to update. + class UpdateCustomerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config CloudChannelService.DeleteCustomerRepricingConfig}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the customer repricing config rule to + # delete. Format: + # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. + class DeleteCustomerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config CloudChannelService.GetChannelPartnerRepricingConfig} + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ChannelPartnerRepricingConfig + # Format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. + class GetChannelPartnerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the account's + # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}. Parent + # uses the format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}. + # Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs + # for all channel partners. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} + # call. + # @!attribute [rw] filter + # @return [::String] + # 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`. + class ListChannelPartnerRepricingConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs}. + # @!attribute [rw] channel_partner_repricing_configs + # @return [::Array<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] + # The repricing configs for this channel partner. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest#page_token ListChannelPartnerRepricingConfigsRequest.page_token} + # to obtain that page. + class ListChannelPartnerRepricingConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config CloudChannelService.CreateChannelPartnerRepricingConfig}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the ChannelPartner that will receive the + # repricing config. Parent uses the format: + # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} + # @!attribute [rw] channel_partner_repricing_config + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # Required. The ChannelPartnerRepricingConfig object to update. + class CreateChannelPartnerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config CloudChannelService.UpdateChannelPartnerRepricingConfig}. + # @!attribute [rw] channel_partner_repricing_config + # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] + # Required. The ChannelPartnerRepricingConfig object to update. + class UpdateChannelPartnerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteChannelPartnerRepricingConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the channel partner repricing config rule to + # delete. + class DeleteChannelPartnerRepricingConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListSkuGroups. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the account from which to list SKU groups. + # Parent uses the format: accounts/\\{account}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of SKU groups to return. The service may + # return fewer than this value. If unspecified, returns a maximum of 1000 SKU + # groups. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups} + # call. + class ListSkuGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListSkuGroupBillableSkus. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the SKU group. + # Format: accounts/\\{account}/skuGroups/\\{sku_group}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of SKUs to return. The service may return + # fewer than this value. If unspecified, returns a maximum of 100000 SKUs. + # The maximum value is 100000; values above 100000 will be coerced to 100000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results beyond the first page. + # Obtained through + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} + # of the previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} + # call. + class ListSkuGroupBillableSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListSkuGroups. + # @!attribute [rw] sku_groups + # @return [::Array<::Google::Cloud::Channel::V1::SkuGroup>] + # The list of SKU groups requested. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest#page_token ListSkuGroupsRequest.page_token} + # to obtain that page. + class ListSkuGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListSkuGroupBillableSkus. + # @!attribute [rw] billable_skus + # @return [::Array<::Google::Cloud::Channel::V1::BillableSku>] + # The list of billable SKUs in the requested SKU group. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + # Pass to + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest#page_token ListSkuGroupBillableSkusRequest.page_token} + # to obtain that page. + class ListSkuGroupBillableSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the SKU group information. + # @!attribute [rw] name + # @return [::String] + # Resource name of SKU group. Format: + # accounts/\\{account}/skuGroups/\\{sku_group}. + # Example: + # "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". + # @!attribute [rw] display_name + # @return [::String] + # Unique human readable identifier for the SKU group. + class SkuGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the Billable SKU information. + # @!attribute [rw] sku + # @return [::String] + # Resource name of Billable SKU. Format: + # billableSkus/\\{sku}. + # Example: + # billableSkus/6E1B-6634-470F". + # @!attribute [rw] sku_display_name + # @return [::String] + # Unique human readable name for the SKU. + # @!attribute [rw] service + # @return [::String] + # Resource name of Service which contains Repricing SKU. Format: + # services/\\{service}. + # Example: + # "services/B7D9-FDCB-15D8". + # @!attribute [rw] service_display_name + # @return [::String] + # Unique human readable name for the Service. + class BillableSku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement CloudChannelService.CreateEntitlement} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller's customer account in which to + # create the entitlement. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] entitlement + # @return [::Google::Cloud::Channel::V1::Entitlement] + # Required. The entitlement to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class CreateEntitlementRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements CloudChannelService.TransferEntitlements}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller's customer account that will + # receive transferred entitlements. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] entitlements + # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] + # Required. The new entitlements to create or transfer. + # @!attribute [rw] auth_token + # @return [::String] + # The super admin of the resold customer generates this token to + # authorize a reseller to access their Cloud Identity and purchase + # entitlements on their behalf. You can omit this token after authorization. + # See https://support.google.com/a/answer/7643790 for more details. + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class TransferEntitlementsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements CloudChannelService.TransferEntitlements}. + # This is put in the response field of google.longrunning.Operation. + # @!attribute [rw] entitlements + # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] + # The transferred entitlements. + class TransferEntitlementsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google CloudChannelService.TransferEntitlementsToGoogle}. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller's customer account where the + # entitlements transfer from. Parent uses the format: + # accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] entitlements + # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] + # Required. The entitlements to transfer to Google. + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class TransferEntitlementsToGoogleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters CloudChannelService.ChangeParameters}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] + # Required. Entitlement parameters to update. You can only change editable + # parameters. + # + # To view the available Parameters for a request, refer to the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} + # from the desired offer. + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @!attribute [rw] purchase_order_id + # @return [::String] + # Optional. Purchase order ID provided by the reseller. + class ChangeParametersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings CloudChannelService.ChangeRenewalSettings}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] renewal_settings + # @return [::Google::Cloud::Channel::V1::RenewalSettings] + # Required. New renewal settings. + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class ChangeRenewalSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer CloudChannelService.ChangeOffer}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entitlement to update. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] offer + # @return [::String] + # Required. New Offer. + # Format: accounts/\\{account_id}/offers/\\{offer_id}. + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] + # Optional. Parameters needed to purchase the Offer. To view the available + # Parameters refer to the + # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} + # from the desired offer. + # @!attribute [rw] purchase_order_id + # @return [::String] + # Optional. Purchase order id provided by the reseller. + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + # @!attribute [rw] billing_account + # @return [::String] + # Optional. The billing account resource name that is used to pay for this + # entitlement when setting up billing on a trial subscription. + # + # This field is only relevant for multi-currency accounts. It should be + # left empty for single currency accounts. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. + class ChangeOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service CloudChannelService.StartPaidService}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the entitlement to start a paid service for. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class StartPaidServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement CloudChannelService.CancelEntitlement}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entitlement to cancel. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class CancelEntitlementRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement CloudChannelService.SuspendEntitlement}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entitlement to suspend. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class SuspendEntitlementRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement CloudChannelService.ActivateEntitlement}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the entitlement to activate. + # Name uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] request_id + # @return [::String] + # Optional. You can specify an optional unique request ID, and if you need to + # retry your request, the server will know to ignore the request if it's + # complete. + # + # For example, you make an initial request and the request times out. If you + # make the request again with the same request ID, the server can check if + # it received the original operation with the same request ID. If it did, it + # will ignore the second request. + # + # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + # with the exception that zero UUID is not supported + # (`00000000-0000-0000-0000-000000000000`). + class ActivateEntitlementRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for LookupOffer. + # @!attribute [rw] entitlement + # @return [::String] + # Required. The resource name of the entitlement to retrieve the Offer. + # Entitlement uses the format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + class LookupOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListProducts. + # @!attribute [rw] account + # @return [::String] + # Required. The resource name of the reseller account. + # Format: accounts/\\{account_id}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 Products. The maximum value + # is 1000; the server will coerce values above 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + class ListProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListProducts. + # @!attribute [rw] products + # @return [::Array<::Google::Cloud::Channel::V1::Product>] + # List of Products requested. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + class ListProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListSkus. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the Product to list SKUs for. + # Parent uses the format: products/\\{product_id}. + # Supports products/- to retrieve SKUs for all products. + # @!attribute [rw] account + # @return [::String] + # Required. Resource name of the reseller. + # Format: accounts/\\{account_id}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 SKUs. The maximum value is + # 1000; the server will coerce values above 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # Optional. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + class ListSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListSkus. + # @!attribute [rw] skus + # @return [::Array<::Google::Cloud::Channel::V1::Sku>] + # The list of SKUs requested. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + class ListSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListOffers. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the reseller account from which to list + # Offers. Parent uses the format: accounts/\\{account_id}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 500 Offers. The maximum value is + # 1000; the server will coerce values above 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # @!attribute [rw] filter + # @return [::String] + # Optional. The expression to filter results by name (name of + # the Offer), sku.name (name of the SKU), or sku.product.name (name of the + # Product). + # Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 + # Example 2: name=accounts/a1/offers/o1 + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + # @!attribute [rw] show_future_offers + # @return [::Boolean] + # Optional. A boolean flag that determines if a response returns future + # offers 30 days from now. If the show_future_offers is true, the response + # will only contain offers that are scheduled to be available 30 days from + # now. + class ListOffersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListOffers. + # @!attribute [rw] offers + # @return [::Array<::Google::Cloud::Channel::V1::Offer>] + # The list of Offers requested. + # + # The pricing information for each Offer only includes the base price. + # Effective prices and discounts aren't populated. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + class ListOffersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPurchasableSkus. + # @!attribute [rw] create_entitlement_purchase + # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase] + # List SKUs for CreateEntitlement purchase. + # + # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] change_offer_purchase + # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase] + # List SKUs for ChangeOffer purchase with a new SKU. + # + # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] customer + # @return [::String] + # Required. The resource name of the customer to list SKUs for. + # Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 SKUs. The maximum value is + # 1000; the server will coerce values above 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + class ListPurchasableSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # List SKUs for a new entitlement. Make the purchase using + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement CloudChannelService.CreateEntitlement}. + # @!attribute [rw] product + # @return [::String] + # Required. List SKUs belonging to this Product. + # Format: products/\\{product_id}. + # Supports products/- to retrieve SKUs for all products. + class CreateEntitlementPurchase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List SKUs for upgrading or downgrading an entitlement. Make the purchase + # using + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer CloudChannelService.ChangeOffer}. + # @!attribute [rw] entitlement + # @return [::String] + # Required. Resource name of the entitlement. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] change_type + # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase::ChangeType] + # Required. Change Type for the entitlement. + class ChangeOfferPurchase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Change Type enum. + module ChangeType + # Not used. + CHANGE_TYPE_UNSPECIFIED = 0 + + # SKU is an upgrade on the current entitlement. + UPGRADE = 1 + + # SKU is a downgrade on the current entitlement. + DOWNGRADE = 2 + end + end + end + + # Response message for ListPurchasableSkus. + # @!attribute [rw] purchasable_skus + # @return [::Array<::Google::Cloud::Channel::V1::PurchasableSku>] + # The list of SKUs requested. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + class ListPurchasableSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SKU that you can purchase. This is used in ListPurchasableSku API + # response. + # @!attribute [rw] sku + # @return [::Google::Cloud::Channel::V1::Sku] + # SKU + class PurchasableSku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListPurchasableOffers. + # @!attribute [rw] create_entitlement_purchase + # @return [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase] + # List Offers for CreateEntitlement purchase. + # + # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] change_offer_purchase + # @return [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase] + # List Offers for ChangeOffer purchase. + # + # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] customer + # @return [::String] + # Required. The resource name of the customer to list Offers for. + # Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server might return fewer results than + # requested. If unspecified, returns at most 100 Offers. The maximum value is + # 1000; the server will coerce values above 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token for a page of results other than the first page. + # @!attribute [rw] language_code + # @return [::String] + # Optional. The BCP-47 language code. For example, "en-US". The + # response will localize in the corresponding language code, if specified. + # The default value is "en-US". + class ListPurchasableOffersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # List Offers for CreateEntitlement purchase. + # @!attribute [rw] sku + # @return [::String] + # Required. SKU that the result should be restricted to. + # Format: products/\\{product_id}/skus/\\{sku_id}. + # @!attribute [rw] billing_account + # @return [::String] + # Optional. Billing account that the result should be restricted to. + # Format: accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. + class CreateEntitlementPurchase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List Offers for ChangeOffer purchase. + # @!attribute [rw] entitlement + # @return [::String] + # Required. Resource name of the entitlement. + # Format: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] new_sku + # @return [::String] + # Optional. Resource name of the new target SKU. Provide this SKU when + # upgrading or downgrading an entitlement. Format: + # products/\\{product_id}/skus/\\{sku_id} + # @!attribute [rw] billing_account + # @return [::String] + # Optional. Resource name of the new target Billing Account. Provide this + # Billing Account when setting up billing for a trial subscription. Format: + # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. + # + # This field is only relevant for multi-currency accounts. It should be + # left empty for single currency accounts. + class ChangeOfferPurchase + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for ListPurchasableOffers. + # @!attribute [rw] purchasable_offers + # @return [::Array<::Google::Cloud::Channel::V1::PurchasableOffer>] + # The list of Offers requested. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. + class ListPurchasableOffersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Offer that you can purchase for a customer. This is used in the + # ListPurchasableOffer API response. + # @!attribute [rw] offer + # @return [::Google::Cloud::Channel::V1::Offer] + # Offer. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. + class PurchasableOffer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for QueryEligibleBillingAccounts. + # @!attribute [rw] customer + # @return [::String] + # Required. The resource name of the customer to list eligible billing + # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}. + # @!attribute [rw] skus + # @return [::Array<::String>] + # Required. List of SKUs to list eligible billing accounts for. At least one + # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}. + class QueryEligibleBillingAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for QueryEligibleBillingAccounts. + # @!attribute [rw] sku_purchase_groups + # @return [::Array<::Google::Cloud::Channel::V1::SkuPurchaseGroup>] + # List of SKU purchase groups where each group represents a set of SKUs that + # must be purchased using the same billing account. Each SKU from + # [QueryEligibleBillingAccountsRequest.skus] will appear in exactly one SKU + # group. + class QueryEligibleBillingAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a set of SKUs that must be purchased using the same billing + # account. + # @!attribute [rw] skus + # @return [::Array<::String>] + # Resource names of the SKUs included in this group. + # Format: products/\\{product_id}/skus/\\{sku_id}. + # @!attribute [rw] billing_account_purchase_infos + # @return [::Array<::Google::Cloud::Channel::V1::BillingAccountPurchaseInfo>] + # List of billing accounts that are eligible to purhcase these SKUs. + class SkuPurchaseGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a billing account that can be used to make a purchase. + # @!attribute [rw] billing_account + # @return [::Google::Cloud::Channel::V1::BillingAccount] + # The billing account resource. + class BillingAccountPurchaseInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request Message for RegisterSubscriber. + # @!attribute [rw] account + # @return [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account that provides subscriber access to the registered + # topic. + # @!attribute [rw] integrator + # @return [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + class RegisterSubscriberRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response Message for RegisterSubscriber. + # @!attribute [rw] topic + # @return [::String] + # Name of the topic the subscriber will listen to. + class RegisterSubscriberResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request Message for UnregisterSubscriber. + # @!attribute [rw] account + # @return [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account to unregister from subscriber access to the + # topic. + # @!attribute [rw] integrator + # @return [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + class UnregisterSubscriberRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response Message for UnregisterSubscriber. + # @!attribute [rw] topic + # @return [::String] + # Name of the topic the service account subscriber access was removed from. + class UnregisterSubscriberResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request Message for ListSubscribers. + # @!attribute [rw] account + # @return [::String] + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of service accounts to return. The service may + # return fewer than this value. If unspecified, returns at most 100 service + # accounts. The maximum value is 1000; the server will coerce values above + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListSubscribers` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListSubscribers` must + # match the call that provided the page token. + # @!attribute [rw] integrator + # @return [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. + class ListSubscribersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response Message for ListSubscribers. + # @!attribute [rw] topic + # @return [::String] + # Name of the topic registered with the reseller. + # @!attribute [rw] service_accounts + # @return [::Array<::String>] + # List of service accounts which have subscriber access to the topic. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListSubscribersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the entitlement for which to list + # entitlement changes. The `-` wildcard may be used to match entitlements + # across a customer. Formats: + # + # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/- + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of entitlement changes to return. The service + # may return fewer than this value. If unspecified, returns at most 10 + # entitlement changes. The maximum value is 50; the server will coerce values + # above 50. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filters applied to the list results. + class ListEntitlementChangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} + # @!attribute [rw] entitlement_changes + # @return [::Array<::Google::Cloud::Channel::V1::EntitlementChange>] + # The list of entitlement changes. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to list the next page of results. + class ListEntitlementChangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb new file mode 100644 index 000000000000..f394cc3fc018 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Channel + module V1 + # Represents Pub/Sub message content describing customer update. + # @!attribute [rw] customer + # @return [::String] + # Resource name of the customer. + # Format: accounts/\\{account_id}/customers/\\{customer_id} + # @!attribute [rw] event_type + # @return [::Google::Cloud::Channel::V1::CustomerEvent::Type] + # Type of event which happened for the customer. + class CustomerEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of customer event. + module Type + # Not used. + TYPE_UNSPECIFIED = 0 + + # Primary domain for customer was changed. + PRIMARY_DOMAIN_CHANGED = 1 + + # Primary domain of the customer has been verified. + PRIMARY_DOMAIN_VERIFIED = 2 + end + end + + # Represents Pub/Sub message content describing entitlement update. + # @!attribute [rw] entitlement + # @return [::String] + # Resource name of an entitlement of the form: + # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} + # @!attribute [rw] event_type + # @return [::Google::Cloud::Channel::V1::EntitlementEvent::Type] + # Type of event which happened for the entitlement. + class EntitlementEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of entitlement event. + module Type + # Not used. + TYPE_UNSPECIFIED = 0 + + # A new entitlement was created. + CREATED = 1 + + # The offer type associated with an entitlement was changed. + # This is not triggered if an entitlement converts from a commit offer to a + # flexible offer as part of a renewal. + PRICE_PLAN_SWITCHED = 3 + + # Annual commitment for a commit plan was changed. + COMMITMENT_CHANGED = 4 + + # An annual entitlement was renewed. + RENEWED = 5 + + # Entitlement was suspended. + SUSPENDED = 6 + + # Entitlement was unsuspended. + ACTIVATED = 7 + + # Entitlement was cancelled. + CANCELLED = 8 + + # Entitlement was upgraded or downgraded (e.g. from Google Workspace + # Business Standard to Google Workspace Business Plus). + SKU_CHANGED = 9 + + # The renewal settings of an entitlement has changed. + RENEWAL_SETTING_CHANGED = 10 + + # Paid service has started on trial entitlement. + PAID_SERVICE_STARTED = 11 + + # License was assigned to or revoked from a user. + LICENSE_ASSIGNMENT_CHANGED = 12 + + # License cap was changed for the entitlement. + LICENSE_CAP_CHANGED = 13 + end + end + + # Represents information which resellers will get as part of notification from + # Pub/Sub. + # @!attribute [rw] customer_event + # @return [::Google::Cloud::Channel::V1::CustomerEvent] + # Customer event sent as part of Pub/Sub event to partners. + # + # Note: The following fields are mutually exclusive: `customer_event`, `entitlement_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] entitlement_event + # @return [::Google::Cloud::Channel::V1::EntitlementEvent] + # Entitlement event sent as part of Pub/Sub event to partners. + # + # Note: The following fields are mutually exclusive: `entitlement_event`, `customer_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SubscriberEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..f2d9d79d9da4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..9e9bdbb09ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..3f61f95b2587 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..48f5db726fe4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..3b045eb0b7d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year is 0, the DateTime is considered not to have a specific year. month + # and day must have valid, non-zero values. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Required. Month of year. Must be from 1 to 12. + # @!attribute [rw] day + # @return [::Integer] + # Required. Day of month. Must be from 1 to 31 and valid for the year and + # month. + # @!attribute [rw] hours + # @return [::Integer] + # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API + # may choose to allow the value "24:00:00" for scenarios like business + # closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Required. Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + # API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Required. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone, e.g. "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number, e.g. "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb new file mode 100644 index 000000000000..6b75307007ed --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # A representation of a decimal value, such as 2.5. Clients may convert values + # into language-native decimal formats, such as Java's [BigDecimal][] or + # Python's [decimal.Decimal][]. + # + # [BigDecimal]: + # https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html + # [decimal.Decimal]: https://docs.python.org/3/library/decimal.html + # @!attribute [rw] value + # @return [::String] + # The decimal value, as a string. + # + # The string representation consists of an optional sign, `+` (`U+002B`) + # or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + # ("the integer"), optionally followed by a fraction, optionally followed + # by an exponent. + # + # The fraction consists of a decimal point followed by zero or more decimal + # digits. The string must contain at least one digit in either the integer + # or the fraction. The number formed by the sign, the integer and the + # fraction is referred to as the significand. + # + # The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + # followed by one or more decimal digits. + # + # Services **should** normalize decimal values before storing them by: + # + # - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + # - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + # - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). + # - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). + # + # Services **may** perform additional normalization based on its own needs + # and the internal decimal implementation selected, such as shifting the + # decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). + # Additionally, services **may** preserve trailing zeroes in the fraction + # to indicate increased precision, but are not required to do so. + # + # Note that only the `.` character is supported to divide the integer + # and the fraction; `,` **should not** be supported regardless of locale. + # Additionally, thousand separators **should not** be supported. If a + # service does support them, values **must** be normalized. + # + # The ENBF grammar is: + # + # DecimalString = + # [Sign] Significand [Exponent]; + # + # Sign = '+' | '-'; + # + # Significand = + # Digits ['.'] [Digits] | [Digits] '.' Digits; + # + # Exponent = ('e' | 'E') [Sign] Digits; + # + # Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + # + # Services **should** clearly document the range of supported values, the + # maximum supported precision (total number of digits), and, if applicable, + # the scale (number of digits after the decimal point), as well as how it + # behaves when receiving out-of-bounds values. + # + # Services **may** choose to accept values passed as input even when the + # value has a higher precision or scale than the service supports, and + # **should** round the value to fit the supported scale. Alternatively, the + # service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + # if precision would be lost. + # + # Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + # gRPC) if the service receives a value outside of the supported range. + class Decimal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..be516f6e23c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..dfe0d90cc9e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb @@ -0,0 +1,135 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a postal address, e.g. for postal delivery or payments addresses. + # Given a postal address, a postal service can deliver items to a premise, P.O. + # Box or similar. + # It is not intended to model geographical locations (roads, towns, + # mountains). + # + # In typical usage an address would be created via user input or from importing + # existing data, depending on the type of process. + # + # Advice on address input / editing: + # - Use an i18n-ready address widget such as + # https://github.com/google/libaddressinput) + # - Users should not be presented with UI elements for input or editing of + # fields outside countries where that field is used. + # + # For more guidance on how to use this schema, please see: + # https://support.google.com/business/answer/6397478 + # @!attribute [rw] revision + # @return [::Integer] + # The schema revision of the `PostalAddress`. This must be set to 0, which is + # the latest revision. + # + # All new revisions **must** be backward compatible with old revisions. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the country/region of the address. This + # is never inferred and it is up to the user to ensure the value is + # correct. See http://cldr.unicode.org/ and + # http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + # for details. Example: "CH" for Switzerland. + # @!attribute [rw] language_code + # @return [::String] + # Optional. BCP-47 language code of the contents of this address (if + # known). This is often the UI language of the input form or is expected + # to match one of the languages used in the address' country/region, or their + # transliterated equivalents. + # This can affect formatting in certain countries, but is not critical + # to the correctness of the data and will never affect any validation or + # other non-formatting related operations. + # + # If this value is not known, it should be omitted (rather than specifying a + # possibly incorrect default). + # + # Examples: "zh-Hant", "ja", "ja-Latn", "en". + # @!attribute [rw] postal_code + # @return [::String] + # Optional. Postal code of the address. Not all countries use or require + # postal codes to be present, but where they are used, they may trigger + # additional validation with other parts of the address (e.g. state/zip + # validation in the U.S.A.). + # @!attribute [rw] sorting_code + # @return [::String] + # Optional. Additional, country-specific, sorting code. This is not used + # in most regions. Where it is used, the value is either a string like + # "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number + # alone, representing the "sector code" (Jamaica), "delivery area indicator" + # (Malawi) or "post office indicator" (e.g. CĂ´te d'Ivoire). + # @!attribute [rw] administrative_area + # @return [::String] + # Optional. Highest administrative subdivision which is used for postal + # addresses of a country or region. + # For example, this can be a state, a province, an oblast, or a prefecture. + # Specifically, for Spain this is the province and not the autonomous + # community (e.g. "Barcelona" and not "Catalonia"). + # Many countries don't use an administrative area in postal addresses. E.g. + # in Switzerland this should be left unpopulated. + # @!attribute [rw] locality + # @return [::String] + # Optional. Generally refers to the city/town portion of the address. + # Examples: US city, IT comune, UK post town. + # In regions of the world where localities are not well defined or do not fit + # into this structure well, leave locality empty and use address_lines. + # @!attribute [rw] sublocality + # @return [::String] + # Optional. Sublocality of the address. + # For example, this can be neighborhoods, boroughs, districts. + # @!attribute [rw] address_lines + # @return [::Array<::String>] + # Unstructured address lines describing the lower levels of an address. + # + # Because values in address_lines do not have type information and may + # sometimes contain multiple values in a single field (e.g. + # "Austin, TX"), it is important that the line order is clear. The order of + # address lines should be "envelope order" for the country/region of the + # address. In places where this can vary (e.g. Japan), address_language is + # used to make it explicit (e.g. "ja" for large-to-small ordering and + # "ja-Latn" or "en" for small-to-large). This way, the most specific line of + # an address can be selected based on the language. + # + # The minimum permitted structural representation of an address consists + # of a region_code with all remaining information placed in the + # address_lines. It would be possible to format such an address very + # approximately without geocoding, but no semantic reasoning could be + # made about any of the address components until it was at least + # partially resolved. + # + # Creating an address only containing a region_code and address_lines, and + # then geocoding is the recommended way to handle completely unstructured + # addresses (as opposed to guessing which parts of the address should be + # localities or administrative areas). + # @!attribute [rw] recipients + # @return [::Array<::String>] + # Optional. The recipient at the address. + # This field may, under certain circumstances, contain multiline information. + # For example, it might contain "care of" information. + # @!attribute [rw] organization + # @return [::String] + # Optional. The name of the organization at the address. + class PostalAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile new file mode 100644 index 000000000000..2eb7c301c33d --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-channel-v1", path: "../" +else + gem "google-cloud-channel-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb new file mode 100644 index 000000000000..b07f42fe9174 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelReportsService_FetchReportResults_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the fetch_report_results call in the CloudChannelReportsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results. +# +def fetch_report_results + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new + + # Call the fetch_report_results method. + result = client.fetch_report_results request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Row. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelReportsService_FetchReportResults_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb new file mode 100644 index 000000000000..2a67946a2ca5 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelReportsService_ListReports_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_reports call in the CloudChannelReportsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports. +# +def list_reports + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListReportsRequest.new + + # Call the list_reports method. + result = client.list_reports request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Report. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelReportsService_ListReports_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb new file mode 100644 index 000000000000..5f6e00893014 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelReportsService_RunReportJob_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the run_report_job call in the CloudChannelReportsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job. +# +def run_report_job + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::RunReportJobRequest.new + + # Call the run_report_job method. + result = client.run_report_job request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelReportsService_RunReportJob_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb new file mode 100644 index 000000000000..dc1b9d5debf4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the activate_entitlement call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement. +# +def activate_entitlement + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new + + # Call the activate_entitlement method. + result = client.activate_entitlement request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb new file mode 100644 index 000000000000..91b448b5c99b --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the cancel_entitlement call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement. +# +def cancel_entitlement + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new + + # Call the cancel_entitlement method. + result = client.cancel_entitlement request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb new file mode 100644 index 000000000000..6576645247fc --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the change_offer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer. +# +def change_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ChangeOfferRequest.new + + # Call the change_offer method. + result = client.change_offer request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb new file mode 100644 index 000000000000..6e38f1239391 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the change_parameters call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters. +# +def change_parameters + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ChangeParametersRequest.new + + # Call the change_parameters method. + result = client.change_parameters request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb new file mode 100644 index 000000000000..13fafc37ac61 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the change_renewal_settings call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings. +# +def change_renewal_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new + + # Call the change_renewal_settings method. + result = client.change_renewal_settings request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb new file mode 100644 index 000000000000..8371817b886e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the check_cloud_identity_accounts_exist call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist. +# +def check_cloud_identity_accounts_exist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new + + # Call the check_cloud_identity_accounts_exist method. + result = client.check_cloud_identity_accounts_exist request + + # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb new file mode 100644 index 000000000000..7e0d35383c19 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the create_channel_partner_link call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link. +# +def create_channel_partner_link + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new + + # Call the create_channel_partner_link method. + result = client.create_channel_partner_link request + + # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb new file mode 100644 index 000000000000..b33b20d2e9e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the create_channel_partner_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config. +# +def create_channel_partner_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new + + # Call the create_channel_partner_repricing_config method. + result = client.create_channel_partner_repricing_config request + + # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb new file mode 100644 index 000000000000..c5a8259419a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the create_customer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer. +# +def create_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CreateCustomerRequest.new + + # Call the create_customer method. + result = client.create_customer request + + # The returned object is of type Google::Cloud::Channel::V1::Customer. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb new file mode 100644 index 000000000000..a0040d963608 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the create_customer_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config. +# +def create_customer_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new + + # Call the create_customer_repricing_config method. + result = client.create_customer_repricing_config request + + # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb new file mode 100644 index 000000000000..3858b6e489e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the create_entitlement call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement. +# +def create_entitlement + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new + + # Call the create_entitlement method. + result = client.create_entitlement request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb new file mode 100644 index 000000000000..37d0dd8bfd77 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the delete_channel_partner_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#delete_channel_partner_repricing_config. +# +def delete_channel_partner_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new + + # Call the delete_channel_partner_repricing_config method. + result = client.delete_channel_partner_repricing_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb new file mode 100644 index 000000000000..5751b35ad0c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the delete_customer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer. +# +def delete_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new + + # Call the delete_customer method. + result = client.delete_customer request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb new file mode 100644 index 000000000000..ba8ccab82cfd --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the delete_customer_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config. +# +def delete_customer_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new + + # Call the delete_customer_repricing_config method. + result = client.delete_customer_repricing_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb new file mode 100644 index 000000000000..75d2e5ab59c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the get_channel_partner_link call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link. +# +def get_channel_partner_link + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new + + # Call the get_channel_partner_link method. + result = client.get_channel_partner_link request + + # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb new file mode 100644 index 000000000000..1af310ea9b71 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the get_channel_partner_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config. +# +def get_channel_partner_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new + + # Call the get_channel_partner_repricing_config method. + result = client.get_channel_partner_repricing_config request + + # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb new file mode 100644 index 000000000000..5d4e74682141 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the get_customer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer. +# +def get_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::GetCustomerRequest.new + + # Call the get_customer method. + result = client.get_customer request + + # The returned object is of type Google::Cloud::Channel::V1::Customer. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb new file mode 100644 index 000000000000..a9c2b4fafa78 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the get_customer_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config. +# +def get_customer_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new + + # Call the get_customer_repricing_config method. + result = client.get_customer_repricing_config request + + # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb new file mode 100644 index 000000000000..03b72468c556 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the get_entitlement call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement. +# +def get_entitlement + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::GetEntitlementRequest.new + + # Call the get_entitlement method. + result = client.get_entitlement request + + # The returned object is of type Google::Cloud::Channel::V1::Entitlement. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb new file mode 100644 index 000000000000..c50b3b9212ea --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the import_customer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer. +# +def import_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ImportCustomerRequest.new + + # Call the import_customer method. + result = client.import_customer request + + # The returned object is of type Google::Cloud::Channel::V1::Customer. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb new file mode 100644 index 000000000000..0a35f7a1109a --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_channel_partner_links call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links. +# +def list_channel_partner_links + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new + + # Call the list_channel_partner_links method. + result = client.list_channel_partner_links request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb new file mode 100644 index 000000000000..2da049657129 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_channel_partner_repricing_configs call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs. +# +def list_channel_partner_repricing_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new + + # Call the list_channel_partner_repricing_configs method. + result = client.list_channel_partner_repricing_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb new file mode 100644 index 000000000000..86bb6f9e0cc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_customer_repricing_configs call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs. +# +def list_customer_repricing_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new + + # Call the list_customer_repricing_configs method. + result = client.list_customer_repricing_configs request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb new file mode 100644 index 000000000000..c2173646667f --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_customers call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers. +# +def list_customers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListCustomersRequest.new + + # Call the list_customers method. + result = client.list_customers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Customer. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb new file mode 100644 index 000000000000..6bc86aad2dd9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_entitlement_changes call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes. +# +def list_entitlement_changes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new + + # Call the list_entitlement_changes method. + result = client.list_entitlement_changes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::EntitlementChange. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb new file mode 100644 index 000000000000..957c8c8cbf53 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_entitlements call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements. +# +def list_entitlements + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new + + # Call the list_entitlements method. + result = client.list_entitlements request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Entitlement. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb new file mode 100644 index 000000000000..5204795d3218 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListOffers_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_offers call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_offers. +# +def list_offers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListOffersRequest.new + + # Call the list_offers method. + result = client.list_offers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Offer. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListOffers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb new file mode 100644 index 000000000000..588acada53df --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListProducts_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_products call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_products. +# +def list_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListProductsRequest.new + + # Call the list_products method. + result = client.list_products request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Product. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListProducts_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb new file mode 100644 index 000000000000..bda94c36fac9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_purchasable_offers call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_offers. +# +def list_purchasable_offers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new + + # Call the list_purchasable_offers method. + result = client.list_purchasable_offers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb new file mode 100644 index 000000000000..821d3c24e509 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_purchasable_skus call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_skus. +# +def list_purchasable_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new + + # Call the list_purchasable_skus method. + result = client.list_purchasable_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb new file mode 100644 index 000000000000..81fcfebe766e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_sku_group_billable_skus call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus. +# +def list_sku_group_billable_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new + + # Call the list_sku_group_billable_skus method. + result = client.list_sku_group_billable_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::BillableSku. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb new file mode 100644 index 000000000000..fb6b93c80b31 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_sku_groups call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups. +# +def list_sku_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new + + # Call the list_sku_groups method. + result = client.list_sku_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb new file mode 100644 index 000000000000..822857b8801c --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListSkus_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_skus call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_skus. +# +def list_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListSkusRequest.new + + # Call the list_skus method. + result = client.list_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::Sku. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb new file mode 100644 index 000000000000..70df63c5de18 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_subscribers call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_subscribers. +# +def list_subscribers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListSubscribersRequest.new + + # Call the list_subscribers method. + result = client.list_subscribers request + + # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb new file mode 100644 index 000000000000..f211b7c25106 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_transferable_offers call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers. +# +def list_transferable_offers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new + + # Call the list_transferable_offers method. + result = client.list_transferable_offers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb new file mode 100644 index 000000000000..10340e9ec63e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the list_transferable_skus call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus. +# +def list_transferable_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new + + # Call the list_transferable_skus method. + result = client.list_transferable_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku. + p item + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb new file mode 100644 index 000000000000..89e70c127343 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the lookup_offer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#lookup_offer. +# +def lookup_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::LookupOfferRequest.new + + # Call the lookup_offer method. + result = client.lookup_offer request + + # The returned object is of type Google::Cloud::Channel::V1::Offer. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb new file mode 100644 index 000000000000..5e00d0520f14 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the provision_cloud_identity call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity. +# +def provision_cloud_identity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new + + # Call the provision_cloud_identity method. + result = client.provision_cloud_identity request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb new file mode 100644 index 000000000000..4845c73a460a --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_QueryEligibleBillingAccounts_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the query_eligible_billing_accounts call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#query_eligible_billing_accounts. +# +def query_eligible_billing_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new + + # Call the query_eligible_billing_accounts method. + result = client.query_eligible_billing_accounts request + + # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_QueryEligibleBillingAccounts_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb new file mode 100644 index 000000000000..c649311cdffa --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the register_subscriber call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#register_subscriber. +# +def register_subscriber + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new + + # Call the register_subscriber method. + result = client.register_subscriber request + + # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb new file mode 100644 index 000000000000..8ee4db7604d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the start_paid_service call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service. +# +def start_paid_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new + + # Call the start_paid_service method. + result = client.start_paid_service request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb new file mode 100644 index 000000000000..20fda879155e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the suspend_entitlement call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement. +# +def suspend_entitlement + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new + + # Call the suspend_entitlement method. + result = client.suspend_entitlement request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb new file mode 100644 index 000000000000..50b4022092fe --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the transfer_entitlements call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements. +# +def transfer_entitlements + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new + + # Call the transfer_entitlements method. + result = client.transfer_entitlements request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb new file mode 100644 index 000000000000..15c557cbc05e --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the transfer_entitlements_to_google call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google. +# +def transfer_entitlements_to_google + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new + + # Call the transfer_entitlements_to_google method. + result = client.transfer_entitlements_to_google request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb new file mode 100644 index 000000000000..aac13d016f1d --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the unregister_subscriber call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#unregister_subscriber. +# +def unregister_subscriber + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new + + # Call the unregister_subscriber method. + result = client.unregister_subscriber request + + # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb new file mode 100644 index 000000000000..cd321b64caef --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the update_channel_partner_link call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link. +# +def update_channel_partner_link + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new + + # Call the update_channel_partner_link method. + result = client.update_channel_partner_link request + + # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb new file mode 100644 index 000000000000..ecd09d85f4e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the update_channel_partner_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config. +# +def update_channel_partner_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new + + # Call the update_channel_partner_repricing_config method. + result = client.update_channel_partner_repricing_config request + + # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb new file mode 100644 index 000000000000..a303659a9dfd --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the update_customer call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer. +# +def update_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new + + # Call the update_customer method. + result = client.update_customer request + + # The returned object is of type Google::Cloud::Channel::V1::Customer. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb new file mode 100644 index 000000000000..e1eda9dcebc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync] +require "google/cloud/channel/v1" + +## +# Snippet for the update_customer_repricing_config call in the CloudChannelService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config. +# +def update_customer_repricing_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Channel::V1::CloudChannelService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new + + # Call the update_customer_repricing_config method. + result = client.update_customer_repricing_config request + + # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. + p result +end +# [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json b/owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json new file mode 100644 index 000000000000..d53beb97d051 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json @@ -0,0 +1,2095 @@ +{ + "client_library": { + "name": "google-cloud-channel-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.channel.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudchannel_v1_generated_CloudChannelReportsService_RunReportJob_sync", + "title": "Snippet for the run_report_job call in the CloudChannelReportsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job.", + "file": "cloud_channel_reports_service/run_report_job.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_report_job", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::RunReportJobRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelReportsService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client" + }, + "method": { + "short_name": "RunReportJob", + "full_name": "google.cloud.channel.v1.CloudChannelReportsService.RunReportJob", + "service": { + "short_name": "CloudChannelReportsService", + "full_name": "google.cloud.channel.v1.CloudChannelReportsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelReportsService_FetchReportResults_sync", + "title": "Snippet for the fetch_report_results call in the CloudChannelReportsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results.", + "file": "cloud_channel_reports_service/fetch_report_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_report_results", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::FetchReportResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::FetchReportResultsResponse", + "client": { + "short_name": "CloudChannelReportsService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client" + }, + "method": { + "short_name": "FetchReportResults", + "full_name": "google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults", + "service": { + "short_name": "CloudChannelReportsService", + "full_name": "google.cloud.channel.v1.CloudChannelReportsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelReportsService_ListReports_sync", + "title": "Snippet for the list_reports call in the CloudChannelReportsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports.", + "file": "cloud_channel_reports_service/list_reports.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reports", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListReportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListReportsResponse", + "client": { + "short_name": "CloudChannelReportsService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client" + }, + "method": { + "short_name": "ListReports", + "full_name": "google.cloud.channel.v1.CloudChannelReportsService.ListReports", + "service": { + "short_name": "CloudChannelReportsService", + "full_name": "google.cloud.channel.v1.CloudChannelReportsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync", + "title": "Snippet for the list_customers call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers.", + "file": "cloud_channel_service/list_customers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_customers", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListCustomersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListCustomersResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListCustomers", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListCustomers", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync", + "title": "Snippet for the get_customer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer.", + "file": "cloud_channel_service/get_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_customer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::GetCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::Customer", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "GetCustomer", + "full_name": "google.cloud.channel.v1.CloudChannelService.GetCustomer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync", + "title": "Snippet for the check_cloud_identity_accounts_exist call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist.", + "file": "cloud_channel_service/check_cloud_identity_accounts_exist.rb", + "language": "RUBY", + "client_method": { + "short_name": "check_cloud_identity_accounts_exist", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CheckCloudIdentityAccountsExist", + "full_name": "google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync", + "title": "Snippet for the create_customer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer.", + "file": "cloud_channel_service/create_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_customer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CreateCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::Customer", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CreateCustomer", + "full_name": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync", + "title": "Snippet for the update_customer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer.", + "file": "cloud_channel_service/update_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_customer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::UpdateCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::Customer", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "UpdateCustomer", + "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateCustomer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync", + "title": "Snippet for the delete_customer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer.", + "file": "cloud_channel_service/delete_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_customer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::DeleteCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "DeleteCustomer", + "full_name": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync", + "title": "Snippet for the import_customer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer.", + "file": "cloud_channel_service/import_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_customer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ImportCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::Customer", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ImportCustomer", + "full_name": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync", + "title": "Snippet for the provision_cloud_identity call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity.", + "file": "cloud_channel_service/provision_cloud_identity.rb", + "language": "RUBY", + "client_method": { + "short_name": "provision_cloud_identity", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ProvisionCloudIdentity", + "full_name": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync", + "title": "Snippet for the list_entitlements call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements.", + "file": "cloud_channel_service/list_entitlements.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entitlements", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListEntitlementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListEntitlementsResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListEntitlements", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync", + "title": "Snippet for the list_transferable_skus call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus.", + "file": "cloud_channel_service/list_transferable_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transferable_skus", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListTransferableSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListTransferableSkusResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListTransferableSkus", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync", + "title": "Snippet for the list_transferable_offers call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers.", + "file": "cloud_channel_service/list_transferable_offers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transferable_offers", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListTransferableOffersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListTransferableOffersResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListTransferableOffers", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync", + "title": "Snippet for the get_entitlement call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement.", + "file": "cloud_channel_service/get_entitlement.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_entitlement", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::GetEntitlementRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::Entitlement", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "GetEntitlement", + "full_name": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync", + "title": "Snippet for the create_entitlement call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement.", + "file": "cloud_channel_service/create_entitlement.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_entitlement", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CreateEntitlementRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CreateEntitlement", + "full_name": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync", + "title": "Snippet for the change_parameters call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters.", + "file": "cloud_channel_service/change_parameters.rb", + "language": "RUBY", + "client_method": { + "short_name": "change_parameters", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ChangeParametersRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ChangeParameters", + "full_name": "google.cloud.channel.v1.CloudChannelService.ChangeParameters", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync", + "title": "Snippet for the change_renewal_settings call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings.", + "file": "cloud_channel_service/change_renewal_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "change_renewal_settings", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ChangeRenewalSettings", + "full_name": "google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync", + "title": "Snippet for the change_offer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer.", + "file": "cloud_channel_service/change_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "change_offer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ChangeOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ChangeOffer", + "full_name": "google.cloud.channel.v1.CloudChannelService.ChangeOffer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync", + "title": "Snippet for the start_paid_service call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service.", + "file": "cloud_channel_service/start_paid_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_paid_service", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::StartPaidServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "StartPaidService", + "full_name": "google.cloud.channel.v1.CloudChannelService.StartPaidService", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync", + "title": "Snippet for the suspend_entitlement call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement.", + "file": "cloud_channel_service/suspend_entitlement.rb", + "language": "RUBY", + "client_method": { + "short_name": "suspend_entitlement", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::SuspendEntitlementRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "SuspendEntitlement", + "full_name": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync", + "title": "Snippet for the cancel_entitlement call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement.", + "file": "cloud_channel_service/cancel_entitlement.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_entitlement", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CancelEntitlementRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CancelEntitlement", + "full_name": "google.cloud.channel.v1.CloudChannelService.CancelEntitlement", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync", + "title": "Snippet for the activate_entitlement call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement.", + "file": "cloud_channel_service/activate_entitlement.rb", + "language": "RUBY", + "client_method": { + "short_name": "activate_entitlement", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ActivateEntitlementRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ActivateEntitlement", + "full_name": "google.cloud.channel.v1.CloudChannelService.ActivateEntitlement", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync", + "title": "Snippet for the transfer_entitlements call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements.", + "file": "cloud_channel_service/transfer_entitlements.rb", + "language": "RUBY", + "client_method": { + "short_name": "transfer_entitlements", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::TransferEntitlementsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "TransferEntitlements", + "full_name": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync", + "title": "Snippet for the transfer_entitlements_to_google call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google.", + "file": "cloud_channel_service/transfer_entitlements_to_google.rb", + "language": "RUBY", + "client_method": { + "short_name": "transfer_entitlements_to_google", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "TransferEntitlementsToGoogle", + "full_name": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync", + "title": "Snippet for the list_channel_partner_links call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links.", + "file": "cloud_channel_service/list_channel_partner_links.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_channel_partner_links", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListChannelPartnerLinks", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync", + "title": "Snippet for the get_channel_partner_link call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link.", + "file": "cloud_channel_service/get_channel_partner_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_channel_partner_link", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerLink", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "GetChannelPartnerLink", + "full_name": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync", + "title": "Snippet for the create_channel_partner_link call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link.", + "file": "cloud_channel_service/create_channel_partner_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_channel_partner_link", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerLink", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CreateChannelPartnerLink", + "full_name": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync", + "title": "Snippet for the update_channel_partner_link call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link.", + "file": "cloud_channel_service/update_channel_partner_link.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_channel_partner_link", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerLink", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "UpdateChannelPartnerLink", + "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync", + "title": "Snippet for the get_customer_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config.", + "file": "cloud_channel_service/get_customer_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_customer_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::CustomerRepricingConfig", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "GetCustomerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync", + "title": "Snippet for the list_customer_repricing_configs call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs.", + "file": "cloud_channel_service/list_customer_repricing_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_customer_repricing_configs", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListCustomerRepricingConfigs", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync", + "title": "Snippet for the create_customer_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config.", + "file": "cloud_channel_service/create_customer_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_customer_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::CustomerRepricingConfig", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CreateCustomerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync", + "title": "Snippet for the update_customer_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config.", + "file": "cloud_channel_service/update_customer_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_customer_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::CustomerRepricingConfig", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "UpdateCustomerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync", + "title": "Snippet for the delete_customer_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config.", + "file": "cloud_channel_service/delete_customer_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_customer_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "DeleteCustomerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync", + "title": "Snippet for the get_channel_partner_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config.", + "file": "cloud_channel_service/get_channel_partner_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_channel_partner_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "GetChannelPartnerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync", + "title": "Snippet for the list_channel_partner_repricing_configs call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs.", + "file": "cloud_channel_service/list_channel_partner_repricing_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_channel_partner_repricing_configs", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListChannelPartnerRepricingConfigs", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync", + "title": "Snippet for the create_channel_partner_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config.", + "file": "cloud_channel_service/create_channel_partner_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_channel_partner_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "CreateChannelPartnerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync", + "title": "Snippet for the update_channel_partner_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config.", + "file": "cloud_channel_service/update_channel_partner_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_channel_partner_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "UpdateChannelPartnerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync", + "title": "Snippet for the delete_channel_partner_repricing_config call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#delete_channel_partner_repricing_config.", + "file": "cloud_channel_service/delete_channel_partner_repricing_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_channel_partner_repricing_config", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_channel_partner_repricing_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "DeleteChannelPartnerRepricingConfig", + "full_name": "google.cloud.channel.v1.CloudChannelService.DeleteChannelPartnerRepricingConfig", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync", + "title": "Snippet for the list_sku_groups call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups.", + "file": "cloud_channel_service/list_sku_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sku_groups", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListSkuGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListSkuGroupsResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListSkuGroups", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListSkuGroups", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync", + "title": "Snippet for the list_sku_group_billable_skus call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus.", + "file": "cloud_channel_service/list_sku_group_billable_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sku_group_billable_skus", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListSkuGroupBillableSkus", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync", + "title": "Snippet for the lookup_offer call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#lookup_offer.", + "file": "cloud_channel_service/lookup_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_offer", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#lookup_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::LookupOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::Offer", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "LookupOffer", + "full_name": "google.cloud.channel.v1.CloudChannelService.LookupOffer", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_sync", + "title": "Snippet for the list_products call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_products.", + "file": "cloud_channel_service/list_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_products", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_products", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListProductsResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListProducts", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListProducts", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_sync", + "title": "Snippet for the list_skus call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_skus.", + "file": "cloud_channel_service/list_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_skus", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListSkusResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListSkus", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListSkus", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_sync", + "title": "Snippet for the list_offers call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_offers.", + "file": "cloud_channel_service/list_offers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_offers", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_offers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListOffersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListOffersResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListOffers", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListOffers", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync", + "title": "Snippet for the list_purchasable_skus call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_skus.", + "file": "cloud_channel_service/list_purchasable_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_purchasable_skus", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListPurchasableSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListPurchasableSkusResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListPurchasableSkus", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync", + "title": "Snippet for the list_purchasable_offers call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_offers.", + "file": "cloud_channel_service/list_purchasable_offers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_purchasable_offers", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_offers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListPurchasableOffersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListPurchasableOffersResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListPurchasableOffers", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_QueryEligibleBillingAccounts_sync", + "title": "Snippet for the query_eligible_billing_accounts call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#query_eligible_billing_accounts.", + "file": "cloud_channel_service/query_eligible_billing_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_eligible_billing_accounts", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#query_eligible_billing_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "QueryEligibleBillingAccounts", + "full_name": "google.cloud.channel.v1.CloudChannelService.QueryEligibleBillingAccounts", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync", + "title": "Snippet for the register_subscriber call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#register_subscriber.", + "file": "cloud_channel_service/register_subscriber.rb", + "language": "RUBY", + "client_method": { + "short_name": "register_subscriber", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#register_subscriber", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::RegisterSubscriberRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::RegisterSubscriberResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "RegisterSubscriber", + "full_name": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync", + "title": "Snippet for the unregister_subscriber call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#unregister_subscriber.", + "file": "cloud_channel_service/unregister_subscriber.rb", + "language": "RUBY", + "client_method": { + "short_name": "unregister_subscriber", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#unregister_subscriber", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::UnregisterSubscriberRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::UnregisterSubscriberResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "UnregisterSubscriber", + "full_name": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync", + "title": "Snippet for the list_subscribers call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_subscribers.", + "file": "cloud_channel_service/list_subscribers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_subscribers", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_subscribers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListSubscribersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListSubscribersResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListSubscribers", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync", + "title": "Snippet for the list_entitlement_changes call in the CloudChannelService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes.", + "file": "cloud_channel_service/list_entitlement_changes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_entitlement_changes", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Channel::V1::ListEntitlementChangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Channel::V1::ListEntitlementChangesResponse", + "client": { + "short_name": "CloudChannelService::Client", + "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" + }, + "method": { + "short_name": "ListEntitlementChanges", + "full_name": "google.cloud.channel.v1.CloudChannelService.ListEntitlementChanges", + "service": { + "short_name": "CloudChannelService", + "full_name": "google.cloud.channel.v1.CloudChannelService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb new file mode 100644 index 000000000000..749086160fb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/channel/v1/reports_service_pb" +require "google/cloud/channel/v1/reports_service_services_pb" +require "google/cloud/channel/v1/cloud_channel_reports_service" + +class ::Google::Cloud::Channel::V1::CloudChannelReportsService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb new file mode 100644 index 000000000000..03eb92091f3c --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/channel/v1/cloud_channel_reports_service" + +class ::Google::Cloud::Channel::V1::CloudChannelReportsService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_report_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.report_path account: "value0", report: "value1" + assert_equal "accounts/value0/reports/value1", path + end + end + + def test_report_job_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.report_job_path account: "value0", report_job: "value1" + assert_equal "accounts/value0/reportJobs/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb new file mode 100644 index 000000000000..94d81e654a21 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb @@ -0,0 +1,270 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/channel/v1/reports_service_pb" +require "google/cloud/channel/v1/cloud_channel_reports_service/rest" + + +class ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_run_report_job + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + date_range = {} + filter = "hello world" + language_code = "hello world" + + run_report_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.stub :transcode_run_report_job_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_report_job_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_report_job name: name, date_range: date_range, filter: filter, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_report_job ::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_report_job(::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_report_job_client_stub.call_count + end + end + end + + def test_fetch_report_results + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::FetchReportResultsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + report_job = "hello world" + page_size = 42 + page_token = "hello world" + partition_keys = ["hello world"] + + fetch_report_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.stub :transcode_fetch_report_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_report_results_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_report_results report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_report_results ::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_report_results(::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_report_results_client_stub.call_count + end + end + end + + def test_list_reports + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListReportsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_reports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.stub :transcode_list_reports_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reports_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_reports parent: parent, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_reports ::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_reports(::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reports_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb new file mode 100644 index 000000000000..04b4e342a4ab --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb @@ -0,0 +1,325 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/channel/v1/reports_service_pb" +require "google/cloud/channel/v1/cloud_channel_reports_service" + +class ::Google::Cloud::Channel::V1::CloudChannelReportsService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_run_report_job + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + date_range = {} + filter = "hello world" + language_code = "hello world" + + run_report_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_report_job, name + assert_kind_of ::Google::Cloud::Channel::V1::RunReportJobRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::DateRange), request["date_range"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_report_job_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_report_job name: name, date_range: date_range, filter: filter, language_code: language_code do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_report_job ::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_report_job(::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_report_job_client_stub.call_rpc_count + end + end + + def test_fetch_report_results + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::FetchReportResultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + report_job = "hello world" + page_size = 42 + page_token = "hello world" + partition_keys = ["hello world"] + + fetch_report_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_report_results, name + assert_kind_of ::Google::Cloud::Channel::V1::FetchReportResultsRequest, request + assert_equal "hello world", request["report_job"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal ["hello world"], request["partition_keys"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_report_results_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_report_results report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_report_results ::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_report_results(::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_report_results_client_stub.call_rpc_count + end + end + + def test_list_reports + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListReportsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_reports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reports, name + assert_kind_of ::Google::Cloud::Channel::V1::ListReportsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reports_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_reports parent: parent, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_reports ::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_reports(::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_reports_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb new file mode 100644 index 000000000000..272abbe14d29 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/channel/v1/service_pb" +require "google/cloud/channel/v1/service_services_pb" +require "google/cloud/channel/v1/cloud_channel_service" + +class ::Google::Cloud::Channel::V1::CloudChannelService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb new file mode 100644 index 000000000000..15da96cff168 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb @@ -0,0 +1,151 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/channel/v1/cloud_channel_service" + +class ::Google::Cloud::Channel::V1::CloudChannelService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + + def test_channel_partner_link_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.channel_partner_link_path account: "value0", channel_partner_link: "value1" + assert_equal "accounts/value0/channelPartnerLinks/value1", path + end + end + + def test_channel_partner_repricing_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.channel_partner_repricing_config_path account: "value0", channel_partner: "value1", channel_partner_repricing_config: "value2" + assert_equal "accounts/value0/channelPartnerLinks/value1/channelPartnerRepricingConfigs/value2", path + end + end + + def test_customer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.customer_path account: "value0", customer: "value1" + assert_equal "accounts/value0/customers/value1", path + end + end + + def test_customer_repricing_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.customer_repricing_config_path account: "value0", customer: "value1", customer_repricing_config: "value2" + assert_equal "accounts/value0/customers/value1/customerRepricingConfigs/value2", path + end + end + + def test_entitlement_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.entitlement_path account: "value0", customer: "value1", entitlement: "value2" + assert_equal "accounts/value0/customers/value1/entitlements/value2", path + end + end + + def test_offer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.offer_path account: "value0", offer: "value1" + assert_equal "accounts/value0/offers/value1", path + end + end + + def test_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_path product: "value0" + assert_equal "products/value0", path + end + end + + def test_sku_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.sku_group_path account: "value0", sku_group: "value1" + assert_equal "accounts/value0/skuGroups/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb new file mode 100644 index 000000000000..e0ae05730df2 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb @@ -0,0 +1,2845 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/channel/v1/service_pb" +require "google/cloud/channel/v1/cloud_channel_service/rest" + + +class ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_customers + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListCustomersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_customers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_customers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_customers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_customers parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_customers ::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_customers(::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_customers_client_stub.call_count + end + end + end + + def test_get_customer + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_customer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_customer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_customer ::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_customer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_customer(::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_customer_client_stub.call_count + end + end + end + + def test_check_cloud_identity_accounts_exist + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + domain = "hello world" + primary_admin_email = "hello world" + + check_cloud_identity_accounts_exist_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_check_cloud_identity_accounts_exist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, check_cloud_identity_accounts_exist_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.check_cloud_identity_accounts_exist parent: parent, domain: domain, primary_admin_email: primary_admin_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.check_cloud_identity_accounts_exist ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.check_cloud_identity_accounts_exist(::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, check_cloud_identity_accounts_exist_client_stub.call_count + end + end + end + + def test_create_customer + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + customer = {} + + create_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_customer({ parent: parent, customer: customer }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_customer parent: parent, customer: customer do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_customer ::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_customer({ parent: parent, customer: customer }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_customer(::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_customer_client_stub.call_count + end + end + end + + def test_update_customer + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + customer = {} + update_mask = {} + + update_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_customer({ customer: customer, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_customer customer: customer, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_customer ::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_customer({ customer: customer, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_customer(::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_customer_client_stub.call_count + end + end + end + + def test_delete_customer + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_delete_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_customer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_customer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_customer ::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_customer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_customer(::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_customer_client_stub.call_count + end + end + end + + def test_import_customer + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + domain = "hello world" + parent = "hello world" + auth_token = "hello world" + overwrite_if_exists = true + channel_partner_id = "hello world" + customer = "hello world" + + import_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_import_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_customer domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_customer ::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_customer(::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_customer_client_stub.call_count + end + end + end + + def test_provision_cloud_identity + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + customer = "hello world" + cloud_identity_info = {} + user = {} + validate_only = true + + provision_cloud_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_provision_cloud_identity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, provision_cloud_identity_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.provision_cloud_identity customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.provision_cloud_identity ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.provision_cloud_identity(::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, provision_cloud_identity_client_stub.call_count + end + end + end + + def test_list_entitlements + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListEntitlementsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_entitlements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_entitlements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entitlements_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entitlements parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entitlements ::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entitlements(::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entitlements_client_stub.call_count + end + end + end + + def test_list_transferable_skus + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListTransferableSkusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + cloud_identity_id = "hello world" + parent = "hello world" + page_size = 42 + page_token = "hello world" + auth_token = "hello world" + language_code = "hello world" + + list_transferable_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_transferable_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transferable_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_transferable_skus cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_transferable_skus ::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_transferable_skus(::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transferable_skus_client_stub.call_count + end + end + end + + def test_list_transferable_offers + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListTransferableOffersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + cloud_identity_id = "hello world" + parent = "hello world" + page_size = 42 + page_token = "hello world" + sku = "hello world" + language_code = "hello world" + billing_account = "hello world" + + list_transferable_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_transferable_offers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transferable_offers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_transferable_offers cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_transferable_offers ::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_transferable_offers(::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transferable_offers_client_stub.call_count + end + end + end + + def test_get_entitlement + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::Entitlement.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_entitlement_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_entitlement({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_entitlement name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_entitlement ::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_entitlement({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_entitlement(::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_entitlement_client_stub.call_count + end + end + end + + def test_create_entitlement + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entitlement = {} + request_id = "hello world" + + create_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_entitlement_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_entitlement parent: parent, entitlement: entitlement, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_entitlement ::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_entitlement(::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_entitlement_client_stub.call_count + end + end + end + + def test_change_parameters + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parameters = [{}] + request_id = "hello world" + purchase_order_id = "hello world" + + change_parameters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_change_parameters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, change_parameters_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.change_parameters name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.change_parameters ::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.change_parameters(::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, change_parameters_client_stub.call_count + end + end + end + + def test_change_renewal_settings + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + renewal_settings = {} + request_id = "hello world" + + change_renewal_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_change_renewal_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, change_renewal_settings_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.change_renewal_settings name: name, renewal_settings: renewal_settings, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.change_renewal_settings ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.change_renewal_settings(::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, change_renewal_settings_client_stub.call_count + end + end + end + + def test_change_offer + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + offer = "hello world" + parameters = [{}] + purchase_order_id = "hello world" + request_id = "hello world" + billing_account = "hello world" + price_reference_id = "hello world" + + change_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_change_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, change_offer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, change_offer_client_stub.call_count + end + end + end + + def test_start_paid_service + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + start_paid_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_start_paid_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_paid_service_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_paid_service({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_paid_service name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_paid_service ::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_paid_service({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_paid_service(::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_paid_service_client_stub.call_count + end + end + end + + def test_suspend_entitlement + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + suspend_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_suspend_entitlement_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, suspend_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.suspend_entitlement({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.suspend_entitlement name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.suspend_entitlement ::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.suspend_entitlement({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.suspend_entitlement(::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, suspend_entitlement_client_stub.call_count + end + end + end + + def test_cancel_entitlement + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + cancel_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_cancel_entitlement_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_entitlement({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_entitlement name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_entitlement ::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_entitlement({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_entitlement(::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_entitlement_client_stub.call_count + end + end + end + + def test_activate_entitlement + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + activate_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_activate_entitlement_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, activate_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.activate_entitlement({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.activate_entitlement name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.activate_entitlement ::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.activate_entitlement({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.activate_entitlement(::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, activate_entitlement_client_stub.call_count + end + end + end + + def test_transfer_entitlements + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entitlements = [{}] + auth_token = "hello world" + request_id = "hello world" + + transfer_entitlements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_transfer_entitlements_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, transfer_entitlements_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.transfer_entitlements parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.transfer_entitlements ::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.transfer_entitlements(::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, transfer_entitlements_client_stub.call_count + end + end + end + + def test_transfer_entitlements_to_google + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entitlements = [{}] + request_id = "hello world" + + transfer_entitlements_to_google_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_transfer_entitlements_to_google_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, transfer_entitlements_to_google_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.transfer_entitlements_to_google parent: parent, entitlements: entitlements, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.transfer_entitlements_to_google ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.transfer_entitlements_to_google(::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, transfer_entitlements_to_google_client_stub.call_count + end + end + end + + def test_list_channel_partner_links + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :UNSPECIFIED + + list_channel_partner_links_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_channel_partner_links_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_channel_partner_links_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_channel_partner_links parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_channel_partner_links ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_channel_partner_links(::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_channel_partner_links_client_stub.call_count + end + end + end + + def test_get_channel_partner_link + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :UNSPECIFIED + + get_channel_partner_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_channel_partner_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_channel_partner_link_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_channel_partner_link({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_channel_partner_link name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_channel_partner_link ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_channel_partner_link({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_channel_partner_link(::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_channel_partner_link_client_stub.call_count + end + end + end + + def test_create_channel_partner_link + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + channel_partner_link = {} + + create_channel_partner_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_channel_partner_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_channel_partner_link_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_channel_partner_link parent: parent, channel_partner_link: channel_partner_link do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_channel_partner_link ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_channel_partner_link(::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_channel_partner_link_client_stub.call_count + end + end + end + + def test_update_channel_partner_link + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + channel_partner_link = {} + update_mask = {} + + update_channel_partner_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_channel_partner_link_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_channel_partner_link_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_channel_partner_link name: name, channel_partner_link: channel_partner_link, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_channel_partner_link ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_channel_partner_link(::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_channel_partner_link_client_stub.call_count + end + end + end + + def test_get_customer_repricing_config + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_customer_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_customer_repricing_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_customer_repricing_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_customer_repricing_config ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_customer_repricing_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_customer_repricing_config(::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_customer_repricing_config_client_stub.call_count + end + end + end + + def test_list_customer_repricing_configs + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_customer_repricing_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_customer_repricing_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_customer_repricing_configs_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_customer_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_customer_repricing_configs ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_customer_repricing_configs(::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_customer_repricing_configs_client_stub.call_count + end + end + end + + def test_create_customer_repricing_config + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + customer_repricing_config = {} + + create_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_customer_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_customer_repricing_config parent: parent, customer_repricing_config: customer_repricing_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_customer_repricing_config ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_customer_repricing_config(::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_customer_repricing_config_client_stub.call_count + end + end + end + + def test_update_customer_repricing_config + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + customer_repricing_config = {} + + update_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_customer_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_customer_repricing_config customer_repricing_config: customer_repricing_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_customer_repricing_config ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_customer_repricing_config(::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_customer_repricing_config_client_stub.call_count + end + end + end + + def test_delete_customer_repricing_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_delete_customer_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_customer_repricing_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_customer_repricing_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_customer_repricing_config ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_customer_repricing_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_customer_repricing_config(::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_customer_repricing_config_client_stub.call_count + end + end + end + + def test_get_channel_partner_repricing_config + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_channel_partner_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_channel_partner_repricing_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_channel_partner_repricing_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_channel_partner_repricing_config ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_channel_partner_repricing_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_channel_partner_repricing_config(::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_channel_partner_repricing_config_client_stub.call_count + end + end + end + + def test_list_channel_partner_repricing_configs + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_channel_partner_repricing_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_channel_partner_repricing_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_channel_partner_repricing_configs_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_channel_partner_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_channel_partner_repricing_configs ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_channel_partner_repricing_configs(::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_channel_partner_repricing_configs_client_stub.call_count + end + end + end + + def test_create_channel_partner_repricing_config + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + channel_partner_repricing_config = {} + + create_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_channel_partner_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_channel_partner_repricing_config parent: parent, channel_partner_repricing_config: channel_partner_repricing_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_channel_partner_repricing_config ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_channel_partner_repricing_config(::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_channel_partner_repricing_config_client_stub.call_count + end + end + end + + def test_update_channel_partner_repricing_config + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + channel_partner_repricing_config = {} + + update_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_channel_partner_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_channel_partner_repricing_config channel_partner_repricing_config: channel_partner_repricing_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_channel_partner_repricing_config ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_channel_partner_repricing_config(::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_channel_partner_repricing_config_client_stub.call_count + end + end + end + + def test_delete_channel_partner_repricing_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_delete_channel_partner_repricing_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_channel_partner_repricing_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_channel_partner_repricing_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_channel_partner_repricing_config ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_channel_partner_repricing_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_channel_partner_repricing_config(::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_channel_partner_repricing_config_client_stub.call_count + end + end + end + + def test_list_sku_groups + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListSkuGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_sku_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_sku_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sku_groups_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sku_groups ::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_sku_groups(::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sku_groups_client_stub.call_count + end + end + end + + def test_list_sku_group_billable_skus + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_sku_group_billable_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_sku_group_billable_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sku_group_billable_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_sku_group_billable_skus parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_sku_group_billable_skus ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_sku_group_billable_skus(::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sku_group_billable_skus_client_stub.call_count + end + end + end + + def test_lookup_offer + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::Offer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + entitlement = "hello world" + + lookup_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_lookup_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_offer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.lookup_offer({ entitlement: entitlement }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.lookup_offer entitlement: entitlement do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.lookup_offer ::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.lookup_offer({ entitlement: entitlement }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.lookup_offer(::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_offer_client_stub.call_count + end + end + end + + def test_list_products + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListProductsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_products_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_products account: account, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_products ::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_products(::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_products_client_stub.call_count + end + end + end + + def test_list_skus + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListSkusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_skus parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_skus ::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_skus(::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_skus_client_stub.call_count + end + end + end + + def test_list_offers + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListOffersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + language_code = "hello world" + show_future_offers = true + + list_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_offers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_offers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_offers ::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_offers(::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_offers_client_stub.call_count + end + end + end + + def test_list_purchasable_skus + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListPurchasableSkusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + create_entitlement_purchase = {} + customer = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_purchasable_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_purchasable_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_purchasable_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_purchasable_skus create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_purchasable_skus ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_purchasable_skus(::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_purchasable_skus_client_stub.call_count + end + end + end + + def test_list_purchasable_offers + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + create_entitlement_purchase = {} + customer = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_purchasable_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_purchasable_offers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_purchasable_offers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_purchasable_offers create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_purchasable_offers ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_purchasable_offers(::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_purchasable_offers_client_stub.call_count + end + end + end + + def test_query_eligible_billing_accounts + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + customer = "hello world" + skus = ["hello world"] + + query_eligible_billing_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_query_eligible_billing_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_eligible_billing_accounts_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_eligible_billing_accounts({ customer: customer, skus: skus }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_eligible_billing_accounts customer: customer, skus: skus do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_eligible_billing_accounts ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_eligible_billing_accounts({ customer: customer, skus: skus }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_eligible_billing_accounts(::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_eligible_billing_accounts_client_stub.call_count + end + end + end + + def test_register_subscriber + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::RegisterSubscriberResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = "hello world" + service_account = "hello world" + integrator = "hello world" + + register_subscriber_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_register_subscriber_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, register_subscriber_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.register_subscriber account: account, service_account: service_account, integrator: integrator do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, register_subscriber_client_stub.call_count + end + end + end + + def test_unregister_subscriber + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = "hello world" + service_account = "hello world" + integrator = "hello world" + + unregister_subscriber_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_unregister_subscriber_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unregister_subscriber_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unregister_subscriber account: account, service_account: service_account, integrator: integrator do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unregister_subscriber_client_stub.call_count + end + end + end + + def test_list_subscribers + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListSubscribersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + account = "hello world" + page_size = 42 + page_token = "hello world" + integrator = "hello world" + + list_subscribers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_subscribers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_subscribers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_subscribers account: account, page_size: page_size, page_token: page_token, integrator: integrator do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_subscribers_client_stub.call_count + end + end + end + + def test_list_entitlement_changes + # Create test objects. + client_result = ::Google::Cloud::Channel::V1::ListEntitlementChangesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entitlement_changes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_entitlement_changes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_entitlement_changes_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_entitlement_changes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_entitlement_changes ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_entitlement_changes(::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_entitlement_changes_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb new file mode 100644 index 000000000000..4bf38e6781d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb @@ -0,0 +1,3298 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/channel/v1/service_pb" +require "google/cloud/channel/v1/cloud_channel_service" + +class ::Google::Cloud::Channel::V1::CloudChannelService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_customers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListCustomersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_customers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_customers, name + assert_kind_of ::Google::Cloud::Channel::V1::ListCustomersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_customers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_customers parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_customers ::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_customers(::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_customers_client_stub.call_rpc_count + end + end + + def test_get_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::Customer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_customer, name + assert_kind_of ::Google::Cloud::Channel::V1::GetCustomerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_customer({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_customer name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_customer ::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_customer({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_customer(::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_customer_client_stub.call_rpc_count + end + end + + def test_check_cloud_identity_accounts_exist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + domain = "hello world" + primary_admin_email = "hello world" + + check_cloud_identity_accounts_exist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :check_cloud_identity_accounts_exist, name + assert_kind_of ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["domain"] + assert_equal "hello world", request["primary_admin_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, check_cloud_identity_accounts_exist_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.check_cloud_identity_accounts_exist parent: parent, domain: domain, primary_admin_email: primary_admin_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.check_cloud_identity_accounts_exist ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.check_cloud_identity_accounts_exist(::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, check_cloud_identity_accounts_exist_client_stub.call_rpc_count + end + end + + def test_create_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::Customer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + customer = {} + + create_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_customer, name + assert_kind_of ::Google::Cloud::Channel::V1::CreateCustomerRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::Customer), request["customer"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_customer({ parent: parent, customer: customer }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_customer parent: parent, customer: customer do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_customer ::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_customer({ parent: parent, customer: customer }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_customer(::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_customer_client_stub.call_rpc_count + end + end + + def test_update_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::Customer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + customer = {} + update_mask = {} + + update_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_customer, name + assert_kind_of ::Google::Cloud::Channel::V1::UpdateCustomerRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::Customer), request["customer"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_customer({ customer: customer, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_customer customer: customer, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_customer ::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_customer({ customer: customer, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_customer(::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_customer_client_stub.call_rpc_count + end + end + + def test_delete_customer + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_customer, name + assert_kind_of ::Google::Cloud::Channel::V1::DeleteCustomerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_customer({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_customer name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_customer ::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_customer({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_customer(::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_customer_client_stub.call_rpc_count + end + end + + def test_import_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::Customer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + domain = "hello world" + parent = "hello world" + auth_token = "hello world" + overwrite_if_exists = true + channel_partner_id = "hello world" + customer = "hello world" + + import_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_customer, name + assert_kind_of ::Google::Cloud::Channel::V1::ImportCustomerRequest, request + assert_equal "hello world", request["domain"] + assert_equal :domain, request.customer_identity + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["auth_token"] + assert_equal true, request["overwrite_if_exists"] + assert_equal "hello world", request["channel_partner_id"] + assert_equal "hello world", request["customer"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_customer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_customer domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_customer ::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_customer(::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_customer_client_stub.call_rpc_count + end + end + + def test_provision_cloud_identity + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + customer = "hello world" + cloud_identity_info = {} + user = {} + validate_only = true + + provision_cloud_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :provision_cloud_identity, name + assert_kind_of ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest, request + assert_equal "hello world", request["customer"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::CloudIdentityInfo), request["cloud_identity_info"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::AdminUser), request["user"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, provision_cloud_identity_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.provision_cloud_identity customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.provision_cloud_identity ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.provision_cloud_identity(::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, provision_cloud_identity_client_stub.call_rpc_count + end + end + + def test_list_entitlements + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListEntitlementsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_entitlements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entitlements, name + assert_kind_of ::Google::Cloud::Channel::V1::ListEntitlementsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entitlements_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entitlements parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entitlements ::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entitlements(::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entitlements_client_stub.call_rpc_count + end + end + + def test_list_transferable_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListTransferableSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + cloud_identity_id = "hello world" + parent = "hello world" + page_size = 42 + page_token = "hello world" + auth_token = "hello world" + language_code = "hello world" + + list_transferable_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transferable_skus, name + assert_kind_of ::Google::Cloud::Channel::V1::ListTransferableSkusRequest, request + assert_equal "hello world", request["cloud_identity_id"] + assert_equal :cloud_identity_id, request.transferred_customer_identity + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["auth_token"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transferable_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_transferable_skus cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_transferable_skus ::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_transferable_skus(::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_transferable_skus_client_stub.call_rpc_count + end + end + + def test_list_transferable_offers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListTransferableOffersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + cloud_identity_id = "hello world" + parent = "hello world" + page_size = 42 + page_token = "hello world" + sku = "hello world" + language_code = "hello world" + billing_account = "hello world" + + list_transferable_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transferable_offers, name + assert_kind_of ::Google::Cloud::Channel::V1::ListTransferableOffersRequest, request + assert_equal "hello world", request["cloud_identity_id"] + assert_equal :cloud_identity_id, request.transferred_customer_identity + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["sku"] + assert_equal "hello world", request["language_code"] + assert_equal "hello world", request["billing_account"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transferable_offers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_transferable_offers cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_transferable_offers ::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_transferable_offers(::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_transferable_offers_client_stub.call_rpc_count + end + end + + def test_get_entitlement + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::Entitlement.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_entitlement, name + assert_kind_of ::Google::Cloud::Channel::V1::GetEntitlementRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_entitlement({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_entitlement name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_entitlement ::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_entitlement({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_entitlement(::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_entitlement_client_stub.call_rpc_count + end + end + + def test_create_entitlement + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entitlement = {} + request_id = "hello world" + + create_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_entitlement, name + assert_kind_of ::Google::Cloud::Channel::V1::CreateEntitlementRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::Entitlement), request["entitlement"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_entitlement parent: parent, entitlement: entitlement, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_entitlement ::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_entitlement(::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_entitlement_client_stub.call_rpc_count + end + end + + def test_change_parameters + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + parameters = [{}] + request_id = "hello world" + purchase_order_id = "hello world" + + change_parameters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :change_parameters, name + assert_kind_of ::Google::Cloud::Channel::V1::ChangeParametersRequest, request + assert_equal "hello world", request["name"] + assert_kind_of ::Google::Cloud::Channel::V1::Parameter, request["parameters"].first + assert_equal "hello world", request["request_id"] + assert_equal "hello world", request["purchase_order_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, change_parameters_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.change_parameters name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.change_parameters ::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.change_parameters(::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, change_parameters_client_stub.call_rpc_count + end + end + + def test_change_renewal_settings + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + renewal_settings = {} + request_id = "hello world" + + change_renewal_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :change_renewal_settings, name + assert_kind_of ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::RenewalSettings), request["renewal_settings"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, change_renewal_settings_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.change_renewal_settings name: name, renewal_settings: renewal_settings, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.change_renewal_settings ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.change_renewal_settings(::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, change_renewal_settings_client_stub.call_rpc_count + end + end + + def test_change_offer + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + offer = "hello world" + parameters = [{}] + purchase_order_id = "hello world" + request_id = "hello world" + billing_account = "hello world" + price_reference_id = "hello world" + + change_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :change_offer, name + assert_kind_of ::Google::Cloud::Channel::V1::ChangeOfferRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["offer"] + assert_kind_of ::Google::Cloud::Channel::V1::Parameter, request["parameters"].first + assert_equal "hello world", request["purchase_order_id"] + assert_equal "hello world", request["request_id"] + assert_equal "hello world", request["billing_account"] + assert_equal "hello world", request["price_reference_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, change_offer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, change_offer_client_stub.call_rpc_count + end + end + + def test_start_paid_service + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + start_paid_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_paid_service, name + assert_kind_of ::Google::Cloud::Channel::V1::StartPaidServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_paid_service_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_paid_service({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_paid_service name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_paid_service ::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_paid_service({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_paid_service(::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_paid_service_client_stub.call_rpc_count + end + end + + def test_suspend_entitlement + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + suspend_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :suspend_entitlement, name + assert_kind_of ::Google::Cloud::Channel::V1::SuspendEntitlementRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, suspend_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.suspend_entitlement({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.suspend_entitlement name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.suspend_entitlement ::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.suspend_entitlement({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.suspend_entitlement(::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, suspend_entitlement_client_stub.call_rpc_count + end + end + + def test_cancel_entitlement + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + cancel_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_entitlement, name + assert_kind_of ::Google::Cloud::Channel::V1::CancelEntitlementRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_entitlement({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_entitlement name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_entitlement ::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_entitlement({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_entitlement(::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_entitlement_client_stub.call_rpc_count + end + end + + def test_activate_entitlement + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + activate_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :activate_entitlement, name + assert_kind_of ::Google::Cloud::Channel::V1::ActivateEntitlementRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, activate_entitlement_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.activate_entitlement({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.activate_entitlement name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.activate_entitlement ::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.activate_entitlement({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.activate_entitlement(::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, activate_entitlement_client_stub.call_rpc_count + end + end + + def test_transfer_entitlements + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entitlements = [{}] + auth_token = "hello world" + request_id = "hello world" + + transfer_entitlements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :transfer_entitlements, name + assert_kind_of ::Google::Cloud::Channel::V1::TransferEntitlementsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Channel::V1::Entitlement, request["entitlements"].first + assert_equal "hello world", request["auth_token"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, transfer_entitlements_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.transfer_entitlements parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.transfer_entitlements ::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.transfer_entitlements(::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, transfer_entitlements_client_stub.call_rpc_count + end + end + + def test_transfer_entitlements_to_google + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + entitlements = [{}] + request_id = "hello world" + + transfer_entitlements_to_google_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :transfer_entitlements_to_google, name + assert_kind_of ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Channel::V1::Entitlement, request["entitlements"].first + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, transfer_entitlements_to_google_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.transfer_entitlements_to_google parent: parent, entitlements: entitlements, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.transfer_entitlements_to_google ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.transfer_entitlements_to_google(::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, transfer_entitlements_to_google_client_stub.call_rpc_count + end + end + + def test_list_channel_partner_links + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :UNSPECIFIED + + list_channel_partner_links_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_channel_partner_links, name + assert_kind_of ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_channel_partner_links_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_channel_partner_links parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_channel_partner_links ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_channel_partner_links(::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_channel_partner_links_client_stub.call_rpc_count + end + end + + def test_get_channel_partner_link + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :UNSPECIFIED + + get_channel_partner_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_channel_partner_link, name + assert_kind_of ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest, request + assert_equal "hello world", request["name"] + assert_equal :UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_channel_partner_link_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_channel_partner_link({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_channel_partner_link name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_channel_partner_link ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_channel_partner_link({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_channel_partner_link(::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_channel_partner_link_client_stub.call_rpc_count + end + end + + def test_create_channel_partner_link + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + channel_partner_link = {} + + create_channel_partner_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_channel_partner_link, name + assert_kind_of ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerLink), request["channel_partner_link"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_channel_partner_link_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_channel_partner_link parent: parent, channel_partner_link: channel_partner_link do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_channel_partner_link ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_channel_partner_link(::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_channel_partner_link_client_stub.call_rpc_count + end + end + + def test_update_channel_partner_link + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + channel_partner_link = {} + update_mask = {} + + update_channel_partner_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_channel_partner_link, name + assert_kind_of ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerLink), request["channel_partner_link"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_channel_partner_link_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_channel_partner_link name: name, channel_partner_link: channel_partner_link, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_channel_partner_link ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_channel_partner_link(::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_channel_partner_link_client_stub.call_rpc_count + end + end + + def test_get_customer_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_customer_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_customer_repricing_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_customer_repricing_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_customer_repricing_config ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_customer_repricing_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_customer_repricing_config(::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_customer_repricing_config_client_stub.call_rpc_count + end + end + + def test_list_customer_repricing_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_customer_repricing_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_customer_repricing_configs, name + assert_kind_of ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_customer_repricing_configs_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_customer_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_customer_repricing_configs ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_customer_repricing_configs(::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_customer_repricing_configs_client_stub.call_rpc_count + end + end + + def test_create_customer_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + customer_repricing_config = {} + + create_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_customer_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::CustomerRepricingConfig), request["customer_repricing_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_customer_repricing_config parent: parent, customer_repricing_config: customer_repricing_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_customer_repricing_config ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_customer_repricing_config(::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_customer_repricing_config_client_stub.call_rpc_count + end + end + + def test_update_customer_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + customer_repricing_config = {} + + update_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_customer_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::CustomerRepricingConfig), request["customer_repricing_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_customer_repricing_config customer_repricing_config: customer_repricing_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_customer_repricing_config ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_customer_repricing_config(::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_customer_repricing_config_client_stub.call_rpc_count + end + end + + def test_delete_customer_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_customer_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_customer_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_customer_repricing_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_customer_repricing_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_customer_repricing_config ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_customer_repricing_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_customer_repricing_config(::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_customer_repricing_config_client_stub.call_rpc_count + end + end + + def test_get_channel_partner_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_channel_partner_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_channel_partner_repricing_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_channel_partner_repricing_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_channel_partner_repricing_config ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_channel_partner_repricing_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_channel_partner_repricing_config(::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_channel_partner_repricing_config_client_stub.call_rpc_count + end + end + + def test_list_channel_partner_repricing_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_channel_partner_repricing_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_channel_partner_repricing_configs, name + assert_kind_of ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_channel_partner_repricing_configs_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_channel_partner_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_channel_partner_repricing_configs ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_channel_partner_repricing_configs(::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_channel_partner_repricing_configs_client_stub.call_rpc_count + end + end + + def test_create_channel_partner_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + channel_partner_repricing_config = {} + + create_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_channel_partner_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig), request["channel_partner_repricing_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_channel_partner_repricing_config parent: parent, channel_partner_repricing_config: channel_partner_repricing_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_channel_partner_repricing_config ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_channel_partner_repricing_config(::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_channel_partner_repricing_config_client_stub.call_rpc_count + end + end + + def test_update_channel_partner_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + channel_partner_repricing_config = {} + + update_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_channel_partner_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig), request["channel_partner_repricing_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_channel_partner_repricing_config channel_partner_repricing_config: channel_partner_repricing_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_channel_partner_repricing_config ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_channel_partner_repricing_config(::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_channel_partner_repricing_config_client_stub.call_rpc_count + end + end + + def test_delete_channel_partner_repricing_config + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_channel_partner_repricing_config, name + assert_kind_of ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_channel_partner_repricing_config_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_channel_partner_repricing_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_channel_partner_repricing_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_channel_partner_repricing_config ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_channel_partner_repricing_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_channel_partner_repricing_config(::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_channel_partner_repricing_config_client_stub.call_rpc_count + end + end + + def test_list_sku_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListSkuGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_sku_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sku_groups, name + assert_kind_of ::Google::Cloud::Channel::V1::ListSkuGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sku_groups_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_sku_groups ::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_sku_groups(::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sku_groups_client_stub.call_rpc_count + end + end + + def test_list_sku_group_billable_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_sku_group_billable_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sku_group_billable_skus, name + assert_kind_of ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sku_group_billable_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_sku_group_billable_skus parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_sku_group_billable_skus ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_sku_group_billable_skus(::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sku_group_billable_skus_client_stub.call_rpc_count + end + end + + def test_lookup_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::Offer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + entitlement = "hello world" + + lookup_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_offer, name + assert_kind_of ::Google::Cloud::Channel::V1::LookupOfferRequest, request + assert_equal "hello world", request["entitlement"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_offer_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.lookup_offer({ entitlement: entitlement }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.lookup_offer entitlement: entitlement do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.lookup_offer ::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.lookup_offer({ entitlement: entitlement }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.lookup_offer(::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_offer_client_stub.call_rpc_count + end + end + + def test_list_products + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListProductsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_products, name + assert_kind_of ::Google::Cloud::Channel::V1::ListProductsRequest, request + assert_equal "hello world", request["account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_products_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_products account: account, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_products ::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_products(::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_products_client_stub.call_rpc_count + end + end + + def test_list_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + account = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_skus, name + assert_kind_of ::Google::Cloud::Channel::V1::ListSkusRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_skus parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_skus ::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_skus(::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_skus_client_stub.call_rpc_count + end + end + + def test_list_offers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListOffersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + language_code = "hello world" + show_future_offers = true + + list_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_offers, name + assert_kind_of ::Google::Cloud::Channel::V1::ListOffersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["language_code"] + assert_equal true, request["show_future_offers"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_offers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_offers ::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_offers(::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_offers_client_stub.call_rpc_count + end + end + + def test_list_purchasable_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListPurchasableSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + create_entitlement_purchase = {} + customer = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_purchasable_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_purchasable_skus, name + assert_kind_of ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase), request["create_entitlement_purchase"] + assert_equal :create_entitlement_purchase, request.purchase_option + assert_equal "hello world", request["customer"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_purchasable_skus_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_purchasable_skus create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_purchasable_skus ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_purchasable_skus(::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_purchasable_skus_client_stub.call_rpc_count + end + end + + def test_list_purchasable_offers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + create_entitlement_purchase = {} + customer = "hello world" + page_size = 42 + page_token = "hello world" + language_code = "hello world" + + list_purchasable_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_purchasable_offers, name + assert_kind_of ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase), request["create_entitlement_purchase"] + assert_equal :create_entitlement_purchase, request.purchase_option + assert_equal "hello world", request["customer"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["language_code"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_purchasable_offers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_purchasable_offers create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_purchasable_offers ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_purchasable_offers(::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_purchasable_offers_client_stub.call_rpc_count + end + end + + def test_query_eligible_billing_accounts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + customer = "hello world" + skus = ["hello world"] + + query_eligible_billing_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_eligible_billing_accounts, name + assert_kind_of ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, request + assert_equal "hello world", request["customer"] + assert_equal ["hello world"], request["skus"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_eligible_billing_accounts_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_eligible_billing_accounts({ customer: customer, skus: skus }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_eligible_billing_accounts customer: customer, skus: skus do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_eligible_billing_accounts ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_eligible_billing_accounts({ customer: customer, skus: skus }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_eligible_billing_accounts(::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_eligible_billing_accounts_client_stub.call_rpc_count + end + end + + def test_register_subscriber + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::RegisterSubscriberResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = "hello world" + service_account = "hello world" + integrator = "hello world" + + register_subscriber_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :register_subscriber, name + assert_kind_of ::Google::Cloud::Channel::V1::RegisterSubscriberRequest, request + assert_equal "hello world", request["account"] + assert_equal "hello world", request["service_account"] + assert_equal "hello world", request["integrator"] + assert request.has_integrator? + refute_nil options + end + + Gapic::ServiceStub.stub :new, register_subscriber_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.register_subscriber account: account, service_account: service_account, integrator: integrator do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, register_subscriber_client_stub.call_rpc_count + end + end + + def test_unregister_subscriber + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = "hello world" + service_account = "hello world" + integrator = "hello world" + + unregister_subscriber_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unregister_subscriber, name + assert_kind_of ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, request + assert_equal "hello world", request["account"] + assert_equal "hello world", request["service_account"] + assert_equal "hello world", request["integrator"] + assert request.has_integrator? + refute_nil options + end + + Gapic::ServiceStub.stub :new, unregister_subscriber_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unregister_subscriber account: account, service_account: service_account, integrator: integrator do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unregister_subscriber_client_stub.call_rpc_count + end + end + + def test_list_subscribers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListSubscribersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + account = "hello world" + page_size = 42 + page_token = "hello world" + integrator = "hello world" + + list_subscribers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_subscribers, name + assert_kind_of ::Google::Cloud::Channel::V1::ListSubscribersRequest, request + assert_equal "hello world", request["account"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["integrator"] + assert request.has_integrator? + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_subscribers_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_subscribers account: account, page_size: page_size, page_token: page_token, integrator: integrator do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_subscribers_client_stub.call_rpc_count + end + end + + def test_list_entitlement_changes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Channel::V1::ListEntitlementChangesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_entitlement_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_entitlement_changes, name + assert_kind_of ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_entitlement_changes_client_stub do + # Create client + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_entitlement_changes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_entitlement_changes ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_entitlement_changes(::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_entitlement_changes_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/helper.rb b/owl-bot-staging/google-cloud-channel-v1/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/owl-bot-staging/google-cloud-channel-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2025 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 19f5e8819e0813bdd3881b222daa6831ad2f0500 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 1 Dec 2025 23:04:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../v1/cloud_channel_service/client.rb | 52 +- .../channel/v1/cloud_channel_service/paths.rb | 14 + .../v1/cloud_channel_service/rest/client.rb | 52 +- .../rest/service_stub.rb | 23 + .../cloud/channel/v1/entitlements_pb.rb | 2 +- .../lib/google/cloud/channel/v1/offers_pb.rb | 4 +- .../google/cloud/channel/v1/repricing_pb.rb | 2 +- .../lib/google/cloud/channel/v1/service_pb.rb | 2 +- .../cloud/channel/v1/service_services_pb.rb | 16 +- .../google/cloud/channel/v1/customers.rb | 4 +- .../google/cloud/channel/v1/entitlements.rb | 5 + .../google/cloud/channel/v1/offers.rb | 50 + .../google/cloud/channel/v1/repricing.rb | 2 +- .../google/cloud/channel/v1/service.rb | 61 +- .../cloud/channel/v1/subscriber_event.rb | 4 +- .../v1/cloud_channel_service_paths_test.rb | 12 + .../v1/cloud_channel_service_rest_test.rb | 44 +- .../channel/v1/cloud_channel_service_test.rb | 51 +- .../google-cloud-channel-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-channel-v1/.rubocop.yml | 33 - .../google-cloud-channel-v1/.toys.rb | 28 - .../google-cloud-channel-v1/.yardopts | 12 - .../google-cloud-channel-v1/AUTHENTICATION.md | 122 - .../google-cloud-channel-v1/CHANGELOG.md | 2 - .../google-cloud-channel-v1/Gemfile | 11 - .../google-cloud-channel-v1/LICENSE.md | 201 - .../google-cloud-channel-v1/README.md | 154 - .../google-cloud-channel-v1/Rakefile | 169 - .../gapic_metadata.json | 287 - .../google-cloud-channel-v1.gemspec | 28 - .../lib/google-cloud-channel-v1.rb | 21 - .../lib/google/cloud/channel/v1.rb | 46 - .../cloud/channel/v1/billing_accounts_pb.rb | 47 - .../channel/v1/channel_partner_links_pb.rb | 51 - .../v1/cloud_channel_reports_service.rb | 65 - .../cloud_channel_reports_service/client.rb | 805 -- .../credentials.rb | 51 - .../operations.rb | 841 --- .../v1/cloud_channel_reports_service/paths.rb | 67 - .../v1/cloud_channel_reports_service/rest.rb | 60 - .../rest/client.rb | 734 -- .../rest/operations.rb | 925 --- .../rest/service_stub.rb | 267 - .../cloud/channel/v1/cloud_channel_service.rb | 75 - .../v1/cloud_channel_service/client.rb | 6649 ----------------- .../v1/cloud_channel_service/credentials.rb | 51 - .../v1/cloud_channel_service/operations.rb | 841 --- .../channel/v1/cloud_channel_service/paths.rb | 186 - .../channel/v1/cloud_channel_service/rest.rb | 72 - .../v1/cloud_channel_service/rest/client.rb | 6271 ---------------- .../cloud_channel_service/rest/operations.rb | 925 --- .../rest/service_stub.rb | 3161 -------- .../lib/google/cloud/channel/v1/common_pb.rb | 52 - .../google/cloud/channel/v1/customers_pb.rb | 53 - .../channel/v1/entitlement_changes_pb.rb | 53 - .../cloud/channel/v1/entitlements_pb.rb | 64 - .../lib/google/cloud/channel/v1/offers_pb.rb | 70 - .../google/cloud/channel/v1/operations_pb.rb | 43 - .../google/cloud/channel/v1/products_pb.rb | 48 - .../cloud/channel/v1/reports_service_pb.rb | 74 - .../channel/v1/reports_service_services_pb.rb | 94 - .../google/cloud/channel/v1/repricing_pb.rb | 61 - .../lib/google/cloud/channel/v1/rest.rb | 38 - .../lib/google/cloud/channel/v1/service_pb.rb | 152 - .../cloud/channel/v1/service_services_pb.rb | 1071 --- .../cloud/channel/v1/subscriber_event_pb.rb | 48 - .../lib/google/cloud/channel/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../cloud/channel/v1/billing_accounts.rb | 48 - .../cloud/channel/v1/channel_partner_links.rb | 94 - .../google/cloud/channel/v1/common.rb | 172 - .../google/cloud/channel/v1/customers.rb | 132 - .../cloud/channel/v1/entitlement_changes.rb | 190 - .../google/cloud/channel/v1/entitlements.rb | 289 - .../google/cloud/channel/v1/offers.rb | 403 - .../google/cloud/channel/v1/operations.rb | 75 - .../google/cloud/channel/v1/products.rb | 98 - .../cloud/channel/v1/reports_service.rb | 424 -- .../google/cloud/channel/v1/repricing.rb | 222 - .../google/cloud/channel/v1/service.rb | 1713 ----- .../cloud/channel/v1/subscriber_event.rb | 126 - .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/datetime.rb | 103 - .../proto_docs/google/type/decimal.rb | 96 - .../proto_docs/google/type/money.rb | 43 - .../proto_docs/google/type/postal_address.rb | 135 - .../google-cloud-channel-v1/snippets/Gemfile | 32 - .../fetch_report_results.rb | 51 - .../list_reports.rb | 51 - .../run_report_job.rb | 54 - .../activate_entitlement.rb | 54 - .../cancel_entitlement.rb | 54 - .../cloud_channel_service/change_offer.rb | 54 - .../change_parameters.rb | 54 - .../change_renewal_settings.rb | 54 - .../check_cloud_identity_accounts_exist.rb | 47 - .../create_channel_partner_link.rb | 47 - ...create_channel_partner_repricing_config.rb | 47 - .../cloud_channel_service/create_customer.rb | 47 - .../create_customer_repricing_config.rb | 47 - .../create_entitlement.rb | 54 - ...delete_channel_partner_repricing_config.rb | 47 - .../cloud_channel_service/delete_customer.rb | 47 - .../delete_customer_repricing_config.rb | 47 - .../get_channel_partner_link.rb | 47 - .../get_channel_partner_repricing_config.rb | 47 - .../cloud_channel_service/get_customer.rb | 47 - .../get_customer_repricing_config.rb | 47 - .../cloud_channel_service/get_entitlement.rb | 47 - .../cloud_channel_service/import_customer.rb | 47 - .../list_channel_partner_links.rb | 51 - .../list_channel_partner_repricing_configs.rb | 51 - .../list_customer_repricing_configs.rb | 51 - .../cloud_channel_service/list_customers.rb | 51 - .../list_entitlement_changes.rb | 51 - .../list_entitlements.rb | 51 - .../cloud_channel_service/list_offers.rb | 51 - .../cloud_channel_service/list_products.rb | 51 - .../list_purchasable_offers.rb | 51 - .../list_purchasable_skus.rb | 51 - .../list_sku_group_billable_skus.rb | 51 - .../cloud_channel_service/list_sku_groups.rb | 51 - .../cloud_channel_service/list_skus.rb | 51 - .../cloud_channel_service/list_subscribers.rb | 47 - .../list_transferable_offers.rb | 51 - .../list_transferable_skus.rb | 51 - .../cloud_channel_service/lookup_offer.rb | 47 - .../provision_cloud_identity.rb | 54 - .../query_eligible_billing_accounts.rb | 47 - .../register_subscriber.rb | 47 - .../start_paid_service.rb | 54 - .../suspend_entitlement.rb | 54 - .../transfer_entitlements.rb | 54 - .../transfer_entitlements_to_google.rb | 54 - .../unregister_subscriber.rb | 47 - .../update_channel_partner_link.rb | 47 - ...update_channel_partner_repricing_config.rb | 47 - .../cloud_channel_service/update_customer.rb | 47 - .../update_customer_repricing_config.rb | 47 - ...ppet_metadata_google.cloud.channel.v1.json | 2095 ------ ...channel_reports_service_operations_test.rb | 400 - ...loud_channel_reports_service_paths_test.rb | 67 - ...cloud_channel_reports_service_rest_test.rb | 270 - .../v1/cloud_channel_reports_service_test.rb | 325 - .../cloud_channel_service_operations_test.rb | 400 - .../v1/cloud_channel_service_paths_test.rb | 151 - .../v1/cloud_channel_service_rest_test.rb | 2845 ------- .../channel/v1/cloud_channel_service_test.rb | 3298 -------- .../google-cloud-channel-v1/test/helper.rb | 25 - 161 files changed, 298 insertions(+), 44001 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-channel-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-channel-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-channel-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-channel-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-channel-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-channel-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-channel-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/subscriber_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-channel-v1/test/helper.rb diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb index 453ef274f282..3f95c0b3dee2 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb @@ -2080,7 +2080,7 @@ def change_renewal_settings request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil) + # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil, price_reference_id: nil) # Pass arguments to `change_offer` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -2118,6 +2118,10 @@ def change_renewal_settings request, options = nil # # This field is only relevant for multi-currency accounts. It should be # left empty for single currency accounts. + # @param price_reference_id [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] @@ -4683,7 +4687,8 @@ def delete_channel_partner_repricing_config request, options = nil # @param page_token [::String] # Optional. A token identifying a page of results beyond the first page. # Obtained through - # [ListSkuGroups.next_page_token][] of the previous + # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} + # of the previous # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups} # call. # @@ -4803,7 +4808,8 @@ def list_sku_groups request, options = nil # @param page_token [::String] # Optional. A token identifying a page of results beyond the first page. # Obtained through - # [ListSkuGroupBillableSkus.next_page_token][] of the previous + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} + # of the previous # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} # call. # @@ -5639,8 +5645,8 @@ def query_eligible_billing_accounts request, options = nil end ## - # Registers a service account with subscriber privileges on the Cloud Pub/Sub - # topic for this Channel Services account. After you create a + # Registers a service account with subscriber privileges on the Pub/Sub + # topic for this Channel Services account or integrator. After you create a # subscriber, you get the events through # {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent} # @@ -5668,16 +5674,20 @@ def query_eligible_billing_accounts request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload register_subscriber(account: nil, service_account: nil) + # @overload register_subscriber(account: nil, service_account: nil, integrator: nil) # Pass arguments to `register_subscriber` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @param service_account [::String] # Required. Service account that provides subscriber access to the registered # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] @@ -5744,10 +5754,10 @@ def register_subscriber request, options = nil end ## - # Unregisters a service account with subscriber privileges on the Cloud - # Pub/Sub topic created for this Channel Services account. If there are no - # service accounts left with subscriber privileges, this deletes the topic. - # You can call ListSubscribers to check for these accounts. + # Unregisters a service account with subscriber privileges on the Pub/Sub + # topic created for this Channel Services account or integrator. If there are + # no service accounts left with subscriber privileges, this deletes the + # topic. You can call ListSubscribers to check for these accounts. # # Possible error codes: # @@ -5776,16 +5786,20 @@ def register_subscriber request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload unregister_subscriber(account: nil, service_account: nil) + # @overload unregister_subscriber(account: nil, service_account: nil, integrator: nil) # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @param service_account [::String] # Required. Service account to unregister from subscriber access to the # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] @@ -5852,8 +5866,8 @@ def unregister_subscriber request, options = nil end ## - # Lists service accounts with subscriber privileges on the Cloud Pub/Sub - # topic created for this Channel Services account. + # Lists service accounts with subscriber privileges on the Pub/Sub topic + # created for this Channel Services account or integrator. # # Possible error codes: # @@ -5880,13 +5894,14 @@ def unregister_subscriber request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_subscribers(account: nil, page_size: nil, page_token: nil) + # @overload list_subscribers(account: nil, page_size: nil, page_token: nil, integrator: nil) # Pass arguments to `list_subscribers` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @param page_size [::Integer] # Optional. The maximum number of service accounts to return. The service may # return fewer than this value. If unspecified, returns at most 100 service @@ -5898,6 +5913,9 @@ def unregister_subscriber request, options = nil # # When paginating, all other parameters provided to `ListSubscribers` must # match the call that provided the page token. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Channel::V1::ListSubscribersResponse] diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb index de41080fe4aa..ff50005c5516 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb @@ -24,6 +24,20 @@ module V1 module CloudChannelService # Path helper methods for the CloudChannelService API. module Paths + ## + # Create a fully-qualified Account resource string. + # + # The resource will be in the following format: + # + # `accounts/{account}` + # + # @param account [String] + # + # @return [::String] + def account_path account: + "accounts/#{account}" + end + ## # Create a fully-qualified ChannelPartnerLink resource string. # diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb index d58690db9053..0a29a23350ed 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb @@ -1968,7 +1968,7 @@ def change_renewal_settings request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil) + # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil, price_reference_id: nil) # Pass arguments to `change_offer` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -2006,6 +2006,10 @@ def change_renewal_settings request, options = nil # # This field is only relevant for multi-currency accounts. It should be # left empty for single currency accounts. + # @param price_reference_id [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -4424,7 +4428,8 @@ def delete_channel_partner_repricing_config request, options = nil # @param page_token [::String] # Optional. A token identifying a page of results beyond the first page. # Obtained through - # [ListSkuGroups.next_page_token][] of the previous + # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} + # of the previous # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_groups CloudChannelService.ListSkuGroups} # call. # @yield [result, operation] Access the result along with the TransportOperation object @@ -4537,7 +4542,8 @@ def list_sku_groups request, options = nil # @param page_token [::String] # Optional. A token identifying a page of results beyond the first page. # Obtained through - # [ListSkuGroupBillableSkus.next_page_token][] of the previous + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} + # of the previous # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} # call. # @yield [result, operation] Access the result along with the TransportOperation object @@ -5325,8 +5331,8 @@ def query_eligible_billing_accounts request, options = nil end ## - # Registers a service account with subscriber privileges on the Cloud Pub/Sub - # topic for this Channel Services account. After you create a + # Registers a service account with subscriber privileges on the Pub/Sub + # topic for this Channel Services account or integrator. After you create a # subscriber, you get the events through # {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent} # @@ -5354,16 +5360,20 @@ def query_eligible_billing_accounts request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload register_subscriber(account: nil, service_account: nil) + # @overload register_subscriber(account: nil, service_account: nil, integrator: nil) # Pass arguments to `register_subscriber` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @param service_account [::String] # Required. Service account that provides subscriber access to the registered # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -5423,10 +5433,10 @@ def register_subscriber request, options = nil end ## - # Unregisters a service account with subscriber privileges on the Cloud - # Pub/Sub topic created for this Channel Services account. If there are no - # service accounts left with subscriber privileges, this deletes the topic. - # You can call ListSubscribers to check for these accounts. + # Unregisters a service account with subscriber privileges on the Pub/Sub + # topic created for this Channel Services account or integrator. If there are + # no service accounts left with subscriber privileges, this deletes the + # topic. You can call ListSubscribers to check for these accounts. # # Possible error codes: # @@ -5455,16 +5465,20 @@ def register_subscriber request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload unregister_subscriber(account: nil, service_account: nil) + # @overload unregister_subscriber(account: nil, service_account: nil, integrator: nil) # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @param service_account [::String] # Required. Service account to unregister from subscriber access to the # topic. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -5524,8 +5538,8 @@ def unregister_subscriber request, options = nil end ## - # Lists service accounts with subscriber privileges on the Cloud Pub/Sub - # topic created for this Channel Services account. + # Lists service accounts with subscriber privileges on the Pub/Sub topic + # created for this Channel Services account or integrator. # # Possible error codes: # @@ -5552,13 +5566,14 @@ def unregister_subscriber request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_subscribers(account: nil, page_size: nil, page_token: nil) + # @overload list_subscribers(account: nil, page_size: nil, page_token: nil, integrator: nil) # Pass arguments to `list_subscribers` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @param page_size [::Integer] # Optional. The maximum number of service accounts to return. The service may # return fewer than this value. If unspecified, returns at most 100 service @@ -5570,6 +5585,9 @@ def unregister_subscriber request, options = nil # # When paginating, all other parameters provided to `ListSubscribers` must # match the call that provided the page token. + # @param integrator [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Channel::V1::ListSubscribersResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb index c6cb4a8e08ba..95e734bfc357 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb @@ -3063,6 +3063,14 @@ def self.transcode_register_subscriber_request request_pb ["account", %r{^accounts/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{integrator}:registerSubscriber", + body: "*", + matches: [ + ["integrator", %r{^integrators/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -3085,6 +3093,14 @@ def self.transcode_unregister_subscriber_request request_pb ["account", %r{^accounts/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{integrator}:unregisterSubscriber", + body: "*", + matches: [ + ["integrator", %r{^integrators/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -3106,6 +3122,13 @@ def self.transcode_list_subscribers_request request_pb ["account", %r{^accounts/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{integrator}:listSubscribers", + matches: [ + ["integrator", %r{^integrators/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb index d81fc57fcc27..e6a13ea30c7b 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n*google/cloud/channel/v1/entitlements.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a$google/cloud/channel/v1/offers.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfb\x08\n\x0b\x45ntitlement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x05offer\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12H\n\x13\x63ommitment_settings\x18\x0c \x01(\x0b\x32+.google.cloud.channel.v1.CommitmentSettings\x12W\n\x12provisioning_state\x18\r \x01(\x0e\x32\x36.google.cloud.channel.v1.Entitlement.ProvisioningStateB\x03\xe0\x41\x03\x12M\n\x13provisioned_service\x18\x10 \x01(\x0b\x32+.google.cloud.channel.v1.ProvisionedServiceB\x03\xe0\x41\x03\x12V\n\x12suspension_reasons\x18\x12 \x03(\x0e\x32\x35.google.cloud.channel.v1.Entitlement.SuspensionReasonB\x03\xe0\x41\x03\x12\x1e\n\x11purchase_order_id\x18\x13 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0etrial_settings\x18\x15 \x01(\x0b\x32&.google.cloud.channel.v1.TrialSettingsB\x03\xe0\x41\x03\x12\x42\n\x10\x61ssociation_info\x18\x17 \x01(\x0b\x32(.google.cloud.channel.v1.AssociationInfo\x12\x36\n\nparameters\x18\x1a \x03(\x0b\x32\".google.cloud.channel.v1.Parameter\x12\x1c\n\x0f\x62illing_account\x18\x1c \x01(\tB\x03\xe0\x41\x01\"R\n\x11ProvisioningState\x12\"\n\x1ePROVISIONING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x05\"\xa3\x01\n\x10SuspensionReason\x12!\n\x1dSUSPENSION_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12RESELLER_INITIATED\x10\x01\x12\x0f\n\x0bTRIAL_ENDED\x10\x02\x12\x1c\n\x18RENEWAL_WITH_TYPE_CANCEL\x10\x03\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x04\x12\t\n\x05OTHER\x10\x64:p\xea\x41m\n\'cloudchannel.googleapis.com/Entitlement\x12\x42\x61\x63\x63ounts/{account}/customers/{customer}/entitlements/{entitlement}\"_\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x15\n\x08\x65\x64itable\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"Y\n\x0f\x41ssociationInfo\x12\x46\n\x10\x62\x61se_entitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"`\n\x12ProvisionedService\x12\x1c\n\x0fprovisioning_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06sku_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc5\x01\n\x12\x43ommitmentSettings\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x01\"\xb8\x01\n\x0fRenewalSettings\x12\x16\n\x0e\x65nable_renewal\x18\x01 \x01(\x08\x12\x19\n\x11resize_unit_count\x18\x02 \x01(\x08\x12:\n\x0cpayment_plan\x18\x05 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12\x36\n\rpayment_cycle\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\"L\n\rTrialSettings\x12\r\n\x05trial\x18\x01 \x01(\x08\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbf\x01\n\x0fTransferableSku\x12J\n\x14transfer_eligibility\x18\t \x01(\x0b\x32,.google.cloud.channel.v1.TransferEligibility\x12)\n\x03sku\x18\x0b \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x35\n\nlegacy_sku\x18\x0c \x01(\x0b\x32\x1c.google.cloud.channel.v1.SkuB\x03\xe0\x41\x01\"\xa6\x02\n\x13TransferEligibility\x12\x13\n\x0bis_eligible\x18\x01 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12Q\n\x14ineligibility_reason\x18\x03 \x01(\x0e\x32\x33.google.cloud.channel.v1.TransferEligibility.Reason\"\x91\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x01\x12\x14\n\x10SKU_NOT_ELIGIBLE\x10\x02\x12\x11\n\rSKU_SUSPENDED\x10\x03\x12*\n&CHANNEL_PARTNER_NOT_AUTHORIZED_FOR_SKU\x10\x04\x42i\n\x1b\x63om.google.cloud.channel.v1B\x11\x45ntitlementsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" +descriptor_data = "\n*google/cloud/channel/v1/entitlements.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a$google/cloud/channel/v1/offers.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\t\n\x0b\x45ntitlement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x05offer\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12H\n\x13\x63ommitment_settings\x18\x0c \x01(\x0b\x32+.google.cloud.channel.v1.CommitmentSettings\x12W\n\x12provisioning_state\x18\r \x01(\x0e\x32\x36.google.cloud.channel.v1.Entitlement.ProvisioningStateB\x03\xe0\x41\x03\x12M\n\x13provisioned_service\x18\x10 \x01(\x0b\x32+.google.cloud.channel.v1.ProvisionedServiceB\x03\xe0\x41\x03\x12V\n\x12suspension_reasons\x18\x12 \x03(\x0e\x32\x35.google.cloud.channel.v1.Entitlement.SuspensionReasonB\x03\xe0\x41\x03\x12\x1e\n\x11purchase_order_id\x18\x13 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0etrial_settings\x18\x15 \x01(\x0b\x32&.google.cloud.channel.v1.TrialSettingsB\x03\xe0\x41\x03\x12\x42\n\x10\x61ssociation_info\x18\x17 \x01(\x0b\x32(.google.cloud.channel.v1.AssociationInfo\x12\x36\n\nparameters\x18\x1a \x03(\x0b\x32\".google.cloud.channel.v1.Parameter\x12\x1c\n\x0f\x62illing_account\x18\x1c \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12price_reference_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\"R\n\x11ProvisioningState\x12\"\n\x1ePROVISIONING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x05\"\xa3\x01\n\x10SuspensionReason\x12!\n\x1dSUSPENSION_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12RESELLER_INITIATED\x10\x01\x12\x0f\n\x0bTRIAL_ENDED\x10\x02\x12\x1c\n\x18RENEWAL_WITH_TYPE_CANCEL\x10\x03\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x04\x12\t\n\x05OTHER\x10\x64:p\xea\x41m\n\'cloudchannel.googleapis.com/Entitlement\x12\x42\x61\x63\x63ounts/{account}/customers/{customer}/entitlements/{entitlement}\"_\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x15\n\x08\x65\x64itable\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"Y\n\x0f\x41ssociationInfo\x12\x46\n\x10\x62\x61se_entitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"`\n\x12ProvisionedService\x12\x1c\n\x0fprovisioning_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06sku_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc5\x01\n\x12\x43ommitmentSettings\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x01\"\xb8\x01\n\x0fRenewalSettings\x12\x16\n\x0e\x65nable_renewal\x18\x01 \x01(\x08\x12\x19\n\x11resize_unit_count\x18\x02 \x01(\x08\x12:\n\x0cpayment_plan\x18\x05 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12\x36\n\rpayment_cycle\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\"L\n\rTrialSettings\x12\r\n\x05trial\x18\x01 \x01(\x08\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbf\x01\n\x0fTransferableSku\x12J\n\x14transfer_eligibility\x18\t \x01(\x0b\x32,.google.cloud.channel.v1.TransferEligibility\x12)\n\x03sku\x18\x0b \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x35\n\nlegacy_sku\x18\x0c \x01(\x0b\x32\x1c.google.cloud.channel.v1.SkuB\x03\xe0\x41\x01\"\xa6\x02\n\x13TransferEligibility\x12\x13\n\x0bis_eligible\x18\x01 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12Q\n\x14ineligibility_reason\x18\x03 \x01(\x0e\x32\x33.google.cloud.channel.v1.TransferEligibility.Reason\"\x91\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x01\x12\x14\n\x10SKU_NOT_ELIGIBLE\x10\x02\x12\x11\n\rSKU_SUSPENDED\x10\x03\x12*\n&CHANNEL_PARTNER_NOT_AUTHORIZED_FOR_SKU\x10\x04\x42i\n\x1b\x63om.google.cloud.channel.v1B\x11\x45ntitlementsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb index b00a3357b6dd..b09e795cf707 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb @@ -12,7 +12,7 @@ require 'google/type/money_pb' -descriptor_data = "\n$google/cloud/channel/v1/offers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\xbc\x04\n\x05Offer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo\x12)\n\x03sku\x18\x03 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12+\n\x04plan\x18\x04 \x01(\x0b\x32\x1d.google.cloud.channel.v1.Plan\x12\x39\n\x0b\x63onstraints\x18\x05 \x01(\x0b\x32$.google.cloud.channel.v1.Constraints\x12\x44\n\x12price_by_resources\x18\x06 \x03(\x0b\x32(.google.cloud.channel.v1.PriceByResource\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x15parameter_definitions\x18\t \x03(\x0b\x32,.google.cloud.channel.v1.ParameterDefinition\x12\x11\n\tdeal_code\x18\x0c \x01(\t:I\xea\x41\x46\n!cloudchannel.googleapis.com/Offer\x12!accounts/{account}/offers/{offer}\"\x88\x03\n\x13ParameterDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0eparameter_type\x18\x02 \x01(\x0e\x32:.google.cloud.channel.v1.ParameterDefinition.ParameterType\x12\x31\n\tmin_value\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x31\n\tmax_value\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x36\n\x0e\x61llowed_values\x18\x05 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x10\n\x08optional\x18\x06 \x01(\x08\"_\n\rParameterType\x12\x1e\n\x1aPARAMETER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\n\n\x06STRING\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\"Y\n\x0b\x43onstraints\x12J\n\x14\x63ustomer_constraints\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.CustomerConstraints\"\xd7\x01\n\x13\x43ustomerConstraints\x12\x17\n\x0f\x61llowed_regions\x18\x01 \x03(\t\x12W\n\x16\x61llowed_customer_types\x18\x02 \x03(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12N\n\x17promotional_order_types\x18\x03 \x03(\x0e\x32-.google.cloud.channel.v1.PromotionalOrderType\"\x86\x02\n\x04Plan\x12:\n\x0cpayment_plan\x18\x01 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12:\n\x0cpayment_type\x18\x02 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentType\x12\x36\n\rpayment_cycle\x18\x03 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x35\n\x0ctrial_period\x18\x04 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x17\n\x0f\x62illing_account\x18\x05 \x01(\t\"\xb9\x01\n\x0fPriceByResource\x12<\n\rresource_type\x18\x01 \x01(\x0e\x32%.google.cloud.channel.v1.ResourceType\x12-\n\x05price\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x39\n\x0cprice_phases\x18\x03 \x03(\x0b\x32#.google.cloud.channel.v1.PricePhase\"\x8a\x01\n\x05Price\x12&\n\nbase_price\x18\x01 \x01(\x0b\x32\x12.google.type.Money\x12\x10\n\x08\x64iscount\x18\x02 \x01(\x01\x12+\n\x0f\x65\x66\x66\x65\x63tive_price\x18\x03 \x01(\x0b\x32\x12.google.type.Money\x12\x1a\n\x12\x65xternal_price_uri\x18\x04 \x01(\t\"\xd9\x01\n\nPricePhase\x12\x38\n\x0bperiod_type\x18\x01 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\x12\x14\n\x0c\x66irst_period\x18\x02 \x01(\x05\x12\x13\n\x0blast_period\x18\x03 \x01(\x05\x12-\n\x05price\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x37\n\x0bprice_tiers\x18\x05 \x03(\x0b\x32\".google.cloud.channel.v1.PriceTier\"i\n\tPriceTier\x12\x16\n\x0e\x66irst_resource\x18\x01 \x01(\x05\x12\x15\n\rlast_resource\x18\x02 \x01(\x05\x12-\n\x05price\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\"T\n\x06Period\x12\x10\n\x08\x64uration\x18\x01 \x01(\x05\x12\x38\n\x0bperiod_type\x18\x02 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType*m\n\x14PromotionalOrderType\x12 \n\x1cPROMOTIONAL_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_UPGRADE\x10\x01\x12\x0c\n\x08TRANSFER\x10\x02\x12\x14\n\x10PROMOTION_SWITCH\x10\x03*k\n\x0bPaymentPlan\x12\x1c\n\x18PAYMENT_PLAN_UNSPECIFIED\x10\x00\x12\x0e\n\nCOMMITMENT\x10\x01\x12\x0c\n\x08\x46LEXIBLE\x10\x02\x12\x08\n\x04\x46REE\x10\x03\x12\t\n\x05TRIAL\x10\x04\x12\x0b\n\x07OFFLINE\x10\x05*D\n\x0bPaymentType\x12\x1c\n\x18PAYMENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PREPAY\x10\x01\x12\x0b\n\x07POSTPAY\x10\x02*\x8a\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04SEAT\x10\x01\x12\x07\n\x03MAU\x10\x02\x12\x06\n\x02GB\x10\x03\x12\x11\n\rLICENSED_USER\x10\x04\x12\x0b\n\x07MINUTES\x10\x05\x12\x0e\n\nIAAS_USAGE\x10\x06\x12\x10\n\x0cSUBSCRIPTION\x10\x07*G\n\nPeriodType\x12\x1b\n\x17PERIOD_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44\x41Y\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x08\n\x04YEAR\x10\x03\x42\x63\n\x1b\x63om.google.cloud.channel.v1B\x0bOffersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" +descriptor_data = "\n$google/cloud/channel/v1/offers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\xbc\x04\n\x05Offer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo\x12)\n\x03sku\x18\x03 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12+\n\x04plan\x18\x04 \x01(\x0b\x32\x1d.google.cloud.channel.v1.Plan\x12\x39\n\x0b\x63onstraints\x18\x05 \x01(\x0b\x32$.google.cloud.channel.v1.Constraints\x12\x44\n\x12price_by_resources\x18\x06 \x03(\x0b\x32(.google.cloud.channel.v1.PriceByResource\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x15parameter_definitions\x18\t \x03(\x0b\x32,.google.cloud.channel.v1.ParameterDefinition\x12\x11\n\tdeal_code\x18\x0c \x01(\t:I\xea\x41\x46\n!cloudchannel.googleapis.com/Offer\x12!accounts/{account}/offers/{offer}\"\x88\x03\n\x13ParameterDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0eparameter_type\x18\x02 \x01(\x0e\x32:.google.cloud.channel.v1.ParameterDefinition.ParameterType\x12\x31\n\tmin_value\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x31\n\tmax_value\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x36\n\x0e\x61llowed_values\x18\x05 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x10\n\x08optional\x18\x06 \x01(\x08\"_\n\rParameterType\x12\x1e\n\x1aPARAMETER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\n\n\x06STRING\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\"Y\n\x0b\x43onstraints\x12J\n\x14\x63ustomer_constraints\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.CustomerConstraints\"\xd7\x01\n\x13\x43ustomerConstraints\x12\x17\n\x0f\x61llowed_regions\x18\x01 \x03(\t\x12W\n\x16\x61llowed_customer_types\x18\x02 \x03(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12N\n\x17promotional_order_types\x18\x03 \x03(\x0e\x32-.google.cloud.channel.v1.PromotionalOrderType\"\x86\x02\n\x04Plan\x12:\n\x0cpayment_plan\x18\x01 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12:\n\x0cpayment_type\x18\x02 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentType\x12\x36\n\rpayment_cycle\x18\x03 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x35\n\x0ctrial_period\x18\x04 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x17\n\x0f\x62illing_account\x18\x05 \x01(\t\"\xb9\x01\n\x0fPriceByResource\x12<\n\rresource_type\x18\x01 \x01(\x0e\x32%.google.cloud.channel.v1.ResourceType\x12-\n\x05price\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x39\n\x0cprice_phases\x18\x03 \x03(\x0b\x32#.google.cloud.channel.v1.PricePhase\"\x8a\x02\n\x05Price\x12&\n\nbase_price\x18\x01 \x01(\x0b\x32\x12.google.type.Money\x12\x10\n\x08\x64iscount\x18\x02 \x01(\x01\x12+\n\x0f\x65\x66\x66\x65\x63tive_price\x18\x03 \x01(\x0b\x32\x12.google.type.Money\x12\x35\n\x0cprice_period\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x1a\n\x12\x65xternal_price_uri\x18\x04 \x01(\t\x12G\n\x13\x64iscount_components\x18\x05 \x03(\x0b\x32*.google.cloud.channel.v1.DiscountComponent\"\xd9\x01\n\nPricePhase\x12\x38\n\x0bperiod_type\x18\x01 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\x12\x14\n\x0c\x66irst_period\x18\x02 \x01(\x05\x12\x13\n\x0blast_period\x18\x03 \x01(\x05\x12-\n\x05price\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x37\n\x0bprice_tiers\x18\x05 \x03(\x0b\x32\".google.cloud.channel.v1.PriceTier\"i\n\tPriceTier\x12\x16\n\x0e\x66irst_resource\x18\x01 \x01(\x05\x12\x15\n\rlast_resource\x18\x02 \x01(\x05\x12-\n\x05price\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\"T\n\x06Period\x12\x10\n\x08\x64uration\x18\x01 \x01(\x05\x12\x38\n\x0bperiod_type\x18\x02 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\"\xb3\x01\n\x11\x44iscountComponent\x12\x1d\n\x13\x64iscount_percentage\x18\x03 \x01(\x01H\x00\x12/\n\x11\x64iscount_absolute\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12<\n\rdiscount_type\x18\x02 \x01(\x0e\x32%.google.cloud.channel.v1.DiscountTypeB\x10\n\x0e\x64iscount_value*m\n\x14PromotionalOrderType\x12 \n\x1cPROMOTIONAL_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_UPGRADE\x10\x01\x12\x0c\n\x08TRANSFER\x10\x02\x12\x14\n\x10PROMOTION_SWITCH\x10\x03*k\n\x0bPaymentPlan\x12\x1c\n\x18PAYMENT_PLAN_UNSPECIFIED\x10\x00\x12\x0e\n\nCOMMITMENT\x10\x01\x12\x0c\n\x08\x46LEXIBLE\x10\x02\x12\x08\n\x04\x46REE\x10\x03\x12\t\n\x05TRIAL\x10\x04\x12\x0b\n\x07OFFLINE\x10\x05*D\n\x0bPaymentType\x12\x1c\n\x18PAYMENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PREPAY\x10\x01\x12\x0b\n\x07POSTPAY\x10\x02*\x8a\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04SEAT\x10\x01\x12\x07\n\x03MAU\x10\x02\x12\x06\n\x02GB\x10\x03\x12\x11\n\rLICENSED_USER\x10\x04\x12\x0b\n\x07MINUTES\x10\x05\x12\x0e\n\nIAAS_USAGE\x10\x06\x12\x10\n\x0cSUBSCRIPTION\x10\x07*G\n\nPeriodType\x12\x1b\n\x17PERIOD_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44\x41Y\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x08\n\x04YEAR\x10\x03*\x96\x01\n\x0c\x44iscountType\x12\x1d\n\x19\x44ISCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11REGIONAL_DISCOUNT\x10\x01\x12\x18\n\x14PROMOTIONAL_DISCOUNT\x10\x02\x12\x12\n\x0eSALES_DISCOUNT\x10\x03\x12\x13\n\x0fRESELLER_MARGIN\x10\x04\x12\r\n\tDEAL_CODE\x10\x05\x42\x63\n\x1b\x63om.google.cloud.channel.v1B\x0bOffersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -57,11 +57,13 @@ module V1 PricePhase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PricePhase").msgclass PriceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PriceTier").msgclass Period = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Period").msgclass + DiscountComponent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DiscountComponent").msgclass PromotionalOrderType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PromotionalOrderType").enummodule PaymentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PaymentPlan").enummodule PaymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PaymentType").enummodule ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ResourceType").enummodule PeriodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PeriodType").enummodule + DiscountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DiscountType").enummodule end end end diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb index 19734186cde4..cfebb4537f92 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb @@ -11,7 +11,7 @@ require 'google/type/decimal_pb' -descriptor_data = "\n\'google/cloud/channel/v1/repricing.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x19google/type/decimal.proto\"\xc5\x02\n\x17\x43ustomerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x97\x01\xea\x41\x93\x01\n3cloudchannel.googleapis.com/CustomerRepricingConfig\x12\\accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}\"\xef\x02\n\x1d\x43hannelPartnerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xbb\x01\xea\x41\xb7\x01\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\x12zaccounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}\"\x85\x05\n\x0fRepricingConfig\x12\x62\n\x17\x65ntitlement_granularity\x18\x04 \x01(\x0b\x32?.google.cloud.channel.v1.RepricingConfig.EntitlementGranularityH\x00\x12m\n\x1b\x63hannel_partner_granularity\x18\x05 \x01(\x0b\x32\x42.google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularityB\x02\x18\x01H\x00\x12\x37\n\x17\x65\x66\x66\x65\x63tive_invoice_month\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12\x45\n\nadjustment\x18\x02 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x03 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12K\n\x15\x63onditional_overrides\x18\x06 \x03(\x0b\x32,.google.cloud.channel.v1.ConditionalOverride\x1a[\n\x16\x45ntitlementGranularity\x12\x41\n\x0b\x65ntitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x1a\x1f\n\x19\x43hannelPartnerGranularity:\x02\x18\x01\x42\r\n\x0bgranularity\"s\n\x13RepricingAdjustment\x12N\n\x15percentage_adjustment\x18\x02 \x01(\x0b\x32-.google.cloud.channel.v1.PercentageAdjustmentH\x00\x42\x0c\n\nadjustment\"@\n\x14PercentageAdjustment\x12(\n\npercentage\x18\x02 \x01(\x0b\x32\x14.google.type.Decimal\"\xf2\x01\n\x13\x43onditionalOverride\x12\x45\n\nadjustment\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x02 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12M\n\x13repricing_condition\x18\x03 \x01(\x0b\x32+.google.cloud.channel.v1.RepricingConditionB\x03\xe0\x41\x02\"l\n\x12RepricingCondition\x12I\n\x13sku_group_condition\x18\x01 \x01(\x0b\x32*.google.cloud.channel.v1.SkuGroupConditionH\x00\x42\x0b\n\tcondition\"&\n\x11SkuGroupCondition\x12\x11\n\tsku_group\x18\x01 \x01(\t*]\n\x0eRebillingBasis\x12\x1f\n\x1bREBILLING_BASIS_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43OST_AT_LIST\x10\x01\x12\x18\n\x14\x44IRECT_CUSTOMER_COST\x10\x02\x42\x66\n\x1b\x63om.google.cloud.channel.v1B\x0eRepricingProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" +descriptor_data = "\n\'google/cloud/channel/v1/repricing.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x19google/type/decimal.proto\"\xc5\x02\n\x17\x43ustomerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x97\x01\xea\x41\x93\x01\n3cloudchannel.googleapis.com/CustomerRepricingConfig\x12\\accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}\"\xef\x02\n\x1d\x43hannelPartnerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xbb\x01\xea\x41\xb7\x01\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\x12zaccounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}\"\x8a\x05\n\x0fRepricingConfig\x12g\n\x17\x65ntitlement_granularity\x18\x04 \x01(\x0b\x32?.google.cloud.channel.v1.RepricingConfig.EntitlementGranularityB\x03\xe0\x41\x02H\x00\x12m\n\x1b\x63hannel_partner_granularity\x18\x05 \x01(\x0b\x32\x42.google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularityB\x02\x18\x01H\x00\x12\x37\n\x17\x65\x66\x66\x65\x63tive_invoice_month\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12\x45\n\nadjustment\x18\x02 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x03 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12K\n\x15\x63onditional_overrides\x18\x06 \x03(\x0b\x32,.google.cloud.channel.v1.ConditionalOverride\x1a[\n\x16\x45ntitlementGranularity\x12\x41\n\x0b\x65ntitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x1a\x1f\n\x19\x43hannelPartnerGranularity:\x02\x18\x01\x42\r\n\x0bgranularity\"s\n\x13RepricingAdjustment\x12N\n\x15percentage_adjustment\x18\x02 \x01(\x0b\x32-.google.cloud.channel.v1.PercentageAdjustmentH\x00\x42\x0c\n\nadjustment\"@\n\x14PercentageAdjustment\x12(\n\npercentage\x18\x02 \x01(\x0b\x32\x14.google.type.Decimal\"\xf2\x01\n\x13\x43onditionalOverride\x12\x45\n\nadjustment\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x02 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12M\n\x13repricing_condition\x18\x03 \x01(\x0b\x32+.google.cloud.channel.v1.RepricingConditionB\x03\xe0\x41\x02\"l\n\x12RepricingCondition\x12I\n\x13sku_group_condition\x18\x01 \x01(\x0b\x32*.google.cloud.channel.v1.SkuGroupConditionH\x00\x42\x0b\n\tcondition\"&\n\x11SkuGroupCondition\x12\x11\n\tsku_group\x18\x01 \x01(\t*]\n\x0eRebillingBasis\x12\x1f\n\x1bREBILLING_BASIS_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43OST_AT_LIST\x10\x01\x12\x18\n\x14\x44IRECT_CUSTOMER_COST\x10\x02\x42\x66\n\x1b\x63om.google.cloud.channel.v1B\x0eRepricingProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb b/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb index acf83858dc11..2fdc38b53a6b 100644 --- a/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb +++ b/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb @@ -23,7 +23,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\n%google/cloud/channel/v1/service.proto\x12\x17google.cloud.channel.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/channel/v1/billing_accounts.proto\x1a\x33google/cloud/channel/v1/channel_partner_links.proto\x1a$google/cloud/channel/v1/common.proto\x1a\'google/cloud/channel/v1/customers.proto\x1a\x31google/cloud/channel/v1/entitlement_changes.proto\x1a*google/cloud/channel/v1/entitlements.proto\x1a$google/cloud/channel/v1/offers.proto\x1a(google/cloud/channel/v1/operations.proto\x1a&google/cloud/channel/v1/products.proto\x1a\'google/cloud/channel/v1/repricing.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"t\n&CheckCloudIdentityAccountsExistRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x64omain\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13primary_admin_email\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf5\x01\n\x1c\x43loudIdentityCustomerAccount\x12\x10\n\x08\x65xisting\x18\x01 \x01(\x08\x12\r\n\x05owned\x18\x02 \x01(\x08\x12\x15\n\rcustomer_name\x18\x03 \x01(\t\x12\"\n\x1a\x63ustomer_cloud_identity_id\x18\x04 \x01(\t\x12N\n\rcustomer_type\x18\x05 \x01(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12)\n!channel_partner_cloud_identity_id\x18\x06 \x01(\t\"\x81\x01\n\'CheckCloudIdentityAccountsExistResponse\x12V\n\x17\x63loud_identity_accounts\x18\x01 \x03(\x0b\x32\x35.google.cloud.channel.v1.CloudIdentityCustomerAccount\"q\n\x14ListCustomersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x15ListCustomersResponse\x12\x34\n\tcustomers\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x12GetCustomerRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\"f\n\x15\x43reateCustomerRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32!.google.cloud.channel.v1.CustomerB\x03\xe0\x41\x02\"\x82\x01\n\x15UpdateCustomerRequest\x12\x38\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32!.google.cloud.channel.v1.CustomerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x15\x44\x65leteCustomerRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\"\xba\x02\n\x15ImportCustomerRequest\x12\x15\n\x06\x64omain\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x12 \n\x11\x63loud_identity_id\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x00\x12\"\n\x13primary_admin_email\x18\x08 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nauth_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13overwrite_if_exists\x18\x05 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1f\n\x12\x63hannel_partner_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12>\n\x08\x63ustomer\x18\x07 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudchannel.googleapis.com/CustomerB\x13\n\x11\x63ustomer_identity\"\xf1\x01\n\x1dProvisionCloudIdentityRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12G\n\x13\x63loud_identity_info\x18\x02 \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfo\x12\x30\n\x04user\x18\x03 \x01(\x0b\x32\".google.cloud.channel.v1.AdminUser\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x88\x01\n\x17ListEntitlementsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n\x18ListEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe0\x01\n\x1bListTransferableSkusRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x07 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x17\n\nauth_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rlanguage_code\x18\x06 \x01(\tB\x1f\n\x1dtransferred_customer_identity\"|\n\x1cListTransferableSkusResponse\x12\x43\n\x11transferable_skus\x18\x01 \x03(\x0b\x32(.google.cloud.channel.v1.TransferableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xfe\x01\n\x1dListTransferableOffersRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x05 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x03sku\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\x42\x1f\n\x1dtransferred_customer_identity\"\x82\x01\n\x1eListTransferableOffersResponse\x12G\n\x13transferable_offers\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.TransferableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"B\n\x11TransferableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\"V\n\x15GetEntitlementRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"\xaa\x01\n\x1eListChannelPartnerLinksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04view\x18\x04 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1fListChannelPartnerLinksResponse\x12J\n\x15\x63hannel_partner_links\x18\x01 \x03(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"u\n\x1cGetChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1f\x43reateChannelPartnerLinkRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\"\xba\x01\n\x1fUpdateChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"n\n!GetCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"\xa9\x01\n#ListCustomerRepricingConfigsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n$ListCustomerRepricingConfigsResponse\x12T\n\x1a\x63ustomer_repricing_configs\x18\x01 \x03(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbe\x01\n$CreateCustomerRepricingConfigRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12X\n\x19\x63ustomer_repricing_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"\x80\x01\n$UpdateCustomerRepricingConfigRequest\x12X\n\x19\x63ustomer_repricing_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"q\n$DeleteCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"z\n\'GetChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\xb9\x01\n)ListChannelPartnerRepricingConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n*ListChannelPartnerRepricingConfigsResponse\x12\x61\n!channel_partner_repricing_configs\x18\x01 \x03(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdb\x01\n*CreateChannelPartnerRepricingConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x65\n channel_partner_repricing_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"\x93\x01\n*UpdateChannelPartnerRepricingConfigRequest\x12\x65\n channel_partner_repricing_config\x18\x01 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"}\n*DeleteChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\\\n\x14ListSkuGroupsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x1fListSkuGroupBillableSkusRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x15ListSkuGroupsResponse\x12\x35\n\nsku_groups\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n ListSkuGroupBillableSkusResponse\x12;\n\rbillable_skus\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.BillableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x08SkuGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t:S\xea\x41P\n$cloudchannel.googleapis.com/SkuGroup\x12(accounts/{account}/skuGroups/{sku_group}\"c\n\x0b\x42illableSku\x12\x0b\n\x03sku\x18\x01 \x01(\t\x12\x18\n\x10sku_display_name\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x1c\n\x14service_display_name\x18\x04 \x01(\t\"\xb1\x01\n\x18\x43reateEntitlementRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12>\n\x0b\x65ntitlement\x18\x02 \x01(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1bTransferEntitlementsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x12\n\nauth_token\x18\x04 \x01(\t\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1cTransferEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\"\x94\x01\n#TransferEntitlementsToGoogleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x17\x43hangeParametersRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\nparameters\x18\x02 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1c\x43hangeRenewalSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xf5\x01\n\x12\x43hangeOfferRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05offer\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12;\n\nparameters\x18\x03 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x07 \x01(\tB\x03\xe0\x41\x01\"E\n\x17StartPaidServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x18\x43\x61ncelEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"G\n\x19SuspendEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"H\n\x1a\x41\x63tivateEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x12LookupOfferRequest\x12\x44\n\x0b\x65ntitlement\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"x\n\x13ListProductsRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x14ListProductsResponse\x12\x32\n\x08products\x18\x01 \x03(\x0b\x32 .google.cloud.channel.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudchannel.googleapis.com/Product\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x10ListSkusResponse\x12*\n\x04skus\x18\x01 \x03(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xab\x01\n\x11ListOffersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12show_future_offers\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"]\n\x12ListOffersResponse\x12.\n\x06offers\x18\x01 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x05\n\x1aListPurchasableSkusRequest\x12t\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32M.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseH\x00\x12h\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32G.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x19\x43reateEntitlementPurchase\x12\x14\n\x07product\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe4\x01\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n\x0b\x63hange_type\x18\x02 \x01(\x0e\x32R.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeTypeB\x03\xe0\x41\x02\"E\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UPGRADE\x10\x01\x12\r\n\tDOWNGRADE\x10\x02\x42\x11\n\x0fpurchase_option\"y\n\x1bListPurchasableSkusResponse\x12\x41\n\x10purchasable_skus\x18\x01 \x03(\x0b\x32\'.google.cloud.channel.v1.PurchasableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\";\n\x0ePurchasableSku\x12)\n\x03sku\x18\x01 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\"\xd4\x04\n\x1cListPurchasableOffersRequest\x12v\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32O.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchaseH\x00\x12j\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32I.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1aK\n\x19\x43reateEntitlementPurchase\x12\x10\n\x03sku\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x62illing_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x63\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07new_sku\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0fpurchase_option\"\x7f\n\x1dListPurchasableOffersResponse\x12\x45\n\x12purchasable_offers\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.PurchasableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"A\n\x10PurchasableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\"x\n#QueryEligibleBillingAccountsRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x11\n\x04skus\x18\x02 \x03(\tB\x03\xe0\x41\x02\"n\n$QueryEligibleBillingAccountsResponse\x12\x46\n\x13sku_purchase_groups\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.SkuPurchaseGroup\"}\n\x10SkuPurchaseGroup\x12\x0c\n\x04skus\x18\x01 \x03(\t\x12[\n\x1e\x62illing_account_purchase_infos\x18\x02 \x03(\x0b\x32\x33.google.cloud.channel.v1.BillingAccountPurchaseInfo\"^\n\x1a\x42illingAccountPurchaseInfo\x12@\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.channel.v1.BillingAccount\"O\n\x19RegisterSubscriberRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\"+\n\x1aRegisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"Q\n\x1bUnregisterSubscriberRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\"-\n\x1cUnregisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"_\n\x16ListSubscribersRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"[\n\x17ListSubscribersResponse\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x18\n\x10service_accounts\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xa6\x01\n\x1dListEntitlementChangesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1eListEntitlementChangesResponse\x12G\n\x13\x65ntitlement_changes\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.EntitlementChange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xc5R\n\x13\x43loudChannelService\x12\xd4\x01\n\rListCustomers\x12-.google.cloud.channel.v1.ListCustomersRequest\x1a..google.cloud.channel.v1.ListCustomersResponse\"d\x82\xd3\xe4\x93\x02^\x12!/v1/{parent=accounts/*}/customersZ9\x12\x37/v1/{parent=accounts/*/channelPartnerLinks/*}/customers\x12\xca\x01\n\x0bGetCustomer\x12+.google.cloud.channel.v1.GetCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12!/v1/{name=accounts/*/customers/*}Z9\x12\x37/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xe8\x01\n\x1f\x43heckCloudIdentityAccountsExist\x12?.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest\x1a@.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist:\x01*\x12\xdd\x01\n\x0e\x43reateCustomer\x12..google.cloud.channel.v1.CreateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"!/v1/{parent=accounts/*}/customers:\x08\x63ustomerZC\"7/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:\x08\x63ustomer\x12\xf1\x01\n\x0eUpdateCustomer\x12..google.cloud.channel.v1.UpdateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01\x32*/v1/{customer.name=accounts/*/customers/*}:\x08\x63ustomerZL2@/v1/{customer.name=accounts/*/channelPartnerLinks/*/customers/*}:\x08\x63ustomer\x12\xc5\x01\n\x0e\x44\x65leteCustomer\x12..google.cloud.channel.v1.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^*!/v1/{name=accounts/*/customers/*}Z9*7/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xdd\x01\n\x0eImportCustomer\x12..google.cloud.channel.v1.ImportCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"(/v1/{parent=accounts/*}/customers:import:\x01*ZC\">/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:import:\x01*\x12\xd8\x01\n\x16ProvisionCloudIdentity\x12\x36.google.cloud.channel.v1.ProvisionCloudIdentityRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1d\n\x08\x43ustomer\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x41\"\"9/v1/{name=accounts/*/customers/*/entitlements/*}:activate:\x01*\x12\xe4\x01\n\x14TransferEntitlements\x12\x34.google.cloud.channel.v1.TransferEntitlementsRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\x31\n\x1cTransferEntitlementsResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{parent=accounts/*/customers/*}:transferEntitlements:\x01*\x12\xf5\x01\n\x1cTransferEntitlementsToGoogle\x12<.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle:\x01*\x12\xc1\x01\n\x17ListChannelPartnerLinks\x12\x37.google.cloud.channel.v1.ListChannelPartnerLinksRequest\x1a\x38.google.cloud.channel.v1.ListChannelPartnerLinksResponse\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=accounts/*}/channelPartnerLinks\x12\xb0\x01\n\x15GetChannelPartnerLink\x12\x35.google.cloud.channel.v1.GetChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{name=accounts/*/channelPartnerLinks/*}\x12\xcc\x01\n\x18\x43reateChannelPartnerLink\x12\x38.google.cloud.channel.v1.CreateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"I\x82\xd3\xe4\x93\x02\x43\"+/v1/{parent=accounts/*}/channelPartnerLinks:\x14\x63hannel_partner_link\x12\xb9\x01\n\x18UpdateChannelPartnerLink\x12\x38.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"6\x82\xd3\xe4\x93\x02\x30\x32+/v1/{name=accounts/*/channelPartnerLinks/*}:\x01*\x12\xd7\x01\n\x1aGetCustomerRepricingConfig\x12:.google.cloud.channel.v1.GetCustomerRepricingConfigRequest\x1a\x30.google.cloud.channel.v1.CustomerRepricingConfig\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\x12\x12*\n\x08\x63ustomer\x18\x07 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudchannel.googleapis.com/CustomerB\x13\n\x11\x63ustomer_identity\"\xf1\x01\n\x1dProvisionCloudIdentityRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12G\n\x13\x63loud_identity_info\x18\x02 \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfo\x12\x30\n\x04user\x18\x03 \x01(\x0b\x32\".google.cloud.channel.v1.AdminUser\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x88\x01\n\x17ListEntitlementsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n\x18ListEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe0\x01\n\x1bListTransferableSkusRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x07 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x17\n\nauth_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rlanguage_code\x18\x06 \x01(\tB\x1f\n\x1dtransferred_customer_identity\"|\n\x1cListTransferableSkusResponse\x12\x43\n\x11transferable_skus\x18\x01 \x03(\x0b\x32(.google.cloud.channel.v1.TransferableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xfe\x01\n\x1dListTransferableOffersRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x05 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x03sku\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\x42\x1f\n\x1dtransferred_customer_identity\"\x82\x01\n\x1eListTransferableOffersResponse\x12G\n\x13transferable_offers\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.TransferableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x11TransferableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x1f\n\x12price_reference_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"V\n\x15GetEntitlementRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"\xaa\x01\n\x1eListChannelPartnerLinksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04view\x18\x04 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1fListChannelPartnerLinksResponse\x12J\n\x15\x63hannel_partner_links\x18\x01 \x03(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"u\n\x1cGetChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1f\x43reateChannelPartnerLinkRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\"\xba\x01\n\x1fUpdateChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"n\n!GetCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"\xa9\x01\n#ListCustomerRepricingConfigsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n$ListCustomerRepricingConfigsResponse\x12T\n\x1a\x63ustomer_repricing_configs\x18\x01 \x03(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbe\x01\n$CreateCustomerRepricingConfigRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12X\n\x19\x63ustomer_repricing_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"\x80\x01\n$UpdateCustomerRepricingConfigRequest\x12X\n\x19\x63ustomer_repricing_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"q\n$DeleteCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"z\n\'GetChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\xb9\x01\n)ListChannelPartnerRepricingConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n*ListChannelPartnerRepricingConfigsResponse\x12\x61\n!channel_partner_repricing_configs\x18\x01 \x03(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdb\x01\n*CreateChannelPartnerRepricingConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x65\n channel_partner_repricing_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"\x93\x01\n*UpdateChannelPartnerRepricingConfigRequest\x12\x65\n channel_partner_repricing_config\x18\x01 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"}\n*DeleteChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\\\n\x14ListSkuGroupsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x1fListSkuGroupBillableSkusRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x15ListSkuGroupsResponse\x12\x35\n\nsku_groups\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n ListSkuGroupBillableSkusResponse\x12;\n\rbillable_skus\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.BillableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x08SkuGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t:S\xea\x41P\n$cloudchannel.googleapis.com/SkuGroup\x12(accounts/{account}/skuGroups/{sku_group}\"c\n\x0b\x42illableSku\x12\x0b\n\x03sku\x18\x01 \x01(\t\x12\x18\n\x10sku_display_name\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x1c\n\x14service_display_name\x18\x04 \x01(\t\"\xb1\x01\n\x18\x43reateEntitlementRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12>\n\x0b\x65ntitlement\x18\x02 \x01(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1bTransferEntitlementsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x12\n\nauth_token\x18\x04 \x01(\t\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1cTransferEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\"\x94\x01\n#TransferEntitlementsToGoogleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x17\x43hangeParametersRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\nparameters\x18\x02 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1c\x43hangeRenewalSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x02\n\x12\x43hangeOfferRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05offer\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12;\n\nparameters\x18\x03 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12price_reference_id\x18\x08 \x01(\tB\x03\xe0\x41\x01\"E\n\x17StartPaidServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x18\x43\x61ncelEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"G\n\x19SuspendEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"H\n\x1a\x41\x63tivateEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x12LookupOfferRequest\x12\x44\n\x0b\x65ntitlement\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"x\n\x13ListProductsRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x14ListProductsResponse\x12\x32\n\x08products\x18\x01 \x03(\x0b\x32 .google.cloud.channel.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudchannel.googleapis.com/Product\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x10ListSkusResponse\x12*\n\x04skus\x18\x01 \x03(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xab\x01\n\x11ListOffersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12show_future_offers\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"]\n\x12ListOffersResponse\x12.\n\x06offers\x18\x01 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x05\n\x1aListPurchasableSkusRequest\x12t\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32M.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseH\x00\x12h\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32G.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x19\x43reateEntitlementPurchase\x12\x14\n\x07product\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe4\x01\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n\x0b\x63hange_type\x18\x02 \x01(\x0e\x32R.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeTypeB\x03\xe0\x41\x02\"E\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UPGRADE\x10\x01\x12\r\n\tDOWNGRADE\x10\x02\x42\x11\n\x0fpurchase_option\"y\n\x1bListPurchasableSkusResponse\x12\x41\n\x10purchasable_skus\x18\x01 \x03(\x0b\x32\'.google.cloud.channel.v1.PurchasableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\";\n\x0ePurchasableSku\x12)\n\x03sku\x18\x01 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\"\xd4\x04\n\x1cListPurchasableOffersRequest\x12v\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32O.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchaseH\x00\x12j\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32I.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1aK\n\x19\x43reateEntitlementPurchase\x12\x10\n\x03sku\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x62illing_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x63\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07new_sku\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0fpurchase_option\"\x7f\n\x1dListPurchasableOffersResponse\x12\x45\n\x12purchasable_offers\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.PurchasableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x10PurchasableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x1f\n\x12price_reference_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"x\n#QueryEligibleBillingAccountsRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x11\n\x04skus\x18\x02 \x03(\tB\x03\xe0\x41\x02\"n\n$QueryEligibleBillingAccountsResponse\x12\x46\n\x13sku_purchase_groups\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.SkuPurchaseGroup\"}\n\x10SkuPurchaseGroup\x12\x0c\n\x04skus\x18\x01 \x03(\t\x12[\n\x1e\x62illing_account_purchase_infos\x18\x02 \x03(\x0b\x32\x33.google.cloud.channel.v1.BillingAccountPurchaseInfo\"^\n\x1a\x42illingAccountPurchaseInfo\x12@\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.channel.v1.BillingAccount\"\xa4\x01\n\x19RegisterSubscriberRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nintegrator\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"+\n\x1aRegisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"\xa6\x01\n\x1bUnregisterSubscriberRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nintegrator\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"-\n\x1cUnregisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"\xb4\x01\n\x16ListSubscribersRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\nintegrator\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"[\n\x17ListSubscribersResponse\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x18\n\x10service_accounts\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xa6\x01\n\x1dListEntitlementChangesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1eListEntitlementChangesResponse\x12G\n\x13\x65ntitlement_changes\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.EntitlementChange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe9S\n\x13\x43loudChannelService\x12\xd4\x01\n\rListCustomers\x12-.google.cloud.channel.v1.ListCustomersRequest\x1a..google.cloud.channel.v1.ListCustomersResponse\"d\x82\xd3\xe4\x93\x02^\x12!/v1/{parent=accounts/*}/customersZ9\x12\x37/v1/{parent=accounts/*/channelPartnerLinks/*}/customers\x12\xca\x01\n\x0bGetCustomer\x12+.google.cloud.channel.v1.GetCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12!/v1/{name=accounts/*/customers/*}Z9\x12\x37/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xe8\x01\n\x1f\x43heckCloudIdentityAccountsExist\x12?.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest\x1a@.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist:\x01*\x12\xdd\x01\n\x0e\x43reateCustomer\x12..google.cloud.channel.v1.CreateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"!/v1/{parent=accounts/*}/customers:\x08\x63ustomerZC\"7/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:\x08\x63ustomer\x12\xf1\x01\n\x0eUpdateCustomer\x12..google.cloud.channel.v1.UpdateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01\x32*/v1/{customer.name=accounts/*/customers/*}:\x08\x63ustomerZL2@/v1/{customer.name=accounts/*/channelPartnerLinks/*/customers/*}:\x08\x63ustomer\x12\xc5\x01\n\x0e\x44\x65leteCustomer\x12..google.cloud.channel.v1.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^*!/v1/{name=accounts/*/customers/*}Z9*7/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xdd\x01\n\x0eImportCustomer\x12..google.cloud.channel.v1.ImportCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"(/v1/{parent=accounts/*}/customers:import:\x01*ZC\">/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:import:\x01*\x12\xd8\x01\n\x16ProvisionCloudIdentity\x12\x36.google.cloud.channel.v1.ProvisionCloudIdentityRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1d\n\x08\x43ustomer\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x41\"\"9/v1/{name=accounts/*/customers/*/entitlements/*}:activate:\x01*\x12\xe4\x01\n\x14TransferEntitlements\x12\x34.google.cloud.channel.v1.TransferEntitlementsRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\x31\n\x1cTransferEntitlementsResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{parent=accounts/*/customers/*}:transferEntitlements:\x01*\x12\xf5\x01\n\x1cTransferEntitlementsToGoogle\x12<.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle:\x01*\x12\xc1\x01\n\x17ListChannelPartnerLinks\x12\x37.google.cloud.channel.v1.ListChannelPartnerLinksRequest\x1a\x38.google.cloud.channel.v1.ListChannelPartnerLinksResponse\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=accounts/*}/channelPartnerLinks\x12\xb0\x01\n\x15GetChannelPartnerLink\x12\x35.google.cloud.channel.v1.GetChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{name=accounts/*/channelPartnerLinks/*}\x12\xcc\x01\n\x18\x43reateChannelPartnerLink\x12\x38.google.cloud.channel.v1.CreateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"I\x82\xd3\xe4\x93\x02\x43\"+/v1/{parent=accounts/*}/channelPartnerLinks:\x14\x63hannel_partner_link\x12\xb9\x01\n\x18UpdateChannelPartnerLink\x12\x38.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"6\x82\xd3\xe4\x93\x02\x30\x32+/v1/{name=accounts/*/channelPartnerLinks/*}:\x01*\x12\xd7\x01\n\x1aGetCustomerRepricingConfig\x12:.google.cloud.channel.v1.GetCustomerRepricingConfigRequest\x1a\x30.google.cloud.channel.v1.CustomerRepricingConfig\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\x12\x12*] + # Breakdown of the discount into its components. + # This will be empty if there is no discount present. class Price include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -253,6 +262,26 @@ class Period extend ::Google::Protobuf::MessageExts::ClassMethods end + # Represents a single component of the total discount applicable on a Price. + # @!attribute [rw] discount_percentage + # @return [::Float] + # Discount percentage, represented as decimal. + # For example, a 20% discount will be represented as 0.2. + # + # Note: The following fields are mutually exclusive: `discount_percentage`, `discount_absolute`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discount_absolute + # @return [::Google::Type::Money] + # Fixed value discount. + # + # Note: The following fields are mutually exclusive: `discount_absolute`, `discount_percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discount_type + # @return [::Google::Cloud::Channel::V1::DiscountType] + # Type of the discount. + class DiscountComponent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Constraints type for Promotional offers. module PromotionalOrderType # Not used. @@ -347,6 +376,27 @@ module PeriodType # Year. YEAR = 3 end + + # Discount Type. + module DiscountType + # Not used. + DISCOUNT_TYPE_UNSPECIFIED = 0 + + # Regional discount. + REGIONAL_DISCOUNT = 1 + + # Promotional discount. + PROMOTIONAL_DISCOUNT = 2 + + # Sales-provided discount. + SALES_DISCOUNT = 3 + + # Reseller margin. + RESELLER_MARGIN = 4 + + # Deal code discount. + DEAL_CODE = 5 + end end end end diff --git a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb index cc9751ede8ed..37c5856657eb 100644 --- a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb +++ b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb @@ -67,7 +67,7 @@ class ChannelPartnerRepricingConfig # Configuration for repricing a Google bill over a period of time. # @!attribute [rw] entitlement_granularity # @return [::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity] - # Applies the repricing configuration at the entitlement level. + # Required. Applies the repricing configuration at the entitlement level. # # Note: If a # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} diff --git a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb index a5c4651bf14a..182629568d8a 100644 --- a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb +++ b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb @@ -49,7 +49,8 @@ class CheckCloudIdentityAccountsExistRequest # @!attribute [rw] owned # @return [::Boolean] # Returns true if the Cloud Identity account is associated with a customer - # of the Channel Services partner. + # of the Channel Services partner (with active subscriptions or purchase + # consents). # @!attribute [rw] customer_name # @return [::String] # If owned = true, the name of the customer that owns the Cloud Identity @@ -423,6 +424,11 @@ class ListTransferableOffersResponse # @!attribute [rw] offer # @return [::Google::Cloud::Channel::V1::Offer] # Offer with parameter constraints updated to allow the Transfer. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. class TransferableOffer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -753,7 +759,8 @@ class DeleteChannelPartnerRepricingConfigRequest # @return [::String] # Optional. A token identifying a page of results beyond the first page. # Obtained through - # [ListSkuGroups.next_page_token][] of the previous + # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} + # of the previous # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups} # call. class ListSkuGroupsRequest @@ -775,7 +782,8 @@ class ListSkuGroupsRequest # @return [::String] # Optional. A token identifying a page of results beyond the first page. # Obtained through - # [ListSkuGroupBillableSkus.next_page_token][] of the previous + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} + # of the previous # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} # call. class ListSkuGroupBillableSkusRequest @@ -790,8 +798,9 @@ class ListSkuGroupBillableSkusRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve the next page of results. - # Pass to [ListSkuGroups.page_token][] to obtain that - # page. + # Pass to + # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest#page_token ListSkuGroupsRequest.page_token} + # to obtain that page. class ListSkuGroupsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -804,8 +813,9 @@ class ListSkuGroupsResponse # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve the next page of results. - # Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that - # page. + # Pass to + # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest#page_token ListSkuGroupBillableSkusRequest.page_token} + # to obtain that page. class ListSkuGroupBillableSkusResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -954,7 +964,8 @@ class TransferEntitlementsToGoogleRequest extend ::Google::Protobuf::MessageExts::ClassMethods end - # Request message for [CloudChannelService.ChangeParametersRequest][]. + # Request message for + # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters CloudChannelService.ChangeParameters}. # @!attribute [rw] name # @return [::String] # Required. The name of the entitlement to update. @@ -1060,6 +1071,11 @@ class ChangeRenewalSettingsRequest # # This field is only relevant for multi-currency accounts. It should be # left empty for single currency accounts. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. class ChangeOfferRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1296,6 +1312,9 @@ class ListOffersRequest # @!attribute [rw] offers # @return [::Array<::Google::Cloud::Channel::V1::Offer>] # The list of Offers requested. + # + # The pricing information for each Offer only includes the base price. + # Effective prices and discounts aren't populated. # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve the next page of results. @@ -1487,6 +1506,11 @@ class ListPurchasableOffersResponse # @!attribute [rw] offer # @return [::Google::Cloud::Channel::V1::Offer] # Offer. + # @!attribute [rw] price_reference_id + # @return [::String] + # Optional. Price reference ID for the offer. Only for offers that require + # additional price information. Used to guarantee that the pricing is + # consistent between quoting the offer and placing the order. class PurchasableOffer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1544,11 +1568,16 @@ class BillingAccountPurchaseInfo # Request Message for RegisterSubscriber. # @!attribute [rw] account # @return [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @!attribute [rw] service_account # @return [::String] # Required. Service account that provides subscriber access to the registered # topic. + # @!attribute [rw] integrator + # @return [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. class RegisterSubscriberRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1566,11 +1595,16 @@ class RegisterSubscriberResponse # Request Message for UnregisterSubscriber. # @!attribute [rw] account # @return [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @!attribute [rw] service_account # @return [::String] # Required. Service account to unregister from subscriber access to the # topic. + # @!attribute [rw] integrator + # @return [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. class UnregisterSubscriberRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1588,7 +1622,8 @@ class UnregisterSubscriberResponse # Request Message for ListSubscribers. # @!attribute [rw] account # @return [::String] - # Required. Resource name of the account. + # Optional. Resource name of the account. Required if integrator is not + # provided. Otherwise, leave this field empty/unset. # @!attribute [rw] page_size # @return [::Integer] # Optional. The maximum number of service accounts to return. The service may @@ -1602,6 +1637,10 @@ class UnregisterSubscriberResponse # # When paginating, all other parameters provided to `ListSubscribers` must # match the call that provided the page token. + # @!attribute [rw] integrator + # @return [::String] + # Optional. Resource name of the integrator. Required if account is not + # provided. Otherwise, leave this field empty/unset. class ListSubscribersRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb index bb92f78f17d6..0543005a4f55 100644 --- a/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb +++ b/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb @@ -28,7 +28,7 @@ module V1 # Format: accounts/\\{account_id}/customers/\\{customer_id} # @!attribute [rw] event_type # @return [::Google::Cloud::Channel::V1::CustomerEvent::Type] - # Type of event which happened on the customer. + # Type of event which happened for the customer. class CustomerEvent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -53,7 +53,7 @@ module Type # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} # @!attribute [rw] event_type # @return [::Google::Cloud::Channel::V1::EntitlementEvent::Type] - # Type of event which happened on the entitlement. + # Type of event which happened for the entitlement. class EntitlementEvent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb index ef1f60abb058..ab124c3f8cd1 100644 --- a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb +++ b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb @@ -41,6 +41,18 @@ def logger end end + def test_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.account_path account: "value0" + assert_equal "accounts/value0", path + end + end + def test_channel_partner_link_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb index 5aa51cd0f2c6..059096e54f0b 100644 --- a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb +++ b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb @@ -937,6 +937,7 @@ def test_change_offer purchase_order_id = "hello world" request_id = "hello world" billing_account = "hello world" + price_reference_id = "hello world" change_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -952,27 +953,27 @@ def test_change_offer end # Use hash object - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account }) do |_result, response| + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account do |_result, response| + client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account) do |_result, response| + client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account }, call_options) do |_result, response| + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account), call_options) do |_result, response| + client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -2607,6 +2608,7 @@ def test_register_subscriber # Create request parameters for a unary method. account = "hello world" service_account = "hello world" + integrator = "hello world" register_subscriber_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -2622,27 +2624,27 @@ def test_register_subscriber end # Use hash object - client.register_subscriber({ account: account, service_account: service_account }) do |_result, response| + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.register_subscriber account: account, service_account: service_account do |_result, response| + client.register_subscriber account: account, service_account: service_account, integrator: integrator do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account) do |_result, response| + client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.register_subscriber({ account: account, service_account: service_account }, call_options) do |_result, response| + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account), call_options) do |_result, response| + client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -2662,6 +2664,7 @@ def test_unregister_subscriber # Create request parameters for a unary method. account = "hello world" service_account = "hello world" + integrator = "hello world" unregister_subscriber_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -2677,27 +2680,27 @@ def test_unregister_subscriber end # Use hash object - client.unregister_subscriber({ account: account, service_account: service_account }) do |_result, response| + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.unregister_subscriber account: account, service_account: service_account do |_result, response| + client.unregister_subscriber account: account, service_account: service_account, integrator: integrator do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account) do |_result, response| + client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.unregister_subscriber({ account: account, service_account: service_account }, call_options) do |_result, response| + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account), call_options) do |_result, response| + client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -2718,6 +2721,7 @@ def test_list_subscribers account = "hello world" page_size = 42 page_token = "hello world" + integrator = "hello world" list_subscribers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -2733,27 +2737,27 @@ def test_list_subscribers end # Use hash object - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token }) do |_result, response| + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_subscribers account: account, page_size: page_size, page_token: page_token do |_result, response| + client.list_subscribers account: account, page_size: page_size, page_token: page_token, integrator: integrator do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token) do |_result, response| + client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb index 13337094fefc..ff1b770eb49b 100644 --- a/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb +++ b/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb @@ -1060,6 +1060,7 @@ def test_change_offer purchase_order_id = "hello world" request_id = "hello world" billing_account = "hello world" + price_reference_id = "hello world" change_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :change_offer, name @@ -1070,6 +1071,7 @@ def test_change_offer assert_equal "hello world", request["purchase_order_id"] assert_equal "hello world", request["request_id"] assert_equal "hello world", request["billing_account"] + assert_equal "hello world", request["price_reference_id"] refute_nil options end @@ -1080,35 +1082,35 @@ def test_change_offer end # Use hash object - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account }) do |response, operation| + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account do |response, operation| + client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account) do |response, operation| + client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account }, grpc_options) do |response, operation| + client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account), grpc_options) do |response, operation| + client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation @@ -2991,12 +2993,15 @@ def test_register_subscriber # Create request parameters for a unary method. account = "hello world" service_account = "hello world" + integrator = "hello world" register_subscriber_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :register_subscriber, name assert_kind_of ::Google::Cloud::Channel::V1::RegisterSubscriberRequest, request assert_equal "hello world", request["account"] assert_equal "hello world", request["service_account"] + assert_equal "hello world", request["integrator"] + assert request.has_integrator? refute_nil options end @@ -3007,31 +3012,31 @@ def test_register_subscriber end # Use hash object - client.register_subscriber({ account: account, service_account: service_account }) do |response, operation| + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.register_subscriber account: account, service_account: service_account do |response, operation| + client.register_subscriber account: account, service_account: service_account, integrator: integrator do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account) do |response, operation| + client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.register_subscriber({ account: account, service_account: service_account }, grpc_options) do |response, operation| + client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account), grpc_options) do |response, operation| + client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -3051,12 +3056,15 @@ def test_unregister_subscriber # Create request parameters for a unary method. account = "hello world" service_account = "hello world" + integrator = "hello world" unregister_subscriber_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :unregister_subscriber, name assert_kind_of ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, request assert_equal "hello world", request["account"] assert_equal "hello world", request["service_account"] + assert_equal "hello world", request["integrator"] + assert request.has_integrator? refute_nil options end @@ -3067,31 +3075,31 @@ def test_unregister_subscriber end # Use hash object - client.unregister_subscriber({ account: account, service_account: service_account }) do |response, operation| + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.unregister_subscriber account: account, service_account: service_account do |response, operation| + client.unregister_subscriber account: account, service_account: service_account, integrator: integrator do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account) do |response, operation| + client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.unregister_subscriber({ account: account, service_account: service_account }, grpc_options) do |response, operation| + client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account), grpc_options) do |response, operation| + client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -3112,6 +3120,7 @@ def test_list_subscribers account = "hello world" page_size = 42 page_token = "hello world" + integrator = "hello world" list_subscribers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_subscribers, name @@ -3119,6 +3128,8 @@ def test_list_subscribers assert_equal "hello world", request["account"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["integrator"] + assert request.has_integrator? refute_nil options end @@ -3129,31 +3140,31 @@ def test_list_subscribers end # Use hash object - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token }) do |response, operation| + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.list_subscribers account: account, page_size: page_size, page_token: page_token do |response, operation| + client.list_subscribers account: account, page_size: page_size, page_token: page_token, integrator: integrator do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token) do |response, operation| + client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end diff --git a/owl-bot-staging/google-cloud-channel-v1/.gitignore b/owl-bot-staging/google-cloud-channel-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json deleted file mode 100644 index 75f715971955..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudchannel.googleapis.com", - "api_shortname": "cloudchannel", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest", - "distribution_name": "google-cloud-channel-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudchannel", - "name_pretty": "Cloud Channel V1 API", - "product_documentation": "https://cloud.google.com/channel", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "You can use Channel Services to manage your relationships with your partners and your customers. Channel Services include a console and APIs to view and provision links between distributors and resellers, customers and entitlements. Note that google-cloud-channel-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-channel instead. See the readme for more details.", - "ruby-cloud-env-prefix": "CHANNEL", - "ruby-cloud-product-url": "https://cloud.google.com/channel", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-channel-v1/.rubocop.yml b/owl-bot-staging/google-cloud-channel-v1/.rubocop.yml deleted file mode 100644 index 443df9c4cf48..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-channel-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-channel-v1.rb" diff --git a/owl-bot-staging/google-cloud-channel-v1/.toys.rb b/owl-bot-staging/google-cloud-channel-v1/.toys.rb deleted file mode 100644 index 9a210f1427c7..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-channel-v1/.yardopts b/owl-bot-staging/google-cloud-channel-v1/.yardopts deleted file mode 100644 index 7c2ba14c6d1b..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Channel V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md deleted file mode 100644 index cab30df4740d..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-channel-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-channel-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/channel/v1" - -client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/channel/v1" - -::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-channel-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/channel/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-channel-v1/Gemfile b/owl-bot-staging/google-cloud-channel-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-channel-v1/LICENSE.md b/owl-bot-staging/google-cloud-channel-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-channel-v1/README.md b/owl-bot-staging/google-cloud-channel-v1/README.md deleted file mode 100644 index 6bc31623441f..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Channel V1 API - -The Cloud Channel API enables Google Cloud partners to have a single unified resale platform and APIs across all of Google Cloud including GCP, Workspace, Maps and Chrome. - -You can use Channel Services to manage your relationships with your partners and your customers. Channel Services include a console and APIs to view and provision links between distributors and resellers, customers and entitlements. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Channel V1 API. Most users should consider using -the main client gem, -[google-cloud-channel](https://rubygems.org/gems/google-cloud-channel). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-channel-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudchannel.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/channel/v1" - -client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new -request = ::Google::Cloud::Channel::V1::RunReportJobRequest.new # (request fields as keyword arguments...) -response = client.run_report_job request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-channel-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/channel) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/channel/v1" -require "logger" - -client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-channel`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-channel-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-channel`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-channel-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-channel-v1/Rakefile b/owl-bot-staging/google-cloud-channel-v1/Rakefile deleted file mode 100644 index 6ef427fc8482..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-channel-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["CHANNEL_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["CHANNEL_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["CHANNEL_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or CHANNEL_TEST_PROJECT=test123 CHANNEL_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/channel/v1/cloud_channel_reports_service/credentials" - ::Google::Cloud::Channel::V1::CloudChannelReportsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["CHANNEL_PROJECT"] = project - ENV["CHANNEL_TEST_PROJECT"] = project - ENV["CHANNEL_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-channel-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-channel-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-channel-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-channel-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-channel-v1" - header "google-cloud-channel-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-channel-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-channel-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-channel-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-channel-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json deleted file mode 100644 index 30e7fa2323e5..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/gapic_metadata.json +++ /dev/null @@ -1,287 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.channel.v1", - "libraryPackage": "::Google::Cloud::Channel::V1", - "services": { - "CloudChannelReportsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client", - "rpcs": { - "RunReportJob": { - "methods": [ - "run_report_job" - ] - }, - "FetchReportResults": { - "methods": [ - "fetch_report_results" - ] - }, - "ListReports": { - "methods": [ - "list_reports" - ] - } - } - } - } - }, - "CloudChannelService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Channel::V1::CloudChannelService::Client", - "rpcs": { - "ListCustomers": { - "methods": [ - "list_customers" - ] - }, - "GetCustomer": { - "methods": [ - "get_customer" - ] - }, - "CheckCloudIdentityAccountsExist": { - "methods": [ - "check_cloud_identity_accounts_exist" - ] - }, - "CreateCustomer": { - "methods": [ - "create_customer" - ] - }, - "UpdateCustomer": { - "methods": [ - "update_customer" - ] - }, - "DeleteCustomer": { - "methods": [ - "delete_customer" - ] - }, - "ImportCustomer": { - "methods": [ - "import_customer" - ] - }, - "ProvisionCloudIdentity": { - "methods": [ - "provision_cloud_identity" - ] - }, - "ListEntitlements": { - "methods": [ - "list_entitlements" - ] - }, - "ListTransferableSkus": { - "methods": [ - "list_transferable_skus" - ] - }, - "ListTransferableOffers": { - "methods": [ - "list_transferable_offers" - ] - }, - "GetEntitlement": { - "methods": [ - "get_entitlement" - ] - }, - "CreateEntitlement": { - "methods": [ - "create_entitlement" - ] - }, - "ChangeParameters": { - "methods": [ - "change_parameters" - ] - }, - "ChangeRenewalSettings": { - "methods": [ - "change_renewal_settings" - ] - }, - "ChangeOffer": { - "methods": [ - "change_offer" - ] - }, - "StartPaidService": { - "methods": [ - "start_paid_service" - ] - }, - "SuspendEntitlement": { - "methods": [ - "suspend_entitlement" - ] - }, - "CancelEntitlement": { - "methods": [ - "cancel_entitlement" - ] - }, - "ActivateEntitlement": { - "methods": [ - "activate_entitlement" - ] - }, - "TransferEntitlements": { - "methods": [ - "transfer_entitlements" - ] - }, - "TransferEntitlementsToGoogle": { - "methods": [ - "transfer_entitlements_to_google" - ] - }, - "ListChannelPartnerLinks": { - "methods": [ - "list_channel_partner_links" - ] - }, - "GetChannelPartnerLink": { - "methods": [ - "get_channel_partner_link" - ] - }, - "CreateChannelPartnerLink": { - "methods": [ - "create_channel_partner_link" - ] - }, - "UpdateChannelPartnerLink": { - "methods": [ - "update_channel_partner_link" - ] - }, - "GetCustomerRepricingConfig": { - "methods": [ - "get_customer_repricing_config" - ] - }, - "ListCustomerRepricingConfigs": { - "methods": [ - "list_customer_repricing_configs" - ] - }, - "CreateCustomerRepricingConfig": { - "methods": [ - "create_customer_repricing_config" - ] - }, - "UpdateCustomerRepricingConfig": { - "methods": [ - "update_customer_repricing_config" - ] - }, - "DeleteCustomerRepricingConfig": { - "methods": [ - "delete_customer_repricing_config" - ] - }, - "GetChannelPartnerRepricingConfig": { - "methods": [ - "get_channel_partner_repricing_config" - ] - }, - "ListChannelPartnerRepricingConfigs": { - "methods": [ - "list_channel_partner_repricing_configs" - ] - }, - "CreateChannelPartnerRepricingConfig": { - "methods": [ - "create_channel_partner_repricing_config" - ] - }, - "UpdateChannelPartnerRepricingConfig": { - "methods": [ - "update_channel_partner_repricing_config" - ] - }, - "DeleteChannelPartnerRepricingConfig": { - "methods": [ - "delete_channel_partner_repricing_config" - ] - }, - "ListSkuGroups": { - "methods": [ - "list_sku_groups" - ] - }, - "ListSkuGroupBillableSkus": { - "methods": [ - "list_sku_group_billable_skus" - ] - }, - "LookupOffer": { - "methods": [ - "lookup_offer" - ] - }, - "ListProducts": { - "methods": [ - "list_products" - ] - }, - "ListSkus": { - "methods": [ - "list_skus" - ] - }, - "ListOffers": { - "methods": [ - "list_offers" - ] - }, - "ListPurchasableSkus": { - "methods": [ - "list_purchasable_skus" - ] - }, - "ListPurchasableOffers": { - "methods": [ - "list_purchasable_offers" - ] - }, - "QueryEligibleBillingAccounts": { - "methods": [ - "query_eligible_billing_accounts" - ] - }, - "RegisterSubscriber": { - "methods": [ - "register_subscriber" - ] - }, - "UnregisterSubscriber": { - "methods": [ - "unregister_subscriber" - ] - }, - "ListSubscribers": { - "methods": [ - "list_subscribers" - ] - }, - "ListEntitlementChanges": { - "methods": [ - "list_entitlement_changes" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec b/owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec deleted file mode 100644 index 83249dea356f..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/google-cloud-channel-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/channel/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-channel-v1" - gem.version = Google::Cloud::Channel::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "You can use Channel Services to manage your relationships with your partners and your customers. Channel Services include a console and APIs to view and provision links between distributors and resellers, customers and entitlements. Note that google-cloud-channel-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-channel instead. See the readme for more details." - gem.summary = "The Cloud Channel API enables Google Cloud partners to have a single unified resale platform and APIs across all of Google Cloud including GCP, Workspace, Maps and Chrome." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb deleted file mode 100644 index 2f158767968b..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google-cloud-channel-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/channel/v1" diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb deleted file mode 100644 index e21406966c69..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/channel/v1/cloud_channel_reports_service" -require "google/cloud/channel/v1/cloud_channel_service" -require "google/cloud/channel/v1/version" - -module Google - module Cloud - module Channel - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/channel/v1" - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/channel/v1" - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/channel/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb deleted file mode 100644 index 5713df794012..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/billing_accounts_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/billing_accounts.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/channel/v1/billing_accounts.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8c\x02\n\x0e\x42illingAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bregion_code\x18\x05 \x01(\tB\x03\xe0\x41\x03:e\xea\x41\x62\n*cloudchannel.googleapis.com/BillingAccount\x12\x34\x61\x63\x63ounts/{account}/billingAccounts/{billing_account}Bl\n\x1b\x63om.google.cloud.channel.v1B\x14\x42illingAccountsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - BillingAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.BillingAccount").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb deleted file mode 100644 index 56e577221a6d..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/channel_partner_links_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/channel_partner_links.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/channel/v1/channel_partner_links.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\x04\n\x12\x43hannelPartnerLink\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x1areseller_cloud_identity_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\nlink_state\x18\x03 \x01(\x0e\x32\x30.google.cloud.channel.v1.ChannelPartnerLinkStateB\x03\xe0\x41\x02\x12\x1c\n\x0finvite_link_uri\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tpublic_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\\\n#channel_partner_cloud_identity_info\x18\x08 \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfoB\x03\xe0\x41\x03:r\xea\x41o\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12=accounts/{account}/channelPartnerLinks/{channel_partner_link}*>\n\x16\x43hannelPartnerLinkView\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02*z\n\x17\x43hannelPartnerLinkState\x12*\n&CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07INVITED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0b\n\x07REVOKED\x10\x03\x12\r\n\tSUSPENDED\x10\x04\x42p\n\x1b\x63om.google.cloud.channel.v1B\x18\x43hannelPartnerLinksProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.channel.v1.CloudIdentityInfo", "google/cloud/channel/v1/common.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - ChannelPartnerLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerLink").msgclass - ChannelPartnerLinkView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerLinkView").enummodule - ChannelPartnerLinkState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerLinkState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb deleted file mode 100644 index f61ee1243df9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/channel/v1/version" - -require "google/cloud/channel/v1/cloud_channel_reports_service/credentials" -require "google/cloud/channel/v1/cloud_channel_reports_service/paths" -require "google/cloud/channel/v1/cloud_channel_reports_service/operations" -require "google/cloud/channel/v1/cloud_channel_reports_service/client" -require "google/cloud/channel/v1/cloud_channel_reports_service/rest" - -module Google - module Cloud - module Channel - module V1 - ## - # CloudChannelReportsService lets Google Cloud resellers and - # distributors retrieve and combine a variety of data in Cloud Channel for - # multiple products (Google Cloud, Google Voice, and Google Workspace.) - # - # Deprecated: This service is being deprecated. Please use [Export Channel - # Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @deprecated This service is deprecated and may be removed in the next major version update. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/channel/v1/cloud_channel_reports_service" - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/channel/v1/cloud_channel_reports_service/rest" - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - module CloudChannelReportsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_channel_reports_service", "helpers.rb" -require "google/cloud/channel/v1/cloud_channel_reports_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb deleted file mode 100644 index effdd5beeb7a..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb +++ /dev/null @@ -1,805 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/channel/v1/reports_service_pb" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - ## - # Client for the CloudChannelReportsService service. - # - # CloudChannelReportsService lets Google Cloud resellers and - # distributors retrieve and combine a variety of data in Cloud Channel for - # multiple products (Google Cloud, Google Voice, and Google Workspace.) - # - # Deprecated: This service is being deprecated. Please use [Export Channel - # Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_channel_reports_service_stub - - ## - # Configure the CloudChannelReportsService Client class. - # - # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration} - # for a description of the configuration fields. - # - # @deprecated This service is deprecated and may be removed in the next major version update. - # - # @example - # - # # Modify the configuration for all CloudChannelReportsService clients - # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Channel", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelReportsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_channel_reports_service_stub.universe_domain - end - - ## - # Create a new CloudChannelReportsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudChannelReportsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/channel/v1/reports_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cloud_channel_reports_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Channel::V1::CloudChannelReportsService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_channel_reports_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_channel_reports_service_stub.logger - end - - # Service calls - - ## - # Begins generation of data for a given report. The report - # identifier is a UID (for example, `613bf59q`). - # - # Possible error codes: - # - # * PERMISSION_DENIED: The user doesn't have access to this report. - # * INVALID_ARGUMENT: Required request parameters are missing - # or invalid. - # * NOT_FOUND: The report identifier was not found. - # * INTERNAL: Any non-user error related to a technical issue - # in the backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue - # in the backend. Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata contains an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # To get the results of report generation, call - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} - # with the - # {::Google::Cloud::Channel::V1::RunReportJobResponse#report_job RunReportJobResponse.report_job}. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload run_report_job(request, options = nil) - # Pass arguments to `run_report_job` via a request object, either of type - # {::Google::Cloud::Channel::V1::RunReportJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::RunReportJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_report_job(name: nil, date_range: nil, filter: nil, language_code: nil) - # Pass arguments to `run_report_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The report's resource name. Specifies the account and report used - # to generate report data. The report_id identifier is a UID (for example, - # `613bf59q`). - # Name uses the format: - # accounts/\\{account_id}/reports/\\{report_id} - # @param date_range [::Google::Cloud::Channel::V1::DateRange, ::Hash] - # Optional. The range of usage or invoice dates to include in the result. - # @param filter [::String] - # Optional. A structured string that defines conditions on dimension columns - # to restrict the report output. - # - # Filters support logical operators (AND, OR, NOT) and conditional operators - # (=, !=, <, >, <=, and >=) using `column_id` as keys. - # - # For example: - # `(customer:"accounts/C123abc/customers/S456def" OR - # customer:"accounts/C123abc/customers/S789ghi") AND - # invoice_start_date.year >= 2022` - # @param language_code [::String] - # Optional. The BCP-47 language code, such as "en-US". If specified, the - # response is localized to the corresponding language code if the - # original data sources support it. - # Default is "en-US". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::RunReportJobRequest.new - # - # # Call the run_report_job method. - # result = client.run_report_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_report_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RunReportJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.run_report_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_report_job.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_report_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_reports_service_stub.call_rpc :run_report_job, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves data generated by - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload fetch_report_results(request, options = nil) - # Pass arguments to `fetch_report_results` via a request object, either of type - # {::Google::Cloud::Channel::V1::FetchReportResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::FetchReportResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_report_results(report_job: nil, page_size: nil, page_token: nil, partition_keys: nil) - # Pass arguments to `fetch_report_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param report_job [::String] - # Required. The report job created by - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # Report_job uses the format: - # accounts/\\{account_id}/reportJobs/\\{report_job_id} - # @param page_size [::Integer] - # Optional. Requested page size of the report. The server may return fewer - # results than requested. If you don't specify a page size, the server uses a - # sensible default (may change over time). - # - # The maximum value is 30,000; the server will change larger values to - # 30,000. - # @param page_token [::String] - # Optional. A token that specifies a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::FetchReportResultsResponse#next_page_token FetchReportResultsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} - # call. - # @param partition_keys [::Array<::String>] - # Optional. List of keys specifying which report partitions to return. - # If empty, returns all partitions. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new - # - # # Call the fetch_report_results method. - # result = client.fetch_report_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Row. - # p item - # end - # - def fetch_report_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::FetchReportResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_report_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.report_job - header_params["report_job"] = request.report_job - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_report_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_report_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_reports_service_stub.call_rpc :fetch_report_results, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_reports_service_stub, :fetch_report_results, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the reports that RunReportJob can run. These reports include an ID, - # a description, and the list of columns that will be in the result. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_reports(request, options = nil) - # Pass arguments to `list_reports` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListReportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListReportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_reports(parent: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_reports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the partner account to list available - # reports for. Parent uses the format: accounts/\\{account_id} - # @param page_size [::Integer] - # Optional. Requested page size of the report. The server might return fewer - # results than requested. If unspecified, returns 20 reports. The maximum - # value is 100. - # @param page_token [::String] - # Optional. A token that specifies a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListReportsResponse#next_page_token ListReportsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports} - # call. - # @param language_code [::String] - # Optional. The BCP-47 language code, such as "en-US". If specified, the - # response is localized to the corresponding language code if the - # original data sources support it. - # Default is "en-US". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListReportsRequest.new - # - # # Call the list_reports method. - # result = client.list_reports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Report. - # p item - # end - # - def list_reports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListReportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_reports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_reports.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_reports_service_stub.call_rpc :list_reports, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_reports_service_stub, :list_reports, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudChannelReportsService API. - # - # This class represents the configuration for CloudChannelReportsService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # run_report_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.run_report_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.run_report_job.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CloudChannelReportsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `run_report_job` - # @return [::Gapic::Config::Method] - # - attr_reader :run_report_job - ## - # RPC-specific configuration for `fetch_report_results` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_report_results - ## - # RPC-specific configuration for `list_reports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reports - - # @private - def initialize parent_rpcs = nil - run_report_job_config = parent_rpcs.run_report_job if parent_rpcs.respond_to? :run_report_job - @run_report_job = ::Gapic::Config::Method.new run_report_job_config - fetch_report_results_config = parent_rpcs.fetch_report_results if parent_rpcs.respond_to? :fetch_report_results - @fetch_report_results = ::Gapic::Config::Method.new fetch_report_results_config - list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports - @list_reports = ::Gapic::Config::Method.new list_reports_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb deleted file mode 100644 index edd72d29cbb5..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - # Credentials for the CloudChannelReportsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/apps.reports.usage.readonly" - ] - self.env_vars = [ - "CHANNEL_CREDENTIALS", - "CHANNEL_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "CHANNEL_CREDENTIALS_JSON", - "CHANNEL_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb deleted file mode 100644 index 761b0b866cbf..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudChannelReportsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelReportsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb deleted file mode 100644 index b3da3856081b..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/paths.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - # Path helper methods for the CloudChannelReportsService API. - module Paths - ## - # Create a fully-qualified Report resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/reports/{report}` - # - # @param account [String] - # @param report [String] - # - # @return [::String] - def report_path account:, report: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/reports/#{report}" - end - - ## - # Create a fully-qualified ReportJob resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/reportJobs/{report_job}` - # - # @param account [String] - # @param report_job [String] - # - # @return [::String] - def report_job_path account:, report_job: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/reportJobs/#{report_job}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb deleted file mode 100644 index 4b2d86be89b3..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest.rb +++ /dev/null @@ -1,60 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/channel/v1/version" - -require "google/cloud/channel/v1/cloud_channel_reports_service/credentials" -require "google/cloud/channel/v1/cloud_channel_reports_service/paths" -require "google/cloud/channel/v1/cloud_channel_reports_service/rest/operations" -require "google/cloud/channel/v1/cloud_channel_reports_service/rest/client" - -module Google - module Cloud - module Channel - module V1 - ## - # CloudChannelReportsService lets Google Cloud resellers and - # distributors retrieve and combine a variety of data in Cloud Channel for - # multiple products (Google Cloud, Google Voice, and Google Workspace.) - # - # Deprecated: This service is being deprecated. Please use [Export Channel - # Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/channel/v1/cloud_channel_reports_service/rest" - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - module CloudChannelReportsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/channel/v1/cloud_channel_reports_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb deleted file mode 100644 index 376bdc37fcef..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb +++ /dev/null @@ -1,734 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/channel/v1/reports_service_pb" -require "google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - module Rest - ## - # REST client for the CloudChannelReportsService service. - # - # CloudChannelReportsService lets Google Cloud resellers and - # distributors retrieve and combine a variety of data in Cloud Channel for - # multiple products (Google Cloud, Google Voice, and Google Workspace.) - # - # Deprecated: This service is being deprecated. Please use [Export Channel - # Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_channel_reports_service_stub - - ## - # Configure the CloudChannelReportsService Client class. - # - # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # @deprecated This service is deprecated and may be removed in the next major version update. - # - # @example - # - # # Modify the configuration for all CloudChannelReportsService clients - # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Channel", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelReportsService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_channel_reports_service_stub.universe_domain - end - - ## - # Create a new CloudChannelReportsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudChannelReportsService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cloud_channel_reports_service_stub = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_channel_reports_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_channel_reports_service_stub.logger - end - - # Service calls - - ## - # Begins generation of data for a given report. The report - # identifier is a UID (for example, `613bf59q`). - # - # Possible error codes: - # - # * PERMISSION_DENIED: The user doesn't have access to this report. - # * INVALID_ARGUMENT: Required request parameters are missing - # or invalid. - # * NOT_FOUND: The report identifier was not found. - # * INTERNAL: Any non-user error related to a technical issue - # in the backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue - # in the backend. Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata contains an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # To get the results of report generation, call - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} - # with the - # {::Google::Cloud::Channel::V1::RunReportJobResponse#report_job RunReportJobResponse.report_job}. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @overload run_report_job(request, options = nil) - # Pass arguments to `run_report_job` via a request object, either of type - # {::Google::Cloud::Channel::V1::RunReportJobRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::RunReportJobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_report_job(name: nil, date_range: nil, filter: nil, language_code: nil) - # Pass arguments to `run_report_job` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The report's resource name. Specifies the account and report used - # to generate report data. The report_id identifier is a UID (for example, - # `613bf59q`). - # Name uses the format: - # accounts/\\{account_id}/reports/\\{report_id} - # @param date_range [::Google::Cloud::Channel::V1::DateRange, ::Hash] - # Optional. The range of usage or invoice dates to include in the result. - # @param filter [::String] - # Optional. A structured string that defines conditions on dimension columns - # to restrict the report output. - # - # Filters support logical operators (AND, OR, NOT) and conditional operators - # (=, !=, <, >, <=, and >=) using `column_id` as keys. - # - # For example: - # `(customer:"accounts/C123abc/customers/S456def" OR - # customer:"accounts/C123abc/customers/S789ghi") AND - # invoice_start_date.year >= 2022` - # @param language_code [::String] - # Optional. The BCP-47 language code, such as "en-US". If specified, the - # response is localized to the corresponding language code if the - # original data sources support it. - # Default is "en-US". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::RunReportJobRequest.new - # - # # Call the run_report_job method. - # result = client.run_report_job request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def run_report_job request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RunReportJobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.run_report_job.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.run_report_job.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_report_job.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_reports_service_stub.run_report_job request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Retrieves data generated by - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @overload fetch_report_results(request, options = nil) - # Pass arguments to `fetch_report_results` via a request object, either of type - # {::Google::Cloud::Channel::V1::FetchReportResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::FetchReportResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_report_results(report_job: nil, page_size: nil, page_token: nil, partition_keys: nil) - # Pass arguments to `fetch_report_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param report_job [::String] - # Required. The report job created by - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # Report_job uses the format: - # accounts/\\{account_id}/reportJobs/\\{report_job_id} - # @param page_size [::Integer] - # Optional. Requested page size of the report. The server may return fewer - # results than requested. If you don't specify a page size, the server uses a - # sensible default (may change over time). - # - # The maximum value is 30,000; the server will change larger values to - # 30,000. - # @param page_token [::String] - # Optional. A token that specifies a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::FetchReportResultsResponse#next_page_token FetchReportResultsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} - # call. - # @param partition_keys [::Array<::String>] - # Optional. List of keys specifying which report partitions to return. - # If empty, returns all partitions. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Row>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new - # - # # Call the fetch_report_results method. - # result = client.fetch_report_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Row. - # p item - # end - # - def fetch_report_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::FetchReportResultsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_report_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_report_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_report_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_reports_service_stub.fetch_report_results request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_reports_service_stub, :fetch_report_results, "rows", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the reports that RunReportJob can run. These reports include an ID, - # a description, and the list of columns that will be in the result. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - # - # @overload list_reports(request, options = nil) - # Pass arguments to `list_reports` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListReportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListReportsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_reports(parent: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_reports` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the partner account to list available - # reports for. Parent uses the format: accounts/\\{account_id} - # @param page_size [::Integer] - # Optional. Requested page size of the report. The server might return fewer - # results than requested. If unspecified, returns 20 reports. The maximum - # value is 100. - # @param page_token [::String] - # Optional. A token that specifies a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListReportsResponse#next_page_token ListReportsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client#list_reports CloudChannelReportsService.ListReports} - # call. - # @param language_code [::String] - # Optional. The BCP-47 language code, such as "en-US". If specified, the - # response is localized to the corresponding language code if the - # original data sources support it. - # Default is "en-US". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Report>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListReportsRequest.new - # - # # Call the list_reports method. - # result = client.list_reports request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Report. - # p item - # end - # - def list_reports request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListReportsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_reports.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_reports.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reports.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_reports_service_stub.list_reports request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_reports_service_stub, :list_reports, "reports", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudChannelReportsService REST API. - # - # This class represents the configuration for CloudChannelReportsService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # run_report_job to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.run_report_job.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.run_report_job.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CloudChannelReportsService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `run_report_job` - # @return [::Gapic::Config::Method] - # - attr_reader :run_report_job - ## - # RPC-specific configuration for `fetch_report_results` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_report_results - ## - # RPC-specific configuration for `list_reports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reports - - # @private - def initialize parent_rpcs = nil - run_report_job_config = parent_rpcs.run_report_job if parent_rpcs.respond_to? :run_report_job - @run_report_job = ::Gapic::Config::Method.new run_report_job_config - fetch_report_results_config = parent_rpcs.fetch_report_results if parent_rpcs.respond_to? :fetch_report_results - @fetch_report_results = ::Gapic::Config::Method.new fetch_report_results_config - list_reports_config = parent_rpcs.list_reports if parent_rpcs.respond_to? :list_reports - @list_reports = ::Gapic::Config::Method.new list_reports_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb deleted file mode 100644 index a32efe8d57c9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudChannelReportsService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelReportsService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb deleted file mode 100644 index 93fae655e6ea..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/service_stub.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/channel/v1/reports_service_pb" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - module Rest - ## - # REST service stub for the CloudChannelReportsService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - # @deprecated This service is deprecated and may be removed in the next major version update. - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the run_report_job REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::RunReportJobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def run_report_job request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_report_job_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "run_report_job", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_report_results REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::FetchReportResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::FetchReportResultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::FetchReportResultsResponse] - # A result object deserialized from the server's reply - def fetch_report_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_report_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_report_results", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::FetchReportResultsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_reports REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListReportsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListReportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListReportsResponse] - # A result object deserialized from the server's reply - def list_reports request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reports_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_reports", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListReportsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the run_report_job REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::RunReportJobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_report_job_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/reports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_report_results REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::FetchReportResultsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_report_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{report_job}:fetchReportResults", - body: "*", - matches: [ - ["report_job", %r{^accounts/[^/]+/reportJobs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reports REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListReportsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_reports_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/reports", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb deleted file mode 100644 index 38c04b759706..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/channel/v1/version" - -require "google/cloud/channel/v1/cloud_channel_service/credentials" -require "google/cloud/channel/v1/cloud_channel_service/paths" -require "google/cloud/channel/v1/cloud_channel_service/operations" -require "google/cloud/channel/v1/cloud_channel_service/client" -require "google/cloud/channel/v1/cloud_channel_service/rest" - -module Google - module Cloud - module Channel - module V1 - ## - # CloudChannelService lets Google cloud resellers and distributors manage - # their customers, channel partners, entitlements, and reports. - # - # Using this service: - # 1. Resellers and distributors can manage a customer entity. - # 2. Distributors can register an authorized reseller in their channel and - # provide them with delegated admin access. - # 3. Resellers and distributors can manage customer entitlements. - # - # CloudChannelService exposes the following resources: - # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an - # enterprise-managed by a reseller or distributor. - # - # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that - # provides a customer with the means to use a service. Entitlements are created - # or updated as a result of a successful fulfillment. - # - # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An - # entity that identifies links between distributors and their indirect - # resellers in a channel. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/channel/v1/cloud_channel_service" - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/channel/v1/cloud_channel_service/rest" - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - module CloudChannelService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_channel_service", "helpers.rb" -require "google/cloud/channel/v1/cloud_channel_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb deleted file mode 100644 index 45430aba1b4d..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +++ /dev/null @@ -1,6649 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/channel/v1/service_pb" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - ## - # Client for the CloudChannelService service. - # - # CloudChannelService lets Google cloud resellers and distributors manage - # their customers, channel partners, entitlements, and reports. - # - # Using this service: - # 1. Resellers and distributors can manage a customer entity. - # 2. Distributors can register an authorized reseller in their channel and - # provide them with delegated admin access. - # 3. Resellers and distributors can manage customer entitlements. - # - # CloudChannelService exposes the following resources: - # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an - # enterprise-managed by a reseller or distributor. - # - # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that - # provides a customer with the means to use a service. Entitlements are created - # or updated as a result of a successful fulfillment. - # - # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An - # entity that identifies links between distributors and their indirect - # resellers in a channel. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_channel_service_stub - - ## - # Configure the CloudChannelService Client class. - # - # See {::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudChannelService clients - # ::Google::Cloud::Channel::V1::CloudChannelService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Channel", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.provision_cloud_identity.timeout = 60.0 - - default_config.rpcs.create_entitlement.timeout = 60.0 - - default_config.rpcs.change_parameters.timeout = 60.0 - - default_config.rpcs.change_renewal_settings.timeout = 60.0 - - default_config.rpcs.change_offer.timeout = 60.0 - - default_config.rpcs.start_paid_service.timeout = 60.0 - - default_config.rpcs.suspend_entitlement.timeout = 60.0 - - default_config.rpcs.cancel_entitlement.timeout = 60.0 - - default_config.rpcs.activate_entitlement.timeout = 60.0 - - default_config.rpcs.transfer_entitlements.timeout = 60.0 - - default_config.rpcs.transfer_entitlements_to_google.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_channel_service_stub.universe_domain - end - - ## - # Create a new CloudChannelService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudChannelService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/channel/v1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cloud_channel_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Channel::V1::CloudChannelService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_channel_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Channel::V1::CloudChannelService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_channel_service_stub.logger - end - - # Service calls - - ## - # List {::Google::Cloud::Channel::V1::Customer Customer}s. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # List of {::Google::Cloud::Channel::V1::Customer Customer}s, or an empty list if - # there are no customers. - # - # @overload list_customers(request, options = nil) - # Pass arguments to `list_customers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListCustomersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListCustomersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_customers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller account to list customers from. - # Parent uses the format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. The maximum number of customers to return. The service may return - # fewer than this value. If unspecified, returns at most 10 customers. The - # maximum value is 50. - # @param page_token [::String] - # Optional. A token identifying a page of results other than the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} - # call. - # @param filter [::String] - # Optional. Filters applied to the [CloudChannelService.ListCustomers] - # results. See - # https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers - # for more information. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListCustomersRequest.new - # - # # Call the list_customers method. - # result = client.list_customers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Customer. - # p item - # end - # - def list_customers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_customers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_customers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_customers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_customers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested {::Google::Cloud::Channel::V1::Customer Customer} - # resource. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer resource doesn't exist. Usually the result of an - # invalid name parameter. - # - # Return value: - # The {::Google::Cloud::Channel::V1::Customer Customer} resource. - # - # @overload get_customer(request, options = nil) - # Pass arguments to `get_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_customer(name: nil) - # Pass arguments to `get_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the customer to retrieve. - # Name uses the format: accounts/\\{account_id}/customers/\\{customer_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetCustomerRequest.new - # - # # Call the get_customer method. - # result = client.get_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def get_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :get_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Confirms the existence of Cloud Identity accounts based on the domain and - # if the Cloud Identity accounts are owned by the reseller. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * INVALID_VALUE: Invalid domain value in the request. - # - # Return value: - # A list of - # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} - # resources for the domain (may be empty) - # - # Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if - # no - # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} - # resources match the domain. - # - # @overload check_cloud_identity_accounts_exist(request, options = nil) - # Pass arguments to `check_cloud_identity_accounts_exist` via a request object, either of type - # {::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload check_cloud_identity_accounts_exist(parent: nil, domain: nil, primary_admin_email: nil) - # Pass arguments to `check_cloud_identity_accounts_exist` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The reseller account's resource name. - # Parent uses the format: accounts/\\{account_id} - # @param domain [::String] - # Required. Domain to fetch for Cloud Identity account customers, including - # domain and team customers. For team customers, please use the domain for - # their emails. - # @param primary_admin_email [::String] - # Optional. Primary admin email to fetch for Cloud Identity account team - # customer. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new - # - # # Call the check_cloud_identity_accounts_exist method. - # result = client.check_cloud_identity_accounts_exist request - # - # # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse. - # p result - # - def check_cloud_identity_accounts_exist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.check_cloud_identity_accounts_exist.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.check_cloud_identity_accounts_exist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.check_cloud_identity_accounts_exist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :check_cloud_identity_accounts_exist, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::Channel::V1::Customer Customer} resource under - # the reseller or distributor account. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The reseller account making the request is different from the - # reseller account in the API request. - # * You are not authorized to create a customer. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: - # * Required request parameters are missing or invalid. - # * Domain field value doesn't match the primary email domain. - # - # Return value: - # The newly created {::Google::Cloud::Channel::V1::Customer Customer} resource. - # - # @overload create_customer(request, options = nil) - # Pass arguments to `create_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_customer(parent: nil, customer: nil) - # Pass arguments to `create_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of reseller account in which to create the - # customer. Parent uses the format: accounts/\\{account_id} - # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] - # Required. The customer to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateCustomerRequest.new - # - # # Call the create_customer method. - # result = client.create_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def create_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :create_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing {::Google::Cloud::Channel::V1::Customer Customer} resource - # for the reseller or distributor. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found - # for the name in the request. - # - # Return value: - # The updated {::Google::Cloud::Channel::V1::Customer Customer} resource. - # - # @overload update_customer(request, options = nil) - # Pass arguments to `update_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_customer(customer: nil, update_mask: nil) - # Pass arguments to `update_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] - # Required. New contents of the customer. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask that applies to the resource. - # Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new - # - # # Call the update_customer method. - # result = client.update_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def update_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer&.name - header_params["customer.name"] = request.customer.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :update_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the given {::Google::Cloud::Channel::V1::Customer Customer} permanently. - # - # 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 customer has existing entitlements. - # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found - # for the name in the request. - # - # @overload delete_customer(request, options = nil) - # Pass arguments to `delete_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::DeleteCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_customer(name: nil) - # Pass arguments to `delete_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the customer to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new - # - # # Call the delete_customer method. - # result = client.delete_customer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :delete_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports a {::Google::Cloud::Channel::V1::Customer Customer} from the Cloud - # Identity associated with the provided Cloud Identity ID or domain before a - # TransferEntitlements call. If a linked Customer already exists and - # overwrite_if_exists is true, it will update that Customer's data. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The reseller account making the request is different from the - # reseller account in the API request. - # * You are not authorized to import the customer. See - # https://support.google.com/channelservices/answer/9759265 - # * NOT_FOUND: Cloud Identity doesn't exist or was deleted. - # * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is - # expired or invalid. - # * ALREADY_EXISTS: A customer already exists and has conflicting critical - # fields. Requires an overwrite. - # - # Return value: - # The {::Google::Cloud::Channel::V1::Customer Customer}. - # - # @overload import_customer(request, options = nil) - # Pass arguments to `import_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::ImportCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ImportCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_customer(domain: nil, cloud_identity_id: nil, primary_admin_email: nil, parent: nil, auth_token: nil, overwrite_if_exists: nil, channel_partner_id: nil, customer: nil) - # Pass arguments to `import_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param domain [::String] - # Required. Customer domain. - # - # Note: The following parameters are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param cloud_identity_id [::String] - # Required. Customer's Cloud Identity ID - # - # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param primary_admin_email [::String] - # Required. Customer's primary admin email. - # - # Note: The following parameters are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The resource name of the reseller's account. - # Parent takes the format: accounts/\\{account_id} or - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} - # @param auth_token [::String] - # Optional. The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @param overwrite_if_exists [::Boolean] - # Required. Choose to overwrite an existing customer if found. - # This must be set to true if there is an existing customer with a - # conflicting region code or domain. - # @param channel_partner_id [::String] - # Optional. Cloud Identity ID of a channel partner who will be the direct - # reseller for the customer's order. This field is required for 2-tier - # transfer scenarios and can be provided via the request Parent binding as - # well. - # @param customer [::String] - # Optional. Specifies the customer that will receive imported Cloud Identity - # information. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ImportCustomerRequest.new - # - # # Call the import_customer method. - # result = client.import_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def import_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ImportCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :import_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Cloud Identity for the given customer using the customer's - # information, or the information provided here. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller. - # * You are not authorized to provision cloud identity id. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer was not found. - # * ALREADY_EXISTS: The customer's primary email already exists. Retry - # after changing the customer's primary contact email. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata contains an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload provision_cloud_identity(request, options = nil) - # Pass arguments to `provision_cloud_identity` via a request object, either of type - # {::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload provision_cloud_identity(customer: nil, cloud_identity_info: nil, user: nil, validate_only: nil) - # Pass arguments to `provision_cloud_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::String] - # Required. Resource name of the customer. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # @param cloud_identity_info [::Google::Cloud::Channel::V1::CloudIdentityInfo, ::Hash] - # CloudIdentity-specific customer information. - # @param user [::Google::Cloud::Channel::V1::AdminUser, ::Hash] - # Admin user information. - # @param validate_only [::Boolean] - # Validate the request and preview the review, but do not post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new - # - # # Call the provision_cloud_identity method. - # result = client.provision_cloud_identity request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def provision_cloud_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.provision_cloud_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer - header_params["customer"] = request.customer - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.provision_cloud_identity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.provision_cloud_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :provision_cloud_identity, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Channel::V1::Entitlement Entitlement}s belonging to a - # customer. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # A list of the customer's - # {::Google::Cloud::Channel::V1::Entitlement Entitlement}s. - # - # @overload list_entitlements(request, options = nil) - # Pass arguments to `list_entitlements` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListEntitlementsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListEntitlementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entitlements(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_entitlements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account to list - # entitlements for. - # Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id} - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, return at most 50 entitlements. The maximum - # value is 100; the server will coerce values above 100. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListEntitlementsResponse#next_page_token ListEntitlementsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements} - # call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new - # - # # Call the list_entitlements method. - # result = client.list_entitlements request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Entitlement. - # p item - # end - # - def list_entitlements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entitlements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entitlements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entitlements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_entitlements, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlements, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}s of a - # customer based on the Cloud Identity ID or Customer Name in the request. - # - # Use this method to list the entitlements information of an - # unowned customer. You should provide the customer's - # Cloud Identity ID or Customer Name. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller and has no auth token. - # * The supplied auth token is invalid. - # * The reseller account making the request is different - # from the reseller account in the query. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # A list of the customer's - # {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}. - # - # @overload list_transferable_skus(request, options = nil) - # Pass arguments to `list_transferable_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListTransferableSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListTransferableSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_transferable_skus(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, auth_token: nil, language_code: nil) - # Pass arguments to `list_transferable_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cloud_identity_id [::String] - # Customer's Cloud Identity ID - # - # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer_name [::String] - # A reseller is required to create a customer and use the resource name of - # the created customer here. - # Customer_name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # - # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The reseller account's resource name. - # Parent uses the format: accounts/\\{account_id} - # @param page_size [::Integer] - # The requested page size. Server might return fewer results than requested. - # If unspecified, returns at most 100 SKUs. - # The maximum value is 1000; the server will coerce values above 1000. - # Optional. - # @param page_token [::String] - # A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListTransferableSkusResponse#next_page_token ListTransferableSkusResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} - # call. Optional. - # @param auth_token [::String] - # Optional. The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @param language_code [::String] - # The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new - # - # # Call the list_transferable_skus method. - # result = client.list_transferable_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku. - # p item - # end - # - def list_transferable_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_transferable_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_transferable_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transferable_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_transferable_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_skus, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer}s of a - # customer based on Cloud Identity ID or Customer Name in the request. - # - # Use this method when a reseller gets the entitlement information of an - # unowned customer. The reseller should provide the customer's - # Cloud Identity ID or Customer Name. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller and has no auth token. - # * The customer provided incorrect reseller information when generating - # auth token. - # * The reseller account making the request is different - # from the reseller account in the query. - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # List of {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer} for - # the given customer and SKU. - # - # @overload list_transferable_offers(request, options = nil) - # Pass arguments to `list_transferable_offers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListTransferableOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListTransferableOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil, billing_account: nil) - # Pass arguments to `list_transferable_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cloud_identity_id [::String] - # Customer's Cloud Identity ID - # - # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer_name [::String] - # A reseller should create a customer and use the resource name of - # that customer here. - # - # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The resource name of the reseller's account. - # @param page_size [::Integer] - # Requested page size. Server might return fewer results than requested. - # If unspecified, returns at most 100 offers. - # The maximum value is 1000; the server will coerce values above 1000. - # @param page_token [::String] - # A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListTransferableOffersResponse#next_page_token ListTransferableOffersResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} - # call. - # @param sku [::String] - # Required. The SKU to look up Offers for. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @param billing_account [::String] - # Optional. The Billing Account to look up Offers for. Format: - # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. - # - # This field is only relevant for multi-currency accounts. It should be left - # empty for single currency accounts. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new - # - # # Call the list_transferable_offers method. - # result = client.list_transferable_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer. - # p item - # end - # - def list_transferable_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_transferable_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_transferable_offers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transferable_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_transferable_offers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_offers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} - # resource. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer entitlement was not found. - # - # Return value: - # The requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} resource. - # - # @overload get_entitlement(request, options = nil) - # Pass arguments to `get_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_entitlement(name: nil) - # Pass arguments to `get_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to retrieve. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::Entitlement] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::Entitlement] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetEntitlementRequest.new - # - # # Call the get_entitlement method. - # result = client.get_entitlement request - # - # # The returned object is of type Google::Cloud::Channel::V1::Entitlement. - # p result - # - def get_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_entitlement.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :get_entitlement, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an entitlement for a customer. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller. - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: - # * Required request parameters are missing or invalid. - # * There is already a customer entitlement for a SKU from the same - # product family. - # * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact - # Google Channel support for further troubleshooting. - # * NOT_FOUND: The customer or offer resource was not found. - # * ALREADY_EXISTS: - # * The SKU was already purchased for the customer. - # * The customer's primary email already exists. Retry - # after changing the customer's primary contact email. - # * CONDITION_NOT_MET or FAILED_PRECONDITION: - # * The domain required for purchasing a SKU has not been verified. - # * A pre-requisite SKU required to purchase an Add-On SKU is missing. - # For example, Google Workspace Business Starter is required to purchase - # Vault or Drive. - # * (Developer accounts only) Reseller and resold domain must meet the - # following naming requirements: - # * Domain names must start with goog-test. - # * Domain names must include the reseller domain. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload create_entitlement(request, options = nil) - # Pass arguments to `create_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_entitlement(parent: nil, entitlement: nil, request_id: nil) - # Pass arguments to `create_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account in which to - # create the entitlement. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param entitlement [::Google::Cloud::Channel::V1::Entitlement, ::Hash] - # Required. The entitlement to create. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new - # - # # Call the create_entitlement method. - # result = client.create_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_entitlement.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :create_entitlement, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Change parameters of the entitlement. - # - # An entitlement update is a long-running operation and it updates the - # entitlement as a result of fulfillment. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # For example, the number of seats being changed is greater than the allowed - # number of max seats, or decreasing seats for a commitment based plan. - # * NOT_FOUND: Entitlement resource not found. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload change_parameters(request, options = nil) - # Pass arguments to `change_parameters` via a request object, either of type - # {::Google::Cloud::Channel::V1::ChangeParametersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ChangeParametersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload change_parameters(name: nil, parameters: nil, request_id: nil, purchase_order_id: nil) - # Pass arguments to `change_parameters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] - # Required. Entitlement parameters to update. You can only change editable - # parameters. - # - # To view the available Parameters for a request, refer to the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} - # from the desired offer. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @param purchase_order_id [::String] - # Optional. Purchase order ID provided by the reseller. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ChangeParametersRequest.new - # - # # Call the change_parameters method. - # result = client.change_parameters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def change_parameters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeParametersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.change_parameters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.change_parameters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.change_parameters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :change_parameters, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the renewal settings for an existing customer entitlement. - # - # An entitlement update is a long-running operation and it updates the - # entitlement as a result of fulfillment. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a - # commitment plan. Can't enable or disable renewals for non-commitment plans. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload change_renewal_settings(request, options = nil) - # Pass arguments to `change_renewal_settings` via a request object, either of type - # {::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload change_renewal_settings(name: nil, renewal_settings: nil, request_id: nil) - # Pass arguments to `change_renewal_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param renewal_settings [::Google::Cloud::Channel::V1::RenewalSettings, ::Hash] - # Required. New renewal settings. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new - # - # # Call the change_renewal_settings method. - # result = client.change_renewal_settings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def change_renewal_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.change_renewal_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.change_renewal_settings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.change_renewal_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :change_renewal_settings, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Offer for an existing customer entitlement. - # - # An entitlement update is a long-running operation and it updates the - # entitlement as a result of fulfillment. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Offer or Entitlement resource not found. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload change_offer(request, options = nil) - # Pass arguments to `change_offer` via a request object, either of type - # {::Google::Cloud::Channel::V1::ChangeOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ChangeOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil, price_reference_id: nil) - # Pass arguments to `change_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param offer [::String] - # Required. New Offer. - # Format: accounts/\\{account_id}/offers/\\{offer_id}. - # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] - # Optional. Parameters needed to purchase the Offer. To view the available - # Parameters refer to the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} - # from the desired offer. - # @param purchase_order_id [::String] - # Optional. Purchase order id provided by the reseller. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @param billing_account [::String] - # Optional. The billing account resource name that is used to pay for this - # entitlement when setting up billing on a trial subscription. - # - # This field is only relevant for multi-currency accounts. It should be - # left empty for single currency accounts. - # @param price_reference_id [::String] - # Optional. Price reference ID for the offer. Only for offers that require - # additional price information. Used to guarantee that the pricing is - # consistent between quoting the offer and placing the order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ChangeOfferRequest.new - # - # # Call the change_offer method. - # result = client.change_offer request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def change_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.change_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.change_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.change_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :change_offer, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts paid service for a trial entitlement. - # - # Starts paid service for a trial entitlement immediately. This method is - # only applicable if a plan is set up for a trial entitlement but has some - # trial days remaining. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for - # entitlement on trial plans. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload start_paid_service(request, options = nil) - # Pass arguments to `start_paid_service` via a request object, either of type - # {::Google::Cloud::Channel::V1::StartPaidServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::StartPaidServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_paid_service(name: nil, request_id: nil) - # Pass arguments to `start_paid_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the entitlement to start a paid service for. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new - # - # # Call the start_paid_service method. - # result = client.start_paid_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_paid_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::StartPaidServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.start_paid_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.start_paid_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_paid_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :start_paid_service, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Suspends a previously fulfilled entitlement. - # - # An entitlement suspension is a long-running operation. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * NOT_ACTIVE: Entitlement is not active. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload suspend_entitlement(request, options = nil) - # Pass arguments to `suspend_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::SuspendEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::SuspendEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload suspend_entitlement(name: nil, request_id: nil) - # Pass arguments to `suspend_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to suspend. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new - # - # # Call the suspend_entitlement method. - # result = client.suspend_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def suspend_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::SuspendEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.suspend_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.suspend_entitlement.timeout, - metadata: metadata, - retry_policy: @config.rpcs.suspend_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :suspend_entitlement, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels a previously fulfilled entitlement. - # - # An entitlement cancellation is a long-running operation. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * FAILED_PRECONDITION: There are Google Cloud projects linked to the - # Google Cloud entitlement's Cloud Billing subaccount. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace - # add-ons, or entitlements for Google Cloud's development platform. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The response will contain - # google.protobuf.Empty on success. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload cancel_entitlement(request, options = nil) - # Pass arguments to `cancel_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::CancelEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CancelEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_entitlement(name: nil, request_id: nil) - # Pass arguments to `cancel_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to cancel. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new - # - # # Call the cancel_entitlement method. - # result = client.cancel_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CancelEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_entitlement.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :cancel_entitlement, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activates a previously suspended entitlement. Entitlements suspended for - # pending ToS acceptance can't be activated using this method. - # - # An entitlement activation is a long-running operation and it updates - # the state of the customer entitlement. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated - # suspensions and entitlements that have accepted the TOS. - # * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE - # state. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload activate_entitlement(request, options = nil) - # Pass arguments to `activate_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::ActivateEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ActivateEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload activate_entitlement(name: nil, request_id: nil) - # Pass arguments to `activate_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to activate. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new - # - # # Call the activate_entitlement method. - # result = client.activate_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def activate_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ActivateEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.activate_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.activate_entitlement.timeout, - metadata: metadata, - retry_policy: @config.rpcs.activate_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :activate_entitlement, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Transfers customer entitlements to new reseller. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller. - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer or offer resource was not found. - # * ALREADY_EXISTS: The SKU was already transferred for the customer. - # * CONDITION_NOT_MET or FAILED_PRECONDITION: - # * The SKU requires domain verification to transfer, but the domain is - # not verified. - # * An Add-On SKU (example, Vault or Drive) is missing the - # pre-requisite SKU (example, G Suite Basic). - # * (Developer accounts only) Reseller and resold domain must meet the - # following naming requirements: - # * Domain names must start with goog-test. - # * Domain names must include the reseller domain. - # * Specify all transferring entitlements. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload transfer_entitlements(request, options = nil) - # Pass arguments to `transfer_entitlements` via a request object, either of type - # {::Google::Cloud::Channel::V1::TransferEntitlementsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload transfer_entitlements(parent: nil, entitlements: nil, auth_token: nil, request_id: nil) - # Pass arguments to `transfer_entitlements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account that will - # receive transferred entitlements. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] - # Required. The new entitlements to create or transfer. - # @param auth_token [::String] - # The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new - # - # # Call the transfer_entitlements method. - # result = client.transfer_entitlements request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def transfer_entitlements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.transfer_entitlements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.transfer_entitlements.timeout, - metadata: metadata, - retry_policy: @config.rpcs.transfer_entitlements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :transfer_entitlements, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Transfers customer entitlements from their current reseller to Google. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer or offer resource was not found. - # * ALREADY_EXISTS: The SKU was already transferred for the customer. - # * CONDITION_NOT_MET or FAILED_PRECONDITION: - # * The SKU requires domain verification to transfer, but the domain is - # not verified. - # * An Add-On SKU (example, Vault or Drive) is missing the - # pre-requisite SKU (example, G Suite Basic). - # * (Developer accounts only) Reseller and resold domain must meet the - # following naming requirements: - # * Domain names must start with goog-test. - # * Domain names must include the reseller domain. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The response will contain - # google.protobuf.Empty on success. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload transfer_entitlements_to_google(request, options = nil) - # Pass arguments to `transfer_entitlements_to_google` via a request object, either of type - # {::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload transfer_entitlements_to_google(parent: nil, entitlements: nil, request_id: nil) - # Pass arguments to `transfer_entitlements_to_google` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account where the - # entitlements transfer from. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] - # Required. The entitlements to transfer to Google. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new - # - # # Call the transfer_entitlements_to_google method. - # result = client.transfer_entitlements_to_google request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def transfer_entitlements_to_google request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.transfer_entitlements_to_google.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.transfer_entitlements_to_google.timeout, - metadata: metadata, - retry_policy: @config.rpcs.transfer_entitlements_to_google.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :transfer_entitlements_to_google, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s - # belonging to a distributor. You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # The list of the distributor account's - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resources. - # - # @overload list_channel_partner_links(request, options = nil) - # Pass arguments to `list_channel_partner_links` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_channel_partner_links(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_channel_partner_links` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller account for listing channel - # partner links. Parent uses the format: accounts/\\{account_id} - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, server will pick a default size (25). The - # maximum value is 200; the server will coerce values above 200. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse#next_page_token ListChannelPartnerLinksResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} - # call. - # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] - # Optional. The level of granularity the ChannelPartnerLink will display. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new - # - # # Call the list_channel_partner_links method. - # result = client.list_channel_partner_links request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink. - # p item - # end - # - def list_channel_partner_links request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_channel_partner_links.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_channel_partner_links.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_channel_partner_links.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_channel_partner_links, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_links, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. - # You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: ChannelPartnerLink resource not found because of an - # invalid channel partner link name. - # - # Return value: - # The {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} - # resource. - # - # @overload get_channel_partner_link(request, options = nil) - # Pass arguments to `get_channel_partner_link` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_channel_partner_link(name: nil, view: nil) - # Pass arguments to `get_channel_partner_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the channel partner link to retrieve. - # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} - # where \\{id} is the Cloud Identity ID of the partner. - # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] - # Optional. The level of granularity the ChannelPartnerLink will display. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new - # - # # Call the get_channel_partner_link method. - # result = client.get_channel_partner_link request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - # p result - # - def get_channel_partner_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_channel_partner_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_channel_partner_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_channel_partner_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :get_channel_partner_link, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initiates a channel partner link between a distributor and a reseller, or - # between resellers in an n-tier reseller channel. - # Invited partners need to follow the invite_link_uri provided in the - # response to accept. After accepting the invitation, a link is set up - # between the two parties. - # You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already - # exists. - # * NOT_FOUND: No Cloud Identity customer exists for provided domain. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The new {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} - # resource. - # - # @overload create_channel_partner_link(request, options = nil) - # Pass arguments to `create_channel_partner_link` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_channel_partner_link(parent: nil, channel_partner_link: nil) - # Pass arguments to `create_channel_partner_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Create a channel partner link for the provided reseller account's - # resource name. - # Parent uses the format: accounts/\\{account_id} - # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] - # Required. The channel partner link to create. - # Either channel_partner_link.reseller_cloud_identity_id or domain can be - # used to create a link. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new - # - # # Call the create_channel_partner_link method. - # result = client.create_channel_partner_link request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - # p result - # - def create_channel_partner_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_channel_partner_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_channel_partner_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_channel_partner_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :create_channel_partner_link, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a channel partner link. Distributors call this method to change a - # link's status. For example, to suspend a partner link. - # You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: - # * Required request parameters are missing or invalid. - # * Link state cannot change from invited to active or suspended. - # * Cannot send reseller_cloud_identity_id, invite_url, or name in update - # mask. - # * NOT_FOUND: ChannelPartnerLink resource not found. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The updated - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. - # - # @overload update_channel_partner_link(request, options = nil) - # Pass arguments to `update_channel_partner_link` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_channel_partner_link(name: nil, channel_partner_link: nil, update_mask: nil) - # Pass arguments to `update_channel_partner_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the channel partner link to cancel. - # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} - # where \\{id} is the Cloud Identity ID of the partner. - # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] - # Required. The channel partner link to update. Only - # channel_partner_link.link_state is allowed for updates. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask that applies to the resource. - # The only allowable value for an update mask is - # channel_partner_link.link_state. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new - # - # # Call the update_channel_partner_link method. - # result = client.update_channel_partner_link request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - # p result - # - def update_channel_partner_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_channel_partner_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_channel_partner_link.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_channel_partner_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :update_channel_partner_link, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload get_customer_repricing_config(request, options = nil) - # Pass arguments to `get_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_customer_repricing_config(name: nil) - # Pass arguments to `get_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the CustomerRepricingConfig. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new - # - # # Call the get_customer_repricing_config method. - # result = client.get_customer_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p result - # - def get_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :get_customer_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resources. The data for each resource is displayed in the ascending order - # of: - # - # * Customer ID - # * {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement} - # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # * {::Google::Cloud::Channel::V1::CustomerRepricingConfig#update_time CustomerRepricingConfig.update_time} - # - # If unsuccessful, returns an error. - # - # @overload list_customer_repricing_configs(request, options = nil) - # Pass arguments to `list_customer_repricing_configs` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_customer_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_customer_repricing_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} - # call. - # @param filter [::String] - # 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. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new - # - # # Call the list_customer_repricing_configs method. - # result = client.list_customer_repricing_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p item - # end - # - def list_customer_repricing_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_customer_repricing_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_customer_repricing_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_customer_repricing_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a CustomerRepricingConfig. Call this method to set modifications - # for a specific customer's bill. You can only create configs if the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, - # for any - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. - # * The contained - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config} - # value must be different from the value used in the current config for a - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload create_customer_repricing_config(request, options = nil) - # Pass arguments to `create_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_customer_repricing_config(parent: nil, customer_repricing_config: nil) - # Pass arguments to `create_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the customer that will receive this - # repricing config. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] - # Required. The CustomerRepricingConfig object to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new - # - # # Call the create_customer_repricing_config method. - # result = client.create_customer_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p result - # - def create_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :create_customer_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # is a future month. To make changes to configs for the current month, use - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config CreateCustomerRepricingConfig}, - # taking note of its restrictions. You cannot update the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload update_customer_repricing_config(request, options = nil) - # Pass arguments to `update_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_customer_repricing_config(customer_repricing_config: nil) - # Pass arguments to `update_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] - # Required. The CustomerRepricingConfig object to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new - # - # # Call the update_customer_repricing_config method. - # result = client.update_customer_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p result - # - def update_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer_repricing_config&.name - header_params["customer_repricing_config.name"] = request.customer_repricing_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :update_customer_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the given - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # permanently. You can only delete configs if their - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # is active or in the past. - # * NOT_FOUND: No - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # found for the name in the request. - # - # @overload delete_customer_repricing_config(request, options = nil) - # Pass arguments to `delete_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_customer_repricing_config(name: nil) - # Pass arguments to `delete_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the customer repricing config rule to - # delete. Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new - # - # # Call the delete_customer_repricing_config method. - # result = client.delete_customer_repricing_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :delete_customer_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload get_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `get_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_channel_partner_repricing_config(name: nil) - # Pass arguments to `get_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the ChannelPartnerRepricingConfig - # Format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new - # - # # Call the get_channel_partner_repricing_config method. - # result = client.get_channel_partner_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p result - # - def get_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_channel_partner_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :get_channel_partner_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resources. The data for each resource is displayed in the ascending order - # of: - # - # * Channel Partner ID - # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # * {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#update_time ChannelPartnerRepricingConfig.update_time} - # - # If unsuccessful, returns an error. - # - # @overload list_channel_partner_repricing_configs(request, options = nil) - # Pass arguments to `list_channel_partner_repricing_configs` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_channel_partner_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_channel_partner_repricing_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account's - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}. Parent - # uses the format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}. - # Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs - # for all channel partners. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} - # call. - # @param filter [::String] - # 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`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new - # - # # Call the list_channel_partner_repricing_configs method. - # result = client.list_channel_partner_repricing_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p item - # end - # - def list_channel_partner_repricing_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_channel_partner_repricing_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_channel_partner_repricing_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_channel_partner_repricing_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_channel_partner_repricing_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a ChannelPartnerRepricingConfig. Call this method to set - # modifications for a specific ChannelPartner's bill. You can only create - # configs if the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, - # for any - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. - # * The contained - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config} - # value 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload create_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `create_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_channel_partner_repricing_config(parent: nil, channel_partner_repricing_config: nil) - # Pass arguments to `create_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the ChannelPartner that will receive the - # repricing config. Parent uses the format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} - # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] - # Required. The ChannelPartnerRepricingConfig object to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new - # - # # Call the create_channel_partner_repricing_config method. - # result = client.create_channel_partner_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p result - # - def create_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_channel_partner_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :create_channel_partner_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # is a future month. To make changes to configs for the current month, use - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config CreateChannelPartnerRepricingConfig}, - # taking note of its restrictions. You cannot update the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload update_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `update_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_channel_partner_repricing_config(channel_partner_repricing_config: nil) - # Pass arguments to `update_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] - # Required. The ChannelPartnerRepricingConfig object to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new - # - # # Call the update_channel_partner_repricing_config method. - # result = client.update_channel_partner_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p result - # - def update_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.channel_partner_repricing_config&.name - header_params["channel_partner_repricing_config.name"] = request.channel_partner_repricing_config.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_channel_partner_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :update_channel_partner_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the given - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # permanently. You can only delete configs if their - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # is active or in the past. - # * NOT_FOUND: No - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # found for the name in the request. - # - # @overload delete_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `delete_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_channel_partner_repricing_config(name: nil) - # Pass arguments to `delete_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the channel partner repricing config rule to - # delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new - # - # # Call the delete_channel_partner_repricing_config method. - # result = client.delete_channel_partner_repricing_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_channel_partner_repricing_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :delete_channel_partner_repricing_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Rebilling supported SKU groups the account is authorized to - # sell. - # Reference: https://cloud.google.com/skus/sku-groups - # - # Possible Error Codes: - # - # * PERMISSION_DENIED: If the account making the request and the account - # being queried are different, or the account doesn't exist. - # * INTERNAL: Any non-user error related to technical issues in the - # backend. In this case, contact Cloud Channel support. - # - # Return Value: - # If successful, the {::Google::Cloud::Channel::V1::SkuGroup SkuGroup} resources. - # The data for each resource is displayed in the alphabetical order of SKU - # group display name. - # The data for each resource is displayed in the ascending order of - # {::Google::Cloud::Channel::V1::SkuGroup#display_name SkuGroup.display_name} - # - # If unsuccessful, returns an error. - # - # @overload list_sku_groups(request, options = nil) - # Pass arguments to `list_sku_groups` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSkuGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sku_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account from which to list SKU groups. - # Parent uses the format: accounts/\\{account}. - # @param page_size [::Integer] - # Optional. The maximum number of SKU groups to return. The service may - # return fewer than this value. If unspecified, returns a maximum of 1000 SKU - # groups. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups} - # call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new - # - # # Call the list_sku_groups method. - # result = client.list_sku_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup. - # p item - # end - # - def list_sku_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sku_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sku_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_sku_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Billable SKUs in a given SKU group. - # - # Possible error codes: - # PERMISSION_DENIED: If the account making the request and the account - # being queried for are different, or the account doesn't exist. - # INVALID_ARGUMENT: Missing or invalid required parameters in the - # request. - # INTERNAL: Any non-user error related to technical issue in the - # backend. In this case, contact cloud channel support. - # - # Return Value: - # If successful, the {::Google::Cloud::Channel::V1::BillableSku BillableSku} - # resources. The data for each resource is displayed in the ascending order - # of: - # - # * {::Google::Cloud::Channel::V1::BillableSku#service_display_name BillableSku.service_display_name} - # * {::Google::Cloud::Channel::V1::BillableSku#sku_display_name BillableSku.sku_display_name} - # - # If unsuccessful, returns an error. - # - # @overload list_sku_group_billable_skus(request, options = nil) - # Pass arguments to `list_sku_group_billable_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sku_group_billable_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the SKU group. - # Format: accounts/\\{account}/skuGroups/\\{sku_group}. - # @param page_size [::Integer] - # Optional. The maximum number of SKUs to return. The service may return - # fewer than this value. If unspecified, returns a maximum of 100000 SKUs. - # The maximum value is 100000; values above 100000 will be coerced to 100000. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} - # call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new - # - # # Call the list_sku_group_billable_skus method. - # result = client.list_sku_group_billable_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::BillableSku. - # p item - # end - # - def list_sku_group_billable_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sku_group_billable_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_sku_group_billable_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement or offer was not found. - # - # Return value: - # The {::Google::Cloud::Channel::V1::Offer Offer} resource. - # - # @overload lookup_offer(request, options = nil) - # Pass arguments to `lookup_offer` via a request object, either of type - # {::Google::Cloud::Channel::V1::LookupOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::LookupOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload lookup_offer(entitlement: nil) - # Pass arguments to `lookup_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entitlement [::String] - # Required. The resource name of the entitlement to retrieve the Offer. - # Entitlement uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::Offer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::Offer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::LookupOfferRequest.new - # - # # Call the lookup_offer method. - # result = client.lookup_offer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Offer. - # p result - # - def lookup_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::LookupOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.lookup_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.entitlement - header_params["entitlement"] = request.entitlement - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.lookup_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :lookup_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Products the reseller is authorized to sell. - # - # Possible error codes: - # - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_products(account: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Required. The resource name of the reseller account. - # Format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 Products. The maximum value - # is 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_products, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the SKUs for a product the reseller is authorized to sell. - # - # Possible error codes: - # - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_skus(parent: nil, account: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Product to list SKUs for. - # Parent uses the format: products/\\{product_id}. - # Supports products/- to retrieve SKUs for all products. - # @param account [::String] - # Required. Resource name of the reseller. - # Format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 SKUs. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # Optional. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Offers the reseller can sell. - # - # Possible error codes: - # - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_offers(request, options = nil) - # Pass arguments to `list_offers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, language_code: nil, show_future_offers: nil) - # Pass arguments to `list_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller account from which to list - # Offers. Parent uses the format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 500 Offers. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param filter [::String] - # Optional. The expression to filter results by name (name of - # the Offer), sku.name (name of the SKU), or sku.product.name (name of the - # Product). - # Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 - # Example 2: name=accounts/a1/offers/o1 - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @param show_future_offers [::Boolean] - # Optional. A boolean flag that determines if a response returns future - # offers 30 days from now. If the show_future_offers is true, the response - # will only contain offers that are scheduled to be available 30 days from - # now. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListOffersRequest.new - # - # # Call the list_offers method. - # result = client.list_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Offer. - # p item - # end - # - def list_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_offers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_offers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the following: - # - # * SKUs that you can purchase for a customer - # * SKUs that you can upgrade or downgrade for an entitlement. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_purchasable_skus(request, options = nil) - # Pass arguments to `list_purchasable_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListPurchasableSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_purchasable_skus(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_purchasable_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash] - # List SKUs for CreateEntitlement purchase. - # - # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash] - # List SKUs for ChangeOffer purchase with a new SKU. - # - # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer [::String] - # Required. The resource name of the customer to list SKUs for. - # Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 SKUs. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new - # - # # Call the list_purchasable_skus method. - # result = client.list_purchasable_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku. - # p item - # end - # - def list_purchasable_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_purchasable_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer - header_params["customer"] = request.customer - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_purchasable_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_purchasable_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_purchasable_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the following: - # - # * Offers that you can purchase for a customer. - # * Offers that you can change for an entitlement. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_purchasable_offers(request, options = nil) - # Pass arguments to `list_purchasable_offers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListPurchasableOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_purchasable_offers(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_purchasable_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase, ::Hash] - # List Offers for CreateEntitlement purchase. - # - # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase, ::Hash] - # List Offers for ChangeOffer purchase. - # - # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer [::String] - # Required. The resource name of the customer to list Offers for. - # Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 Offers. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new - # - # # Call the list_purchasable_offers method. - # result = client.list_purchasable_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer. - # p item - # end - # - def list_purchasable_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_purchasable_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer - header_params["customer"] = request.customer - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_purchasable_offers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_purchasable_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_purchasable_offers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_offers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the billing accounts that are eligible to purchase particular SKUs - # for a given customer. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # Based on the provided list of SKUs, returns a list of SKU groups that must - # be purchased using the same billing account and the billing accounts - # eligible to purchase each SKU group. - # - # @overload query_eligible_billing_accounts(request, options = nil) - # Pass arguments to `query_eligible_billing_accounts` via a request object, either of type - # {::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload query_eligible_billing_accounts(customer: nil, skus: nil) - # Pass arguments to `query_eligible_billing_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::String] - # Required. The resource name of the customer to list eligible billing - # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @param skus [::Array<::String>] - # Required. List of SKUs to list eligible billing accounts for. At least one - # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new - # - # # Call the query_eligible_billing_accounts method. - # result = client.query_eligible_billing_accounts request - # - # # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse. - # p result - # - def query_eligible_billing_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.query_eligible_billing_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer - header_params["customer"] = request.customer - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :query_eligible_billing_accounts, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Registers a service account with subscriber privileges on the Pub/Sub - # topic for this Channel Services account or integrator. After you create a - # subscriber, you get the events through - # {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent} - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different, or the impersonated user - # is not a super admin. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The topic name with the registered service email address. - # - # @overload register_subscriber(request, options = nil) - # Pass arguments to `register_subscriber` via a request object, either of type - # {::Google::Cloud::Channel::V1::RegisterSubscriberRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::RegisterSubscriberRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload register_subscriber(account: nil, service_account: nil, integrator: nil) - # Pass arguments to `register_subscriber` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @param service_account [::String] - # Required. Service account that provides subscriber access to the registered - # topic. - # @param integrator [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new - # - # # Call the register_subscriber method. - # result = client.register_subscriber request - # - # # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse. - # p result - # - def register_subscriber request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RegisterSubscriberRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.register_subscriber.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account - header_params["account"] = request.account - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.register_subscriber.timeout, - metadata: metadata, - retry_policy: @config.rpcs.register_subscriber.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :register_subscriber, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unregisters a service account with subscriber privileges on the Pub/Sub - # topic created for this Channel Services account or integrator. If there are - # no service accounts left with subscriber privileges, this deletes the - # topic. You can call ListSubscribers to check for these accounts. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different, or the impersonated user - # is not a super admin. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The topic resource doesn't exist. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The topic name that unregistered the service email address. - # Returns a success response if the service email address wasn't registered - # with the topic. - # - # @overload unregister_subscriber(request, options = nil) - # Pass arguments to `unregister_subscriber` via a request object, either of type - # {::Google::Cloud::Channel::V1::UnregisterSubscriberRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unregister_subscriber(account: nil, service_account: nil, integrator: nil) - # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @param service_account [::String] - # Required. Service account to unregister from subscriber access to the - # topic. - # @param integrator [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new - # - # # Call the unregister_subscriber method. - # result = client.unregister_subscriber request - # - # # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse. - # p result - # - def unregister_subscriber request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.unregister_subscriber.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account - header_params["account"] = request.account - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.unregister_subscriber.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unregister_subscriber.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :unregister_subscriber, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists service accounts with subscriber privileges on the Pub/Sub topic - # created for this Channel Services account or integrator. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different, or the impersonated user - # is not a super admin. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The topic resource doesn't exist. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # A list of service email addresses. - # - # @overload list_subscribers(request, options = nil) - # Pass arguments to `list_subscribers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSubscribersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSubscribersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_subscribers(account: nil, page_size: nil, page_token: nil, integrator: nil) - # Pass arguments to `list_subscribers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @param page_size [::Integer] - # Optional. The maximum number of service accounts to return. The service may - # return fewer than this value. If unspecified, returns at most 100 service - # accounts. The maximum value is 1000; the server will coerce values above - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListSubscribers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListSubscribers` must - # match the call that provided the page token. - # @param integrator [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Channel::V1::ListSubscribersResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSubscribersRequest.new - # - # # Call the list_subscribers method. - # result = client.list_subscribers request - # - # # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse. - # p result - # - def list_subscribers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSubscribersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_subscribers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.account - header_params["account"] = request.account - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_subscribers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_subscribers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_subscribers, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List entitlement history. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different. - # * INVALID_ARGUMENT: Missing or invalid required fields in the request. - # * NOT_FOUND: The parent resource doesn't exist. Usually the result of an - # invalid name parameter. - # * INTERNAL: Any non-user error related to a technical issue in the backend. - # In this case, contact CloudChannel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # In this case, contact Cloud Channel support. - # - # Return value: - # List of {::Google::Cloud::Channel::V1::EntitlementChange EntitlementChange}s. - # - # @overload list_entitlement_changes(request, options = nil) - # Pass arguments to `list_entitlement_changes` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListEntitlementChangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_entitlement_changes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entitlement_changes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the entitlement for which to list - # entitlement changes. The `-` wildcard may be used to match entitlements - # across a customer. Formats: - # - # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/- - # @param page_size [::Integer] - # Optional. The maximum number of entitlement changes to return. The service - # may return fewer than this value. If unspecified, returns at most 10 - # entitlement changes. The maximum value is 50; the server will coerce values - # above 50. - # @param page_token [::String] - # Optional. A page token, received from a previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # must match the call that provided the page token. - # @param filter [::String] - # Optional. Filters applied to the list results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new - # - # # Call the list_entitlement_changes method. - # result = client.list_entitlement_changes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::EntitlementChange. - # p item - # end - # - def list_entitlement_changes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_entitlement_changes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_entitlement_changes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_entitlement_changes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.call_rpc :list_entitlement_changes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlement_changes, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudChannelService API. - # - # This class represents the configuration for CloudChannelService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_customers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Channel::V1::CloudChannelService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_customers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_customers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CloudChannelService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_customers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customers - ## - # RPC-specific configuration for `get_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer - ## - # RPC-specific configuration for `check_cloud_identity_accounts_exist` - # @return [::Gapic::Config::Method] - # - attr_reader :check_cloud_identity_accounts_exist - ## - # RPC-specific configuration for `create_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer - ## - # RPC-specific configuration for `update_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer - ## - # RPC-specific configuration for `delete_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer - ## - # RPC-specific configuration for `import_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :import_customer - ## - # RPC-specific configuration for `provision_cloud_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :provision_cloud_identity - ## - # RPC-specific configuration for `list_entitlements` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entitlements - ## - # RPC-specific configuration for `list_transferable_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transferable_skus - ## - # RPC-specific configuration for `list_transferable_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transferable_offers - ## - # RPC-specific configuration for `get_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entitlement - ## - # RPC-specific configuration for `create_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entitlement - ## - # RPC-specific configuration for `change_parameters` - # @return [::Gapic::Config::Method] - # - attr_reader :change_parameters - ## - # RPC-specific configuration for `change_renewal_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :change_renewal_settings - ## - # RPC-specific configuration for `change_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :change_offer - ## - # RPC-specific configuration for `start_paid_service` - # @return [::Gapic::Config::Method] - # - attr_reader :start_paid_service - ## - # RPC-specific configuration for `suspend_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :suspend_entitlement - ## - # RPC-specific configuration for `cancel_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_entitlement - ## - # RPC-specific configuration for `activate_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_entitlement - ## - # RPC-specific configuration for `transfer_entitlements` - # @return [::Gapic::Config::Method] - # - attr_reader :transfer_entitlements - ## - # RPC-specific configuration for `transfer_entitlements_to_google` - # @return [::Gapic::Config::Method] - # - attr_reader :transfer_entitlements_to_google - ## - # RPC-specific configuration for `list_channel_partner_links` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channel_partner_links - ## - # RPC-specific configuration for `get_channel_partner_link` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel_partner_link - ## - # RPC-specific configuration for `create_channel_partner_link` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel_partner_link - ## - # RPC-specific configuration for `update_channel_partner_link` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel_partner_link - ## - # RPC-specific configuration for `get_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer_repricing_config - ## - # RPC-specific configuration for `list_customer_repricing_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customer_repricing_configs - ## - # RPC-specific configuration for `create_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer_repricing_config - ## - # RPC-specific configuration for `update_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer_repricing_config - ## - # RPC-specific configuration for `delete_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer_repricing_config - ## - # RPC-specific configuration for `get_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel_partner_repricing_config - ## - # RPC-specific configuration for `list_channel_partner_repricing_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channel_partner_repricing_configs - ## - # RPC-specific configuration for `create_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel_partner_repricing_config - ## - # RPC-specific configuration for `update_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel_partner_repricing_config - ## - # RPC-specific configuration for `delete_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel_partner_repricing_config - ## - # RPC-specific configuration for `list_sku_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sku_groups - ## - # RPC-specific configuration for `list_sku_group_billable_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sku_group_billable_skus - ## - # RPC-specific configuration for `lookup_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_offer - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - ## - # RPC-specific configuration for `list_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_offers - ## - # RPC-specific configuration for `list_purchasable_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_purchasable_skus - ## - # RPC-specific configuration for `list_purchasable_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_purchasable_offers - ## - # RPC-specific configuration for `query_eligible_billing_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :query_eligible_billing_accounts - ## - # RPC-specific configuration for `register_subscriber` - # @return [::Gapic::Config::Method] - # - attr_reader :register_subscriber - ## - # RPC-specific configuration for `unregister_subscriber` - # @return [::Gapic::Config::Method] - # - attr_reader :unregister_subscriber - ## - # RPC-specific configuration for `list_subscribers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_subscribers - ## - # RPC-specific configuration for `list_entitlement_changes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entitlement_changes - - # @private - def initialize parent_rpcs = nil - list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers - @list_customers = ::Gapic::Config::Method.new list_customers_config - get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer - @get_customer = ::Gapic::Config::Method.new get_customer_config - check_cloud_identity_accounts_exist_config = parent_rpcs.check_cloud_identity_accounts_exist if parent_rpcs.respond_to? :check_cloud_identity_accounts_exist - @check_cloud_identity_accounts_exist = ::Gapic::Config::Method.new check_cloud_identity_accounts_exist_config - create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer - @create_customer = ::Gapic::Config::Method.new create_customer_config - update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer - @update_customer = ::Gapic::Config::Method.new update_customer_config - delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer - @delete_customer = ::Gapic::Config::Method.new delete_customer_config - import_customer_config = parent_rpcs.import_customer if parent_rpcs.respond_to? :import_customer - @import_customer = ::Gapic::Config::Method.new import_customer_config - provision_cloud_identity_config = parent_rpcs.provision_cloud_identity if parent_rpcs.respond_to? :provision_cloud_identity - @provision_cloud_identity = ::Gapic::Config::Method.new provision_cloud_identity_config - list_entitlements_config = parent_rpcs.list_entitlements if parent_rpcs.respond_to? :list_entitlements - @list_entitlements = ::Gapic::Config::Method.new list_entitlements_config - list_transferable_skus_config = parent_rpcs.list_transferable_skus if parent_rpcs.respond_to? :list_transferable_skus - @list_transferable_skus = ::Gapic::Config::Method.new list_transferable_skus_config - list_transferable_offers_config = parent_rpcs.list_transferable_offers if parent_rpcs.respond_to? :list_transferable_offers - @list_transferable_offers = ::Gapic::Config::Method.new list_transferable_offers_config - get_entitlement_config = parent_rpcs.get_entitlement if parent_rpcs.respond_to? :get_entitlement - @get_entitlement = ::Gapic::Config::Method.new get_entitlement_config - create_entitlement_config = parent_rpcs.create_entitlement if parent_rpcs.respond_to? :create_entitlement - @create_entitlement = ::Gapic::Config::Method.new create_entitlement_config - change_parameters_config = parent_rpcs.change_parameters if parent_rpcs.respond_to? :change_parameters - @change_parameters = ::Gapic::Config::Method.new change_parameters_config - change_renewal_settings_config = parent_rpcs.change_renewal_settings if parent_rpcs.respond_to? :change_renewal_settings - @change_renewal_settings = ::Gapic::Config::Method.new change_renewal_settings_config - change_offer_config = parent_rpcs.change_offer if parent_rpcs.respond_to? :change_offer - @change_offer = ::Gapic::Config::Method.new change_offer_config - start_paid_service_config = parent_rpcs.start_paid_service if parent_rpcs.respond_to? :start_paid_service - @start_paid_service = ::Gapic::Config::Method.new start_paid_service_config - suspend_entitlement_config = parent_rpcs.suspend_entitlement if parent_rpcs.respond_to? :suspend_entitlement - @suspend_entitlement = ::Gapic::Config::Method.new suspend_entitlement_config - cancel_entitlement_config = parent_rpcs.cancel_entitlement if parent_rpcs.respond_to? :cancel_entitlement - @cancel_entitlement = ::Gapic::Config::Method.new cancel_entitlement_config - activate_entitlement_config = parent_rpcs.activate_entitlement if parent_rpcs.respond_to? :activate_entitlement - @activate_entitlement = ::Gapic::Config::Method.new activate_entitlement_config - transfer_entitlements_config = parent_rpcs.transfer_entitlements if parent_rpcs.respond_to? :transfer_entitlements - @transfer_entitlements = ::Gapic::Config::Method.new transfer_entitlements_config - transfer_entitlements_to_google_config = parent_rpcs.transfer_entitlements_to_google if parent_rpcs.respond_to? :transfer_entitlements_to_google - @transfer_entitlements_to_google = ::Gapic::Config::Method.new transfer_entitlements_to_google_config - list_channel_partner_links_config = parent_rpcs.list_channel_partner_links if parent_rpcs.respond_to? :list_channel_partner_links - @list_channel_partner_links = ::Gapic::Config::Method.new list_channel_partner_links_config - get_channel_partner_link_config = parent_rpcs.get_channel_partner_link if parent_rpcs.respond_to? :get_channel_partner_link - @get_channel_partner_link = ::Gapic::Config::Method.new get_channel_partner_link_config - create_channel_partner_link_config = parent_rpcs.create_channel_partner_link if parent_rpcs.respond_to? :create_channel_partner_link - @create_channel_partner_link = ::Gapic::Config::Method.new create_channel_partner_link_config - update_channel_partner_link_config = parent_rpcs.update_channel_partner_link if parent_rpcs.respond_to? :update_channel_partner_link - @update_channel_partner_link = ::Gapic::Config::Method.new update_channel_partner_link_config - get_customer_repricing_config_config = parent_rpcs.get_customer_repricing_config if parent_rpcs.respond_to? :get_customer_repricing_config - @get_customer_repricing_config = ::Gapic::Config::Method.new get_customer_repricing_config_config - list_customer_repricing_configs_config = parent_rpcs.list_customer_repricing_configs if parent_rpcs.respond_to? :list_customer_repricing_configs - @list_customer_repricing_configs = ::Gapic::Config::Method.new list_customer_repricing_configs_config - create_customer_repricing_config_config = parent_rpcs.create_customer_repricing_config if parent_rpcs.respond_to? :create_customer_repricing_config - @create_customer_repricing_config = ::Gapic::Config::Method.new create_customer_repricing_config_config - update_customer_repricing_config_config = parent_rpcs.update_customer_repricing_config if parent_rpcs.respond_to? :update_customer_repricing_config - @update_customer_repricing_config = ::Gapic::Config::Method.new update_customer_repricing_config_config - delete_customer_repricing_config_config = parent_rpcs.delete_customer_repricing_config if parent_rpcs.respond_to? :delete_customer_repricing_config - @delete_customer_repricing_config = ::Gapic::Config::Method.new delete_customer_repricing_config_config - get_channel_partner_repricing_config_config = parent_rpcs.get_channel_partner_repricing_config if parent_rpcs.respond_to? :get_channel_partner_repricing_config - @get_channel_partner_repricing_config = ::Gapic::Config::Method.new get_channel_partner_repricing_config_config - list_channel_partner_repricing_configs_config = parent_rpcs.list_channel_partner_repricing_configs if parent_rpcs.respond_to? :list_channel_partner_repricing_configs - @list_channel_partner_repricing_configs = ::Gapic::Config::Method.new list_channel_partner_repricing_configs_config - create_channel_partner_repricing_config_config = parent_rpcs.create_channel_partner_repricing_config if parent_rpcs.respond_to? :create_channel_partner_repricing_config - @create_channel_partner_repricing_config = ::Gapic::Config::Method.new create_channel_partner_repricing_config_config - update_channel_partner_repricing_config_config = parent_rpcs.update_channel_partner_repricing_config if parent_rpcs.respond_to? :update_channel_partner_repricing_config - @update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config - delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config - @delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config - list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups - @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config - list_sku_group_billable_skus_config = parent_rpcs.list_sku_group_billable_skus if parent_rpcs.respond_to? :list_sku_group_billable_skus - @list_sku_group_billable_skus = ::Gapic::Config::Method.new list_sku_group_billable_skus_config - lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer - @lookup_offer = ::Gapic::Config::Method.new lookup_offer_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - list_offers_config = parent_rpcs.list_offers if parent_rpcs.respond_to? :list_offers - @list_offers = ::Gapic::Config::Method.new list_offers_config - list_purchasable_skus_config = parent_rpcs.list_purchasable_skus if parent_rpcs.respond_to? :list_purchasable_skus - @list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config - list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers - @list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config - query_eligible_billing_accounts_config = parent_rpcs.query_eligible_billing_accounts if parent_rpcs.respond_to? :query_eligible_billing_accounts - @query_eligible_billing_accounts = ::Gapic::Config::Method.new query_eligible_billing_accounts_config - register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber - @register_subscriber = ::Gapic::Config::Method.new register_subscriber_config - unregister_subscriber_config = parent_rpcs.unregister_subscriber if parent_rpcs.respond_to? :unregister_subscriber - @unregister_subscriber = ::Gapic::Config::Method.new unregister_subscriber_config - list_subscribers_config = parent_rpcs.list_subscribers if parent_rpcs.respond_to? :list_subscribers - @list_subscribers = ::Gapic::Config::Method.new list_subscribers_config - list_entitlement_changes_config = parent_rpcs.list_entitlement_changes if parent_rpcs.respond_to? :list_entitlement_changes - @list_entitlement_changes = ::Gapic::Config::Method.new list_entitlement_changes_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb deleted file mode 100644 index 3c6eadfa3687..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - # Credentials for the CloudChannelService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/apps.order" - ] - self.env_vars = [ - "CHANNEL_CREDENTIALS", - "CHANNEL_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "CHANNEL_CREDENTIALS_JSON", - "CHANNEL_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb deleted file mode 100644 index f78667841bbd..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudChannelService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb deleted file mode 100644 index b31ab215ff58..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/paths.rb +++ /dev/null @@ -1,186 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - # Path helper methods for the CloudChannelService API. - module Paths - ## - # Create a fully-qualified Account resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}` - # - # @param account [String] - # - # @return [::String] - def account_path account: - "accounts/#{account}" - end - - ## - # Create a fully-qualified ChannelPartnerLink resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/channelPartnerLinks/{channel_partner_link}` - # - # @param account [String] - # @param channel_partner_link [String] - # - # @return [::String] - def channel_partner_link_path account:, channel_partner_link: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/channelPartnerLinks/#{channel_partner_link}" - end - - ## - # Create a fully-qualified ChannelPartnerRepricingConfig resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}` - # - # @param account [String] - # @param channel_partner [String] - # @param channel_partner_repricing_config [String] - # - # @return [::String] - def channel_partner_repricing_config_path account:, channel_partner:, channel_partner_repricing_config: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "channel_partner cannot contain /" if channel_partner.to_s.include? "/" - - "accounts/#{account}/channelPartnerLinks/#{channel_partner}/channelPartnerRepricingConfigs/#{channel_partner_repricing_config}" - end - - ## - # Create a fully-qualified Customer resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/customers/{customer}` - # - # @param account [String] - # @param customer [String] - # - # @return [::String] - def customer_path account:, customer: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/customers/#{customer}" - end - - ## - # Create a fully-qualified CustomerRepricingConfig resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}` - # - # @param account [String] - # @param customer [String] - # @param customer_repricing_config [String] - # - # @return [::String] - def customer_repricing_config_path account:, customer:, customer_repricing_config: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "accounts/#{account}/customers/#{customer}/customerRepricingConfigs/#{customer_repricing_config}" - end - - ## - # Create a fully-qualified Entitlement resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/customers/{customer}/entitlements/{entitlement}` - # - # @param account [String] - # @param customer [String] - # @param entitlement [String] - # - # @return [::String] - def entitlement_path account:, customer:, entitlement: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "accounts/#{account}/customers/#{customer}/entitlements/#{entitlement}" - end - - ## - # Create a fully-qualified Offer resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/offers/{offer}` - # - # @param account [String] - # @param offer [String] - # - # @return [::String] - def offer_path account:, offer: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/offers/#{offer}" - end - - ## - # Create a fully-qualified Product resource string. - # - # The resource will be in the following format: - # - # `products/{product}` - # - # @param product [String] - # - # @return [::String] - def product_path product: - "products/#{product}" - end - - ## - # Create a fully-qualified SkuGroup resource string. - # - # The resource will be in the following format: - # - # `accounts/{account}/skuGroups/{sku_group}` - # - # @param account [String] - # @param sku_group [String] - # - # @return [::String] - def sku_group_path account:, sku_group: - raise ::ArgumentError, "account cannot contain /" if account.to_s.include? "/" - - "accounts/#{account}/skuGroups/#{sku_group}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb deleted file mode 100644 index dd938dd89369..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/channel/v1/version" - -require "google/cloud/channel/v1/cloud_channel_service/credentials" -require "google/cloud/channel/v1/cloud_channel_service/paths" -require "google/cloud/channel/v1/cloud_channel_service/rest/operations" -require "google/cloud/channel/v1/cloud_channel_service/rest/client" - -module Google - module Cloud - module Channel - module V1 - ## - # CloudChannelService lets Google cloud resellers and distributors manage - # their customers, channel partners, entitlements, and reports. - # - # Using this service: - # 1. Resellers and distributors can manage a customer entity. - # 2. Distributors can register an authorized reseller in their channel and - # provide them with delegated admin access. - # 3. Resellers and distributors can manage customer entitlements. - # - # CloudChannelService exposes the following resources: - # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an - # enterprise-managed by a reseller or distributor. - # - # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that - # provides a customer with the means to use a service. Entitlements are created - # or updated as a result of a successful fulfillment. - # - # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An - # entity that identifies links between distributors and their indirect - # resellers in a channel. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/channel/v1/cloud_channel_service/rest" - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - module CloudChannelService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/channel/v1/cloud_channel_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb deleted file mode 100644 index e4b74d4cdb7e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +++ /dev/null @@ -1,6271 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/channel/v1/service_pb" -require "google/cloud/channel/v1/cloud_channel_service/rest/service_stub" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - module Rest - ## - # REST client for the CloudChannelService service. - # - # CloudChannelService lets Google cloud resellers and distributors manage - # their customers, channel partners, entitlements, and reports. - # - # Using this service: - # 1. Resellers and distributors can manage a customer entity. - # 2. Distributors can register an authorized reseller in their channel and - # provide them with delegated admin access. - # 3. Resellers and distributors can manage customer entitlements. - # - # CloudChannelService exposes the following resources: - # - {::Google::Cloud::Channel::V1::Customer Customer}s: An entity-usually an - # enterprise-managed by a reseller or distributor. - # - # - {::Google::Cloud::Channel::V1::Entitlement Entitlement}s: An entity that - # provides a customer with the means to use a service. Entitlements are created - # or updated as a result of a successful fulfillment. - # - # - {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s: An - # entity that identifies links between distributors and their indirect - # resellers in a channel. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_channel_service_stub - - ## - # Configure the CloudChannelService Client class. - # - # See {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudChannelService clients - # ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Channel", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.provision_cloud_identity.timeout = 60.0 - - default_config.rpcs.create_entitlement.timeout = 60.0 - - default_config.rpcs.change_parameters.timeout = 60.0 - - default_config.rpcs.change_renewal_settings.timeout = 60.0 - - default_config.rpcs.change_offer.timeout = 60.0 - - default_config.rpcs.start_paid_service.timeout = 60.0 - - default_config.rpcs.suspend_entitlement.timeout = 60.0 - - default_config.rpcs.cancel_entitlement.timeout = 60.0 - - default_config.rpcs.activate_entitlement.timeout = 60.0 - - default_config.rpcs.transfer_entitlements.timeout = 60.0 - - default_config.rpcs.transfer_entitlements_to_google.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_channel_service_stub.universe_domain - end - - ## - # Create a new CloudChannelService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudChannelService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @cloud_channel_service_stub = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_channel_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Channel::V1::CloudChannelService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_channel_service_stub.logger - end - - # Service calls - - ## - # List {::Google::Cloud::Channel::V1::Customer Customer}s. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # List of {::Google::Cloud::Channel::V1::Customer Customer}s, or an empty list if - # there are no customers. - # - # @overload list_customers(request, options = nil) - # Pass arguments to `list_customers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListCustomersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListCustomersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_customers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller account to list customers from. - # Parent uses the format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. The maximum number of customers to return. The service may return - # fewer than this value. If unspecified, returns at most 10 customers. The - # maximum value is 50. - # @param page_token [::String] - # Optional. A token identifying a page of results other than the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_customers CloudChannelService.ListCustomers} - # call. - # @param filter [::String] - # Optional. Filters applied to the [CloudChannelService.ListCustomers] - # results. See - # https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers - # for more information. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListCustomersRequest.new - # - # # Call the list_customers method. - # result = client.list_customers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Customer. - # p item - # end - # - def list_customers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_customers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_customers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_customers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_customers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_customers, "customers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested {::Google::Cloud::Channel::V1::Customer Customer} - # resource. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer resource doesn't exist. Usually the result of an - # invalid name parameter. - # - # Return value: - # The {::Google::Cloud::Channel::V1::Customer Customer} resource. - # - # @overload get_customer(request, options = nil) - # Pass arguments to `get_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_customer(name: nil) - # Pass arguments to `get_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the customer to retrieve. - # Name uses the format: accounts/\\{account_id}/customers/\\{customer_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetCustomerRequest.new - # - # # Call the get_customer method. - # result = client.get_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def get_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.get_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Confirms the existence of Cloud Identity accounts based on the domain and - # if the Cloud Identity accounts are owned by the reseller. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * INVALID_VALUE: Invalid domain value in the request. - # - # Return value: - # A list of - # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} - # resources for the domain (may be empty) - # - # Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if - # no - # {::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount CloudIdentityCustomerAccount} - # resources match the domain. - # - # @overload check_cloud_identity_accounts_exist(request, options = nil) - # Pass arguments to `check_cloud_identity_accounts_exist` via a request object, either of type - # {::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload check_cloud_identity_accounts_exist(parent: nil, domain: nil, primary_admin_email: nil) - # Pass arguments to `check_cloud_identity_accounts_exist` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The reseller account's resource name. - # Parent uses the format: accounts/\\{account_id} - # @param domain [::String] - # Required. Domain to fetch for Cloud Identity account customers, including - # domain and team customers. For team customers, please use the domain for - # their emails. - # @param primary_admin_email [::String] - # Optional. Primary admin email to fetch for Cloud Identity account team - # customer. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new - # - # # Call the check_cloud_identity_accounts_exist method. - # result = client.check_cloud_identity_accounts_exist request - # - # # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse. - # p result - # - def check_cloud_identity_accounts_exist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.check_cloud_identity_accounts_exist.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.check_cloud_identity_accounts_exist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.check_cloud_identity_accounts_exist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.check_cloud_identity_accounts_exist request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new {::Google::Cloud::Channel::V1::Customer Customer} resource under - # the reseller or distributor account. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The reseller account making the request is different from the - # reseller account in the API request. - # * You are not authorized to create a customer. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: - # * Required request parameters are missing or invalid. - # * Domain field value doesn't match the primary email domain. - # - # Return value: - # The newly created {::Google::Cloud::Channel::V1::Customer Customer} resource. - # - # @overload create_customer(request, options = nil) - # Pass arguments to `create_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_customer(parent: nil, customer: nil) - # Pass arguments to `create_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of reseller account in which to create the - # customer. Parent uses the format: accounts/\\{account_id} - # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] - # Required. The customer to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateCustomerRequest.new - # - # # Call the create_customer method. - # result = client.create_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def create_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.create_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing {::Google::Cloud::Channel::V1::Customer Customer} resource - # for the reseller or distributor. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found - # for the name in the request. - # - # Return value: - # The updated {::Google::Cloud::Channel::V1::Customer Customer} resource. - # - # @overload update_customer(request, options = nil) - # Pass arguments to `update_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_customer(customer: nil, update_mask: nil) - # Pass arguments to `update_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::Google::Cloud::Channel::V1::Customer, ::Hash] - # Required. New contents of the customer. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask that applies to the resource. - # Optional. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new - # - # # Call the update_customer method. - # result = client.update_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def update_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.update_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the given {::Google::Cloud::Channel::V1::Customer Customer} permanently. - # - # 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 customer has existing entitlements. - # * NOT_FOUND: No {::Google::Cloud::Channel::V1::Customer Customer} resource found - # for the name in the request. - # - # @overload delete_customer(request, options = nil) - # Pass arguments to `delete_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::DeleteCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_customer(name: nil) - # Pass arguments to `delete_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the customer to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new - # - # # Call the delete_customer method. - # result = client.delete_customer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.delete_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports a {::Google::Cloud::Channel::V1::Customer Customer} from the Cloud - # Identity associated with the provided Cloud Identity ID or domain before a - # TransferEntitlements call. If a linked Customer already exists and - # overwrite_if_exists is true, it will update that Customer's data. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The reseller account making the request is different from the - # reseller account in the API request. - # * You are not authorized to import the customer. See - # https://support.google.com/channelservices/answer/9759265 - # * NOT_FOUND: Cloud Identity doesn't exist or was deleted. - # * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is - # expired or invalid. - # * ALREADY_EXISTS: A customer already exists and has conflicting critical - # fields. Requires an overwrite. - # - # Return value: - # The {::Google::Cloud::Channel::V1::Customer Customer}. - # - # @overload import_customer(request, options = nil) - # Pass arguments to `import_customer` via a request object, either of type - # {::Google::Cloud::Channel::V1::ImportCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ImportCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_customer(domain: nil, cloud_identity_id: nil, primary_admin_email: nil, parent: nil, auth_token: nil, overwrite_if_exists: nil, channel_partner_id: nil, customer: nil) - # Pass arguments to `import_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param domain [::String] - # Required. Customer domain. - # - # Note: The following parameters are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param cloud_identity_id [::String] - # Required. Customer's Cloud Identity ID - # - # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param primary_admin_email [::String] - # Required. Customer's primary admin email. - # - # Note: The following parameters are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The resource name of the reseller's account. - # Parent takes the format: accounts/\\{account_id} or - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} - # @param auth_token [::String] - # Optional. The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @param overwrite_if_exists [::Boolean] - # Required. Choose to overwrite an existing customer if found. - # This must be set to true if there is an existing customer with a - # conflicting region code or domain. - # @param channel_partner_id [::String] - # Optional. Cloud Identity ID of a channel partner who will be the direct - # reseller for the customer's order. This field is required for 2-tier - # transfer scenarios and can be provided via the request Parent binding as - # well. - # @param customer [::String] - # Optional. Specifies the customer that will receive imported Cloud Identity - # information. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ImportCustomerRequest.new - # - # # Call the import_customer method. - # result = client.import_customer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Customer. - # p result - # - def import_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ImportCustomerRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_customer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.import_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Cloud Identity for the given customer using the customer's - # information, or the information provided here. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller. - # * You are not authorized to provision cloud identity id. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer was not found. - # * ALREADY_EXISTS: The customer's primary email already exists. Retry - # after changing the customer's primary contact email. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata contains an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload provision_cloud_identity(request, options = nil) - # Pass arguments to `provision_cloud_identity` via a request object, either of type - # {::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload provision_cloud_identity(customer: nil, cloud_identity_info: nil, user: nil, validate_only: nil) - # Pass arguments to `provision_cloud_identity` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::String] - # Required. Resource name of the customer. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # @param cloud_identity_info [::Google::Cloud::Channel::V1::CloudIdentityInfo, ::Hash] - # CloudIdentity-specific customer information. - # @param user [::Google::Cloud::Channel::V1::AdminUser, ::Hash] - # Admin user information. - # @param validate_only [::Boolean] - # Validate the request and preview the review, but do not post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new - # - # # Call the provision_cloud_identity method. - # result = client.provision_cloud_identity request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def provision_cloud_identity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.provision_cloud_identity.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.provision_cloud_identity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.provision_cloud_identity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.provision_cloud_identity request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::Channel::V1::Entitlement Entitlement}s belonging to a - # customer. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # A list of the customer's - # {::Google::Cloud::Channel::V1::Entitlement Entitlement}s. - # - # @overload list_entitlements(request, options = nil) - # Pass arguments to `list_entitlements` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListEntitlementsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListEntitlementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entitlements(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_entitlements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account to list - # entitlements for. - # Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id} - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, return at most 50 entitlements. The maximum - # value is 100; the server will coerce values above 100. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListEntitlementsResponse#next_page_token ListEntitlementsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_entitlements CloudChannelService.ListEntitlements} - # call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new - # - # # Call the list_entitlements method. - # result = client.list_entitlements request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Entitlement. - # p item - # end - # - def list_entitlements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entitlements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entitlements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entitlements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_entitlements request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlements, "entitlements", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}s of a - # customer based on the Cloud Identity ID or Customer Name in the request. - # - # Use this method to list the entitlements information of an - # unowned customer. You should provide the customer's - # Cloud Identity ID or Customer Name. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller and has no auth token. - # * The supplied auth token is invalid. - # * The reseller account making the request is different - # from the reseller account in the query. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # A list of the customer's - # {::Google::Cloud::Channel::V1::TransferableSku TransferableSku}. - # - # @overload list_transferable_skus(request, options = nil) - # Pass arguments to `list_transferable_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListTransferableSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListTransferableSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_transferable_skus(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, auth_token: nil, language_code: nil) - # Pass arguments to `list_transferable_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cloud_identity_id [::String] - # Customer's Cloud Identity ID - # - # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer_name [::String] - # A reseller is required to create a customer and use the resource name of - # the created customer here. - # Customer_name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # - # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The reseller account's resource name. - # Parent uses the format: accounts/\\{account_id} - # @param page_size [::Integer] - # The requested page size. Server might return fewer results than requested. - # If unspecified, returns at most 100 SKUs. - # The maximum value is 1000; the server will coerce values above 1000. - # Optional. - # @param page_token [::String] - # A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListTransferableSkusResponse#next_page_token ListTransferableSkusResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} - # call. Optional. - # @param auth_token [::String] - # Optional. The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @param language_code [::String] - # The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # Optional. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new - # - # # Call the list_transferable_skus method. - # result = client.list_transferable_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku. - # p item - # end - # - def list_transferable_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_transferable_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_transferable_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transferable_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_transferable_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_skus, "transferable_skus", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer}s of a - # customer based on Cloud Identity ID or Customer Name in the request. - # - # Use this method when a reseller gets the entitlement information of an - # unowned customer. The reseller should provide the customer's - # Cloud Identity ID or Customer Name. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller and has no auth token. - # * The customer provided incorrect reseller information when generating - # auth token. - # * The reseller account making the request is different - # from the reseller account in the query. - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # List of {::Google::Cloud::Channel::V1::TransferableOffer TransferableOffer} for - # the given customer and SKU. - # - # @overload list_transferable_offers(request, options = nil) - # Pass arguments to `list_transferable_offers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListTransferableOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListTransferableOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil, billing_account: nil) - # Pass arguments to `list_transferable_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cloud_identity_id [::String] - # Customer's Cloud Identity ID - # - # Note: The following parameters are mutually exclusive: `cloud_identity_id`, `customer_name`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer_name [::String] - # A reseller should create a customer and use the resource name of - # that customer here. - # - # Note: The following parameters are mutually exclusive: `customer_name`, `cloud_identity_id`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The resource name of the reseller's account. - # @param page_size [::Integer] - # Requested page size. Server might return fewer results than requested. - # If unspecified, returns at most 100 offers. - # The maximum value is 1000; the server will coerce values above 1000. - # @param page_token [::String] - # A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListTransferableOffersResponse#next_page_token ListTransferableOffersResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} - # call. - # @param sku [::String] - # Required. The SKU to look up Offers for. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @param billing_account [::String] - # Optional. The Billing Account to look up Offers for. Format: - # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. - # - # This field is only relevant for multi-currency accounts. It should be left - # empty for single currency accounts. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new - # - # # Call the list_transferable_offers method. - # result = client.list_transferable_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer. - # p item - # end - # - def list_transferable_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_transferable_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_transferable_offers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transferable_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_transferable_offers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_offers, "transferable_offers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} - # resource. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer entitlement was not found. - # - # Return value: - # The requested {::Google::Cloud::Channel::V1::Entitlement Entitlement} resource. - # - # @overload get_entitlement(request, options = nil) - # Pass arguments to `get_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_entitlement(name: nil) - # Pass arguments to `get_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to retrieve. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Entitlement] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Entitlement] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetEntitlementRequest.new - # - # # Call the get_entitlement method. - # result = client.get_entitlement request - # - # # The returned object is of type Google::Cloud::Channel::V1::Entitlement. - # p result - # - def get_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_entitlement.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.get_entitlement request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an entitlement for a customer. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller. - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: - # * Required request parameters are missing or invalid. - # * There is already a customer entitlement for a SKU from the same - # product family. - # * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact - # Google Channel support for further troubleshooting. - # * NOT_FOUND: The customer or offer resource was not found. - # * ALREADY_EXISTS: - # * The SKU was already purchased for the customer. - # * The customer's primary email already exists. Retry - # after changing the customer's primary contact email. - # * CONDITION_NOT_MET or FAILED_PRECONDITION: - # * The domain required for purchasing a SKU has not been verified. - # * A pre-requisite SKU required to purchase an Add-On SKU is missing. - # For example, Google Workspace Business Starter is required to purchase - # Vault or Drive. - # * (Developer accounts only) Reseller and resold domain must meet the - # following naming requirements: - # * Domain names must start with goog-test. - # * Domain names must include the reseller domain. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload create_entitlement(request, options = nil) - # Pass arguments to `create_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_entitlement(parent: nil, entitlement: nil, request_id: nil) - # Pass arguments to `create_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account in which to - # create the entitlement. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param entitlement [::Google::Cloud::Channel::V1::Entitlement, ::Hash] - # Required. The entitlement to create. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new - # - # # Call the create_entitlement method. - # result = client.create_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_entitlement.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.create_entitlement request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Change parameters of the entitlement. - # - # An entitlement update is a long-running operation and it updates the - # entitlement as a result of fulfillment. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # For example, the number of seats being changed is greater than the allowed - # number of max seats, or decreasing seats for a commitment based plan. - # * NOT_FOUND: Entitlement resource not found. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload change_parameters(request, options = nil) - # Pass arguments to `change_parameters` via a request object, either of type - # {::Google::Cloud::Channel::V1::ChangeParametersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ChangeParametersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload change_parameters(name: nil, parameters: nil, request_id: nil, purchase_order_id: nil) - # Pass arguments to `change_parameters` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] - # Required. Entitlement parameters to update. You can only change editable - # parameters. - # - # To view the available Parameters for a request, refer to the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} - # from the desired offer. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @param purchase_order_id [::String] - # Optional. Purchase order ID provided by the reseller. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ChangeParametersRequest.new - # - # # Call the change_parameters method. - # result = client.change_parameters request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def change_parameters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeParametersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.change_parameters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.change_parameters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.change_parameters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.change_parameters request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the renewal settings for an existing customer entitlement. - # - # An entitlement update is a long-running operation and it updates the - # entitlement as a result of fulfillment. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a - # commitment plan. Can't enable or disable renewals for non-commitment plans. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload change_renewal_settings(request, options = nil) - # Pass arguments to `change_renewal_settings` via a request object, either of type - # {::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload change_renewal_settings(name: nil, renewal_settings: nil, request_id: nil) - # Pass arguments to `change_renewal_settings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param renewal_settings [::Google::Cloud::Channel::V1::RenewalSettings, ::Hash] - # Required. New renewal settings. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new - # - # # Call the change_renewal_settings method. - # result = client.change_renewal_settings request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def change_renewal_settings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.change_renewal_settings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.change_renewal_settings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.change_renewal_settings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.change_renewal_settings request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the Offer for an existing customer entitlement. - # - # An entitlement update is a long-running operation and it updates the - # entitlement as a result of fulfillment. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Offer or Entitlement resource not found. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload change_offer(request, options = nil) - # Pass arguments to `change_offer` via a request object, either of type - # {::Google::Cloud::Channel::V1::ChangeOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ChangeOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil, price_reference_id: nil) - # Pass arguments to `change_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param offer [::String] - # Required. New Offer. - # Format: accounts/\\{account_id}/offers/\\{offer_id}. - # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>] - # Optional. Parameters needed to purchase the Offer. To view the available - # Parameters refer to the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} - # from the desired offer. - # @param purchase_order_id [::String] - # Optional. Purchase order id provided by the reseller. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @param billing_account [::String] - # Optional. The billing account resource name that is used to pay for this - # entitlement when setting up billing on a trial subscription. - # - # This field is only relevant for multi-currency accounts. It should be - # left empty for single currency accounts. - # @param price_reference_id [::String] - # Optional. Price reference ID for the offer. Only for offers that require - # additional price information. Used to guarantee that the pricing is - # consistent between quoting the offer and placing the order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ChangeOfferRequest.new - # - # # Call the change_offer method. - # result = client.change_offer request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def change_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.change_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.change_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.change_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.change_offer request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts paid service for a trial entitlement. - # - # Starts paid service for a trial entitlement immediately. This method is - # only applicable if a plan is set up for a trial entitlement but has some - # trial days remaining. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for - # entitlement on trial plans. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload start_paid_service(request, options = nil) - # Pass arguments to `start_paid_service` via a request object, either of type - # {::Google::Cloud::Channel::V1::StartPaidServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::StartPaidServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_paid_service(name: nil, request_id: nil) - # Pass arguments to `start_paid_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the entitlement to start a paid service for. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new - # - # # Call the start_paid_service method. - # result = client.start_paid_service request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def start_paid_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::StartPaidServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.start_paid_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_paid_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_paid_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.start_paid_service request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Suspends a previously fulfilled entitlement. - # - # An entitlement suspension is a long-running operation. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * NOT_ACTIVE: Entitlement is not active. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload suspend_entitlement(request, options = nil) - # Pass arguments to `suspend_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::SuspendEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::SuspendEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload suspend_entitlement(name: nil, request_id: nil) - # Pass arguments to `suspend_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to suspend. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new - # - # # Call the suspend_entitlement method. - # result = client.suspend_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def suspend_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::SuspendEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.suspend_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.suspend_entitlement.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.suspend_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.suspend_entitlement request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels a previously fulfilled entitlement. - # - # An entitlement cancellation is a long-running operation. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * FAILED_PRECONDITION: There are Google Cloud projects linked to the - # Google Cloud entitlement's Cloud Billing subaccount. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace - # add-ons, or entitlements for Google Cloud's development platform. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The response will contain - # google.protobuf.Empty on success. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload cancel_entitlement(request, options = nil) - # Pass arguments to `cancel_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::CancelEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CancelEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_entitlement(name: nil, request_id: nil) - # Pass arguments to `cancel_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to cancel. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new - # - # # Call the cancel_entitlement method. - # result = client.cancel_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CancelEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_entitlement.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.cancel_entitlement request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Activates a previously suspended entitlement. Entitlements suspended for - # pending ToS acceptance can't be activated using this method. - # - # An entitlement activation is a long-running operation and it updates - # the state of the customer entitlement. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement resource not found. - # * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated - # suspensions and entitlements that have accepted the TOS. - # * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE - # state. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload activate_entitlement(request, options = nil) - # Pass arguments to `activate_entitlement` via a request object, either of type - # {::Google::Cloud::Channel::V1::ActivateEntitlementRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ActivateEntitlementRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload activate_entitlement(name: nil, request_id: nil) - # Pass arguments to `activate_entitlement` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the entitlement to activate. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new - # - # # Call the activate_entitlement method. - # result = client.activate_entitlement request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def activate_entitlement request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ActivateEntitlementRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.activate_entitlement.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.activate_entitlement.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.activate_entitlement.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.activate_entitlement request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Transfers customer entitlements to new reseller. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller. - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer or offer resource was not found. - # * ALREADY_EXISTS: The SKU was already transferred for the customer. - # * CONDITION_NOT_MET or FAILED_PRECONDITION: - # * The SKU requires domain verification to transfer, but the domain is - # not verified. - # * An Add-On SKU (example, Vault or Drive) is missing the - # pre-requisite SKU (example, G Suite Basic). - # * (Developer accounts only) Reseller and resold domain must meet the - # following naming requirements: - # * Domain names must start with goog-test. - # * Domain names must include the reseller domain. - # * Specify all transferring entitlements. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload transfer_entitlements(request, options = nil) - # Pass arguments to `transfer_entitlements` via a request object, either of type - # {::Google::Cloud::Channel::V1::TransferEntitlementsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload transfer_entitlements(parent: nil, entitlements: nil, auth_token: nil, request_id: nil) - # Pass arguments to `transfer_entitlements` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account that will - # receive transferred entitlements. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] - # Required. The new entitlements to create or transfer. - # @param auth_token [::String] - # The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new - # - # # Call the transfer_entitlements method. - # result = client.transfer_entitlements request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def transfer_entitlements request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.transfer_entitlements.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.transfer_entitlements.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.transfer_entitlements.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.transfer_entitlements request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Transfers customer entitlements from their current reseller to Google. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The customer or offer resource was not found. - # * ALREADY_EXISTS: The SKU was already transferred for the customer. - # * CONDITION_NOT_MET or FAILED_PRECONDITION: - # * The SKU requires domain verification to transfer, but the domain is - # not verified. - # * An Add-On SKU (example, Vault or Drive) is missing the - # pre-requisite SKU (example, G Suite Basic). - # * (Developer accounts only) Reseller and resold domain must meet the - # following naming requirements: - # * Domain names must start with goog-test. - # * Domain names must include the reseller domain. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The response will contain - # google.protobuf.Empty on success. The Operation metadata will contain an - # instance of {::Google::Cloud::Channel::V1::OperationMetadata OperationMetadata}. - # - # @overload transfer_entitlements_to_google(request, options = nil) - # Pass arguments to `transfer_entitlements_to_google` via a request object, either of type - # {::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload transfer_entitlements_to_google(parent: nil, entitlements: nil, request_id: nil) - # Pass arguments to `transfer_entitlements_to_google` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller's customer account where the - # entitlements transfer from. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param entitlements [::Array<::Google::Cloud::Channel::V1::Entitlement, ::Hash>] - # Required. The entitlements to transfer to Google. - # @param request_id [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new - # - # # Call the transfer_entitlements_to_google method. - # result = client.transfer_entitlements_to_google request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def transfer_entitlements_to_google request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.transfer_entitlements_to_google.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.transfer_entitlements_to_google.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.transfer_entitlements_to_google.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.transfer_entitlements_to_google request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}s - # belonging to a distributor. You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # The list of the distributor account's - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resources. - # - # @overload list_channel_partner_links(request, options = nil) - # Pass arguments to `list_channel_partner_links` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_channel_partner_links(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_channel_partner_links` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller account for listing channel - # partner links. Parent uses the format: accounts/\\{account_id} - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, server will pick a default size (25). The - # maximum value is 200; the server will coerce values above 200. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse#next_page_token ListChannelPartnerLinksResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} - # call. - # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] - # Optional. The level of granularity the ChannelPartnerLink will display. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new - # - # # Call the list_channel_partner_links method. - # result = client.list_channel_partner_links request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink. - # p item - # end - # - def list_channel_partner_links request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_channel_partner_links.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_channel_partner_links.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_channel_partner_links.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_channel_partner_links request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_links, "channel_partner_links", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. - # You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: ChannelPartnerLink resource not found because of an - # invalid channel partner link name. - # - # Return value: - # The {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} - # resource. - # - # @overload get_channel_partner_link(request, options = nil) - # Pass arguments to `get_channel_partner_link` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_channel_partner_link(name: nil, view: nil) - # Pass arguments to `get_channel_partner_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the channel partner link to retrieve. - # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} - # where \\{id} is the Cloud Identity ID of the partner. - # @param view [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] - # Optional. The level of granularity the ChannelPartnerLink will display. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new - # - # # Call the get_channel_partner_link method. - # result = client.get_channel_partner_link request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - # p result - # - def get_channel_partner_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_channel_partner_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_channel_partner_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_channel_partner_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.get_channel_partner_link request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Initiates a channel partner link between a distributor and a reseller, or - # between resellers in an n-tier reseller channel. - # Invited partners need to follow the invite_link_uri provided in the - # response to accept. After accepting the invitation, a link is set up - # between the two parties. - # You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already - # exists. - # * NOT_FOUND: No Cloud Identity customer exists for provided domain. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The new {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} - # resource. - # - # @overload create_channel_partner_link(request, options = nil) - # Pass arguments to `create_channel_partner_link` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_channel_partner_link(parent: nil, channel_partner_link: nil) - # Pass arguments to `create_channel_partner_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Create a channel partner link for the provided reseller account's - # resource name. - # Parent uses the format: accounts/\\{account_id} - # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] - # Required. The channel partner link to create. - # Either channel_partner_link.reseller_cloud_identity_id or domain can be - # used to create a link. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new - # - # # Call the create_channel_partner_link method. - # result = client.create_channel_partner_link request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - # p result - # - def create_channel_partner_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_channel_partner_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_channel_partner_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_channel_partner_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.create_channel_partner_link request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a channel partner link. Distributors call this method to change a - # link's status. For example, to suspend a partner link. - # You must be a distributor to call this method. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request is different - # from the reseller account in the API request. - # * INVALID_ARGUMENT: - # * Required request parameters are missing or invalid. - # * Link state cannot change from invited to active or suspended. - # * Cannot send reseller_cloud_identity_id, invite_url, or name in update - # mask. - # * NOT_FOUND: ChannelPartnerLink resource not found. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The updated - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} resource. - # - # @overload update_channel_partner_link(request, options = nil) - # Pass arguments to `update_channel_partner_link` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_channel_partner_link(name: nil, channel_partner_link: nil, update_mask: nil) - # Pass arguments to `update_channel_partner_link` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the channel partner link to cancel. - # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} - # where \\{id} is the Cloud Identity ID of the partner. - # @param channel_partner_link [::Google::Cloud::Channel::V1::ChannelPartnerLink, ::Hash] - # Required. The channel partner link to update. Only - # channel_partner_link.link_state is allowed for updates. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask that applies to the resource. - # The only allowable value for an update mask is - # channel_partner_link.link_state. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new - # - # # Call the update_channel_partner_link method. - # result = client.update_channel_partner_link request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - # p result - # - def update_channel_partner_link request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_channel_partner_link.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_channel_partner_link.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_channel_partner_link.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.update_channel_partner_link request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload get_customer_repricing_config(request, options = nil) - # Pass arguments to `get_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_customer_repricing_config(name: nil) - # Pass arguments to `get_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the CustomerRepricingConfig. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new - # - # # Call the get_customer_repricing_config method. - # result = client.get_customer_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p result - # - def get_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.get_customer_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resources. The data for each resource is displayed in the ascending order - # of: - # - # * Customer ID - # * {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement} - # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # * {::Google::Cloud::Channel::V1::CustomerRepricingConfig#update_time CustomerRepricingConfig.update_time} - # - # If unsuccessful, returns an error. - # - # @overload list_customer_repricing_configs(request, options = nil) - # Pass arguments to `list_customer_repricing_configs` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_customer_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_customer_repricing_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # 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. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} - # call. - # @param filter [::String] - # 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. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new - # - # # Call the list_customer_repricing_configs method. - # result = client.list_customer_repricing_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p item - # end - # - def list_customer_repricing_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_customer_repricing_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_customer_repricing_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_customer_repricing_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, "customer_repricing_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a CustomerRepricingConfig. Call this method to set modifications - # for a specific customer's bill. You can only create configs if the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, - # for any - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. - # * The contained - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config} - # value must be different from the value used in the current config for a - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload create_customer_repricing_config(request, options = nil) - # Pass arguments to `create_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_customer_repricing_config(parent: nil, customer_repricing_config: nil) - # Pass arguments to `create_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the customer that will receive this - # repricing config. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] - # Required. The CustomerRepricingConfig object to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new - # - # # Call the create_customer_repricing_config method. - # result = client.create_customer_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p result - # - def create_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.create_customer_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # is a future month. To make changes to configs for the current month, use - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#create_customer_repricing_config CreateCustomerRepricingConfig}, - # taking note of its restrictions. You cannot update the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload update_customer_repricing_config(request, options = nil) - # Pass arguments to `update_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_customer_repricing_config(customer_repricing_config: nil) - # Pass arguments to `update_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer_repricing_config [::Google::Cloud::Channel::V1::CustomerRepricingConfig, ::Hash] - # Required. The CustomerRepricingConfig object to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new - # - # # Call the update_customer_repricing_config method. - # result = client.update_customer_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - # p result - # - def update_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.update_customer_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the given - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # permanently. You can only delete configs if their - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # is active or in the past. - # * NOT_FOUND: No - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # found for the name in the request. - # - # @overload delete_customer_repricing_config(request, options = nil) - # Pass arguments to `delete_customer_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_customer_repricing_config(name: nil) - # Pass arguments to `delete_customer_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the customer repricing config rule to - # delete. Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new - # - # # Call the delete_customer_repricing_config method. - # result = client.delete_customer_repricing_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_customer_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.delete_customer_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload get_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `get_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_channel_partner_repricing_config(name: nil) - # Pass arguments to `get_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the ChannelPartnerRepricingConfig - # Format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new - # - # # Call the get_channel_partner_repricing_config method. - # result = client.get_channel_partner_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p result - # - def get_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_channel_partner_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.get_channel_partner_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resources. The data for each resource is displayed in the ascending order - # of: - # - # * Channel Partner ID - # * {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # * {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#update_time ChannelPartnerRepricingConfig.update_time} - # - # If unsuccessful, returns an error. - # - # @overload list_channel_partner_repricing_configs(request, options = nil) - # Pass arguments to `list_channel_partner_repricing_configs` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_channel_partner_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_channel_partner_repricing_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account's - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}. Parent - # uses the format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}. - # Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs - # for all channel partners. - # @param page_size [::Integer] - # 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. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} - # call. - # @param filter [::String] - # 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`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new - # - # # Call the list_channel_partner_repricing_configs method. - # result = client.list_channel_partner_repricing_configs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p item - # end - # - def list_channel_partner_repricing_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_channel_partner_repricing_configs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_channel_partner_repricing_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_channel_partner_repricing_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_channel_partner_repricing_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, "channel_partner_repricing_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a ChannelPartnerRepricingConfig. Call this method to set - # modifications for a specific ChannelPartner's bill. You can only create - # configs if the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}, - # for any - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}. - # * The contained - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config} - # value 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload create_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `create_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_channel_partner_repricing_config(parent: nil, channel_partner_repricing_config: nil) - # Pass arguments to `create_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the ChannelPartner that will receive the - # repricing config. Parent uses the format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} - # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] - # Required. The ChannelPartnerRepricingConfig object to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new - # - # # Call the create_channel_partner_repricing_config method. - # result = client.create_channel_partner_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p result - # - def create_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_channel_partner_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.create_channel_partner_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # 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 - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # is a future month. To make changes to configs for the current month, use - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#create_channel_partner_repricing_config CreateChannelPartnerRepricingConfig}, - # taking note of its restrictions. You cannot update the - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # resource, otherwise returns an error. - # - # @overload update_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `update_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_channel_partner_repricing_config(channel_partner_repricing_config: nil) - # Pass arguments to `update_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel_partner_repricing_config [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig, ::Hash] - # Required. The ChannelPartnerRepricingConfig object to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new - # - # # Call the update_channel_partner_repricing_config method. - # result = client.update_channel_partner_repricing_config request - # - # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - # p result - # - def update_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_channel_partner_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.update_channel_partner_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the given - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # permanently. You can only delete configs if their - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month 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 - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # is active or in the past. - # * NOT_FOUND: No - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # found for the name in the request. - # - # @overload delete_channel_partner_repricing_config(request, options = nil) - # Pass arguments to `delete_channel_partner_repricing_config` via a request object, either of type - # {::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_channel_partner_repricing_config(name: nil) - # Pass arguments to `delete_channel_partner_repricing_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the channel partner repricing config rule to - # delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new - # - # # Call the delete_channel_partner_repricing_config method. - # result = client.delete_channel_partner_repricing_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_channel_partner_repricing_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_channel_partner_repricing_config.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_channel_partner_repricing_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_channel_partner_repricing_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.delete_channel_partner_repricing_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Rebilling supported SKU groups the account is authorized to - # sell. - # Reference: https://cloud.google.com/skus/sku-groups - # - # Possible Error Codes: - # - # * PERMISSION_DENIED: If the account making the request and the account - # being queried are different, or the account doesn't exist. - # * INTERNAL: Any non-user error related to technical issues in the - # backend. In this case, contact Cloud Channel support. - # - # Return Value: - # If successful, the {::Google::Cloud::Channel::V1::SkuGroup SkuGroup} resources. - # The data for each resource is displayed in the alphabetical order of SKU - # group display name. - # The data for each resource is displayed in the ascending order of - # {::Google::Cloud::Channel::V1::SkuGroup#display_name SkuGroup.display_name} - # - # If unsuccessful, returns an error. - # - # @overload list_sku_groups(request, options = nil) - # Pass arguments to `list_sku_groups` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSkuGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sku_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the account from which to list SKU groups. - # Parent uses the format: accounts/\\{account}. - # @param page_size [::Integer] - # Optional. The maximum number of SKU groups to return. The service may - # return fewer than this value. If unspecified, returns a maximum of 1000 SKU - # groups. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_groups CloudChannelService.ListSkuGroups} - # call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new - # - # # Call the list_sku_groups method. - # result = client.list_sku_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup. - # p item - # end - # - def list_sku_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sku_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sku_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_sku_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, "sku_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Billable SKUs in a given SKU group. - # - # Possible error codes: - # PERMISSION_DENIED: If the account making the request and the account - # being queried for are different, or the account doesn't exist. - # INVALID_ARGUMENT: Missing or invalid required parameters in the - # request. - # INTERNAL: Any non-user error related to technical issue in the - # backend. In this case, contact cloud channel support. - # - # Return Value: - # If successful, the {::Google::Cloud::Channel::V1::BillableSku BillableSku} - # resources. The data for each resource is displayed in the ascending order - # of: - # - # * {::Google::Cloud::Channel::V1::BillableSku#service_display_name BillableSku.service_display_name} - # * {::Google::Cloud::Channel::V1::BillableSku#sku_display_name BillableSku.sku_display_name} - # - # If unsuccessful, returns an error. - # - # @overload list_sku_group_billable_skus(request, options = nil) - # Pass arguments to `list_sku_group_billable_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sku_group_billable_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the SKU group. - # Format: accounts/\\{account}/skuGroups/\\{sku_group}. - # @param page_size [::Integer] - # Optional. The maximum number of SKUs to return. The service may return - # fewer than this value. If unspecified, returns a maximum of 100000 SKUs. - # The maximum value is 100000; values above 100000 will be coerced to 100000. - # @param page_token [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} - # call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new - # - # # Call the list_sku_group_billable_skus method. - # result = client.list_sku_group_billable_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::BillableSku. - # p item - # end - # - def list_sku_group_billable_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sku_group_billable_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_sku_group_billable_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, "billable_skus", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested {::Google::Cloud::Channel::V1::Offer Offer} resource. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The entitlement doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: Entitlement or offer was not found. - # - # Return value: - # The {::Google::Cloud::Channel::V1::Offer Offer} resource. - # - # @overload lookup_offer(request, options = nil) - # Pass arguments to `lookup_offer` via a request object, either of type - # {::Google::Cloud::Channel::V1::LookupOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::LookupOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload lookup_offer(entitlement: nil) - # Pass arguments to `lookup_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param entitlement [::String] - # Required. The resource name of the entitlement to retrieve the Offer. - # Entitlement uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Offer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Offer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::LookupOfferRequest.new - # - # # Call the lookup_offer method. - # result = client.lookup_offer request - # - # # The returned object is of type Google::Cloud::Channel::V1::Offer. - # p result - # - def lookup_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::LookupOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.lookup_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.lookup_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.lookup_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Products the reseller is authorized to sell. - # - # Possible error codes: - # - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_products(request, options = nil) - # Pass arguments to `list_products` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListProductsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_products(account: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_products` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Required. The resource name of the reseller account. - # Format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 Products. The maximum value - # is 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Product>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListProductsRequest.new - # - # # Call the list_products method. - # result = client.list_products request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Product. - # p item - # end - # - def list_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListProductsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_products.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_products, "products", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the SKUs for a product the reseller is authorized to sell. - # - # Possible error codes: - # - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_skus(parent: nil, account: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the Product to list SKUs for. - # Parent uses the format: products/\\{product_id}. - # Supports products/- to retrieve SKUs for all products. - # @param account [::String] - # Required. Resource name of the reseller. - # Format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 SKUs. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # Optional. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, "skus", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the Offers the reseller can sell. - # - # Possible error codes: - # - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_offers(request, options = nil) - # Pass arguments to `list_offers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, language_code: nil, show_future_offers: nil) - # Pass arguments to `list_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the reseller account from which to list - # Offers. Parent uses the format: accounts/\\{account_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 500 Offers. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param filter [::String] - # Optional. The expression to filter results by name (name of - # the Offer), sku.name (name of the SKU), or sku.product.name (name of the - # Product). - # Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 - # Example 2: name=accounts/a1/offers/o1 - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @param show_future_offers [::Boolean] - # Optional. A boolean flag that determines if a response returns future - # offers 30 days from now. If the show_future_offers is true, the response - # will only contain offers that are scheduled to be available 30 days from - # now. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListOffersRequest.new - # - # # Call the list_offers method. - # result = client.list_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::Offer. - # p item - # end - # - def list_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_offers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_offers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, "offers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the following: - # - # * SKUs that you can purchase for a customer - # * SKUs that you can upgrade or downgrade for an entitlement. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_purchasable_skus(request, options = nil) - # Pass arguments to `list_purchasable_skus` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListPurchasableSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_purchasable_skus(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_purchasable_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase, ::Hash] - # List SKUs for CreateEntitlement purchase. - # - # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase, ::Hash] - # List SKUs for ChangeOffer purchase with a new SKU. - # - # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer [::String] - # Required. The resource name of the customer to list SKUs for. - # Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 SKUs. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new - # - # # Call the list_purchasable_skus method. - # result = client.list_purchasable_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku. - # p item - # end - # - def list_purchasable_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_purchasable_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_purchasable_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_purchasable_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_purchasable_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, "purchasable_skus", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the following: - # - # * Offers that you can purchase for a customer. - # * Offers that you can change for an entitlement. - # - # Possible error codes: - # - # * PERMISSION_DENIED: - # * The customer doesn't belong to the reseller - # * The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # @overload list_purchasable_offers(request, options = nil) - # Pass arguments to `list_purchasable_offers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListPurchasableOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_purchasable_offers(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) - # Pass arguments to `list_purchasable_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param create_entitlement_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase, ::Hash] - # List Offers for CreateEntitlement purchase. - # - # Note: The following parameters are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param change_offer_purchase [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase, ::Hash] - # List Offers for ChangeOffer purchase. - # - # Note: The following parameters are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param customer [::String] - # Required. The resource name of the customer to list Offers for. - # Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @param page_size [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 Offers. The maximum value is - # 1000; the server will coerce values above 1000. - # @param page_token [::String] - # Optional. A token for a page of results other than the first page. - # @param language_code [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new - # - # # Call the list_purchasable_offers method. - # result = client.list_purchasable_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer. - # p item - # end - # - def list_purchasable_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_purchasable_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_purchasable_offers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_purchasable_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_purchasable_offers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_offers, "purchasable_offers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the billing accounts that are eligible to purchase particular SKUs - # for a given customer. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The customer doesn't belong to the reseller. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # - # Return value: - # Based on the provided list of SKUs, returns a list of SKU groups that must - # be purchased using the same billing account and the billing accounts - # eligible to purchase each SKU group. - # - # @overload query_eligible_billing_accounts(request, options = nil) - # Pass arguments to `query_eligible_billing_accounts` via a request object, either of type - # {::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload query_eligible_billing_accounts(customer: nil, skus: nil) - # Pass arguments to `query_eligible_billing_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::String] - # Required. The resource name of the customer to list eligible billing - # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @param skus [::Array<::String>] - # Required. List of SKUs to list eligible billing accounts for. At least one - # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new - # - # # Call the query_eligible_billing_accounts method. - # result = client.query_eligible_billing_accounts request - # - # # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse. - # p result - # - def query_eligible_billing_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.query_eligible_billing_accounts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.query_eligible_billing_accounts request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Registers a service account with subscriber privileges on the Pub/Sub - # topic for this Channel Services account or integrator. After you create a - # subscriber, you get the events through - # {::Google::Cloud::Channel::V1::SubscriberEvent SubscriberEvent} - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different, or the impersonated user - # is not a super admin. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The topic name with the registered service email address. - # - # @overload register_subscriber(request, options = nil) - # Pass arguments to `register_subscriber` via a request object, either of type - # {::Google::Cloud::Channel::V1::RegisterSubscriberRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::RegisterSubscriberRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload register_subscriber(account: nil, service_account: nil, integrator: nil) - # Pass arguments to `register_subscriber` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @param service_account [::String] - # Required. Service account that provides subscriber access to the registered - # topic. - # @param integrator [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new - # - # # Call the register_subscriber method. - # result = client.register_subscriber request - # - # # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse. - # p result - # - def register_subscriber request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RegisterSubscriberRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.register_subscriber.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.register_subscriber.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.register_subscriber.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.register_subscriber request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Unregisters a service account with subscriber privileges on the Pub/Sub - # topic created for this Channel Services account or integrator. If there are - # no service accounts left with subscriber privileges, this deletes the - # topic. You can call ListSubscribers to check for these accounts. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different, or the impersonated user - # is not a super admin. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The topic resource doesn't exist. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # The topic name that unregistered the service email address. - # Returns a success response if the service email address wasn't registered - # with the topic. - # - # @overload unregister_subscriber(request, options = nil) - # Pass arguments to `unregister_subscriber` via a request object, either of type - # {::Google::Cloud::Channel::V1::UnregisterSubscriberRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unregister_subscriber(account: nil, service_account: nil, integrator: nil) - # Pass arguments to `unregister_subscriber` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @param service_account [::String] - # Required. Service account to unregister from subscriber access to the - # topic. - # @param integrator [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new - # - # # Call the unregister_subscriber method. - # result = client.unregister_subscriber request - # - # # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse. - # p result - # - def unregister_subscriber request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.unregister_subscriber.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.unregister_subscriber.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unregister_subscriber.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.unregister_subscriber request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists service accounts with subscriber privileges on the Pub/Sub topic - # created for this Channel Services account or integrator. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different, or the impersonated user - # is not a super admin. - # * INVALID_ARGUMENT: Required request parameters are missing or invalid. - # * NOT_FOUND: The topic resource doesn't exist. - # * INTERNAL: Any non-user error related to a technical issue in the - # backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # Contact Cloud Channel support. - # - # Return value: - # A list of service email addresses. - # - # @overload list_subscribers(request, options = nil) - # Pass arguments to `list_subscribers` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListSubscribersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListSubscribersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_subscribers(account: nil, page_size: nil, page_token: nil, integrator: nil) - # Pass arguments to `list_subscribers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param account [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @param page_size [::Integer] - # Optional. The maximum number of service accounts to return. The service may - # return fewer than this value. If unspecified, returns at most 100 service - # accounts. The maximum value is 1000; the server will coerce values above - # 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListSubscribers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListSubscribers` must - # match the call that provided the page token. - # @param integrator [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListSubscribersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListSubscribersRequest.new - # - # # Call the list_subscribers method. - # result = client.list_subscribers request - # - # # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse. - # p result - # - def list_subscribers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSubscribersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_subscribers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_subscribers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_subscribers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_subscribers request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List entitlement history. - # - # Possible error codes: - # - # * PERMISSION_DENIED: The reseller account making the request and the - # provided reseller account are different. - # * INVALID_ARGUMENT: Missing or invalid required fields in the request. - # * NOT_FOUND: The parent resource doesn't exist. Usually the result of an - # invalid name parameter. - # * INTERNAL: Any non-user error related to a technical issue in the backend. - # In this case, contact CloudChannel support. - # * UNKNOWN: Any non-user error related to a technical issue in the backend. - # In this case, contact Cloud Channel support. - # - # Return value: - # List of {::Google::Cloud::Channel::V1::EntitlementChange EntitlementChange}s. - # - # @overload list_entitlement_changes(request, options = nil) - # Pass arguments to `list_entitlement_changes` via a request object, either of type - # {::Google::Cloud::Channel::V1::ListEntitlementChangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_entitlement_changes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_entitlement_changes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the entitlement for which to list - # entitlement changes. The `-` wildcard may be used to match entitlements - # across a customer. Formats: - # - # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/- - # @param page_size [::Integer] - # Optional. The maximum number of entitlement changes to return. The service - # may return fewer than this value. If unspecified, returns at most 10 - # entitlement changes. The maximum value is 50; the server will coerce values - # above 50. - # @param page_token [::String] - # Optional. A page token, received from a previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # must match the call that provided the page token. - # @param filter [::String] - # Optional. Filters applied to the list results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/channel/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new - # - # # Call the list_entitlement_changes method. - # result = client.list_entitlement_changes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Channel::V1::EntitlementChange. - # p item - # end - # - def list_entitlement_changes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_entitlement_changes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_entitlement_changes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_entitlement_changes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_channel_service_stub.list_entitlement_changes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlement_changes, "entitlement_changes", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudChannelService REST API. - # - # This class represents the configuration for CloudChannelService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_customers to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_customers.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_customers.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CloudChannelService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_customers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customers - ## - # RPC-specific configuration for `get_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer - ## - # RPC-specific configuration for `check_cloud_identity_accounts_exist` - # @return [::Gapic::Config::Method] - # - attr_reader :check_cloud_identity_accounts_exist - ## - # RPC-specific configuration for `create_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer - ## - # RPC-specific configuration for `update_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer - ## - # RPC-specific configuration for `delete_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer - ## - # RPC-specific configuration for `import_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :import_customer - ## - # RPC-specific configuration for `provision_cloud_identity` - # @return [::Gapic::Config::Method] - # - attr_reader :provision_cloud_identity - ## - # RPC-specific configuration for `list_entitlements` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entitlements - ## - # RPC-specific configuration for `list_transferable_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transferable_skus - ## - # RPC-specific configuration for `list_transferable_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transferable_offers - ## - # RPC-specific configuration for `get_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :get_entitlement - ## - # RPC-specific configuration for `create_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :create_entitlement - ## - # RPC-specific configuration for `change_parameters` - # @return [::Gapic::Config::Method] - # - attr_reader :change_parameters - ## - # RPC-specific configuration for `change_renewal_settings` - # @return [::Gapic::Config::Method] - # - attr_reader :change_renewal_settings - ## - # RPC-specific configuration for `change_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :change_offer - ## - # RPC-specific configuration for `start_paid_service` - # @return [::Gapic::Config::Method] - # - attr_reader :start_paid_service - ## - # RPC-specific configuration for `suspend_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :suspend_entitlement - ## - # RPC-specific configuration for `cancel_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_entitlement - ## - # RPC-specific configuration for `activate_entitlement` - # @return [::Gapic::Config::Method] - # - attr_reader :activate_entitlement - ## - # RPC-specific configuration for `transfer_entitlements` - # @return [::Gapic::Config::Method] - # - attr_reader :transfer_entitlements - ## - # RPC-specific configuration for `transfer_entitlements_to_google` - # @return [::Gapic::Config::Method] - # - attr_reader :transfer_entitlements_to_google - ## - # RPC-specific configuration for `list_channel_partner_links` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channel_partner_links - ## - # RPC-specific configuration for `get_channel_partner_link` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel_partner_link - ## - # RPC-specific configuration for `create_channel_partner_link` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel_partner_link - ## - # RPC-specific configuration for `update_channel_partner_link` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel_partner_link - ## - # RPC-specific configuration for `get_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer_repricing_config - ## - # RPC-specific configuration for `list_customer_repricing_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customer_repricing_configs - ## - # RPC-specific configuration for `create_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer_repricing_config - ## - # RPC-specific configuration for `update_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer_repricing_config - ## - # RPC-specific configuration for `delete_customer_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer_repricing_config - ## - # RPC-specific configuration for `get_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel_partner_repricing_config - ## - # RPC-specific configuration for `list_channel_partner_repricing_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channel_partner_repricing_configs - ## - # RPC-specific configuration for `create_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel_partner_repricing_config - ## - # RPC-specific configuration for `update_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel_partner_repricing_config - ## - # RPC-specific configuration for `delete_channel_partner_repricing_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel_partner_repricing_config - ## - # RPC-specific configuration for `list_sku_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sku_groups - ## - # RPC-specific configuration for `list_sku_group_billable_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sku_group_billable_skus - ## - # RPC-specific configuration for `lookup_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_offer - ## - # RPC-specific configuration for `list_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_products - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - ## - # RPC-specific configuration for `list_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_offers - ## - # RPC-specific configuration for `list_purchasable_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_purchasable_skus - ## - # RPC-specific configuration for `list_purchasable_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_purchasable_offers - ## - # RPC-specific configuration for `query_eligible_billing_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :query_eligible_billing_accounts - ## - # RPC-specific configuration for `register_subscriber` - # @return [::Gapic::Config::Method] - # - attr_reader :register_subscriber - ## - # RPC-specific configuration for `unregister_subscriber` - # @return [::Gapic::Config::Method] - # - attr_reader :unregister_subscriber - ## - # RPC-specific configuration for `list_subscribers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_subscribers - ## - # RPC-specific configuration for `list_entitlement_changes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_entitlement_changes - - # @private - def initialize parent_rpcs = nil - list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers - @list_customers = ::Gapic::Config::Method.new list_customers_config - get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer - @get_customer = ::Gapic::Config::Method.new get_customer_config - check_cloud_identity_accounts_exist_config = parent_rpcs.check_cloud_identity_accounts_exist if parent_rpcs.respond_to? :check_cloud_identity_accounts_exist - @check_cloud_identity_accounts_exist = ::Gapic::Config::Method.new check_cloud_identity_accounts_exist_config - create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer - @create_customer = ::Gapic::Config::Method.new create_customer_config - update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer - @update_customer = ::Gapic::Config::Method.new update_customer_config - delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer - @delete_customer = ::Gapic::Config::Method.new delete_customer_config - import_customer_config = parent_rpcs.import_customer if parent_rpcs.respond_to? :import_customer - @import_customer = ::Gapic::Config::Method.new import_customer_config - provision_cloud_identity_config = parent_rpcs.provision_cloud_identity if parent_rpcs.respond_to? :provision_cloud_identity - @provision_cloud_identity = ::Gapic::Config::Method.new provision_cloud_identity_config - list_entitlements_config = parent_rpcs.list_entitlements if parent_rpcs.respond_to? :list_entitlements - @list_entitlements = ::Gapic::Config::Method.new list_entitlements_config - list_transferable_skus_config = parent_rpcs.list_transferable_skus if parent_rpcs.respond_to? :list_transferable_skus - @list_transferable_skus = ::Gapic::Config::Method.new list_transferable_skus_config - list_transferable_offers_config = parent_rpcs.list_transferable_offers if parent_rpcs.respond_to? :list_transferable_offers - @list_transferable_offers = ::Gapic::Config::Method.new list_transferable_offers_config - get_entitlement_config = parent_rpcs.get_entitlement if parent_rpcs.respond_to? :get_entitlement - @get_entitlement = ::Gapic::Config::Method.new get_entitlement_config - create_entitlement_config = parent_rpcs.create_entitlement if parent_rpcs.respond_to? :create_entitlement - @create_entitlement = ::Gapic::Config::Method.new create_entitlement_config - change_parameters_config = parent_rpcs.change_parameters if parent_rpcs.respond_to? :change_parameters - @change_parameters = ::Gapic::Config::Method.new change_parameters_config - change_renewal_settings_config = parent_rpcs.change_renewal_settings if parent_rpcs.respond_to? :change_renewal_settings - @change_renewal_settings = ::Gapic::Config::Method.new change_renewal_settings_config - change_offer_config = parent_rpcs.change_offer if parent_rpcs.respond_to? :change_offer - @change_offer = ::Gapic::Config::Method.new change_offer_config - start_paid_service_config = parent_rpcs.start_paid_service if parent_rpcs.respond_to? :start_paid_service - @start_paid_service = ::Gapic::Config::Method.new start_paid_service_config - suspend_entitlement_config = parent_rpcs.suspend_entitlement if parent_rpcs.respond_to? :suspend_entitlement - @suspend_entitlement = ::Gapic::Config::Method.new suspend_entitlement_config - cancel_entitlement_config = parent_rpcs.cancel_entitlement if parent_rpcs.respond_to? :cancel_entitlement - @cancel_entitlement = ::Gapic::Config::Method.new cancel_entitlement_config - activate_entitlement_config = parent_rpcs.activate_entitlement if parent_rpcs.respond_to? :activate_entitlement - @activate_entitlement = ::Gapic::Config::Method.new activate_entitlement_config - transfer_entitlements_config = parent_rpcs.transfer_entitlements if parent_rpcs.respond_to? :transfer_entitlements - @transfer_entitlements = ::Gapic::Config::Method.new transfer_entitlements_config - transfer_entitlements_to_google_config = parent_rpcs.transfer_entitlements_to_google if parent_rpcs.respond_to? :transfer_entitlements_to_google - @transfer_entitlements_to_google = ::Gapic::Config::Method.new transfer_entitlements_to_google_config - list_channel_partner_links_config = parent_rpcs.list_channel_partner_links if parent_rpcs.respond_to? :list_channel_partner_links - @list_channel_partner_links = ::Gapic::Config::Method.new list_channel_partner_links_config - get_channel_partner_link_config = parent_rpcs.get_channel_partner_link if parent_rpcs.respond_to? :get_channel_partner_link - @get_channel_partner_link = ::Gapic::Config::Method.new get_channel_partner_link_config - create_channel_partner_link_config = parent_rpcs.create_channel_partner_link if parent_rpcs.respond_to? :create_channel_partner_link - @create_channel_partner_link = ::Gapic::Config::Method.new create_channel_partner_link_config - update_channel_partner_link_config = parent_rpcs.update_channel_partner_link if parent_rpcs.respond_to? :update_channel_partner_link - @update_channel_partner_link = ::Gapic::Config::Method.new update_channel_partner_link_config - get_customer_repricing_config_config = parent_rpcs.get_customer_repricing_config if parent_rpcs.respond_to? :get_customer_repricing_config - @get_customer_repricing_config = ::Gapic::Config::Method.new get_customer_repricing_config_config - list_customer_repricing_configs_config = parent_rpcs.list_customer_repricing_configs if parent_rpcs.respond_to? :list_customer_repricing_configs - @list_customer_repricing_configs = ::Gapic::Config::Method.new list_customer_repricing_configs_config - create_customer_repricing_config_config = parent_rpcs.create_customer_repricing_config if parent_rpcs.respond_to? :create_customer_repricing_config - @create_customer_repricing_config = ::Gapic::Config::Method.new create_customer_repricing_config_config - update_customer_repricing_config_config = parent_rpcs.update_customer_repricing_config if parent_rpcs.respond_to? :update_customer_repricing_config - @update_customer_repricing_config = ::Gapic::Config::Method.new update_customer_repricing_config_config - delete_customer_repricing_config_config = parent_rpcs.delete_customer_repricing_config if parent_rpcs.respond_to? :delete_customer_repricing_config - @delete_customer_repricing_config = ::Gapic::Config::Method.new delete_customer_repricing_config_config - get_channel_partner_repricing_config_config = parent_rpcs.get_channel_partner_repricing_config if parent_rpcs.respond_to? :get_channel_partner_repricing_config - @get_channel_partner_repricing_config = ::Gapic::Config::Method.new get_channel_partner_repricing_config_config - list_channel_partner_repricing_configs_config = parent_rpcs.list_channel_partner_repricing_configs if parent_rpcs.respond_to? :list_channel_partner_repricing_configs - @list_channel_partner_repricing_configs = ::Gapic::Config::Method.new list_channel_partner_repricing_configs_config - create_channel_partner_repricing_config_config = parent_rpcs.create_channel_partner_repricing_config if parent_rpcs.respond_to? :create_channel_partner_repricing_config - @create_channel_partner_repricing_config = ::Gapic::Config::Method.new create_channel_partner_repricing_config_config - update_channel_partner_repricing_config_config = parent_rpcs.update_channel_partner_repricing_config if parent_rpcs.respond_to? :update_channel_partner_repricing_config - @update_channel_partner_repricing_config = ::Gapic::Config::Method.new update_channel_partner_repricing_config_config - delete_channel_partner_repricing_config_config = parent_rpcs.delete_channel_partner_repricing_config if parent_rpcs.respond_to? :delete_channel_partner_repricing_config - @delete_channel_partner_repricing_config = ::Gapic::Config::Method.new delete_channel_partner_repricing_config_config - list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups - @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config - list_sku_group_billable_skus_config = parent_rpcs.list_sku_group_billable_skus if parent_rpcs.respond_to? :list_sku_group_billable_skus - @list_sku_group_billable_skus = ::Gapic::Config::Method.new list_sku_group_billable_skus_config - lookup_offer_config = parent_rpcs.lookup_offer if parent_rpcs.respond_to? :lookup_offer - @lookup_offer = ::Gapic::Config::Method.new lookup_offer_config - list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products - @list_products = ::Gapic::Config::Method.new list_products_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - list_offers_config = parent_rpcs.list_offers if parent_rpcs.respond_to? :list_offers - @list_offers = ::Gapic::Config::Method.new list_offers_config - list_purchasable_skus_config = parent_rpcs.list_purchasable_skus if parent_rpcs.respond_to? :list_purchasable_skus - @list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config - list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers - @list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config - query_eligible_billing_accounts_config = parent_rpcs.query_eligible_billing_accounts if parent_rpcs.respond_to? :query_eligible_billing_accounts - @query_eligible_billing_accounts = ::Gapic::Config::Method.new query_eligible_billing_accounts_config - register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber - @register_subscriber = ::Gapic::Config::Method.new register_subscriber_config - unregister_subscriber_config = parent_rpcs.unregister_subscriber if parent_rpcs.respond_to? :unregister_subscriber - @unregister_subscriber = ::Gapic::Config::Method.new unregister_subscriber_config - list_subscribers_config = parent_rpcs.list_subscribers if parent_rpcs.respond_to? :list_subscribers - @list_subscribers = ::Gapic::Config::Method.new list_subscribers_config - list_entitlement_changes_config = parent_rpcs.list_entitlement_changes if parent_rpcs.respond_to? :list_entitlement_changes - @list_entitlement_changes = ::Gapic::Config::Method.new list_entitlement_changes_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb deleted file mode 100644 index daa4756e5695..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudchannel.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudChannelService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudChannelService Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Channel::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudchannel.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb deleted file mode 100644 index 2cff684e71ea..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb +++ /dev/null @@ -1,3161 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/channel/v1/service_pb" - -module Google - module Cloud - module Channel - module V1 - module CloudChannelService - module Rest - ## - # REST service stub for the CloudChannelService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_customers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListCustomersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListCustomersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListCustomersResponse] - # A result object deserialized from the server's reply - def list_customers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_customers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_customers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListCustomersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # A result object deserialized from the server's reply - def get_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the check_cloud_identity_accounts_exist REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse] - # A result object deserialized from the server's reply - def check_cloud_identity_accounts_exist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_check_cloud_identity_accounts_exist_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "check_cloud_identity_accounts_exist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # A result object deserialized from the server's reply - def create_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # A result object deserialized from the server's reply - def update_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ImportCustomerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Customer] - # A result object deserialized from the server's reply - def import_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_customer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::Customer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the provision_cloud_identity REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def provision_cloud_identity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_provision_cloud_identity_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "provision_cloud_identity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_entitlements REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListEntitlementsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListEntitlementsResponse] - # A result object deserialized from the server's reply - def list_entitlements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entitlements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_entitlements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListEntitlementsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_transferable_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListTransferableSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListTransferableSkusResponse] - # A result object deserialized from the server's reply - def list_transferable_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transferable_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_transferable_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListTransferableSkusResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_transferable_offers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableOffersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListTransferableOffersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListTransferableOffersResponse] - # A result object deserialized from the server's reply - def list_transferable_offers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transferable_offers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_transferable_offers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListTransferableOffersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetEntitlementRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Entitlement] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Entitlement] - # A result object deserialized from the server's reply - def get_entitlement request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_entitlement_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_entitlement", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::Entitlement.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateEntitlementRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_entitlement request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_entitlement_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_entitlement", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the change_parameters REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ChangeParametersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def change_parameters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_change_parameters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "change_parameters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the change_renewal_settings REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def change_renewal_settings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_change_renewal_settings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "change_renewal_settings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the change_offer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ChangeOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def change_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_change_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "change_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_paid_service REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::StartPaidServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def start_paid_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_paid_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_paid_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the suspend_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::SuspendEntitlementRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def suspend_entitlement request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_suspend_entitlement_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "suspend_entitlement", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CancelEntitlementRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def cancel_entitlement request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_entitlement_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_entitlement", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the activate_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ActivateEntitlementRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def activate_entitlement request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_activate_entitlement_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "activate_entitlement", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the transfer_entitlements REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def transfer_entitlements request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_transfer_entitlements_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "transfer_entitlements", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the transfer_entitlements_to_google REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def transfer_entitlements_to_google request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_transfer_entitlements_to_google_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "transfer_entitlements_to_google", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_channel_partner_links REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse] - # A result object deserialized from the server's reply - def list_channel_partner_links request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_partner_links_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_channel_partner_links", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_channel_partner_link REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # A result object deserialized from the server's reply - def get_channel_partner_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_partner_link_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_channel_partner_link", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_channel_partner_link REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # A result object deserialized from the server's reply - def create_channel_partner_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_partner_link_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_channel_partner_link", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_channel_partner_link REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # A result object deserialized from the server's reply - def update_channel_partner_link request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_partner_link_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_channel_partner_link", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # A result object deserialized from the server's reply - def get_customer_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_customer_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_customer_repricing_configs REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse] - # A result object deserialized from the server's reply - def list_customer_repricing_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_customer_repricing_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_customer_repricing_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # A result object deserialized from the server's reply - def create_customer_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_customer_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # A result object deserialized from the server's reply - def update_customer_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_customer_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_customer_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_customer_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # A result object deserialized from the server's reply - def get_channel_partner_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_partner_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_channel_partner_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_channel_partner_repricing_configs REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse] - # A result object deserialized from the server's reply - def list_channel_partner_repricing_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_partner_repricing_configs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_channel_partner_repricing_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # A result object deserialized from the server's reply - def create_channel_partner_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_partner_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_channel_partner_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # A result object deserialized from the server's reply - def update_channel_partner_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_partner_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_channel_partner_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_channel_partner_repricing_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_partner_repricing_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_channel_partner_repricing_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sku_groups REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListSkuGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListSkuGroupsResponse] - # A result object deserialized from the server's reply - def list_sku_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sku_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sku_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListSkuGroupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sku_group_billable_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse] - # A result object deserialized from the server's reply - def list_sku_group_billable_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sku_group_billable_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sku_group_billable_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the lookup_offer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::LookupOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::Offer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::Offer] - # A result object deserialized from the server's reply - def lookup_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "lookup_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::Offer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_products REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListProductsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListProductsResponse] - # A result object deserialized from the server's reply - def list_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_products_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListProductsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListSkusResponse] - # A result object deserialized from the server's reply - def list_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListSkusResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_offers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListOffersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListOffersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListOffersResponse] - # A result object deserialized from the server's reply - def list_offers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_offers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_offers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListOffersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_purchasable_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListPurchasableSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusResponse] - # A result object deserialized from the server's reply - def list_purchasable_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_purchasable_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_purchasable_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListPurchasableSkusResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_purchasable_offers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListPurchasableOffersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListPurchasableOffersResponse] - # A result object deserialized from the server's reply - def list_purchasable_offers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_purchasable_offers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_purchasable_offers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the query_eligible_billing_accounts REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse] - # A result object deserialized from the server's reply - def query_eligible_billing_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_eligible_billing_accounts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "query_eligible_billing_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the register_subscriber REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::RegisterSubscriberRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::RegisterSubscriberResponse] - # A result object deserialized from the server's reply - def register_subscriber request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_register_subscriber_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "register_subscriber", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::RegisterSubscriberResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the unregister_subscriber REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::UnregisterSubscriberResponse] - # A result object deserialized from the server's reply - def unregister_subscriber request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unregister_subscriber_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "unregister_subscriber", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_subscribers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSubscribersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListSubscribersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListSubscribersResponse] - # A result object deserialized from the server's reply - def list_subscribers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_subscribers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_subscribers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListSubscribersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_entitlement_changes REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Channel::V1::ListEntitlementChangesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Channel::V1::ListEntitlementChangesResponse] - # A result object deserialized from the server's reply - def list_entitlement_changes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_entitlement_changes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_entitlement_changes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Channel::V1::ListEntitlementChangesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_customers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListCustomersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_customers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customers", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customers", - matches: [ - ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the check_cloud_identity_accounts_exist REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_check_cloud_identity_accounts_exist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:checkCloudIdentityAccountsExist", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customers", - body: "customer", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customers", - body: "customer", - matches: [ - ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{customer.name}", - body: "customer", - matches: [ - ["customer.name", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{customer.name}", - body: "customer", - matches: [ - ["customer.name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_customer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ImportCustomerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customers:import", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customers:import", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the provision_cloud_identity REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_provision_cloud_identity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{customer}:provisionCloudIdentity", - body: "*", - matches: [ - ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entitlements REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entitlements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/entitlements", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transferable_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableSkusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_transferable_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:listTransferableSkus", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transferable_offers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListTransferableOffersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_transferable_offers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:listTransferableOffers", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetEntitlementRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_entitlement_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateEntitlementRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_entitlement_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/entitlements", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the change_parameters REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ChangeParametersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_change_parameters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:changeParameters", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the change_renewal_settings REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_change_renewal_settings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:changeRenewalSettings", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the change_offer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ChangeOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_change_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:changeOffer", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_paid_service REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::StartPaidServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_paid_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:startPaidService", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the suspend_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::SuspendEntitlementRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_suspend_entitlement_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:suspend", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CancelEntitlementRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_entitlement_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the activate_entitlement REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ActivateEntitlementRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_activate_entitlement_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:activate", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the transfer_entitlements REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_transfer_entitlements_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:transferEntitlements", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the transfer_entitlements_to_google REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_transfer_entitlements_to_google_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:transferEntitlementsToGoogle", - body: "*", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_channel_partner_links REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_channel_partner_links_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/channelPartnerLinks", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_channel_partner_link REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_channel_partner_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_channel_partner_link REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_channel_partner_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/channelPartnerLinks", - body: "channel_partner_link", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_channel_partner_link REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_channel_partner_link_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "*", - matches: [ - ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_customer_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_customer_repricing_configs REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_customer_repricing_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customerRepricingConfigs", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_customer_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customerRepricingConfigs", - body: "customer_repricing_config", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_customer_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{customer_repricing_config.name}", - body: "customer_repricing_config", - matches: [ - ["customer_repricing_config.name", %r{^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_customer_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_customer_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/customers/[^/]+/customerRepricingConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_channel_partner_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_channel_partner_repricing_configs REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_channel_partner_repricing_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/channelPartnerRepricingConfigs", - matches: [ - ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_channel_partner_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/channelPartnerRepricingConfigs", - body: "channel_partner_repricing_config", - matches: [ - ["parent", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_channel_partner_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{channel_partner_repricing_config.name}", - body: "channel_partner_repricing_config", - matches: [ - ["channel_partner_repricing_config.name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_channel_partner_repricing_config REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_channel_partner_repricing_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^accounts/[^/]+/channelPartnerLinks/[^/]+/channelPartnerRepricingConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sku_groups REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sku_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/skuGroups", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sku_group_billable_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sku_group_billable_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/billableSkus", - matches: [ - ["parent", %r{^accounts/[^/]+/skuGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_offer REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::LookupOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{entitlement}:lookupOffer", - matches: [ - ["entitlement", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_products REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListProductsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/products", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSkusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/skus", - matches: [ - ["parent", %r{^products/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_offers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListOffersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_offers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/offers", - matches: [ - ["parent", %r{^accounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_purchasable_skus REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_purchasable_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{customer}:listPurchasableSkus", - matches: [ - ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_purchasable_offers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_purchasable_offers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{customer}:listPurchasableOffers", - matches: [ - ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the query_eligible_billing_accounts REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_eligible_billing_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{customer}:queryEligibleBillingAccounts", - matches: [ - ["customer", %r{^accounts/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the register_subscriber REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::RegisterSubscriberRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_register_subscriber_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{account}:register", - body: "*", - matches: [ - ["account", %r{^accounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{integrator}:registerSubscriber", - body: "*", - matches: [ - ["integrator", %r{^integrators/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unregister_subscriber REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::UnregisterSubscriberRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unregister_subscriber_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{account}:unregister", - body: "*", - matches: [ - ["account", %r{^accounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{integrator}:unregisterSubscriber", - body: "*", - matches: [ - ["integrator", %r{^integrators/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_subscribers REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListSubscribersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_subscribers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{account}:listSubscribers", - matches: [ - ["account", %r{^accounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{integrator}:listSubscribers", - matches: [ - ["integrator", %r{^integrators/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_entitlement_changes REST call - # - # @param request_pb [::Google::Cloud::Channel::V1::ListEntitlementChangesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_entitlement_changes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:listEntitlementChanges", - matches: [ - ["parent", %r{^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb deleted file mode 100644 index 0055a7f454b5..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/common_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' - - -descriptor_data = "\n$google/cloud/channel/v1/common.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\"\xb0\x03\n\x07\x45\x64uData\x12\x46\n\x0einstitute_type\x18\x01 \x01(\x0e\x32..google.cloud.channel.v1.EduData.InstituteType\x12\x46\n\x0einstitute_size\x18\x02 \x01(\x0e\x32..google.cloud.channel.v1.EduData.InstituteSize\x12\x0f\n\x07website\x18\x03 \x01(\t\"H\n\rInstituteType\x12\x1e\n\x1aINSTITUTE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03K12\x10\x01\x12\x0e\n\nUNIVERSITY\x10\x02\"\xb9\x01\n\rInstituteSize\x12\x1e\n\x1aINSTITUTE_SIZE_UNSPECIFIED\x10\x00\x12\x0e\n\nSIZE_1_100\x10\x01\x12\x10\n\x0cSIZE_101_500\x10\x02\x12\x11\n\rSIZE_501_1000\x10\x03\x12\x12\n\x0eSIZE_1001_2000\x10\x04\x12\x12\n\x0eSIZE_2001_5000\x10\x05\x12\x13\n\x0fSIZE_5001_10000\x10\x06\x12\x16\n\x12SIZE_10001_OR_MORE\x10\x07\"\x80\x03\n\x11\x43loudIdentityInfo\x12N\n\rcustomer_type\x18\x01 \x01(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12\x1b\n\x0eprimary_domain\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12is_domain_verified\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x17\n\x0f\x61lternate_email\x18\x06 \x01(\t\x12\x14\n\x0cphone_number\x18\x07 \x01(\t\x12\x15\n\rlanguage_code\x18\x08 \x01(\t\x12\x1e\n\x11\x61\x64min_console_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x32\n\x08\x65\x64u_data\x18\x16 \x01(\x0b\x32 .google.cloud.channel.v1.EduData\"C\n\x0c\x43ustomerType\x12\x1d\n\x19\x43USTOMER_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x44OMAIN\x10\x01\x12\x08\n\x04TEAM\x10\x02\"\x99\x01\n\x05Value\x12\x15\n\x0bint64_value\x18\x01 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12+\n\x0bproto_value\x18\x04 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x14\n\nbool_value\x18\x05 \x01(\x08H\x00\x42\x06\n\x04kind\"C\n\tAdminUser\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x12\n\ngiven_name\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61mily_name\x18\x03 \x01(\tBc\n\x1b\x63om.google.cloud.channel.v1B\x0b\x43ommonProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Any", "google/protobuf/any.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - EduData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EduData").msgclass - EduData::InstituteType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EduData.InstituteType").enummodule - EduData::InstituteSize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EduData.InstituteSize").enummodule - CloudIdentityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CloudIdentityInfo").msgclass - CloudIdentityInfo::CustomerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CloudIdentityInfo.CustomerType").enummodule - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Value").msgclass - AdminUser = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.AdminUser").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb deleted file mode 100644 index e072fb6b13c7..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/customers_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/customers.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/common_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/postal_address_pb' - - -descriptor_data = "\n\'google/cloud/channel/v1/customers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\"\xc9\x06\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10org_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12;\n\x12org_postal_address\x18\x03 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x02\x12\x42\n\x14primary_contact_info\x18\x04 \x01(\x0b\x32$.google.cloud.channel.v1.ContactInfo\x12\x17\n\x0f\x61lternate_email\x18\x05 \x01(\t\x12\x13\n\x06\x64omain\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11\x63loud_identity_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\n \x01(\tB\x03\xe0\x41\x01\x12L\n\x13\x63loud_identity_info\x18\x0c \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfoB\x03\xe0\x41\x03\x12\x1a\n\x12\x63hannel_partner_id\x18\r \x01(\t\x12\x1b\n\x0e\x63orrelation_id\x18\x0e \x01(\tB\x03\xe0\x41\x01\x12\x63\n\x1a\x63ustomer_attestation_state\x18\x10 \x01(\x0e\x32:.google.cloud.channel.v1.Customer.CustomerAttestationStateB\x03\xe0\x41\x01\"t\n\x18\x43ustomerAttestationState\x12*\n&CUSTOMER_ATTESTATION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45XEMPT\x10\x01\x12 \n\x1cNON_EXEMPT_AND_INFO_VERIFIED\x10\x02:R\xea\x41O\n$cloudchannel.googleapis.com/Customer\x12\'accounts/{account}/customers/{customer}\"\x81\x01\n\x0b\x43ontactInfo\x12\x12\n\nfirst_name\x18\x01 \x01(\t\x12\x11\n\tlast_name\x18\x02 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12\x12\n\x05title\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\r\n\x05phone\x18\x07 \x01(\tBf\n\x1b\x63om.google.cloud.channel.v1B\x0e\x43ustomersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.type.PostalAddress", "google/type/postal_address.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.channel.v1.CloudIdentityInfo", "google/cloud/channel/v1/common.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Customer").msgclass - Customer::CustomerAttestationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Customer.CustomerAttestationState").enummodule - ContactInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ContactInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb deleted file mode 100644 index e2a8821e32a1..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlement_changes_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/entitlement_changes.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/entitlements_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/cloud/channel/v1/entitlement_changes.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/channel/v1/entitlements.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0c\n\x11\x45ntitlementChange\x12R\n\x11suspension_reason\x18\t \x01(\x0e\x32\x35.google.cloud.channel.v1.Entitlement.SuspensionReasonH\x00\x12\\\n\x13\x63\x61ncellation_reason\x18\n \x01(\x0e\x32=.google.cloud.channel.v1.EntitlementChange.CancellationReasonH\x00\x12X\n\x11\x61\x63tivation_reason\x18\x0b \x01(\x0e\x32;.google.cloud.channel.v1.EntitlementChange.ActivationReasonH\x00\x12\x1d\n\x13other_change_reason\x18\x64 \x01(\tH\x00\x12\x44\n\x0b\x65ntitlement\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x12\x38\n\x05offer\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12H\n\x13provisioned_service\x18\x03 \x01(\x0b\x32+.google.cloud.channel.v1.ProvisionedService\x12J\n\x0b\x63hange_type\x18\x04 \x01(\x0e\x32\x35.google.cloud.channel.v1.EntitlementChange.ChangeType\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12N\n\roperator_type\x18\x06 \x01(\x0e\x32\x37.google.cloud.channel.v1.EntitlementChange.OperatorType\x12\x36\n\nparameters\x18\x08 \x03(\x0b\x32\".google.cloud.channel.v1.Parameter\x12\x10\n\x08operator\x18\x0c \x01(\t\"\xd7\x02\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x17\n\x13PRICE_PLAN_SWITCHED\x10\x03\x12\x16\n\x12\x43OMMITMENT_CHANGED\x10\x04\x12\x0b\n\x07RENEWED\x10\x05\x12\r\n\tSUSPENDED\x10\x06\x12\r\n\tACTIVATED\x10\x07\x12\r\n\tCANCELLED\x10\x08\x12\x0f\n\x0bSKU_CHANGED\x10\t\x12\x1b\n\x17RENEWAL_SETTING_CHANGED\x10\n\x12\x1d\n\x19PAID_SUBSCRIPTION_STARTED\x10\x0b\x12\x17\n\x13LICENSE_CAP_CHANGED\x10\x0c\x12\x1e\n\x1aSUSPENSION_DETAILS_CHANGED\x10\r\x12\x1b\n\x17TRIAL_END_DATE_EXTENDED\x10\x0e\x12\x11\n\rTRIAL_STARTED\x10\x0f\"z\n\x0cOperatorType\x12\x1d\n\x19OPERATOR_TYPE_UNSPECIFIED\x10\x00\x12#\n\x1f\x43USTOMER_SERVICE_REPRESENTATIVE\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\x0c\n\x08\x43USTOMER\x10\x03\x12\x0c\n\x08RESELLER\x10\x04\"\x7f\n\x12\x43\x61ncellationReason\x12#\n\x1f\x43\x41NCELLATION_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_TERMINATED\x10\x01\x12\x16\n\x12RELATIONSHIP_ENDED\x10\x02\x12\x14\n\x10PARTIAL_TRANSFER\x10\x03\"\xb4\x01\n\x10\x41\x63tivationReason\x12!\n\x1d\x41\x43TIVATION_REASON_UNSPECIFIED\x10\x00\x12\x1f\n\x1bRESELLER_REVOKED_SUSPENSION\x10\x01\x12!\n\x1d\x43USTOMER_ACCEPTED_PENDING_TOS\x10\x02\x12\x1c\n\x18RENEWAL_SETTINGS_CHANGED\x10\x03\x12\x1b\n\x17OTHER_ACTIVATION_REASON\x10\x64\x42\x0f\n\rchange_reasonBo\n\x1b\x63om.google.cloud.channel.v1B\x17\x45ntitlementChangesProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.channel.v1.ProvisionedService", "google/cloud/channel/v1/entitlements.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - EntitlementChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange").msgclass - EntitlementChange::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.ChangeType").enummodule - EntitlementChange::OperatorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.OperatorType").enummodule - EntitlementChange::CancellationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.CancellationReason").enummodule - EntitlementChange::ActivationReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.EntitlementChange.ActivationReason").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb deleted file mode 100644 index e6a13ea30c7b..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/entitlements_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/entitlements.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/common_pb' -require 'google/cloud/channel/v1/offers_pb' -require 'google/cloud/channel/v1/products_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/channel/v1/entitlements.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a$google/cloud/channel/v1/offers.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\t\n\x0b\x45ntitlement\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x05offer\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12H\n\x13\x63ommitment_settings\x18\x0c \x01(\x0b\x32+.google.cloud.channel.v1.CommitmentSettings\x12W\n\x12provisioning_state\x18\r \x01(\x0e\x32\x36.google.cloud.channel.v1.Entitlement.ProvisioningStateB\x03\xe0\x41\x03\x12M\n\x13provisioned_service\x18\x10 \x01(\x0b\x32+.google.cloud.channel.v1.ProvisionedServiceB\x03\xe0\x41\x03\x12V\n\x12suspension_reasons\x18\x12 \x03(\x0e\x32\x35.google.cloud.channel.v1.Entitlement.SuspensionReasonB\x03\xe0\x41\x03\x12\x1e\n\x11purchase_order_id\x18\x13 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x0etrial_settings\x18\x15 \x01(\x0b\x32&.google.cloud.channel.v1.TrialSettingsB\x03\xe0\x41\x03\x12\x42\n\x10\x61ssociation_info\x18\x17 \x01(\x0b\x32(.google.cloud.channel.v1.AssociationInfo\x12\x36\n\nparameters\x18\x1a \x03(\x0b\x32\".google.cloud.channel.v1.Parameter\x12\x1c\n\x0f\x62illing_account\x18\x1c \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12price_reference_id\x18\x1d \x01(\tB\x03\xe0\x41\x01\"R\n\x11ProvisioningState\x12\"\n\x1ePROVISIONING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUSPENDED\x10\x05\"\xa3\x01\n\x10SuspensionReason\x12!\n\x1dSUSPENSION_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12RESELLER_INITIATED\x10\x01\x12\x0f\n\x0bTRIAL_ENDED\x10\x02\x12\x1c\n\x18RENEWAL_WITH_TYPE_CANCEL\x10\x03\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x04\x12\t\n\x05OTHER\x10\x64:p\xea\x41m\n\'cloudchannel.googleapis.com/Entitlement\x12\x42\x61\x63\x63ounts/{account}/customers/{customer}/entitlements/{entitlement}\"_\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x15\n\x08\x65\x64itable\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"Y\n\x0f\x41ssociationInfo\x12\x46\n\x10\x62\x61se_entitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"`\n\x12ProvisionedService\x12\x1c\n\x0fprovisioning_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproduct_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06sku_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc5\x01\n\x12\x43ommitmentSettings\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x01\"\xb8\x01\n\x0fRenewalSettings\x12\x16\n\x0e\x65nable_renewal\x18\x01 \x01(\x08\x12\x19\n\x11resize_unit_count\x18\x02 \x01(\x08\x12:\n\x0cpayment_plan\x18\x05 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12\x36\n\rpayment_cycle\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\"L\n\rTrialSettings\x12\r\n\x05trial\x18\x01 \x01(\x08\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbf\x01\n\x0fTransferableSku\x12J\n\x14transfer_eligibility\x18\t \x01(\x0b\x32,.google.cloud.channel.v1.TransferEligibility\x12)\n\x03sku\x18\x0b \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x35\n\nlegacy_sku\x18\x0c \x01(\x0b\x32\x1c.google.cloud.channel.v1.SkuB\x03\xe0\x41\x01\"\xa6\x02\n\x13TransferEligibility\x12\x13\n\x0bis_eligible\x18\x01 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12Q\n\x14ineligibility_reason\x18\x03 \x01(\x0e\x32\x33.google.cloud.channel.v1.TransferEligibility.Reason\"\x91\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1a\n\x16PENDING_TOS_ACCEPTANCE\x10\x01\x12\x14\n\x10SKU_NOT_ELIGIBLE\x10\x02\x12\x11\n\rSKU_SUSPENDED\x10\x03\x12*\n&CHANNEL_PARTNER_NOT_AUTHORIZED_FOR_SKU\x10\x04\x42i\n\x1b\x63om.google.cloud.channel.v1B\x11\x45ntitlementsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.channel.v1.Value", "google/cloud/channel/v1/common.proto"], - ["google.cloud.channel.v1.Period", "google/cloud/channel/v1/offers.proto"], - ["google.cloud.channel.v1.Sku", "google/cloud/channel/v1/products.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - Entitlement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Entitlement").msgclass - Entitlement::ProvisioningState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Entitlement.ProvisioningState").enummodule - Entitlement::SuspensionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Entitlement.SuspensionReason").enummodule - Parameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Parameter").msgclass - AssociationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.AssociationInfo").msgclass - ProvisionedService = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ProvisionedService").msgclass - CommitmentSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CommitmentSettings").msgclass - RenewalSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RenewalSettings").msgclass - TrialSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TrialSettings").msgclass - TransferableSku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TransferableSku").msgclass - TransferEligibility = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TransferEligibility").msgclass - TransferEligibility::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.TransferEligibility.Reason").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb deleted file mode 100644 index b09e795cf707..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/offers_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/offers.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/common_pb' -require 'google/cloud/channel/v1/products_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/money_pb' - - -descriptor_data = "\n$google/cloud/channel/v1/offers.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/channel/v1/common.proto\x1a&google/cloud/channel/v1/products.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\xbc\x04\n\x05Offer\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo\x12)\n\x03sku\x18\x03 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12+\n\x04plan\x18\x04 \x01(\x0b\x32\x1d.google.cloud.channel.v1.Plan\x12\x39\n\x0b\x63onstraints\x18\x05 \x01(\x0b\x32$.google.cloud.channel.v1.Constraints\x12\x44\n\x12price_by_resources\x18\x06 \x03(\x0b\x32(.google.cloud.channel.v1.PriceByResource\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x15parameter_definitions\x18\t \x03(\x0b\x32,.google.cloud.channel.v1.ParameterDefinition\x12\x11\n\tdeal_code\x18\x0c \x01(\t:I\xea\x41\x46\n!cloudchannel.googleapis.com/Offer\x12!accounts/{account}/offers/{offer}\"\x88\x03\n\x13ParameterDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\x0eparameter_type\x18\x02 \x01(\x0e\x32:.google.cloud.channel.v1.ParameterDefinition.ParameterType\x12\x31\n\tmin_value\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x31\n\tmax_value\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x36\n\x0e\x61llowed_values\x18\x05 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Value\x12\x10\n\x08optional\x18\x06 \x01(\x08\"_\n\rParameterType\x12\x1e\n\x1aPARAMETER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\n\n\x06STRING\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\"Y\n\x0b\x43onstraints\x12J\n\x14\x63ustomer_constraints\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.CustomerConstraints\"\xd7\x01\n\x13\x43ustomerConstraints\x12\x17\n\x0f\x61llowed_regions\x18\x01 \x03(\t\x12W\n\x16\x61llowed_customer_types\x18\x02 \x03(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12N\n\x17promotional_order_types\x18\x03 \x03(\x0e\x32-.google.cloud.channel.v1.PromotionalOrderType\"\x86\x02\n\x04Plan\x12:\n\x0cpayment_plan\x18\x01 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentPlan\x12:\n\x0cpayment_type\x18\x02 \x01(\x0e\x32$.google.cloud.channel.v1.PaymentType\x12\x36\n\rpayment_cycle\x18\x03 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x35\n\x0ctrial_period\x18\x04 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x17\n\x0f\x62illing_account\x18\x05 \x01(\t\"\xb9\x01\n\x0fPriceByResource\x12<\n\rresource_type\x18\x01 \x01(\x0e\x32%.google.cloud.channel.v1.ResourceType\x12-\n\x05price\x18\x02 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x39\n\x0cprice_phases\x18\x03 \x03(\x0b\x32#.google.cloud.channel.v1.PricePhase\"\x8a\x02\n\x05Price\x12&\n\nbase_price\x18\x01 \x01(\x0b\x32\x12.google.type.Money\x12\x10\n\x08\x64iscount\x18\x02 \x01(\x01\x12+\n\x0f\x65\x66\x66\x65\x63tive_price\x18\x03 \x01(\x0b\x32\x12.google.type.Money\x12\x35\n\x0cprice_period\x18\x06 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Period\x12\x1a\n\x12\x65xternal_price_uri\x18\x04 \x01(\t\x12G\n\x13\x64iscount_components\x18\x05 \x03(\x0b\x32*.google.cloud.channel.v1.DiscountComponent\"\xd9\x01\n\nPricePhase\x12\x38\n\x0bperiod_type\x18\x01 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\x12\x14\n\x0c\x66irst_period\x18\x02 \x01(\x05\x12\x13\n\x0blast_period\x18\x03 \x01(\x05\x12-\n\x05price\x18\x04 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\x12\x37\n\x0bprice_tiers\x18\x05 \x03(\x0b\x32\".google.cloud.channel.v1.PriceTier\"i\n\tPriceTier\x12\x16\n\x0e\x66irst_resource\x18\x01 \x01(\x05\x12\x15\n\rlast_resource\x18\x02 \x01(\x05\x12-\n\x05price\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Price\"T\n\x06Period\x12\x10\n\x08\x64uration\x18\x01 \x01(\x05\x12\x38\n\x0bperiod_type\x18\x02 \x01(\x0e\x32#.google.cloud.channel.v1.PeriodType\"\xb3\x01\n\x11\x44iscountComponent\x12\x1d\n\x13\x64iscount_percentage\x18\x03 \x01(\x01H\x00\x12/\n\x11\x64iscount_absolute\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12<\n\rdiscount_type\x18\x02 \x01(\x0e\x32%.google.cloud.channel.v1.DiscountTypeB\x10\n\x0e\x64iscount_value*m\n\x14PromotionalOrderType\x12 \n\x1cPROMOTIONAL_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_UPGRADE\x10\x01\x12\x0c\n\x08TRANSFER\x10\x02\x12\x14\n\x10PROMOTION_SWITCH\x10\x03*k\n\x0bPaymentPlan\x12\x1c\n\x18PAYMENT_PLAN_UNSPECIFIED\x10\x00\x12\x0e\n\nCOMMITMENT\x10\x01\x12\x0c\n\x08\x46LEXIBLE\x10\x02\x12\x08\n\x04\x46REE\x10\x03\x12\t\n\x05TRIAL\x10\x04\x12\x0b\n\x07OFFLINE\x10\x05*D\n\x0bPaymentType\x12\x1c\n\x18PAYMENT_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PREPAY\x10\x01\x12\x0b\n\x07POSTPAY\x10\x02*\x8a\x01\n\x0cResourceType\x12\x1d\n\x19RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04SEAT\x10\x01\x12\x07\n\x03MAU\x10\x02\x12\x06\n\x02GB\x10\x03\x12\x11\n\rLICENSED_USER\x10\x04\x12\x0b\n\x07MINUTES\x10\x05\x12\x0e\n\nIAAS_USAGE\x10\x06\x12\x10\n\x0cSUBSCRIPTION\x10\x07*G\n\nPeriodType\x12\x1b\n\x17PERIOD_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x44\x41Y\x10\x01\x12\t\n\x05MONTH\x10\x02\x12\x08\n\x04YEAR\x10\x03*\x96\x01\n\x0c\x44iscountType\x12\x1d\n\x19\x44ISCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11REGIONAL_DISCOUNT\x10\x01\x12\x18\n\x14PROMOTIONAL_DISCOUNT\x10\x02\x12\x12\n\x0eSALES_DISCOUNT\x10\x03\x12\x13\n\x0fRESELLER_MARGIN\x10\x04\x12\r\n\tDEAL_CODE\x10\x05\x42\x63\n\x1b\x63om.google.cloud.channel.v1B\x0bOffersProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.channel.v1.MarketingInfo", "google/cloud/channel/v1/products.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.channel.v1.Value", "google/cloud/channel/v1/common.proto"], - ["google.type.Money", "google/type/money.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - Offer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Offer").msgclass - ParameterDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ParameterDefinition").msgclass - ParameterDefinition::ParameterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ParameterDefinition.ParameterType").enummodule - Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Constraints").msgclass - CustomerConstraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CustomerConstraints").msgclass - Plan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Plan").msgclass - PriceByResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PriceByResource").msgclass - Price = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Price").msgclass - PricePhase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PricePhase").msgclass - PriceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PriceTier").msgclass - Period = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Period").msgclass - DiscountComponent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DiscountComponent").msgclass - PromotionalOrderType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PromotionalOrderType").enummodule - PaymentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PaymentPlan").enummodule - PaymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PaymentType").enummodule - ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ResourceType").enummodule - PeriodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PeriodType").enummodule - DiscountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DiscountType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb deleted file mode 100644 index ad71508f4e02..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/operations_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/operations.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/cloud/channel/v1/operations.proto\x12\x17google.cloud.channel.v1\"\xb6\x03\n\x11OperationMetadata\x12P\n\x0eoperation_type\x18\x01 \x01(\x0e\x32\x38.google.cloud.channel.v1.OperationMetadata.OperationType\"\xce\x02\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43REATE_ENTITLEMENT\x10\x01\x12\x1b\n\x17\x43HANGE_RENEWAL_SETTINGS\x10\x03\x12\x16\n\x12START_PAID_SERVICE\x10\x05\x12\x18\n\x14\x41\x43TIVATE_ENTITLEMENT\x10\x07\x12\x17\n\x13SUSPEND_ENTITLEMENT\x10\x08\x12\x16\n\x12\x43\x41NCEL_ENTITLEMENT\x10\t\x12\x19\n\x15TRANSFER_ENTITLEMENTS\x10\n\x12#\n\x1fTRANSFER_ENTITLEMENTS_TO_GOOGLE\x10\x0b\x12\x10\n\x0c\x43HANGE_OFFER\x10\x0e\x12\x15\n\x11\x43HANGE_PARAMETERS\x10\x0f\x12\x1c\n\x18PROVISION_CLOUD_IDENTITY\x10\x10\x42g\n\x1b\x63om.google.cloud.channel.v1B\x0fOperationsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.OperationMetadata").msgclass - OperationMetadata::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.OperationMetadata.OperationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb deleted file mode 100644 index b86c7982c900..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/products_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/products.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n&google/cloud/channel/v1/products.proto\x12\x17google.cloud.channel.v1\x1a\x19google/api/resource.proto\"\x95\x01\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo:<\xea\x41\x39\n#cloudchannel.googleapis.com/Product\x12\x12products/{product}\"\xcb\x01\n\x03Sku\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\x0emarketing_info\x18\x02 \x01(\x0b\x32&.google.cloud.channel.v1.MarketingInfo\x12\x31\n\x07product\x18\x03 \x01(\x0b\x32 .google.cloud.channel.v1.Product:C\xea\x41@\n\x1f\x63loudchannel.googleapis.com/Sku\x12\x1dproducts/{product}/skus/{sku}\"p\n\rMarketingInfo\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x34\n\x0c\x64\x65\x66\x61ult_logo\x18\x03 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Media\"Y\n\x05Media\x12\r\n\x05title\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x30\n\x04type\x18\x03 \x01(\x0e\x32\".google.cloud.channel.v1.MediaType*=\n\tMediaType\x12\x1a\n\x16MEDIA_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10MEDIA_TYPE_IMAGE\x10\x01\x42\x65\n\x1b\x63om.google.cloud.channel.v1B\rProductsProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - Product = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Product").msgclass - Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Sku").msgclass - MarketingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.MarketingInfo").msgclass - Media = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Media").msgclass - MediaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.MediaType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb deleted file mode 100644 index 869e0d5e9a90..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_pb.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/reports_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/operations_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' -require 'google/type/datetime_pb' -require 'google/type/decimal_pb' -require 'google/type/money_pb' - - -descriptor_data = "\n-google/cloud/channel/v1/reports_service.proto\x12\x17google.cloud.channel.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/channel/v1/operations.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/datetime.proto\x1a\x19google/type/decimal.proto\x1a\x17google/type/money.proto\"\xc1\x01\n\x13RunReportJobRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"cloudchannel.googleapis.com/Report\x12;\n\ndate_range\x18\x02 \x01(\x0b\x32\".google.cloud.channel.v1.DateRangeB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x02\x18\x01\"\x9b\x01\n\x14RunReportJobResponse\x12\x36\n\nreport_job\x18\x01 \x01(\x0b\x32\".google.cloud.channel.v1.ReportJob\x12G\n\x0freport_metadata\x18\x02 \x01(\x0b\x32..google.cloud.channel.v1.ReportResultsMetadata:\x02\x18\x01\"\xb0\x01\n\x19\x46\x65tchReportResultsRequest\x12\x41\n\nreport_job\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%cloudchannel.googleapis.com/ReportJob\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0epartition_keys\x18\x04 \x03(\tB\x03\xe0\x41\x01:\x02\x18\x01\"\xae\x01\n\x1a\x46\x65tchReportResultsResponse\x12G\n\x0freport_metadata\x18\x01 \x01(\x0b\x32..google.cloud.channel.v1.ReportResultsMetadata\x12*\n\x04rows\x18\x02 \x03(\x0b\x32\x1c.google.cloud.channel.v1.Row\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t:\x02\x18\x01\"z\n\x12ListReportsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01:\x02\x18\x01\"d\n\x13ListReportsResponse\x12\x30\n\x07reports\x18\x01 \x03(\x0b\x32\x1f.google.cloud.channel.v1.Report\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t:\x02\x18\x01\"\xb6\x01\n\tReportJob\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12<\n\rreport_status\x18\x02 \x01(\x0b\x32%.google.cloud.channel.v1.ReportStatus:X\x18\x01\xea\x41S\n%cloudchannel.googleapis.com/ReportJob\x12*accounts/{account}/reportJobs/{report_job}\"\xd9\x01\n\x15ReportResultsMetadata\x12/\n\x06report\x18\x01 \x01(\x0b\x32\x1f.google.cloud.channel.v1.Report\x12\x11\n\trow_count\x18\x02 \x01(\x03\x12\x36\n\ndate_range\x18\x03 \x01(\x0b\x32\".google.cloud.channel.v1.DateRange\x12@\n\x14preceding_date_range\x18\x04 \x01(\x0b\x32\".google.cloud.channel.v1.DateRange:\x02\x18\x01\"\xdf\x01\n\x06\x43olumn\x12\x11\n\tcolumn_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12;\n\tdata_type\x18\x03 \x01(\x0e\x32(.google.cloud.channel.v1.Column.DataType\"k\n\x08\x44\x61taType\x12\x19\n\x15\x44\x41TA_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x0b\n\x07\x44\x45\x43IMAL\x10\x03\x12\t\n\x05MONEY\x10\x04\x12\x08\n\x04\x44\x41TE\x10\x05\x12\r\n\tDATE_TIME\x10\x06:\x02\x18\x01\"\xd5\x01\n\tDateRange\x12\x34\n\x15usage_start_date_time\x18\x01 \x01(\x0b\x32\x15.google.type.DateTime\x12\x32\n\x13usage_end_date_time\x18\x02 \x01(\x0b\x32\x15.google.type.DateTime\x12-\n\x12invoice_start_date\x18\x03 \x01(\x0b\x32\x11.google.type.Date\x12+\n\x10invoice_end_date\x18\x04 \x01(\x0b\x32\x11.google.type.Date:\x02\x18\x01\"V\n\x03Row\x12\x34\n\x06values\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.ReportValue\x12\x15\n\rpartition_key\x18\x02 \x01(\t:\x02\x18\x01\"\xfc\x01\n\x0bReportValue\x12\x16\n\x0cstring_value\x18\x01 \x01(\tH\x00\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12-\n\rdecimal_value\x18\x03 \x01(\x0b\x32\x14.google.type.DecimalH\x00\x12)\n\x0bmoney_value\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\'\n\ndate_value\x18\x05 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x30\n\x0f\x64\x61te_time_value\x18\x06 \x01(\x0b\x32\x15.google.type.DateTimeH\x00:\x02\x18\x01\x42\x07\n\x05value\"\x81\x02\n\x0cReportStatus\x12:\n\x05state\x18\x01 \x01(\x0e\x32+.google.cloud.channel.v1.ReportStatus.State\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"S\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07STARTED\x10\x01\x12\x0b\n\x07WRITING\x10\x02\x12\r\n\tAVAILABLE\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x02\x18\x01\"\xc8\x01\n\x06Report\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x30\n\x07\x63olumns\x18\x03 \x03(\x0b\x32\x1f.google.cloud.channel.v1.Column\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t:N\x18\x01\xea\x41I\n\"cloudchannel.googleapis.com/Report\x12#accounts/{account}/reports/{report}2\xb2\x05\n\x1a\x43loudChannelReportsService\x12\xba\x01\n\x0cRunReportJob\x12,.google.cloud.channel.v1.RunReportJobRequest\x1a\x1d.google.longrunning.Operation\"]\x88\x02\x01\xca\x41)\n\x14RunReportJobResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02(\"#/v1/{name=accounts/*/reports/*}:run:\x01*\x12\xd5\x01\n\x12\x46\x65tchReportResults\x12\x32.google.cloud.channel.v1.FetchReportResultsRequest\x1a\x33.google.cloud.channel.v1.FetchReportResultsResponse\"V\x88\x02\x01\xda\x41\nreport_job\x82\xd3\xe4\x93\x02@\";/v1/{report_job=accounts/*/reportJobs/*}:fetchReportResults:\x01*\x12\x9d\x01\n\x0bListReports\x12+.google.cloud.channel.v1.ListReportsRequest\x1a,.google.cloud.channel.v1.ListReportsResponse\"3\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{parent=accounts/*}/reports\x1a_\x88\x02\x01\xca\x41\x1b\x63loudchannel.googleapis.com\xd2\x41;https://www.googleapis.com/auth/apps.reports.usage.readonlyBk\n\x1b\x63om.google.cloud.channel.v1B\x13ReportsServiceProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.type.DateTime", "google/type/datetime.proto"], - ["google.type.Date", "google/type/date.proto"], - ["google.type.Decimal", "google/type/decimal.proto"], - ["google.type.Money", "google/type/money.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - RunReportJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RunReportJobRequest").msgclass - RunReportJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RunReportJobResponse").msgclass - FetchReportResultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.FetchReportResultsRequest").msgclass - FetchReportResultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.FetchReportResultsResponse").msgclass - ListReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListReportsRequest").msgclass - ListReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ListReportsResponse").msgclass - ReportJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportJob").msgclass - ReportResultsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportResultsMetadata").msgclass - Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Column").msgclass - Column::DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Column.DataType").enummodule - DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.DateRange").msgclass - Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Row").msgclass - ReportValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportValue").msgclass - ReportStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportStatus").msgclass - ReportStatus::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ReportStatus.State").enummodule - Report = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.Report").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb deleted file mode 100644 index 926af73da2ac..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/reports_service_services_pb.rb +++ /dev/null @@ -1,94 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/channel/v1/reports_service.proto for package 'google.cloud.channel.v1' -# Original file comments: -# Copyright 2025 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. -# - -require 'grpc' -require 'google/cloud/channel/v1/reports_service_pb' - -module Google - module Cloud - module Channel - module V1 - module CloudChannelReportsService - # CloudChannelReportsService lets Google Cloud resellers and - # distributors retrieve and combine a variety of data in Cloud Channel for - # multiple products (Google Cloud, Google Voice, and Google Workspace.) - # - # Deprecated: This service is being deprecated. Please use [Export Channel - # Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.channel.v1.CloudChannelReportsService' - - # Begins generation of data for a given report. The report - # identifier is a UID (for example, `613bf59q`). - # - # Possible error codes: - # - # * PERMISSION_DENIED: The user doesn't have access to this report. - # * INVALID_ARGUMENT: Required request parameters are missing - # or invalid. - # * NOT_FOUND: The report identifier was not found. - # * INTERNAL: Any non-user error related to a technical issue - # in the backend. Contact Cloud Channel support. - # * UNKNOWN: Any non-user error related to a technical issue - # in the backend. Contact Cloud Channel support. - # - # Return value: - # The ID of a long-running operation. - # - # To get the results of the operation, call the GetOperation method of - # CloudChannelOperationsService. The Operation metadata contains an - # instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - # - # To get the results of report generation, call - # [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] - # with the - # [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job]. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - rpc :RunReportJob, ::Google::Cloud::Channel::V1::RunReportJobRequest, ::Google::Longrunning::Operation - # Retrieves data generated by - # [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - rpc :FetchReportResults, ::Google::Cloud::Channel::V1::FetchReportResultsRequest, ::Google::Cloud::Channel::V1::FetchReportResultsResponse - # Lists the reports that RunReportJob can run. These reports include an ID, - # a description, and the list of columns that will be in the result. - # - # Deprecated: Please use [Export Channel Services data to - # BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - # instead. - rpc :ListReports, ::Google::Cloud::Channel::V1::ListReportsRequest, ::Google::Cloud::Channel::V1::ListReportsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb deleted file mode 100644 index cfebb4537f92..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/repricing_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/repricing.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' -require 'google/type/decimal_pb' - - -descriptor_data = "\n\'google/cloud/channel/v1/repricing.proto\x12\x17google.cloud.channel.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x19google/type/decimal.proto\"\xc5\x02\n\x17\x43ustomerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x97\x01\xea\x41\x93\x01\n3cloudchannel.googleapis.com/CustomerRepricingConfig\x12\\accounts/{account}/customers/{customer}/customerRepricingConfigs/{customer_repricing_config}\"\xef\x02\n\x1d\x43hannelPartnerRepricingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12G\n\x10repricing_config\x18\x02 \x01(\x0b\x32(.google.cloud.channel.v1.RepricingConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\xbb\x01\xea\x41\xb7\x01\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\x12zaccounts/{account}/channelPartnerLinks/{channel_partner}/channelPartnerRepricingConfigs/{channel_partner_repricing_config}\"\x8a\x05\n\x0fRepricingConfig\x12g\n\x17\x65ntitlement_granularity\x18\x04 \x01(\x0b\x32?.google.cloud.channel.v1.RepricingConfig.EntitlementGranularityB\x03\xe0\x41\x02H\x00\x12m\n\x1b\x63hannel_partner_granularity\x18\x05 \x01(\x0b\x32\x42.google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularityB\x02\x18\x01H\x00\x12\x37\n\x17\x65\x66\x66\x65\x63tive_invoice_month\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12\x45\n\nadjustment\x18\x02 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x03 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12K\n\x15\x63onditional_overrides\x18\x06 \x03(\x0b\x32,.google.cloud.channel.v1.ConditionalOverride\x1a[\n\x16\x45ntitlementGranularity\x12\x41\n\x0b\x65ntitlement\x18\x01 \x01(\tB,\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x1a\x1f\n\x19\x43hannelPartnerGranularity:\x02\x18\x01\x42\r\n\x0bgranularity\"s\n\x13RepricingAdjustment\x12N\n\x15percentage_adjustment\x18\x02 \x01(\x0b\x32-.google.cloud.channel.v1.PercentageAdjustmentH\x00\x42\x0c\n\nadjustment\"@\n\x14PercentageAdjustment\x12(\n\npercentage\x18\x02 \x01(\x0b\x32\x14.google.type.Decimal\"\xf2\x01\n\x13\x43onditionalOverride\x12\x45\n\nadjustment\x18\x01 \x01(\x0b\x32,.google.cloud.channel.v1.RepricingAdjustmentB\x03\xe0\x41\x02\x12\x45\n\x0frebilling_basis\x18\x02 \x01(\x0e\x32\'.google.cloud.channel.v1.RebillingBasisB\x03\xe0\x41\x02\x12M\n\x13repricing_condition\x18\x03 \x01(\x0b\x32+.google.cloud.channel.v1.RepricingConditionB\x03\xe0\x41\x02\"l\n\x12RepricingCondition\x12I\n\x13sku_group_condition\x18\x01 \x01(\x0b\x32*.google.cloud.channel.v1.SkuGroupConditionH\x00\x42\x0b\n\tcondition\"&\n\x11SkuGroupCondition\x12\x11\n\tsku_group\x18\x01 \x01(\t*]\n\x0eRebillingBasis\x12\x1f\n\x1bREBILLING_BASIS_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43OST_AT_LIST\x10\x01\x12\x18\n\x14\x44IRECT_CUSTOMER_COST\x10\x02\x42\x66\n\x1b\x63om.google.cloud.channel.v1B\x0eRepricingProtoP\x01Z5cloud.google.com/go/channel/apiv1/channelpb;channelpbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.type.Date", "google/type/date.proto"], - ["google.type.Decimal", "google/type/decimal.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Channel - module V1 - CustomerRepricingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.CustomerRepricingConfig").msgclass - ChannelPartnerRepricingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ChannelPartnerRepricingConfig").msgclass - RepricingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingConfig").msgclass - RepricingConfig::EntitlementGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingConfig.EntitlementGranularity").msgclass - RepricingConfig::ChannelPartnerGranularity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingConfig.ChannelPartnerGranularity").msgclass - RepricingAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingAdjustment").msgclass - PercentageAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.PercentageAdjustment").msgclass - ConditionalOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.ConditionalOverride").msgclass - RepricingCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RepricingCondition").msgclass - SkuGroupCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.SkuGroupCondition").msgclass - RebillingBasis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.RebillingBasis").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb deleted file mode 100644 index 4c458d3817ce..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/channel/v1/cloud_channel_reports_service/rest" -require "google/cloud/channel/v1/cloud_channel_service/rest" -require "google/cloud/channel/v1/version" - -module Google - module Cloud - module Channel - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/channel/v1/rest" - # client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb b/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb deleted file mode 100644 index 2fdc38b53a6b..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/lib/google/cloud/channel/v1/service_pb.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/channel/v1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/channel/v1/billing_accounts_pb' -require 'google/cloud/channel/v1/channel_partner_links_pb' -require 'google/cloud/channel/v1/common_pb' -require 'google/cloud/channel/v1/customers_pb' -require 'google/cloud/channel/v1/entitlement_changes_pb' -require 'google/cloud/channel/v1/entitlements_pb' -require 'google/cloud/channel/v1/offers_pb' -require 'google/cloud/channel/v1/operations_pb' -require 'google/cloud/channel/v1/products_pb' -require 'google/cloud/channel/v1/repricing_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n%google/cloud/channel/v1/service.proto\x12\x17google.cloud.channel.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a.google/cloud/channel/v1/billing_accounts.proto\x1a\x33google/cloud/channel/v1/channel_partner_links.proto\x1a$google/cloud/channel/v1/common.proto\x1a\'google/cloud/channel/v1/customers.proto\x1a\x31google/cloud/channel/v1/entitlement_changes.proto\x1a*google/cloud/channel/v1/entitlements.proto\x1a$google/cloud/channel/v1/offers.proto\x1a(google/cloud/channel/v1/operations.proto\x1a&google/cloud/channel/v1/products.proto\x1a\'google/cloud/channel/v1/repricing.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"t\n&CheckCloudIdentityAccountsExistRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x64omain\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13primary_admin_email\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf5\x01\n\x1c\x43loudIdentityCustomerAccount\x12\x10\n\x08\x65xisting\x18\x01 \x01(\x08\x12\r\n\x05owned\x18\x02 \x01(\x08\x12\x15\n\rcustomer_name\x18\x03 \x01(\t\x12\"\n\x1a\x63ustomer_cloud_identity_id\x18\x04 \x01(\t\x12N\n\rcustomer_type\x18\x05 \x01(\x0e\x32\x37.google.cloud.channel.v1.CloudIdentityInfo.CustomerType\x12)\n!channel_partner_cloud_identity_id\x18\x06 \x01(\t\"\x81\x01\n\'CheckCloudIdentityAccountsExistResponse\x12V\n\x17\x63loud_identity_accounts\x18\x01 \x03(\x0b\x32\x35.google.cloud.channel.v1.CloudIdentityCustomerAccount\"q\n\x14ListCustomersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x15ListCustomersResponse\x12\x34\n\tcustomers\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x12GetCustomerRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\"f\n\x15\x43reateCustomerRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32!.google.cloud.channel.v1.CustomerB\x03\xe0\x41\x02\"\x82\x01\n\x15UpdateCustomerRequest\x12\x38\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32!.google.cloud.channel.v1.CustomerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x15\x44\x65leteCustomerRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\"\xba\x02\n\x15ImportCustomerRequest\x12\x15\n\x06\x64omain\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x12 \n\x11\x63loud_identity_id\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x00\x12\"\n\x13primary_admin_email\x18\x08 \x01(\tB\x03\xe0\x41\x02H\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nauth_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13overwrite_if_exists\x18\x05 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1f\n\x12\x63hannel_partner_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12>\n\x08\x63ustomer\x18\x07 \x01(\tB,\xe0\x41\x01\xfa\x41&\n$cloudchannel.googleapis.com/CustomerB\x13\n\x11\x63ustomer_identity\"\xf1\x01\n\x1dProvisionCloudIdentityRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12G\n\x13\x63loud_identity_info\x18\x02 \x01(\x0b\x32*.google.cloud.channel.v1.CloudIdentityInfo\x12\x30\n\x04user\x18\x03 \x01(\x0b\x32\".google.cloud.channel.v1.AdminUser\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x88\x01\n\x17ListEntitlementsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n\x18ListEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe0\x01\n\x1bListTransferableSkusRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x07 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x17\n\nauth_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rlanguage_code\x18\x06 \x01(\tB\x1f\n\x1dtransferred_customer_identity\"|\n\x1cListTransferableSkusResponse\x12\x43\n\x11transferable_skus\x18\x01 \x03(\x0b\x32(.google.cloud.channel.v1.TransferableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xfe\x01\n\x1dListTransferableOffersRequest\x12\x1b\n\x11\x63loud_identity_id\x18\x04 \x01(\tH\x00\x12\x17\n\rcustomer_name\x18\x05 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x03sku\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x08 \x01(\tB\x03\xe0\x41\x01\x42\x1f\n\x1dtransferred_customer_identity\"\x82\x01\n\x1eListTransferableOffersResponse\x12G\n\x13transferable_offers\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.TransferableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x11TransferableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x1f\n\x12price_reference_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"V\n\x15GetEntitlementRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"\xaa\x01\n\x1eListChannelPartnerLinksRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04view\x18\x04 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1fListChannelPartnerLinksResponse\x12J\n\x15\x63hannel_partner_links\x18\x01 \x03(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLink\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"u\n\x1cGetChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x04view\x18\x02 \x01(\x0e\x32/.google.cloud.channel.v1.ChannelPartnerLinkViewB\x03\xe0\x41\x01\"\x86\x01\n\x1f\x43reateChannelPartnerLinkRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\"\xba\x01\n\x1fUpdateChannelPartnerLinkRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\x14\x63hannel_partner_link\x18\x02 \x01(\x0b\x32+.google.cloud.channel.v1.ChannelPartnerLinkB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"n\n!GetCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"\xa9\x01\n#ListCustomerRepricingConfigsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x95\x01\n$ListCustomerRepricingConfigsResponse\x12T\n\x1a\x63ustomer_repricing_configs\x18\x01 \x03(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbe\x01\n$CreateCustomerRepricingConfigRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12X\n\x19\x63ustomer_repricing_config\x18\x02 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"\x80\x01\n$UpdateCustomerRepricingConfigRequest\x12X\n\x19\x63ustomer_repricing_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.channel.v1.CustomerRepricingConfigB\x03\xe0\x41\x02\"q\n$DeleteCustomerRepricingConfigRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudchannel.googleapis.com/CustomerRepricingConfig\"z\n\'GetChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\xb9\x01\n)ListChannelPartnerRepricingConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa8\x01\n*ListChannelPartnerRepricingConfigsResponse\x12\x61\n!channel_partner_repricing_configs\x18\x01 \x03(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xdb\x01\n*CreateChannelPartnerRepricingConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.cloudchannel.googleapis.com/ChannelPartnerLink\x12\x65\n channel_partner_repricing_config\x18\x02 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"\x93\x01\n*UpdateChannelPartnerRepricingConfigRequest\x12\x65\n channel_partner_repricing_config\x18\x01 \x01(\x0b\x32\x36.google.cloud.channel.v1.ChannelPartnerRepricingConfigB\x03\xe0\x41\x02\"}\n*DeleteChannelPartnerRepricingConfigRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudchannel.googleapis.com/ChannelPartnerRepricingConfig\"\\\n\x14ListSkuGroupsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x90\x01\n\x1fListSkuGroupBillableSkusRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"g\n\x15ListSkuGroupsResponse\x12\x35\n\nsku_groups\x18\x01 \x03(\x0b\x32!.google.cloud.channel.v1.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n ListSkuGroupBillableSkusResponse\x12;\n\rbillable_skus\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.BillableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x08SkuGroup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t:S\xea\x41P\n$cloudchannel.googleapis.com/SkuGroup\x12(accounts/{account}/skuGroups/{sku_group}\"c\n\x0b\x42illableSku\x12\x0b\n\x03sku\x18\x01 \x01(\t\x12\x18\n\x10sku_display_name\x18\x02 \x01(\t\x12\x0f\n\x07service\x18\x03 \x01(\t\x12\x1c\n\x14service_display_name\x18\x04 \x01(\t\"\xb1\x01\n\x18\x43reateEntitlementRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12>\n\x0b\x65ntitlement\x18\x02 \x01(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1bTransferEntitlementsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x12\n\nauth_token\x18\x04 \x01(\t\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\"Z\n\x1cTransferEntitlementsResponse\x12:\n\x0c\x65ntitlements\x18\x01 \x03(\x0b\x32$.google.cloud.channel.v1.Entitlement\"\x94\x01\n#TransferEntitlementsToGoogleRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0c\x65ntitlements\x18\x02 \x03(\x0b\x32$.google.cloud.channel.v1.EntitlementB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n\x17\x43hangeParametersRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\nparameters\x18\x02 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1c\x43hangeRenewalSettingsRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\x10renewal_settings\x18\x04 \x01(\x0b\x32(.google.cloud.channel.v1.RenewalSettingsB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x96\x02\n\x12\x43hangeOfferRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05offer\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudchannel.googleapis.com/Offer\x12;\n\nparameters\x18\x03 \x03(\x0b\x32\".google.cloud.channel.v1.ParameterB\x03\xe0\x41\x01\x12\x1e\n\x11purchase_order_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12price_reference_id\x18\x08 \x01(\tB\x03\xe0\x41\x01\"E\n\x17StartPaidServiceRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"F\n\x18\x43\x61ncelEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"G\n\x19SuspendEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"H\n\x1a\x41\x63tivateEntitlementRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Z\n\x12LookupOfferRequest\x12\x44\n\x0b\x65ntitlement\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\"x\n\x13ListProductsRequest\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\"c\n\x14ListProductsResponse\x12\x32\n\x08products\x18\x01 \x03(\x0b\x32 .google.cloud.channel.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb1\x01\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudchannel.googleapis.com/Product\x12\x14\n\x07\x61\x63\x63ount\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\"W\n\x10ListSkusResponse\x12*\n\x04skus\x18\x01 \x03(\x0b\x32\x1c.google.cloud.channel.v1.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xab\x01\n\x11ListOffersRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12show_future_offers\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\"]\n\x12ListOffersResponse\x12.\n\x06offers\x18\x01 \x03(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb6\x05\n\x1aListPurchasableSkusRequest\x12t\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32M.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseH\x00\x12h\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32G.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x31\n\x19\x43reateEntitlementPurchase\x12\x14\n\x07product\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xe4\x01\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n\x0b\x63hange_type\x18\x02 \x01(\x0e\x32R.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeTypeB\x03\xe0\x41\x02\"E\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07UPGRADE\x10\x01\x12\r\n\tDOWNGRADE\x10\x02\x42\x11\n\x0fpurchase_option\"y\n\x1bListPurchasableSkusResponse\x12\x41\n\x10purchasable_skus\x18\x01 \x03(\x0b\x32\'.google.cloud.channel.v1.PurchasableSku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\";\n\x0ePurchasableSku\x12)\n\x03sku\x18\x01 \x01(\x0b\x32\x1c.google.cloud.channel.v1.Sku\"\xd4\x04\n\x1cListPurchasableOffersRequest\x12v\n\x1b\x63reate_entitlement_purchase\x18\x02 \x01(\x0b\x32O.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchaseH\x00\x12j\n\x15\x63hange_offer_purchase\x18\x03 \x01(\x0b\x32I.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseH\x00\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1aK\n\x19\x43reateEntitlementPurchase\x12\x10\n\x03sku\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x62illing_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x63\n\x13\x43hangeOfferPurchase\x12\x18\n\x0b\x65ntitlement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07new_sku\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x62illing_account\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x11\n\x0fpurchase_option\"\x7f\n\x1dListPurchasableOffersResponse\x12\x45\n\x12purchasable_offers\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.PurchasableOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x10PurchasableOffer\x12-\n\x05offer\x18\x01 \x01(\x0b\x32\x1e.google.cloud.channel.v1.Offer\x12\x1f\n\x12price_reference_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"x\n#QueryEligibleBillingAccountsRequest\x12>\n\x08\x63ustomer\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudchannel.googleapis.com/Customer\x12\x11\n\x04skus\x18\x02 \x03(\tB\x03\xe0\x41\x02\"n\n$QueryEligibleBillingAccountsResponse\x12\x46\n\x13sku_purchase_groups\x18\x01 \x03(\x0b\x32).google.cloud.channel.v1.SkuPurchaseGroup\"}\n\x10SkuPurchaseGroup\x12\x0c\n\x04skus\x18\x01 \x03(\t\x12[\n\x1e\x62illing_account_purchase_infos\x18\x02 \x03(\x0b\x32\x33.google.cloud.channel.v1.BillingAccountPurchaseInfo\"^\n\x1a\x42illingAccountPurchaseInfo\x12@\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.channel.v1.BillingAccount\"\xa4\x01\n\x19RegisterSubscriberRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nintegrator\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"+\n\x1aRegisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"\xa6\x01\n\x1bUnregisterSubscriberRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\nintegrator\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"-\n\x1cUnregisterSubscriberResponse\x12\r\n\x05topic\x18\x01 \x01(\t\"\xb4\x01\n\x16ListSubscribersRequest\x12<\n\x07\x61\x63\x63ount\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#cloudchannel.googleapis.com/Account\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\nintegrator\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_integrator\"[\n\x17ListSubscribersResponse\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x18\n\x10service_accounts\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xa6\x01\n\x1dListEntitlementChangesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'cloudchannel.googleapis.com/Entitlement\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x1eListEntitlementChangesResponse\x12G\n\x13\x65ntitlement_changes\x18\x01 \x03(\x0b\x32*.google.cloud.channel.v1.EntitlementChange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe9S\n\x13\x43loudChannelService\x12\xd4\x01\n\rListCustomers\x12-.google.cloud.channel.v1.ListCustomersRequest\x1a..google.cloud.channel.v1.ListCustomersResponse\"d\x82\xd3\xe4\x93\x02^\x12!/v1/{parent=accounts/*}/customersZ9\x12\x37/v1/{parent=accounts/*/channelPartnerLinks/*}/customers\x12\xca\x01\n\x0bGetCustomer\x12+.google.cloud.channel.v1.GetCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^\x12!/v1/{name=accounts/*/customers/*}Z9\x12\x37/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xe8\x01\n\x1f\x43heckCloudIdentityAccountsExist\x12?.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest\x1a@.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist:\x01*\x12\xdd\x01\n\x0e\x43reateCustomer\x12..google.cloud.channel.v1.CreateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"!/v1/{parent=accounts/*}/customers:\x08\x63ustomerZC\"7/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:\x08\x63ustomer\x12\xf1\x01\n\x0eUpdateCustomer\x12..google.cloud.channel.v1.UpdateCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"\x8b\x01\x82\xd3\xe4\x93\x02\x84\x01\x32*/v1/{customer.name=accounts/*/customers/*}:\x08\x63ustomerZL2@/v1/{customer.name=accounts/*/channelPartnerLinks/*/customers/*}:\x08\x63ustomer\x12\xc5\x01\n\x0e\x44\x65leteCustomer\x12..google.cloud.channel.v1.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"k\xda\x41\x04name\x82\xd3\xe4\x93\x02^*!/v1/{name=accounts/*/customers/*}Z9*7/v1/{name=accounts/*/channelPartnerLinks/*/customers/*}\x12\xdd\x01\n\x0eImportCustomer\x12..google.cloud.channel.v1.ImportCustomerRequest\x1a!.google.cloud.channel.v1.Customer\"x\x82\xd3\xe4\x93\x02r\"(/v1/{parent=accounts/*}/customers:import:\x01*ZC\">/v1/{parent=accounts/*/channelPartnerLinks/*}/customers:import:\x01*\x12\xd8\x01\n\x16ProvisionCloudIdentity\x12\x36.google.cloud.channel.v1.ProvisionCloudIdentityRequest\x1a\x1d.google.longrunning.Operation\"g\xca\x41\x1d\n\x08\x43ustomer\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x41\"\"9/v1/{name=accounts/*/customers/*/entitlements/*}:activate:\x01*\x12\xe4\x01\n\x14TransferEntitlements\x12\x34.google.cloud.channel.v1.TransferEntitlementsRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41\x31\n\x1cTransferEntitlementsResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{parent=accounts/*/customers/*}:transferEntitlements:\x01*\x12\xf5\x01\n\x1cTransferEntitlementsToGoogle\x12<.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\x45\"@/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle:\x01*\x12\xc1\x01\n\x17ListChannelPartnerLinks\x12\x37.google.cloud.channel.v1.ListChannelPartnerLinksRequest\x1a\x38.google.cloud.channel.v1.ListChannelPartnerLinksResponse\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=accounts/*}/channelPartnerLinks\x12\xb0\x01\n\x15GetChannelPartnerLink\x12\x35.google.cloud.channel.v1.GetChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"3\x82\xd3\xe4\x93\x02-\x12+/v1/{name=accounts/*/channelPartnerLinks/*}\x12\xcc\x01\n\x18\x43reateChannelPartnerLink\x12\x38.google.cloud.channel.v1.CreateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"I\x82\xd3\xe4\x93\x02\x43\"+/v1/{parent=accounts/*}/channelPartnerLinks:\x14\x63hannel_partner_link\x12\xb9\x01\n\x18UpdateChannelPartnerLink\x12\x38.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest\x1a+.google.cloud.channel.v1.ChannelPartnerLink\"6\x82\xd3\xe4\x93\x02\x30\x32+/v1/{name=accounts/*/channelPartnerLinks/*}:\x01*\x12\xd7\x01\n\x1aGetCustomerRepricingConfig\x12:.google.cloud.channel.v1.GetCustomerRepricingConfigRequest\x1a\x30.google.cloud.channel.v1.CustomerRepricingConfig\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\x12\x12*] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index fb9115c630af..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index b836bdb60b21..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 71b994c7ef20..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb deleted file mode 100644 index 80c83c230b7e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/billing_accounts.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Represents a billing account. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the billing account. - # Format: accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. - # @!attribute [rw] display_name - # @return [::String] - # Display name of the billing account. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when this billing account was created. - # @!attribute [r] currency_code - # @return [::String] - # Output only. The 3-letter currency code defined in ISO 4217. - # @!attribute [r] region_code - # @return [::String] - # Output only. The CLDR region code. - class BillingAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb deleted file mode 100644 index 4d607895e4f8..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/channel_partner_links.rb +++ /dev/null @@ -1,94 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Entity representing a link between distributors and their indirect - # resellers in an n-tier resale channel. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name for the channel partner link, in the format - # accounts/\\{account_id}/channelPartnerLinks/\\{id}. - # @!attribute [rw] reseller_cloud_identity_id - # @return [::String] - # Required. Cloud Identity ID of the linked reseller. - # @!attribute [rw] link_state - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLinkState] - # Required. State of the channel partner link. - # @!attribute [r] invite_link_uri - # @return [::String] - # Output only. URI of the web page where partner accepts the link invitation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of when the channel partner link is created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of when the channel partner link is updated. - # @!attribute [r] public_id - # @return [::String] - # Output only. Public identifier that a customer must use to generate a - # transfer token to move to this distributor-reseller combination. - # @!attribute [r] channel_partner_cloud_identity_info - # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo] - # Output only. Cloud Identity info of the channel partner (IR). - class ChannelPartnerLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The level of granularity the - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink} will - # display. - module ChannelPartnerLinkView - # The default / unset value. - # The API will default to the BASIC view. - UNSPECIFIED = 0 - - # Includes all fields except the - # {::Google::Cloud::Channel::V1::ChannelPartnerLink#channel_partner_cloud_identity_info ChannelPartnerLink.channel_partner_cloud_identity_info}. - BASIC = 1 - - # Includes all fields. - FULL = 2 - end - - # ChannelPartnerLinkState represents state of a channel partner link. - module ChannelPartnerLinkState - # Not used. - CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0 - - # An invitation has been sent to the reseller to create a channel partner - # link. - INVITED = 1 - - # Status when the reseller is active. - ACTIVE = 2 - - # Status when the reseller has been revoked by the distributor. - REVOKED = 3 - - # Status when the reseller is suspended by Google or distributor. - SUSPENDED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb deleted file mode 100644 index 7a71e4ceec10..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/common.rb +++ /dev/null @@ -1,172 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Required Edu Attributes - # @!attribute [rw] institute_type - # @return [::Google::Cloud::Channel::V1::EduData::InstituteType] - # Designated institute type of customer. - # @!attribute [rw] institute_size - # @return [::Google::Cloud::Channel::V1::EduData::InstituteSize] - # Size of the institute. - # @!attribute [rw] website - # @return [::String] - # Web address for the edu customer's institution. - class EduData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to specify the institute type. - module InstituteType - # Not used. - INSTITUTE_TYPE_UNSPECIFIED = 0 - - # Elementary/Secondary Schools & Districts - K12 = 1 - - # Higher Education Universities & Colleges - UNIVERSITY = 2 - end - - # Number of students and staff the institute has. - module InstituteSize - # Not used. - INSTITUTE_SIZE_UNSPECIFIED = 0 - - # 1 - 100 - SIZE_1_100 = 1 - - # 101 - 500 - SIZE_101_500 = 2 - - # 501 - 1,000 - SIZE_501_1000 = 3 - - # 1,001 - 2,000 - SIZE_1001_2000 = 4 - - # 2,001 - 5,000 - SIZE_2001_5000 = 5 - - # 5,001 - 10,000 - SIZE_5001_10000 = 6 - - # 10,001 + - SIZE_10001_OR_MORE = 7 - end - end - - # Cloud Identity information for the Cloud Channel Customer. - # @!attribute [rw] customer_type - # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo::CustomerType] - # CustomerType indicates verification type needed for using services. - # @!attribute [r] primary_domain - # @return [::String] - # Output only. The primary domain name. - # @!attribute [r] is_domain_verified - # @return [::Boolean] - # Output only. Whether the domain is verified. - # This field is not returned for a Customer's cloud_identity_info resource. - # Partners can use the domains.get() method of the Workspace SDK's - # Directory API, or listen to the PRIMARY_DOMAIN_VERIFIED Pub/Sub event in - # to track domain verification of their resolve Workspace customers. - # @!attribute [rw] alternate_email - # @return [::String] - # The alternate email. - # @!attribute [rw] phone_number - # @return [::String] - # Phone number associated with the Cloud Identity. - # @!attribute [rw] language_code - # @return [::String] - # Language code. - # @!attribute [r] admin_console_uri - # @return [::String] - # Output only. URI of Customer's Admin console dashboard. - # @!attribute [rw] edu_data - # @return [::Google::Cloud::Channel::V1::EduData] - # Edu information about the customer. - class CloudIdentityInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # CustomerType of the customer - module CustomerType - # Not used. - CUSTOMER_TYPE_UNSPECIFIED = 0 - - # Domain-owning customer which needs domain verification to use services. - DOMAIN = 1 - - # Team customer which needs email verification to use services. - TEAM = 2 - end - end - - # Data type and value of a parameter. - # @!attribute [rw] int64_value - # @return [::Integer] - # Represents an int64 value. - # - # Note: The following fields are mutually exclusive: `int64_value`, `string_value`, `double_value`, `proto_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `int64_value`, `double_value`, `proto_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `double_value`, `int64_value`, `string_value`, `proto_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] proto_value - # @return [::Google::Protobuf::Any] - # Represents an 'Any' proto value. - # - # Note: The following fields are mutually exclusive: `proto_value`, `int64_value`, `string_value`, `double_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `string_value`, `double_value`, `proto_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information needed to create an Admin User for Google Workspace. - # @!attribute [rw] email - # @return [::String] - # Primary email of the admin user. - # @!attribute [rw] given_name - # @return [::String] - # Given name of the admin user. - # @!attribute [rw] family_name - # @return [::String] - # Family name of the admin user. - class AdminUser - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb deleted file mode 100644 index 3597cacdb3d4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/customers.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Entity representing a customer of a reseller or distributor. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the customer. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] org_display_name - # @return [::String] - # Required. Name of the organization that the customer entity represents. - # @!attribute [rw] org_postal_address - # @return [::Google::Type::PostalAddress] - # Required. The organization address for the customer. To enforce US laws and - # embargoes, we require a region, postal code, and address lines. You must - # provide valid addresses for every customer. To set the customer's - # language, use the Customer-level language code. - # @!attribute [rw] primary_contact_info - # @return [::Google::Cloud::Channel::V1::ContactInfo] - # Primary contact info. - # @!attribute [rw] alternate_email - # @return [::String] - # Secondary contact email. You need to provide an alternate email to create - # different domains if a primary contact email already exists. Users will - # receive a notification with credentials when you create an admin.google.com - # account. Secondary emails are also recovery email addresses. Alternate - # emails are optional when you create Team customers. - # @!attribute [rw] domain - # @return [::String] - # Required. The customer's primary domain. Must match the primary contact - # email's domain. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the customer was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the customer was updated. - # @!attribute [r] cloud_identity_id - # @return [::String] - # Output only. The customer's Cloud Identity ID if the customer has a Cloud - # Identity resource. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # @!attribute [r] cloud_identity_info - # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo] - # Output only. Cloud Identity information for the customer. - # Populated only if a Cloud Identity account exists for this customer. - # @!attribute [rw] channel_partner_id - # @return [::String] - # Cloud Identity ID of the customer's channel partner. - # Populated only if a channel partner exists for this customer. - # @!attribute [rw] correlation_id - # @return [::String] - # Optional. External CRM ID for the customer. - # Populated only if a CRM ID exists for this customer. - # @!attribute [rw] customer_attestation_state - # @return [::Google::Cloud::Channel::V1::Customer::CustomerAttestationState] - # Optional. Indicate if a customer is attesting about the correctness of - # provided information. Only required if creating a GCP Entitlement. - class Customer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enum represents if a customer belongs to public sector - module CustomerAttestationState - # Default value if not set yet - CUSTOMER_ATTESTATION_STATE_UNSPECIFIED = 0 - - # Customer is exempt from attesting based on exemption list at - # https://cloud.google.com/terms/direct-tos-exemptions. Contact information - # of customer will be mandatory. - EXEMPT = 1 - - # Customer is not exempt and has verified the information provided is - # correct. Contact information of customer will be mandatory. - NON_EXEMPT_AND_INFO_VERIFIED = 2 - end - end - - # Contact information for a customer account. - # @!attribute [rw] first_name - # @return [::String] - # The customer account contact's first name. Optional for Team customers. - # @!attribute [rw] last_name - # @return [::String] - # The customer account contact's last name. Optional for Team customers. - # @!attribute [r] display_name - # @return [::String] - # Output only. The customer account contact's display name, formatted as a - # combination of the customer's first and last name. - # @!attribute [rw] email - # @return [::String] - # The customer account's contact email. Required for entitlements that create - # admin.google.com accounts, and serves as the customer's username for those - # accounts. Use this email to invite Team customers. - # @!attribute [rw] title - # @return [::String] - # Optional. The customer account contact's job title. - # @!attribute [rw] phone - # @return [::String] - # The customer account's contact phone number. - class ContactInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb deleted file mode 100644 index ac50baa50950..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlement_changes.rb +++ /dev/null @@ -1,190 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Change event entry for Entitlement order history - # @!attribute [rw] suspension_reason - # @return [::Google::Cloud::Channel::V1::Entitlement::SuspensionReason] - # Suspension reason for the Entitlement. - # - # Note: The following fields are mutually exclusive: `suspension_reason`, `cancellation_reason`, `activation_reason`, `other_change_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cancellation_reason - # @return [::Google::Cloud::Channel::V1::EntitlementChange::CancellationReason] - # Cancellation reason for the Entitlement. - # - # Note: The following fields are mutually exclusive: `cancellation_reason`, `suspension_reason`, `activation_reason`, `other_change_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] activation_reason - # @return [::Google::Cloud::Channel::V1::EntitlementChange::ActivationReason] - # The Entitlement's activation reason - # - # Note: The following fields are mutually exclusive: `activation_reason`, `suspension_reason`, `cancellation_reason`, `other_change_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] other_change_reason - # @return [::String] - # e.g. purchase_number change reason, entered by CRS. - # - # Note: The following fields are mutually exclusive: `other_change_reason`, `suspension_reason`, `cancellation_reason`, `activation_reason`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entitlement - # @return [::String] - # Required. Resource name of an entitlement in the form: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] offer - # @return [::String] - # Required. Resource name of the Offer at the time of change. - # Takes the form: accounts/\\{account_id}/offers/\\{offer_id}. - # @!attribute [rw] provisioned_service - # @return [::Google::Cloud::Channel::V1::ProvisionedService] - # Service provisioned for an Entitlement. - # @!attribute [rw] change_type - # @return [::Google::Cloud::Channel::V1::EntitlementChange::ChangeType] - # The change action type. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The submitted time of the change. - # @!attribute [rw] operator_type - # @return [::Google::Cloud::Channel::V1::EntitlementChange::OperatorType] - # Operator type responsible for the change. - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] - # Extended parameters, such as: - # purchase_order_number, gcp_details; - # internal_correlation_id, long_running_operation_id, order_id; - # etc. - # @!attribute [rw] operator - # @return [::String] - # Human-readable identifier that shows what operator made a change. - # When the operator_type is RESELLER, this is the user's email address. - # For all other operator types, this is empty. - class EntitlementChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the type of change action - module ChangeType - # Not used. - CHANGE_TYPE_UNSPECIFIED = 0 - - # New Entitlement was created. - CREATED = 1 - - # Price plan associated with an Entitlement was changed. - PRICE_PLAN_SWITCHED = 3 - - # Number of seats committed for a commitment Entitlement was changed. - COMMITMENT_CHANGED = 4 - - # An annual Entitlement was renewed. - RENEWED = 5 - - # Entitlement was suspended. - SUSPENDED = 6 - - # Entitlement was activated. - ACTIVATED = 7 - - # Entitlement was cancelled. - CANCELLED = 8 - - # Entitlement was upgraded or downgraded for ex. from Google Workspace - # Business Standard to Google Workspace Business Plus. - SKU_CHANGED = 9 - - # The settings for renewal of an Entitlement have changed. - RENEWAL_SETTING_CHANGED = 10 - - # Use for Google Workspace subscription. - # Either a trial was converted to a paid subscription or a new subscription - # with no trial is created. - PAID_SUBSCRIPTION_STARTED = 11 - - # License cap was changed for the entitlement. - LICENSE_CAP_CHANGED = 12 - - # The suspension details have changed (but it is still suspended). - SUSPENSION_DETAILS_CHANGED = 13 - - # The trial end date was extended. - TRIAL_END_DATE_EXTENDED = 14 - - # Entitlement started trial. - TRIAL_STARTED = 15 - end - - # Specifies the type of operator responsible for the change - module OperatorType - # Not used. - OPERATOR_TYPE_UNSPECIFIED = 0 - - # Customer service representative. - CUSTOMER_SERVICE_REPRESENTATIVE = 1 - - # System auto job. - SYSTEM = 2 - - # Customer user. - CUSTOMER = 3 - - # Reseller user. - RESELLER = 4 - end - - # Cancellation reason for the entitlement - module CancellationReason - # Not used. - CANCELLATION_REASON_UNSPECIFIED = 0 - - # Reseller triggered a cancellation of the service. - SERVICE_TERMINATED = 1 - - # Relationship between the reseller and customer has ended due to a - # transfer. - RELATIONSHIP_ENDED = 2 - - # Entitlement transferred away from reseller while still keeping other - # entitlement(s) with the reseller. - PARTIAL_TRANSFER = 3 - end - - # The Entitlement's activation reason - module ActivationReason - # Not used. - ACTIVATION_REASON_UNSPECIFIED = 0 - - # Reseller reactivated a suspended Entitlement. - RESELLER_REVOKED_SUSPENSION = 1 - - # Customer accepted pending terms of service. - CUSTOMER_ACCEPTED_PENDING_TOS = 2 - - # Reseller updated the renewal settings on an entitlement that was - # suspended due to cancellation, and this update reactivated the - # entitlement. - RENEWAL_SETTINGS_CHANGED = 3 - - # Other reasons (Activated temporarily for cancellation, added a payment - # plan to a trial entitlement, etc.) - OTHER_ACTIVATION_REASON = 100 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb deleted file mode 100644 index 50727ce7f3b4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/entitlements.rb +++ /dev/null @@ -1,289 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # An entitlement is a representation of a customer's ability to use a service. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of an entitlement in the form: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id}. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the entitlement is created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the entitlement is updated. - # @!attribute [rw] offer - # @return [::String] - # Required. The offer resource name for which the entitlement is to be - # created. Takes the form: accounts/\\{account_id}/offers/\\{offer_id}. - # @!attribute [rw] commitment_settings - # @return [::Google::Cloud::Channel::V1::CommitmentSettings] - # Commitment settings for a commitment-based Offer. - # Required for commitment based offers. - # @!attribute [r] provisioning_state - # @return [::Google::Cloud::Channel::V1::Entitlement::ProvisioningState] - # Output only. Current provisioning state of the entitlement. - # @!attribute [r] provisioned_service - # @return [::Google::Cloud::Channel::V1::ProvisionedService] - # Output only. Service provisioning details for the entitlement. - # @!attribute [r] suspension_reasons - # @return [::Array<::Google::Cloud::Channel::V1::Entitlement::SuspensionReason>] - # Output only. Enumerable of all current suspension reasons for an - # entitlement. - # @!attribute [rw] purchase_order_id - # @return [::String] - # Optional. This purchase order (PO) information is for resellers to use for - # their 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. This is only supported for Google - # Workspace entitlements. - # @!attribute [r] trial_settings - # @return [::Google::Cloud::Channel::V1::TrialSettings] - # Output only. Settings for trial offers. - # @!attribute [rw] association_info - # @return [::Google::Cloud::Channel::V1::AssociationInfo] - # Association information to other entitlements. - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] - # Extended entitlement parameters. When creating an entitlement, valid - # parameter names and values are defined in the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions}. - # - # For Google Workspace, the following Parameters may be accepted as input: - # - # - max_units: The maximum assignable units for a flexible offer - # - # OR - # - # - num_units: The total commitment for commitment-based offers - # - # The response may additionally include the following output-only Parameters: - # - # - assigned_units: The number of licenses assigned to users. - # - # For Google Cloud billing subaccounts, the following Parameter may be - # accepted as input: - # - # - display_name: The display name of the billing subaccount. - # @!attribute [rw] billing_account - # @return [::String] - # Optional. The billing account resource name that is used to pay for this - # entitlement. - # @!attribute [rw] price_reference_id - # @return [::String] - # Optional. Price reference ID for the offer. Only for offers that require - # additional price information. Used to guarantee that the pricing is - # consistent between quoting the offer and placing the order. - class Entitlement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Indicates the current provisioning state of the entitlement. - module ProvisioningState - # Not used. - PROVISIONING_STATE_UNSPECIFIED = 0 - - # The entitlement is currently active. - ACTIVE = 1 - - # The entitlement is currently suspended. - SUSPENDED = 5 - end - - # Suspension reason for an entitlement if - # {::Google::Cloud::Channel::V1::Entitlement#provisioning_state provisioning_state} - # = SUSPENDED. - module SuspensionReason - # Not used. - SUSPENSION_REASON_UNSPECIFIED = 0 - - # Entitlement was manually suspended by the Reseller. - RESELLER_INITIATED = 1 - - # Trial ended. - TRIAL_ENDED = 2 - - # Entitlement renewal was canceled. - RENEWAL_WITH_TYPE_CANCEL = 3 - - # Entitlement was automatically suspended on creation for pending ToS - # acceptance on customer. - PENDING_TOS_ACCEPTANCE = 4 - - # Other reasons (internal reasons, abuse, etc.). - OTHER = 100 - end - end - - # Definition for extended entitlement parameters. - # @!attribute [rw] name - # @return [::String] - # Name of the parameter. - # @!attribute [rw] value - # @return [::Google::Cloud::Channel::V1::Value] - # Value of the parameter. - # @!attribute [r] editable - # @return [::Boolean] - # Output only. Specifies whether this parameter is allowed to be changed. For - # example, for a Google Workspace Business Starter entitlement in commitment - # plan, num_units is editable when entitlement is active. - class Parameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Association links that an entitlement has to other entitlements. - # @!attribute [rw] base_entitlement - # @return [::String] - # The name of the base entitlement, for which this entitlement is an add-on. - class AssociationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Service provisioned for an entitlement. - # @!attribute [r] provisioning_id - # @return [::String] - # Output only. Provisioning ID of the entitlement. For Google Workspace, this - # is the underlying Subscription ID. For Google Cloud, this is the Billing - # Account ID of the billing subaccount. - # @!attribute [r] product_id - # @return [::String] - # Output only. The product pertaining to the provisioning resource as - # specified in the Offer. - # @!attribute [r] sku_id - # @return [::String] - # Output only. The SKU pertaining to the provisioning resource as specified - # in the Offer. - class ProvisionedService - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Commitment settings for commitment-based offers. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Commitment start timestamp. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Commitment end timestamp. - # @!attribute [rw] renewal_settings - # @return [::Google::Cloud::Channel::V1::RenewalSettings] - # Optional. Renewal settings applicable for a commitment-based Offer. - class CommitmentSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Renewal settings for renewable Offers. - # @!attribute [rw] enable_renewal - # @return [::Boolean] - # If false, the plan will be completed at the end date. - # @!attribute [rw] resize_unit_count - # @return [::Boolean] - # If true and enable_renewal = true, the unit (for example seats or licenses) - # will be set to the number of active units at renewal time. - # @!attribute [rw] payment_plan - # @return [::Google::Cloud::Channel::V1::PaymentPlan] - # Describes how a reseller will be billed. - # @!attribute [rw] payment_cycle - # @return [::Google::Cloud::Channel::V1::Period] - # Describes how frequently the reseller will be billed, such as - # once per month. - class RenewalSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for trial offers. - # @!attribute [rw] trial - # @return [::Boolean] - # Determines if the entitlement is in a trial or not: - # - # * `true` - The entitlement is in trial. - # * `false` - The entitlement is not in trial. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Date when the trial ends. The value is in milliseconds - # using the UNIX Epoch format. See an example [Epoch - # converter](https://www.epochconverter.com). - class TrialSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TransferableSku represents information a reseller needs to view existing - # provisioned services for a customer that they do not own. - # Read-only. - # @!attribute [rw] transfer_eligibility - # @return [::Google::Cloud::Channel::V1::TransferEligibility] - # Describes the transfer eligibility of a SKU. - # @!attribute [rw] sku - # @return [::Google::Cloud::Channel::V1::Sku] - # The SKU pertaining to the provisioning resource as specified in the Offer. - # @!attribute [rw] legacy_sku - # @return [::Google::Cloud::Channel::V1::Sku] - # Optional. The customer to transfer has an entitlement with the populated - # legacy SKU. - class TransferableSku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies transfer eligibility of a SKU. - # @!attribute [rw] is_eligible - # @return [::Boolean] - # Whether reseller is eligible to transfer the SKU. - # @!attribute [rw] description - # @return [::String] - # Localized description if reseller is not eligible to transfer the SKU. - # @!attribute [rw] ineligibility_reason - # @return [::Google::Cloud::Channel::V1::TransferEligibility::Reason] - # Specified the reason for ineligibility. - class TransferEligibility - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reason of ineligibility. - module Reason - # Not used. - REASON_UNSPECIFIED = 0 - - # Reseller needs to accept TOS before transferring the SKU. - PENDING_TOS_ACCEPTANCE = 1 - - # Reseller not eligible to sell the SKU. - SKU_NOT_ELIGIBLE = 2 - - # SKU subscription is suspended - SKU_SUSPENDED = 3 - - # The reseller is not authorized to transact on this Product. See - # https://support.google.com/channelservices/answer/9759265 - CHANNEL_PARTNER_NOT_AUTHORIZED_FOR_SKU = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb deleted file mode 100644 index b69d45c143b2..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/offers.rb +++ /dev/null @@ -1,403 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Represents an offer made to resellers for purchase. - # An offer is associated with a {::Google::Cloud::Channel::V1::Sku Sku}, has a plan - # for payment, a price, and defines the constraints for buying. - # @!attribute [rw] name - # @return [::String] - # Resource Name of the Offer. - # Format: accounts/\\{account_id}/offers/\\{offer_id} - # @!attribute [rw] marketing_info - # @return [::Google::Cloud::Channel::V1::MarketingInfo] - # Marketing information for the Offer. - # @!attribute [rw] sku - # @return [::Google::Cloud::Channel::V1::Sku] - # SKU the offer is associated with. - # @!attribute [rw] plan - # @return [::Google::Cloud::Channel::V1::Plan] - # Describes the payment plan for the Offer. - # @!attribute [rw] constraints - # @return [::Google::Cloud::Channel::V1::Constraints] - # Constraints on transacting the Offer. - # @!attribute [rw] price_by_resources - # @return [::Array<::Google::Cloud::Channel::V1::PriceByResource>] - # Price for each monetizable resource type. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start of the Offer validity time. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. End of the Offer validity time. - # @!attribute [rw] parameter_definitions - # @return [::Array<::Google::Cloud::Channel::V1::ParameterDefinition>] - # Parameters required to use current Offer to purchase. - # @!attribute [rw] deal_code - # @return [::String] - # The deal code of the offer to get a special promotion or discount. - class Offer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameter's definition. Specifies what parameter is required to use the - # current Offer to purchase. - # @!attribute [rw] name - # @return [::String] - # Name of the parameter. - # @!attribute [rw] parameter_type - # @return [::Google::Cloud::Channel::V1::ParameterDefinition::ParameterType] - # Data type of the parameter. Minimal value, Maximum value and allowed values - # will use specified data type here. - # @!attribute [rw] min_value - # @return [::Google::Cloud::Channel::V1::Value] - # Minimal value of the parameter, if applicable. Inclusive. For example, - # minimal commitment when purchasing Anthos is 0.01. - # Applicable to INT64 and DOUBLE parameter types. - # @!attribute [rw] max_value - # @return [::Google::Cloud::Channel::V1::Value] - # Maximum value of the parameter, if applicable. Inclusive. For example, - # maximum seats when purchasing Google Workspace Business Standard. - # Applicable to INT64 and DOUBLE parameter types. - # @!attribute [rw] allowed_values - # @return [::Array<::Google::Cloud::Channel::V1::Value>] - # If not empty, parameter values must be drawn from this list. - # For example, [us-west1, us-west2, ...] - # Applicable to STRING parameter type. - # @!attribute [rw] optional - # @return [::Boolean] - # If set to true, parameter is optional to purchase this Offer. - class ParameterDefinition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Data type of the parameter. - module ParameterType - # Not used. - PARAMETER_TYPE_UNSPECIFIED = 0 - - # Int64 type. - INT64 = 1 - - # String type. - STRING = 2 - - # Double type. - DOUBLE = 3 - - # Boolean type. - BOOLEAN = 4 - end - end - - # Represents the constraints for buying the Offer. - # @!attribute [rw] customer_constraints - # @return [::Google::Cloud::Channel::V1::CustomerConstraints] - # Represents constraints required to purchase the Offer for a customer. - class Constraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents constraints required to purchase the Offer for a customer. - # @!attribute [rw] allowed_regions - # @return [::Array<::String>] - # Allowed geographical regions of the customer. - # @!attribute [rw] allowed_customer_types - # @return [::Array<::Google::Cloud::Channel::V1::CloudIdentityInfo::CustomerType>] - # Allowed Customer Type. - # @!attribute [rw] promotional_order_types - # @return [::Array<::Google::Cloud::Channel::V1::PromotionalOrderType>] - # Allowed Promotional Order Type. Present for Promotional offers. - class CustomerConstraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The payment plan for the Offer. Describes how to make a payment. - # @!attribute [rw] payment_plan - # @return [::Google::Cloud::Channel::V1::PaymentPlan] - # Describes how a reseller will be billed. - # @!attribute [rw] payment_type - # @return [::Google::Cloud::Channel::V1::PaymentType] - # Specifies when the payment needs to happen. - # @!attribute [rw] payment_cycle - # @return [::Google::Cloud::Channel::V1::Period] - # Describes how frequently the reseller will be billed, such as - # once per month. - # @!attribute [rw] trial_period - # @return [::Google::Cloud::Channel::V1::Period] - # Present for Offers with a trial period. - # For trial-only Offers, a paid service needs to start before the trial - # period ends for continued service. - # For Regular Offers with a trial period, the regular pricing goes into - # effect when trial period ends, or if paid service is started before the end - # of the trial period. - # @!attribute [rw] billing_account - # @return [::String] - # Reseller Billing account to charge after an offer transaction. - # Only present for Google Cloud offers. - class Plan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents price by resource type. - # @!attribute [rw] resource_type - # @return [::Google::Cloud::Channel::V1::ResourceType] - # Resource Type. Example: SEAT - # @!attribute [rw] price - # @return [::Google::Cloud::Channel::V1::Price] - # Price of the Offer. Present if there are no price phases. - # @!attribute [rw] price_phases - # @return [::Array<::Google::Cloud::Channel::V1::PricePhase>] - # Specifies the price by time range. - class PriceByResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the price of the Offer. - # @!attribute [rw] base_price - # @return [::Google::Type::Money] - # Base price. - # @!attribute [rw] discount - # @return [::Float] - # Discount percentage, represented as decimal. - # For example, a 20% discount will be represent as 0.2. - # @!attribute [rw] effective_price - # @return [::Google::Type::Money] - # Effective Price after applying the discounts. - # @!attribute [rw] price_period - # @return [::Google::Cloud::Channel::V1::Period] - # The time period with respect to which base and effective prices are - # defined. - # Example: 1 month, 6 months, 1 year, etc. - # @!attribute [rw] external_price_uri - # @return [::String] - # Link to external price list, such as link to Google Voice rate card. - # @!attribute [rw] discount_components - # @return [::Array<::Google::Cloud::Channel::V1::DiscountComponent>] - # Breakdown of the discount into its components. - # This will be empty if there is no discount present. - class Price - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the price by the duration of months. - # For example, a 20% discount for the first six months, then a 10% discount - # starting on the seventh month. - # @!attribute [rw] period_type - # @return [::Google::Cloud::Channel::V1::PeriodType] - # Defines the phase period type. - # @!attribute [rw] first_period - # @return [::Integer] - # Defines first period for the phase. - # @!attribute [rw] last_period - # @return [::Integer] - # Defines first period for the phase. - # @!attribute [rw] price - # @return [::Google::Cloud::Channel::V1::Price] - # Price of the phase. Present if there are no price tiers. - # @!attribute [rw] price_tiers - # @return [::Array<::Google::Cloud::Channel::V1::PriceTier>] - # Price by the resource tiers. - class PricePhase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines price at resource tier level. - # For example, an offer with following definition : - # - # * Tier 1: Provide 25% discount for all seats between 1 and 25. - # * Tier 2: Provide 10% discount for all seats between 26 and 100. - # * Tier 3: Provide flat 15% discount for all seats above 100. - # - # Each of these tiers is represented as a PriceTier. - # @!attribute [rw] first_resource - # @return [::Integer] - # First resource for which the tier price applies. - # @!attribute [rw] last_resource - # @return [::Integer] - # Last resource for which the tier price applies. - # @!attribute [rw] price - # @return [::Google::Cloud::Channel::V1::Price] - # Price of the tier. - class PriceTier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents period in days/months/years. - # @!attribute [rw] duration - # @return [::Integer] - # Total duration of Period Type defined. - # @!attribute [rw] period_type - # @return [::Google::Cloud::Channel::V1::PeriodType] - # Period Type. - class Period - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a single component of the total discount applicable on a Price. - # @!attribute [rw] discount_percentage - # @return [::Float] - # Discount percentage, represented as decimal. - # For example, a 20% discount will be represented as 0.2. - # - # Note: The following fields are mutually exclusive: `discount_percentage`, `discount_absolute`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] discount_absolute - # @return [::Google::Type::Money] - # Fixed value discount. - # - # Note: The following fields are mutually exclusive: `discount_absolute`, `discount_percentage`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] discount_type - # @return [::Google::Cloud::Channel::V1::DiscountType] - # Type of the discount. - class DiscountComponent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Constraints type for Promotional offers. - module PromotionalOrderType - # Not used. - PROMOTIONAL_TYPE_UNSPECIFIED = 0 - - # Order used for new customers, trial conversions and upgrades. - NEW_UPGRADE = 1 - - # All orders for transferring an existing customer. - TRANSFER = 2 - - # Orders for modifying an existing customer's promotion on the same SKU. - PROMOTION_SWITCH = 3 - end - - # Describes how the reseller will be billed. - module PaymentPlan - # Not used. - PAYMENT_PLAN_UNSPECIFIED = 0 - - # Commitment. - COMMITMENT = 1 - - # No commitment. - FLEXIBLE = 2 - - # Free. - FREE = 3 - - # Trial. - TRIAL = 4 - - # Price and ordering not available through API. - OFFLINE = 5 - end - - # Specifies when the payment needs to happen. - module PaymentType - # Not used. - PAYMENT_TYPE_UNSPECIFIED = 0 - - # Prepay. Amount has to be paid before service is rendered. - PREPAY = 1 - - # Postpay. Reseller is charged at the end of the Payment cycle. - POSTPAY = 2 - end - - # Represents the type for a monetizable resource(any entity on which billing - # happens). For example, this could be MINUTES for Google Voice and GB for - # Google Drive. One SKU can map to multiple monetizable resources. - module ResourceType - # Not used. - RESOURCE_TYPE_UNSPECIFIED = 0 - - # Seat. - SEAT = 1 - - # Monthly active user. - MAU = 2 - - # GB (used for storage SKUs). - GB = 3 - - # Active licensed users(for Voice SKUs). - LICENSED_USER = 4 - - # Voice usage. - MINUTES = 5 - - # For IaaS SKUs like Google Cloud, monetization is based on usage accrued on - # your billing account irrespective of the type of monetizable resource. This - # enum represents an aggregated resource/container for all usage SKUs on a - # billing account. Currently, only applicable to Google Cloud. - IAAS_USAGE = 6 - - # For Google Cloud subscriptions like Anthos or SAP. - SUBSCRIPTION = 7 - end - - # Period Type. - module PeriodType - # Not used. - PERIOD_TYPE_UNSPECIFIED = 0 - - # Day. - DAY = 1 - - # Month. - MONTH = 2 - - # Year. - YEAR = 3 - end - - # Discount Type. - module DiscountType - # Not used. - DISCOUNT_TYPE_UNSPECIFIED = 0 - - # Regional discount. - REGIONAL_DISCOUNT = 1 - - # Promotional discount. - PROMOTIONAL_DISCOUNT = 2 - - # Sales-provided discount. - SALES_DISCOUNT = 3 - - # Reseller margin. - RESELLER_MARGIN = 4 - - # Deal code discount. - DEAL_CODE = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb deleted file mode 100644 index 5e23dfe6b887..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/operations.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Provides contextual information about a - # {::Google::Longrunning::Operation google.longrunning.Operation}. - # @!attribute [rw] operation_type - # @return [::Google::Cloud::Channel::V1::OperationMetadata::OperationType] - # The RPC that initiated this Long Running Operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # RPCs that return a Long Running Operation. - module OperationType - # Not used. - OPERATION_TYPE_UNSPECIFIED = 0 - - # Long Running Operation was triggered by CreateEntitlement. - CREATE_ENTITLEMENT = 1 - - # Long Running Operation was triggered by ChangeRenewalSettings. - CHANGE_RENEWAL_SETTINGS = 3 - - # Long Running Operation was triggered by StartPaidService. - START_PAID_SERVICE = 5 - - # Long Running Operation was triggered by ActivateEntitlement. - ACTIVATE_ENTITLEMENT = 7 - - # Long Running Operation was triggered by SuspendEntitlement. - SUSPEND_ENTITLEMENT = 8 - - # Long Running Operation was triggered by CancelEntitlement. - CANCEL_ENTITLEMENT = 9 - - # Long Running Operation was triggered by TransferEntitlements. - TRANSFER_ENTITLEMENTS = 10 - - # Long Running Operation was triggered by TransferEntitlementsToGoogle. - TRANSFER_ENTITLEMENTS_TO_GOOGLE = 11 - - # Long Running Operation was triggered by ChangeOffer. - CHANGE_OFFER = 14 - - # Long Running Operation was triggered by ChangeParameters. - CHANGE_PARAMETERS = 15 - - # Long Running Operation was triggered by ProvisionCloudIdentity. - PROVISION_CLOUD_IDENTITY = 16 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb deleted file mode 100644 index ab3128fa7835..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/products.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # A Product is the entity a customer uses when placing an order. For example, - # Google Workspace, Google Voice, etc. - # @!attribute [rw] name - # @return [::String] - # Resource Name of the Product. - # Format: products/\\{product_id} - # @!attribute [rw] marketing_info - # @return [::Google::Cloud::Channel::V1::MarketingInfo] - # Marketing information for the product. - class Product - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a product's purchasable Stock Keeping Unit (SKU). - # SKUs represent the different variations of the product. For example, Google - # Workspace Business Standard and Google Workspace Business Plus are Google - # Workspace product SKUs. - # @!attribute [rw] name - # @return [::String] - # Resource Name of the SKU. - # Format: products/\\{product_id}/skus/\\{sku_id} - # @!attribute [rw] marketing_info - # @return [::Google::Cloud::Channel::V1::MarketingInfo] - # Marketing information for the SKU. - # @!attribute [rw] product - # @return [::Google::Cloud::Channel::V1::Product] - # Product the SKU is associated with. - class Sku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the marketing information for a Product, SKU or Offer. - # @!attribute [rw] display_name - # @return [::String] - # Human readable name. - # @!attribute [rw] description - # @return [::String] - # Human readable description. Description can contain HTML. - # @!attribute [rw] default_logo - # @return [::Google::Cloud::Channel::V1::Media] - # Default logo. - class MarketingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents media information. - # @!attribute [rw] title - # @return [::String] - # Title of the media. - # @!attribute [rw] content - # @return [::String] - # URL of the media. - # @!attribute [rw] type - # @return [::Google::Cloud::Channel::V1::MediaType] - # Type of the media. - class Media - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of media used. - module MediaType - # Not used. - MEDIA_TYPE_UNSPECIFIED = 0 - - # Type of image. - MEDIA_TYPE_IMAGE = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb deleted file mode 100644 index cf1c42abf4e3..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/reports_service.rb +++ /dev/null @@ -1,424 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] name - # @return [::String] - # Required. The report's resource name. Specifies the account and report used - # to generate report data. The report_id identifier is a UID (for example, - # `613bf59q`). - # Name uses the format: - # accounts/\\{account_id}/reports/\\{report_id} - # @!attribute [rw] date_range - # @return [::Google::Cloud::Channel::V1::DateRange] - # Optional. The range of usage or invoice dates to include in the result. - # @!attribute [rw] filter - # @return [::String] - # Optional. A structured string that defines conditions on dimension columns - # to restrict the report output. - # - # Filters support logical operators (AND, OR, NOT) and conditional operators - # (=, !=, <, >, <=, and >=) using `column_id` as keys. - # - # For example: - # `(customer:"accounts/C123abc/customers/S456def" OR - # customer:"accounts/C123abc/customers/S789ghi") AND - # invoice_start_date.year >= 2022` - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code, such as "en-US". If specified, the - # response is localized to the corresponding language code if the - # original data sources support it. - # Default is "en-US". - class RunReportJobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] report_job - # @return [::Google::Cloud::Channel::V1::ReportJob] - # Pass `report_job.name` to - # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#report_job FetchReportResultsRequest.report_job} - # to retrieve the report's results. - # @!attribute [rw] report_metadata - # @return [::Google::Cloud::Channel::V1::ReportResultsMetadata] - # The metadata for the report's results (display name, columns, row count, - # and date range). If you view this before the operation finishes, - # you may see incomplete data. - class RunReportJobResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults}. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] report_job - # @return [::String] - # Required. The report job created by - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob}. - # Report_job uses the format: - # accounts/\\{account_id}/reportJobs/\\{report_job_id} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size of the report. The server may return fewer - # results than requested. If you don't specify a page size, the server uses a - # sensible default (may change over time). - # - # The maximum value is 30,000; the server will change larger values to - # 30,000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that specifies a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::FetchReportResultsResponse#next_page_token FetchReportResultsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults} - # call. - # @!attribute [rw] partition_keys - # @return [::Array<::String>] - # Optional. List of keys specifying which report partitions to return. - # If empty, returns all partitions. - class FetchReportResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults}. - # Contains a tabular representation of the report results. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] report_metadata - # @return [::Google::Cloud::Channel::V1::ReportResultsMetadata] - # The metadata for the report results (display name, columns, row count, and - # date ranges). - # @!attribute [rw] rows - # @return [::Array<::Google::Cloud::Channel::V1::Row>] - # The report's lists of values. Each row follows the settings and ordering - # of the columns from `report_metadata`. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token to - # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#page_token FetchReportResultsRequest.page_token} - # to retrieve the next page of results. - class FetchReportResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports}. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the partner account to list available - # reports for. Parent uses the format: accounts/\\{account_id} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size of the report. The server might return fewer - # results than requested. If unspecified, returns 20 reports. The maximum - # value is 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that specifies a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListReportsResponse#next_page_token ListReportsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports} - # call. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code, such as "en-US". If specified, the - # response is localized to the corresponding language code if the - # original data sources support it. - # Default is "en-US". - class ListReportsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports}. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] reports - # @return [::Array<::Google::Cloud::Channel::V1::Report>] - # The reports available to the partner. - # @!attribute [rw] next_page_token - # @return [::String] - # Pass this token to - # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#page_token FetchReportResultsRequest.page_token} - # to retrieve the next page of results. - class ListReportsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of a [RunReportJob][] operation. Contains the name to use in - # {::Google::Cloud::Channel::V1::FetchReportResultsRequest#report_job FetchReportResultsRequest.report_job} - # and the status of the operation. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of a report job. - # Name uses the format: - # `accounts/{account_id}/reportJobs/{report_job_id}` - # @!attribute [rw] report_status - # @return [::Google::Cloud::Channel::V1::ReportStatus] - # The current status of report generation. - class ReportJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The features describing the data. Returned by - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job CloudChannelReportsService.RunReportJob} - # and - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results CloudChannelReportsService.FetchReportResults}. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] report - # @return [::Google::Cloud::Channel::V1::Report] - # Details of the completed report. - # @!attribute [rw] row_count - # @return [::Integer] - # The total number of rows of data in the final report. - # @!attribute [rw] date_range - # @return [::Google::Cloud::Channel::V1::DateRange] - # The date range of reported usage. - # @!attribute [rw] preceding_date_range - # @return [::Google::Cloud::Channel::V1::DateRange] - # The usage dates immediately preceding `date_range` with the same duration. - # Use this to calculate trending usage and costs. This is only populated if - # you request trending data. - # - # For example, if `date_range` is July 1-15, `preceding_date_range` will be - # June 16-30. - class ReportResultsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The definition of a report column. Specifies the data properties - # in the corresponding position of the report rows. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] column_id - # @return [::String] - # The unique name of the column (for example, customer_domain, - # channel_partner, customer_cost). You can use column IDs in - # {::Google::Cloud::Channel::V1::RunReportJobRequest#filter RunReportJobRequest.filter}. - # To see all reports and their columns, call - # {::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports CloudChannelReportsService.ListReports}. - # @!attribute [rw] display_name - # @return [::String] - # The column's display name. - # @!attribute [rw] data_type - # @return [::Google::Cloud::Channel::V1::Column::DataType] - # The type of the values for this column. - class Column - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available data types for columns. Corresponds to the fields in the - # ReportValue `oneof` field. - module DataType - # Not used. - DATA_TYPE_UNSPECIFIED = 0 - - # ReportValues for this column will use string_value. - STRING = 1 - - # ReportValues for this column will use int_value. - INT = 2 - - # ReportValues for this column will use decimal_value. - DECIMAL = 3 - - # ReportValues for this column will use money_value. - MONEY = 4 - - # ReportValues for this column will use date_value. - DATE = 5 - - # ReportValues for this column will use date_time_value. - DATE_TIME = 6 - end - end - - # A representation of usage or invoice date ranges. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] usage_start_date_time - # @return [::Google::Type::DateTime] - # The earliest usage date time (inclusive). - # - # If you use time groupings (daily, weekly, etc), each group uses - # midnight to midnight (Pacific time). The usage start date is - # rounded down to include all usage from the specified date. We recommend - # that clients pass `usage_start_date_time` in Pacific time. - # @!attribute [rw] usage_end_date_time - # @return [::Google::Type::DateTime] - # The latest usage date time (exclusive). - # - # If you use time groupings (daily, weekly, etc), each group uses - # midnight to midnight (Pacific time). The usage end date is - # rounded down to include all usage from the specified date. We recommend - # that clients pass `usage_start_date_time` in Pacific time. - # @!attribute [rw] invoice_start_date - # @return [::Google::Type::Date] - # The earliest invoice date (inclusive). - # - # If this value is not the first day of a month, this will move it back to - # the first day of the given month. - # @!attribute [rw] invoice_end_date - # @return [::Google::Type::Date] - # The latest invoice date (inclusive). - # - # If this value is not the last day of a month, this will move it forward to - # the last day of the given month. - class DateRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A row of report values. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Channel::V1::ReportValue>] - # The list of values in the row. - # @!attribute [rw] partition_key - # @return [::String] - # The key for the partition this row belongs to. This field is empty - # if the report is not partitioned. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single report value. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] string_value - # @return [::String] - # A value of type `string`. - # - # Note: The following fields are mutually exclusive: `string_value`, `int_value`, `decimal_value`, `money_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int_value - # @return [::Integer] - # A value of type `int`. - # - # Note: The following fields are mutually exclusive: `int_value`, `string_value`, `decimal_value`, `money_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] decimal_value - # @return [::Google::Type::Decimal] - # A value of type `google.type.Decimal`, representing non-integer numeric - # values. - # - # Note: The following fields are mutually exclusive: `decimal_value`, `string_value`, `int_value`, `money_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] money_value - # @return [::Google::Type::Money] - # A value of type `google.type.Money` (currency code, whole units, decimal - # units). - # - # Note: The following fields are mutually exclusive: `money_value`, `string_value`, `int_value`, `decimal_value`, `date_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_value - # @return [::Google::Type::Date] - # A value of type `google.type.Date` (year, month, day). - # - # Note: The following fields are mutually exclusive: `date_value`, `string_value`, `int_value`, `decimal_value`, `money_value`, `date_time_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_time_value - # @return [::Google::Type::DateTime] - # A value of type `google.type.DateTime` (year, month, day, hour, minute, - # second, and UTC offset or timezone.) - # - # Note: The following fields are mutually exclusive: `date_time_value`, `string_value`, `int_value`, `decimal_value`, `money_value`, `date_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ReportValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Status of a report generation process. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] state - # @return [::Google::Cloud::Channel::V1::ReportStatus::State] - # The current state of the report generation process. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The report generation's start time. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The report generation's completion time. - class ReportStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available states of report generation. - module State - # Not used. - STATE_UNSPECIFIED = 0 - - # Report processing started. - STARTED = 1 - - # Data generated from the report is being staged. - WRITING = 2 - - # Report data is available for access. - AVAILABLE = 3 - - # Report failed. - FAILED = 4 - end - end - - # The ID and description of a report that was used to generate report data. - # For example, "Google Cloud Daily Spend", "Google Workspace License Activity", - # etc. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] name - # @return [::String] - # Required. The report's resource name. Specifies the account and report used - # to generate report data. The report_id identifier is a UID (for example, - # `613bf59q`). - # - # Name uses the format: - # accounts/\\{account_id}/reports/\\{report_id} - # @!attribute [rw] display_name - # @return [::String] - # A human-readable name for this report. - # @!attribute [rw] columns - # @return [::Array<::Google::Cloud::Channel::V1::Column>] - # The list of columns included in the report. This defines the schema of - # the report results. - # @!attribute [rw] description - # @return [::String] - # A description of other aspects of the report, such as the products - # it supports. - class Report - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb deleted file mode 100644 index 07c960fc8aff..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/repricing.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Configuration for how a reseller will reprice a Customer. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the CustomerRepricingConfig. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - # @!attribute [rw] repricing_config - # @return [::Google::Cloud::Channel::V1::RepricingConfig] - # Required. The configuration for bill modifications made by a reseller - # before sending it to customers. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of an update to the repricing rule. If `update_time` - # is after - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # then it indicates this was set mid-month. - class CustomerRepricingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for how a distributor will rebill a channel partner - # (also known as a distributor-authorized reseller). - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the ChannelPartnerRepricingConfig. - # Format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. - # @!attribute [rw] repricing_config - # @return [::Google::Cloud::Channel::V1::RepricingConfig] - # Required. The configuration for bill modifications made by a reseller - # before sending it to ChannelPartner. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of an update to the repricing rule. If `update_time` - # is after - # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month} - # then it indicates this was set mid-month. - class ChannelPartnerRepricingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for repricing a Google bill over a period of time. - # @!attribute [rw] entitlement_granularity - # @return [::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity] - # Required. Applies the repricing configuration at the entitlement level. - # - # Note: If a - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # using - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity RepricingConfig.EntitlementGranularity} - # becomes effective, then no existing or future - # {::Google::Cloud::Channel::V1::RepricingConfig::ChannelPartnerGranularity RepricingConfig.ChannelPartnerGranularity} - # will apply to the - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}. - # This is the recommended value for both - # {::Google::Cloud::Channel::V1::CustomerRepricingConfig CustomerRepricingConfig} - # and - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig}. - # - # Note: The following fields are mutually exclusive: `entitlement_granularity`, `channel_partner_granularity`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] channel_partner_granularity - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Channel::V1::RepricingConfig::ChannelPartnerGranularity] - # Applies the repricing configuration at the channel partner level. - # Only - # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig ChannelPartnerRepricingConfig} - # supports this value. Deprecated: This is no longer supported. Use - # {::Google::Cloud::Channel::V1::RepricingConfig#entitlement_granularity RepricingConfig.entitlement_granularity} - # instead. - # - # Note: The following fields are mutually exclusive: `channel_partner_granularity`, `entitlement_granularity`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] effective_invoice_month - # @return [::Google::Type::Date] - # Required. The YearMonth when these adjustments activate. The Day field - # needs to be "0" since we only accept YearMonth repricing boundaries. - # @!attribute [rw] adjustment - # @return [::Google::Cloud::Channel::V1::RepricingAdjustment] - # Required. Information about the adjustment. - # @!attribute [rw] rebilling_basis - # @return [::Google::Cloud::Channel::V1::RebillingBasis] - # Required. The {::Google::Cloud::Channel::V1::RebillingBasis RebillingBasis} to - # use for this bill. Specifies the relative cost based on repricing costs you - # will apply. - # @!attribute [rw] conditional_overrides - # @return [::Array<::Google::Cloud::Channel::V1::ConditionalOverride>] - # The conditional overrides to apply for this configuration. If you list - # multiple overrides, only the first valid override is used. If you don't - # list any overrides, the API uses the normal adjustment and rebilling basis. - class RepricingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Applies the repricing configuration at the entitlement level. - # @!attribute [rw] entitlement - # @return [::String] - # Resource name of the entitlement. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - class EntitlementGranularity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Applies the repricing configuration at the channel partner level. - # The channel partner value is derived from the resource name. Takes an - # empty json object. - # Deprecated: This is no longer supported. Use - # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity RepricingConfig.EntitlementGranularity} - # instead. - # @deprecated This message is deprecated and may be removed in the next major version update. - class ChannelPartnerGranularity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A type that represents the various adjustments you can apply to a bill. - # @!attribute [rw] percentage_adjustment - # @return [::Google::Cloud::Channel::V1::PercentageAdjustment] - # Flat markup or markdown on an entire bill. - class RepricingAdjustment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An adjustment that applies a flat markup or markdown to an entire bill. - # @!attribute [rw] percentage - # @return [::Google::Type::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" - class PercentageAdjustment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the override to conditionally apply. - # @!attribute [rw] adjustment - # @return [::Google::Cloud::Channel::V1::RepricingAdjustment] - # Required. Information about the applied override's adjustment. - # @!attribute [rw] rebilling_basis - # @return [::Google::Cloud::Channel::V1::RebillingBasis] - # Required. The {::Google::Cloud::Channel::V1::RebillingBasis RebillingBasis} to - # use for the applied override. Shows the relative cost based on your - # repricing costs. - # @!attribute [rw] repricing_condition - # @return [::Google::Cloud::Channel::V1::RepricingCondition] - # Required. Specifies the condition which, if met, will apply the override. - class ConditionalOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the various repricing conditions you can use for a conditional - # override. - # @!attribute [rw] sku_group_condition - # @return [::Google::Cloud::Channel::V1::SkuGroupCondition] - # SKU Group condition for override. - class RepricingCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A condition that applies the override if a line item SKU is found in the SKU - # group. - # @!attribute [rw] sku_group - # @return [::String] - # Specifies a SKU group (https://cloud.google.com/skus/sku-groups). - # Resource name of SKU group. Format: - # accounts/\\{account}/skuGroups/\\{sku_group}. - # Example: - # "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". - class SkuGroupCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the different costs that the modified bill can be based on. - module RebillingBasis - # Not used. - REBILLING_BASIS_UNSPECIFIED = 0 - - # Use the list cost, also known as the MSRP. - COST_AT_LIST = 1 - - # Pass through all discounts except the Reseller Program Discount. If this is - # the default cost base and no adjustments are specified, the output cost - # will be exactly what the customer would see if they viewed the bill in the - # Google Cloud Console. - DIRECT_CUSTOMER_COST = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb deleted file mode 100644 index abb787be273f..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/service.rb +++ /dev/null @@ -1,1713 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist CloudChannelService.CheckCloudIdentityAccountsExist}. - # @!attribute [rw] parent - # @return [::String] - # Required. The reseller account's resource name. - # Parent uses the format: accounts/\\{account_id} - # @!attribute [rw] domain - # @return [::String] - # Required. Domain to fetch for Cloud Identity account customers, including - # domain and team customers. For team customers, please use the domain for - # their emails. - # @!attribute [rw] primary_admin_email - # @return [::String] - # Optional. Primary admin email to fetch for Cloud Identity account team - # customer. - class CheckCloudIdentityAccountsExistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Entity representing a Cloud Identity account that may be - # associated with a Channel Services API partner. - # @!attribute [rw] existing - # @return [::Boolean] - # Returns true if a Cloud Identity account exists for a specific domain. - # @!attribute [rw] owned - # @return [::Boolean] - # Returns true if the Cloud Identity account is associated with a customer - # of the Channel Services partner (with active subscriptions or purchase - # consents). - # @!attribute [rw] customer_name - # @return [::String] - # If owned = true, the name of the customer that owns the Cloud Identity - # account. - # Customer_name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] customer_cloud_identity_id - # @return [::String] - # If existing = true, the Cloud Identity ID of the customer. - # @!attribute [rw] customer_type - # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo::CustomerType] - # If existing = true, the type of the customer. - # @!attribute [rw] channel_partner_cloud_identity_id - # @return [::String] - # If existing = true, and is 2-tier customer, the channel partner of the - # customer. - class CloudIdentityCustomerAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist CloudChannelService.CheckCloudIdentityAccountsExist}. - # @!attribute [rw] cloud_identity_accounts - # @return [::Array<::Google::Cloud::Channel::V1::CloudIdentityCustomerAccount>] - # The Cloud Identity accounts associated with the domain. - class CheckCloudIdentityAccountsExistResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller account to list customers from. - # Parent uses the format: accounts/\\{account_id}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of customers to return. The service may return - # fewer than this value. If unspecified, returns at most 10 customers. The - # maximum value is 50. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results other than the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListCustomersResponse#next_page_token ListCustomersResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers} - # call. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filters applied to the [CloudChannelService.ListCustomers] - # results. See - # https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers - # for more information. - class ListCustomersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers CloudChannelService.ListCustomers}. - # @!attribute [rw] customers - # @return [::Array<::Google::Cloud::Channel::V1::Customer>] - # The customers belonging to a reseller or distributor. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListCustomersRequest#page_token ListCustomersRequest.page_token} - # to obtain that page. - class ListCustomersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer CloudChannelService.GetCustomer}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the customer to retrieve. - # Name uses the format: accounts/\\{account_id}/customers/\\{customer_id} - class GetCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer CloudChannelService.CreateCustomer} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of reseller account in which to create the - # customer. Parent uses the format: accounts/\\{account_id} - # @!attribute [rw] customer - # @return [::Google::Cloud::Channel::V1::Customer] - # Required. The customer to create. - class CreateCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer CloudChannelService.UpdateCustomer}. - # @!attribute [rw] customer - # @return [::Google::Cloud::Channel::V1::Customer] - # Required. New contents of the customer. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask that applies to the resource. - # Optional. - class UpdateCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer CloudChannelService.DeleteCustomer}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the customer to delete. - class DeleteCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer CloudChannelService.ImportCustomer} - # @!attribute [rw] domain - # @return [::String] - # Required. Customer domain. - # - # Note: The following fields are mutually exclusive: `domain`, `cloud_identity_id`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_identity_id - # @return [::String] - # Required. Customer's Cloud Identity ID - # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `domain`, `primary_admin_email`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] primary_admin_email - # @return [::String] - # Required. Customer's primary admin email. - # - # Note: The following fields are mutually exclusive: `primary_admin_email`, `domain`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller's account. - # Parent takes the format: accounts/\\{account_id} or - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} - # @!attribute [rw] auth_token - # @return [::String] - # Optional. The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @!attribute [rw] overwrite_if_exists - # @return [::Boolean] - # Required. Choose to overwrite an existing customer if found. - # This must be set to true if there is an existing customer with a - # conflicting region code or domain. - # @!attribute [rw] channel_partner_id - # @return [::String] - # Optional. Cloud Identity ID of a channel partner who will be the direct - # reseller for the customer's order. This field is required for 2-tier - # transfer scenarios and can be provided via the request Parent binding as - # well. - # @!attribute [rw] customer - # @return [::String] - # Optional. Specifies the customer that will receive imported Cloud Identity - # information. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - class ImportCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity CloudChannelService.ProvisionCloudIdentity} - # @!attribute [rw] customer - # @return [::String] - # Required. Resource name of the customer. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] cloud_identity_info - # @return [::Google::Cloud::Channel::V1::CloudIdentityInfo] - # CloudIdentity-specific customer information. - # @!attribute [rw] user - # @return [::Google::Cloud::Channel::V1::AdminUser] - # Admin user information. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Validate the request and preview the review, but do not post it. - class ProvisionCloudIdentityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller's customer account to list - # entitlements for. - # Parent uses the format: accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, return at most 50 entitlements. The maximum - # value is 100; the server will coerce values above 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListEntitlementsResponse#next_page_token ListEntitlementsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements} - # call. - class ListEntitlementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements CloudChannelService.ListEntitlements}. - # @!attribute [rw] entitlements - # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] - # The reseller customer's entitlements. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to list the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListEntitlementsRequest#page_token ListEntitlementsRequest.page_token} - # to obtain that page. - class ListEntitlementsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} - # @!attribute [rw] cloud_identity_id - # @return [::String] - # Customer's Cloud Identity ID - # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] customer_name - # @return [::String] - # A reseller is required to create a customer and use the resource name of - # the created customer here. - # Customer_name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # - # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The reseller account's resource name. - # Parent uses the format: accounts/\\{account_id} - # @!attribute [rw] page_size - # @return [::Integer] - # The requested page size. Server might return fewer results than requested. - # If unspecified, returns at most 100 SKUs. - # The maximum value is 1000; the server will coerce values above 1000. - # Optional. - # @!attribute [rw] page_token - # @return [::String] - # A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListTransferableSkusResponse#next_page_token ListTransferableSkusResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus} - # call. Optional. - # @!attribute [rw] auth_token - # @return [::String] - # Optional. The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @!attribute [rw] language_code - # @return [::String] - # The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # Optional. - class ListTransferableSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus CloudChannelService.ListTransferableSkus}. - # @!attribute [rw] transferable_skus - # @return [::Array<::Google::Cloud::Channel::V1::TransferableSku>] - # Information about existing SKUs for a customer that needs a transfer. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListTransferableSkusRequest#page_token ListTransferableSkusRequest.page_token} - # to obtain that page. - class ListTransferableSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} - # @!attribute [rw] cloud_identity_id - # @return [::String] - # Customer's Cloud Identity ID - # - # Note: The following fields are mutually exclusive: `cloud_identity_id`, `customer_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] customer_name - # @return [::String] - # A reseller should create a customer and use the resource name of - # that customer here. - # - # Note: The following fields are mutually exclusive: `customer_name`, `cloud_identity_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller's account. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server might return fewer results than requested. - # If unspecified, returns at most 100 offers. - # The maximum value is 1000; the server will coerce values above 1000. - # @!attribute [rw] page_token - # @return [::String] - # A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListTransferableOffersResponse#next_page_token ListTransferableOffersResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers} - # call. - # @!attribute [rw] sku - # @return [::String] - # Required. The SKU to look up Offers for. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @!attribute [rw] billing_account - # @return [::String] - # Optional. The Billing Account to look up Offers for. Format: - # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. - # - # This field is only relevant for multi-currency accounts. It should be left - # empty for single currency accounts. - class ListTransferableOffersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers CloudChannelService.ListTransferableOffers}. - # @!attribute [rw] transferable_offers - # @return [::Array<::Google::Cloud::Channel::V1::TransferableOffer>] - # Information about Offers for a customer that can be used for - # transfer. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListTransferableOffersRequest#page_token ListTransferableOffersRequest.page_token} - # to obtain that page. - class ListTransferableOffersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TransferableOffer represents an Offer that can be used in Transfer. - # Read-only. - # @!attribute [rw] offer - # @return [::Google::Cloud::Channel::V1::Offer] - # Offer with parameter constraints updated to allow the Transfer. - # @!attribute [rw] price_reference_id - # @return [::String] - # Optional. Price reference ID for the offer. Only for offers that require - # additional price information. Used to guarantee that the pricing is - # consistent between quoting the offer and placing the order. - class TransferableOffer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement CloudChannelService.GetEntitlement}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entitlement to retrieve. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - class GetEntitlementRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller account for listing channel - # partner links. Parent uses the format: accounts/\\{account_id} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, server will pick a default size (25). The - # maximum value is 200; the server will coerce values above 200. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # Obtained using - # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse#next_page_token ListChannelPartnerLinksResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks} - # call. - # @!attribute [rw] view - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] - # Optional. The level of granularity the ChannelPartnerLink will display. - class ListChannelPartnerLinksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links CloudChannelService.ListChannelPartnerLinks}. - # @!attribute [rw] channel_partner_links - # @return [::Array<::Google::Cloud::Channel::V1::ChannelPartnerLink>] - # The Channel partner links for a reseller. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest#page_token ListChannelPartnerLinksRequest.page_token} - # to obtain that page. - class ListChannelPartnerLinksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link CloudChannelService.GetChannelPartnerLink}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the channel partner link to retrieve. - # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} - # where \\{id} is the Cloud Identity ID of the partner. - # @!attribute [rw] view - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLinkView] - # Optional. The level of granularity the ChannelPartnerLink will display. - class GetChannelPartnerLinkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link CloudChannelService.CreateChannelPartnerLink} - # @!attribute [rw] parent - # @return [::String] - # Required. Create a channel partner link for the provided reseller account's - # resource name. - # Parent uses the format: accounts/\\{account_id} - # @!attribute [rw] channel_partner_link - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # Required. The channel partner link to create. - # Either channel_partner_link.reseller_cloud_identity_id or domain can be - # used to create a link. - class CreateChannelPartnerLinkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link CloudChannelService.UpdateChannelPartnerLink} - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the channel partner link to cancel. - # Name uses the format: accounts/\\{account_id}/channelPartnerLinks/\\{id} - # where \\{id} is the Cloud Identity ID of the partner. - # @!attribute [rw] channel_partner_link - # @return [::Google::Cloud::Channel::V1::ChannelPartnerLink] - # Required. The channel partner link to update. Only - # channel_partner_link.link_state is allowed for updates. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask that applies to the resource. - # The only allowable value for an update mask is - # channel_partner_link.link_state. - class UpdateChannelPartnerLinkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config CloudChannelService.GetCustomerRepricingConfig}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the CustomerRepricingConfig. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - class GetCustomerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs}. - # @!attribute [rw] parent - # @return [::String] - # 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. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse#next_page_token ListCustomerRepricingConfigsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs} - # call. - # @!attribute [rw] filter - # @return [::String] - # 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. - class ListCustomerRepricingConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs CloudChannelService.ListCustomerRepricingConfigs}. - # @!attribute [rw] customer_repricing_configs - # @return [::Array<::Google::Cloud::Channel::V1::CustomerRepricingConfig>] - # The repricing configs for this channel partner. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest#page_token ListCustomerRepricingConfigsRequest.page_token} - # to obtain that page. - class ListCustomerRepricingConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config CloudChannelService.CreateCustomerRepricingConfig}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the customer that will receive this - # repricing config. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] customer_repricing_config - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # Required. The CustomerRepricingConfig object to update. - class CreateCustomerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config CloudChannelService.UpdateCustomerRepricingConfig}. - # @!attribute [rw] customer_repricing_config - # @return [::Google::Cloud::Channel::V1::CustomerRepricingConfig] - # Required. The CustomerRepricingConfig object to update. - class UpdateCustomerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config CloudChannelService.DeleteCustomerRepricingConfig}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the customer repricing config rule to - # delete. Format: - # accounts/\\{account_id}/customers/\\{customer_id}/customerRepricingConfigs/\\{id}. - class DeleteCustomerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config CloudChannelService.GetChannelPartnerRepricingConfig} - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ChannelPartnerRepricingConfig - # Format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}/channelPartnerRepricingConfigs/\\{id}. - class GetChannelPartnerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the account's - # {::Google::Cloud::Channel::V1::ChannelPartnerLink ChannelPartnerLink}. Parent - # uses the format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}. - # Supports accounts/\\{account_id}/channelPartnerLinks/- to retrieve configs - # for all channel partners. - # @!attribute [rw] page_size - # @return [::Integer] - # 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. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse#next_page_token ListChannelPartnerRepricingConfigsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs} - # call. - # @!attribute [rw] filter - # @return [::String] - # 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`. - class ListChannelPartnerRepricingConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs CloudChannelService.ListChannelPartnerRepricingConfigs}. - # @!attribute [rw] channel_partner_repricing_configs - # @return [::Array<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>] - # The repricing configs for this channel partner. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest#page_token ListChannelPartnerRepricingConfigsRequest.page_token} - # to obtain that page. - class ListChannelPartnerRepricingConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config CloudChannelService.CreateChannelPartnerRepricingConfig}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the ChannelPartner that will receive the - # repricing config. Parent uses the format: - # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id} - # @!attribute [rw] channel_partner_repricing_config - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # Required. The ChannelPartnerRepricingConfig object to update. - class CreateChannelPartnerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config CloudChannelService.UpdateChannelPartnerRepricingConfig}. - # @!attribute [rw] channel_partner_repricing_config - # @return [::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig] - # Required. The ChannelPartnerRepricingConfig object to update. - class UpdateChannelPartnerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteChannelPartnerRepricingConfig. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the channel partner repricing config rule to - # delete. - class DeleteChannelPartnerRepricingConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListSkuGroups. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the account from which to list SKU groups. - # Parent uses the format: accounts/\\{account}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of SKU groups to return. The service may - # return fewer than this value. If unspecified, returns a maximum of 1000 SKU - # groups. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListSkuGroupsResponse#next_page_token ListSkuGroupsResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups CloudChannelService.ListSkuGroups} - # call. - class ListSkuGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListSkuGroupBillableSkus. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the SKU group. - # Format: accounts/\\{account}/skuGroups/\\{sku_group}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of SKUs to return. The service may return - # fewer than this value. If unspecified, returns a maximum of 100000 SKUs. - # The maximum value is 100000; values above 100000 will be coerced to 100000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results beyond the first page. - # Obtained through - # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse#next_page_token ListSkuGroupBillableSkusResponse.next_page_token} - # of the previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus CloudChannelService.ListSkuGroupBillableSkus} - # call. - class ListSkuGroupBillableSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListSkuGroups. - # @!attribute [rw] sku_groups - # @return [::Array<::Google::Cloud::Channel::V1::SkuGroup>] - # The list of SKU groups requested. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListSkuGroupsRequest#page_token ListSkuGroupsRequest.page_token} - # to obtain that page. - class ListSkuGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListSkuGroupBillableSkus. - # @!attribute [rw] billable_skus - # @return [::Array<::Google::Cloud::Channel::V1::BillableSku>] - # The list of billable SKUs in the requested SKU group. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - # Pass to - # {::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest#page_token ListSkuGroupBillableSkusRequest.page_token} - # to obtain that page. - class ListSkuGroupBillableSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the SKU group information. - # @!attribute [rw] name - # @return [::String] - # Resource name of SKU group. Format: - # accounts/\\{account}/skuGroups/\\{sku_group}. - # Example: - # "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". - # @!attribute [rw] display_name - # @return [::String] - # Unique human readable identifier for the SKU group. - class SkuGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the Billable SKU information. - # @!attribute [rw] sku - # @return [::String] - # Resource name of Billable SKU. Format: - # billableSkus/\\{sku}. - # Example: - # billableSkus/6E1B-6634-470F". - # @!attribute [rw] sku_display_name - # @return [::String] - # Unique human readable name for the SKU. - # @!attribute [rw] service - # @return [::String] - # Resource name of Service which contains Repricing SKU. Format: - # services/\\{service}. - # Example: - # "services/B7D9-FDCB-15D8". - # @!attribute [rw] service_display_name - # @return [::String] - # Unique human readable name for the Service. - class BillableSku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement CloudChannelService.CreateEntitlement} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller's customer account in which to - # create the entitlement. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] entitlement - # @return [::Google::Cloud::Channel::V1::Entitlement] - # Required. The entitlement to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class CreateEntitlementRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements CloudChannelService.TransferEntitlements}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller's customer account that will - # receive transferred entitlements. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] entitlements - # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] - # Required. The new entitlements to create or transfer. - # @!attribute [rw] auth_token - # @return [::String] - # The super admin of the resold customer generates this token to - # authorize a reseller to access their Cloud Identity and purchase - # entitlements on their behalf. You can omit this token after authorization. - # See https://support.google.com/a/answer/7643790 for more details. - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class TransferEntitlementsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements CloudChannelService.TransferEntitlements}. - # This is put in the response field of google.longrunning.Operation. - # @!attribute [rw] entitlements - # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] - # The transferred entitlements. - class TransferEntitlementsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google CloudChannelService.TransferEntitlementsToGoogle}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller's customer account where the - # entitlements transfer from. Parent uses the format: - # accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] entitlements - # @return [::Array<::Google::Cloud::Channel::V1::Entitlement>] - # Required. The entitlements to transfer to Google. - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class TransferEntitlementsToGoogleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters CloudChannelService.ChangeParameters}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] - # Required. Entitlement parameters to update. You can only change editable - # parameters. - # - # To view the available Parameters for a request, refer to the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} - # from the desired offer. - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @!attribute [rw] purchase_order_id - # @return [::String] - # Optional. Purchase order ID provided by the reseller. - class ChangeParametersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings CloudChannelService.ChangeRenewalSettings}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] renewal_settings - # @return [::Google::Cloud::Channel::V1::RenewalSettings] - # Required. New renewal settings. - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class ChangeRenewalSettingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer CloudChannelService.ChangeOffer}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entitlement to update. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] offer - # @return [::String] - # Required. New Offer. - # Format: accounts/\\{account_id}/offers/\\{offer_id}. - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::Channel::V1::Parameter>] - # Optional. Parameters needed to purchase the Offer. To view the available - # Parameters refer to the - # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} - # from the desired offer. - # @!attribute [rw] purchase_order_id - # @return [::String] - # Optional. Purchase order id provided by the reseller. - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - # @!attribute [rw] billing_account - # @return [::String] - # Optional. The billing account resource name that is used to pay for this - # entitlement when setting up billing on a trial subscription. - # - # This field is only relevant for multi-currency accounts. It should be - # left empty for single currency accounts. - # @!attribute [rw] price_reference_id - # @return [::String] - # Optional. Price reference ID for the offer. Only for offers that require - # additional price information. Used to guarantee that the pricing is - # consistent between quoting the offer and placing the order. - class ChangeOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service CloudChannelService.StartPaidService}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the entitlement to start a paid service for. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class StartPaidServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement CloudChannelService.CancelEntitlement}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entitlement to cancel. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class CancelEntitlementRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement CloudChannelService.SuspendEntitlement}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entitlement to suspend. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class SuspendEntitlementRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement CloudChannelService.ActivateEntitlement}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the entitlement to activate. - # Name uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] request_id - # @return [::String] - # Optional. You can specify an optional unique request ID, and if you need to - # retry your request, the server will know to ignore the request if it's - # complete. - # - # For example, you make an initial request and the request times out. If you - # make the request again with the same request ID, the server can check if - # it received the original operation with the same request ID. If it did, it - # will ignore the second request. - # - # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) - # with the exception that zero UUID is not supported - # (`00000000-0000-0000-0000-000000000000`). - class ActivateEntitlementRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for LookupOffer. - # @!attribute [rw] entitlement - # @return [::String] - # Required. The resource name of the entitlement to retrieve the Offer. - # Entitlement uses the format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - class LookupOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListProducts. - # @!attribute [rw] account - # @return [::String] - # Required. The resource name of the reseller account. - # Format: accounts/\\{account_id}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 Products. The maximum value - # is 1000; the server will coerce values above 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - class ListProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListProducts. - # @!attribute [rw] products - # @return [::Array<::Google::Cloud::Channel::V1::Product>] - # List of Products requested. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - class ListProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListSkus. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the Product to list SKUs for. - # Parent uses the format: products/\\{product_id}. - # Supports products/- to retrieve SKUs for all products. - # @!attribute [rw] account - # @return [::String] - # Required. Resource name of the reseller. - # Format: accounts/\\{account_id}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 SKUs. The maximum value is - # 1000; the server will coerce values above 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # Optional. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - class ListSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListSkus. - # @!attribute [rw] skus - # @return [::Array<::Google::Cloud::Channel::V1::Sku>] - # The list of SKUs requested. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - class ListSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListOffers. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the reseller account from which to list - # Offers. Parent uses the format: accounts/\\{account_id}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 500 Offers. The maximum value is - # 1000; the server will coerce values above 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # @!attribute [rw] filter - # @return [::String] - # Optional. The expression to filter results by name (name of - # the Offer), sku.name (name of the SKU), or sku.product.name (name of the - # Product). - # Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 - # Example 2: name=accounts/a1/offers/o1 - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - # @!attribute [rw] show_future_offers - # @return [::Boolean] - # Optional. A boolean flag that determines if a response returns future - # offers 30 days from now. If the show_future_offers is true, the response - # will only contain offers that are scheduled to be available 30 days from - # now. - class ListOffersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListOffers. - # @!attribute [rw] offers - # @return [::Array<::Google::Cloud::Channel::V1::Offer>] - # The list of Offers requested. - # - # The pricing information for each Offer only includes the base price. - # Effective prices and discounts aren't populated. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - class ListOffersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPurchasableSkus. - # @!attribute [rw] create_entitlement_purchase - # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase] - # List SKUs for CreateEntitlement purchase. - # - # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] change_offer_purchase - # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase] - # List SKUs for ChangeOffer purchase with a new SKU. - # - # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] customer - # @return [::String] - # Required. The resource name of the customer to list SKUs for. - # Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 SKUs. The maximum value is - # 1000; the server will coerce values above 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - class ListPurchasableSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # List SKUs for a new entitlement. Make the purchase using - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement CloudChannelService.CreateEntitlement}. - # @!attribute [rw] product - # @return [::String] - # Required. List SKUs belonging to this Product. - # Format: products/\\{product_id}. - # Supports products/- to retrieve SKUs for all products. - class CreateEntitlementPurchase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List SKUs for upgrading or downgrading an entitlement. Make the purchase - # using - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer CloudChannelService.ChangeOffer}. - # @!attribute [rw] entitlement - # @return [::String] - # Required. Resource name of the entitlement. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] change_type - # @return [::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::ChangeOfferPurchase::ChangeType] - # Required. Change Type for the entitlement. - class ChangeOfferPurchase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Change Type enum. - module ChangeType - # Not used. - CHANGE_TYPE_UNSPECIFIED = 0 - - # SKU is an upgrade on the current entitlement. - UPGRADE = 1 - - # SKU is a downgrade on the current entitlement. - DOWNGRADE = 2 - end - end - end - - # Response message for ListPurchasableSkus. - # @!attribute [rw] purchasable_skus - # @return [::Array<::Google::Cloud::Channel::V1::PurchasableSku>] - # The list of SKUs requested. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - class ListPurchasableSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SKU that you can purchase. This is used in ListPurchasableSku API - # response. - # @!attribute [rw] sku - # @return [::Google::Cloud::Channel::V1::Sku] - # SKU - class PurchasableSku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListPurchasableOffers. - # @!attribute [rw] create_entitlement_purchase - # @return [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase] - # List Offers for CreateEntitlement purchase. - # - # Note: The following fields are mutually exclusive: `create_entitlement_purchase`, `change_offer_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] change_offer_purchase - # @return [::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::ChangeOfferPurchase] - # List Offers for ChangeOffer purchase. - # - # Note: The following fields are mutually exclusive: `change_offer_purchase`, `create_entitlement_purchase`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] customer - # @return [::String] - # Required. The resource name of the customer to list Offers for. - # Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server might return fewer results than - # requested. If unspecified, returns at most 100 Offers. The maximum value is - # 1000; the server will coerce values above 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token for a page of results other than the first page. - # @!attribute [rw] language_code - # @return [::String] - # Optional. The BCP-47 language code. For example, "en-US". The - # response will localize in the corresponding language code, if specified. - # The default value is "en-US". - class ListPurchasableOffersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # List Offers for CreateEntitlement purchase. - # @!attribute [rw] sku - # @return [::String] - # Required. SKU that the result should be restricted to. - # Format: products/\\{product_id}/skus/\\{sku_id}. - # @!attribute [rw] billing_account - # @return [::String] - # Optional. Billing account that the result should be restricted to. - # Format: accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. - class CreateEntitlementPurchase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List Offers for ChangeOffer purchase. - # @!attribute [rw] entitlement - # @return [::String] - # Required. Resource name of the entitlement. - # Format: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] new_sku - # @return [::String] - # Optional. Resource name of the new target SKU. Provide this SKU when - # upgrading or downgrading an entitlement. Format: - # products/\\{product_id}/skus/\\{sku_id} - # @!attribute [rw] billing_account - # @return [::String] - # Optional. Resource name of the new target Billing Account. Provide this - # Billing Account when setting up billing for a trial subscription. Format: - # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}. - # - # This field is only relevant for multi-currency accounts. It should be - # left empty for single currency accounts. - class ChangeOfferPurchase - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for ListPurchasableOffers. - # @!attribute [rw] purchasable_offers - # @return [::Array<::Google::Cloud::Channel::V1::PurchasableOffer>] - # The list of Offers requested. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. - class ListPurchasableOffersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Offer that you can purchase for a customer. This is used in the - # ListPurchasableOffer API response. - # @!attribute [rw] offer - # @return [::Google::Cloud::Channel::V1::Offer] - # Offer. - # @!attribute [rw] price_reference_id - # @return [::String] - # Optional. Price reference ID for the offer. Only for offers that require - # additional price information. Used to guarantee that the pricing is - # consistent between quoting the offer and placing the order. - class PurchasableOffer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for QueryEligibleBillingAccounts. - # @!attribute [rw] customer - # @return [::String] - # Required. The resource name of the customer to list eligible billing - # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}. - # @!attribute [rw] skus - # @return [::Array<::String>] - # Required. List of SKUs to list eligible billing accounts for. At least one - # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}. - class QueryEligibleBillingAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for QueryEligibleBillingAccounts. - # @!attribute [rw] sku_purchase_groups - # @return [::Array<::Google::Cloud::Channel::V1::SkuPurchaseGroup>] - # List of SKU purchase groups where each group represents a set of SKUs that - # must be purchased using the same billing account. Each SKU from - # [QueryEligibleBillingAccountsRequest.skus] will appear in exactly one SKU - # group. - class QueryEligibleBillingAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a set of SKUs that must be purchased using the same billing - # account. - # @!attribute [rw] skus - # @return [::Array<::String>] - # Resource names of the SKUs included in this group. - # Format: products/\\{product_id}/skus/\\{sku_id}. - # @!attribute [rw] billing_account_purchase_infos - # @return [::Array<::Google::Cloud::Channel::V1::BillingAccountPurchaseInfo>] - # List of billing accounts that are eligible to purhcase these SKUs. - class SkuPurchaseGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a billing account that can be used to make a purchase. - # @!attribute [rw] billing_account - # @return [::Google::Cloud::Channel::V1::BillingAccount] - # The billing account resource. - class BillingAccountPurchaseInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request Message for RegisterSubscriber. - # @!attribute [rw] account - # @return [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account that provides subscriber access to the registered - # topic. - # @!attribute [rw] integrator - # @return [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - class RegisterSubscriberRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response Message for RegisterSubscriber. - # @!attribute [rw] topic - # @return [::String] - # Name of the topic the subscriber will listen to. - class RegisterSubscriberResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request Message for UnregisterSubscriber. - # @!attribute [rw] account - # @return [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account to unregister from subscriber access to the - # topic. - # @!attribute [rw] integrator - # @return [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - class UnregisterSubscriberRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response Message for UnregisterSubscriber. - # @!attribute [rw] topic - # @return [::String] - # Name of the topic the service account subscriber access was removed from. - class UnregisterSubscriberResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request Message for ListSubscribers. - # @!attribute [rw] account - # @return [::String] - # Optional. Resource name of the account. Required if integrator is not - # provided. Otherwise, leave this field empty/unset. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of service accounts to return. The service may - # return fewer than this value. If unspecified, returns at most 100 service - # accounts. The maximum value is 1000; the server will coerce values above - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListSubscribers` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListSubscribers` must - # match the call that provided the page token. - # @!attribute [rw] integrator - # @return [::String] - # Optional. Resource name of the integrator. Required if account is not - # provided. Otherwise, leave this field empty/unset. - class ListSubscribersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response Message for ListSubscribers. - # @!attribute [rw] topic - # @return [::String] - # Name of the topic registered with the reseller. - # @!attribute [rw] service_accounts - # @return [::Array<::String>] - # List of service accounts which have subscriber access to the topic. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListSubscribersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the entitlement for which to list - # entitlement changes. The `-` wildcard may be used to match entitlements - # across a customer. Formats: - # - # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # * accounts/\\{account_id}/customers/\\{customer_id}/entitlements/- - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of entitlement changes to return. The service - # may return fewer than this value. If unspecified, returns at most 10 - # entitlement changes. The maximum value is 50; the server will coerce values - # above 50. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filters applied to the list results. - class ListEntitlementChangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes CloudChannelService.ListEntitlementChanges} - # @!attribute [rw] entitlement_changes - # @return [::Array<::Google::Cloud::Channel::V1::EntitlementChange>] - # The list of entitlement changes. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to list the next page of results. - class ListEntitlementChangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb deleted file mode 100644 index f394cc3fc018..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/cloud/channel/v1/subscriber_event.rb +++ /dev/null @@ -1,126 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Channel - module V1 - # Represents Pub/Sub message content describing customer update. - # @!attribute [rw] customer - # @return [::String] - # Resource name of the customer. - # Format: accounts/\\{account_id}/customers/\\{customer_id} - # @!attribute [rw] event_type - # @return [::Google::Cloud::Channel::V1::CustomerEvent::Type] - # Type of event which happened for the customer. - class CustomerEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of customer event. - module Type - # Not used. - TYPE_UNSPECIFIED = 0 - - # Primary domain for customer was changed. - PRIMARY_DOMAIN_CHANGED = 1 - - # Primary domain of the customer has been verified. - PRIMARY_DOMAIN_VERIFIED = 2 - end - end - - # Represents Pub/Sub message content describing entitlement update. - # @!attribute [rw] entitlement - # @return [::String] - # Resource name of an entitlement of the form: - # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id} - # @!attribute [rw] event_type - # @return [::Google::Cloud::Channel::V1::EntitlementEvent::Type] - # Type of event which happened for the entitlement. - class EntitlementEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of entitlement event. - module Type - # Not used. - TYPE_UNSPECIFIED = 0 - - # A new entitlement was created. - CREATED = 1 - - # The offer type associated with an entitlement was changed. - # This is not triggered if an entitlement converts from a commit offer to a - # flexible offer as part of a renewal. - PRICE_PLAN_SWITCHED = 3 - - # Annual commitment for a commit plan was changed. - COMMITMENT_CHANGED = 4 - - # An annual entitlement was renewed. - RENEWED = 5 - - # Entitlement was suspended. - SUSPENDED = 6 - - # Entitlement was unsuspended. - ACTIVATED = 7 - - # Entitlement was cancelled. - CANCELLED = 8 - - # Entitlement was upgraded or downgraded (e.g. from Google Workspace - # Business Standard to Google Workspace Business Plus). - SKU_CHANGED = 9 - - # The renewal settings of an entitlement has changed. - RENEWAL_SETTING_CHANGED = 10 - - # Paid service has started on trial entitlement. - PAID_SERVICE_STARTED = 11 - - # License was assigned to or revoked from a user. - LICENSE_ASSIGNMENT_CHANGED = 12 - - # License cap was changed for the entitlement. - LICENSE_CAP_CHANGED = 13 - end - end - - # Represents information which resellers will get as part of notification from - # Pub/Sub. - # @!attribute [rw] customer_event - # @return [::Google::Cloud::Channel::V1::CustomerEvent] - # Customer event sent as part of Pub/Sub event to partners. - # - # Note: The following fields are mutually exclusive: `customer_event`, `entitlement_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] entitlement_event - # @return [::Google::Cloud::Channel::V1::EntitlementEvent] - # Entitlement event sent as part of Pub/Sub event to partners. - # - # Note: The following fields are mutually exclusive: `entitlement_event`, `customer_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SubscriberEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index f2d9d79d9da4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 9e9bdbb09ea4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index 341efa296c29..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index c2acab1235a9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index ad3c3ad25f0f..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index a005f395ccab..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index 3f61f95b2587..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb deleted file mode 100644 index 48f5db726fe4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb deleted file mode 100644 index 3b045eb0b7d8..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/datetime.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year is 0, the DateTime is considered not to have a specific year. month - # and day must have valid, non-zero values. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Required. Month of year. Must be from 1 to 12. - # @!attribute [rw] day - # @return [::Integer] - # Required. Day of month. Must be from 1 to 31 and valid for the year and - # month. - # @!attribute [rw] hours - # @return [::Integer] - # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API - # may choose to allow the value "24:00:00" for scenarios like business - # closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Required. Minutes of hour of day. Must be from 0 to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An - # API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Required. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone, e.g. "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number, e.g. "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb deleted file mode 100644 index 6b75307007ed..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/decimal.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # A representation of a decimal value, such as 2.5. Clients may convert values - # into language-native decimal formats, such as Java's [BigDecimal][] or - # Python's [decimal.Decimal][]. - # - # [BigDecimal]: - # https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html - # [decimal.Decimal]: https://docs.python.org/3/library/decimal.html - # @!attribute [rw] value - # @return [::String] - # The decimal value, as a string. - # - # The string representation consists of an optional sign, `+` (`U+002B`) - # or `-` (`U+002D`), followed by a sequence of zero or more decimal digits - # ("the integer"), optionally followed by a fraction, optionally followed - # by an exponent. - # - # The fraction consists of a decimal point followed by zero or more decimal - # digits. The string must contain at least one digit in either the integer - # or the fraction. The number formed by the sign, the integer and the - # fraction is referred to as the significand. - # - # The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) - # followed by one or more decimal digits. - # - # Services **should** normalize decimal values before storing them by: - # - # - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - # - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - # - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - # - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). - # - # Services **may** perform additional normalization based on its own needs - # and the internal decimal implementation selected, such as shifting the - # decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). - # Additionally, services **may** preserve trailing zeroes in the fraction - # to indicate increased precision, but are not required to do so. - # - # Note that only the `.` character is supported to divide the integer - # and the fraction; `,` **should not** be supported regardless of locale. - # Additionally, thousand separators **should not** be supported. If a - # service does support them, values **must** be normalized. - # - # The ENBF grammar is: - # - # DecimalString = - # [Sign] Significand [Exponent]; - # - # Sign = '+' | '-'; - # - # Significand = - # Digits ['.'] [Digits] | [Digits] '.' Digits; - # - # Exponent = ('e' | 'E') [Sign] Digits; - # - # Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; - # - # Services **should** clearly document the range of supported values, the - # maximum supported precision (total number of digits), and, if applicable, - # the scale (number of digits after the decimal point), as well as how it - # behaves when receiving out-of-bounds values. - # - # Services **may** choose to accept values passed as input even when the - # value has a higher precision or scale than the service supports, and - # **should** round the value to fit the supported scale. Alternatively, the - # service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) - # if precision would be lost. - # - # Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in - # gRPC) if the service receives a value outside of the supported range. - class Decimal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb deleted file mode 100644 index be516f6e23c9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/money.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents an amount of money with its currency type. - # @!attribute [rw] currency_code - # @return [::String] - # The three-letter currency code defined in ISO 4217. - # @!attribute [rw] units - # @return [::Integer] - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # @!attribute [rw] nanos - # @return [::Integer] - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - class Money - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb deleted file mode 100644 index dfe0d90cc9e8..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/proto_docs/google/type/postal_address.rb +++ /dev/null @@ -1,135 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a postal address, e.g. for postal delivery or payments addresses. - # Given a postal address, a postal service can deliver items to a premise, P.O. - # Box or similar. - # It is not intended to model geographical locations (roads, towns, - # mountains). - # - # In typical usage an address would be created via user input or from importing - # existing data, depending on the type of process. - # - # Advice on address input / editing: - # - Use an i18n-ready address widget such as - # https://github.com/google/libaddressinput) - # - Users should not be presented with UI elements for input or editing of - # fields outside countries where that field is used. - # - # For more guidance on how to use this schema, please see: - # https://support.google.com/business/answer/6397478 - # @!attribute [rw] revision - # @return [::Integer] - # The schema revision of the `PostalAddress`. This must be set to 0, which is - # the latest revision. - # - # All new revisions **must** be backward compatible with old revisions. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the country/region of the address. This - # is never inferred and it is up to the user to ensure the value is - # correct. See http://cldr.unicode.org/ and - # http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html - # for details. Example: "CH" for Switzerland. - # @!attribute [rw] language_code - # @return [::String] - # Optional. BCP-47 language code of the contents of this address (if - # known). This is often the UI language of the input form or is expected - # to match one of the languages used in the address' country/region, or their - # transliterated equivalents. - # This can affect formatting in certain countries, but is not critical - # to the correctness of the data and will never affect any validation or - # other non-formatting related operations. - # - # If this value is not known, it should be omitted (rather than specifying a - # possibly incorrect default). - # - # Examples: "zh-Hant", "ja", "ja-Latn", "en". - # @!attribute [rw] postal_code - # @return [::String] - # Optional. Postal code of the address. Not all countries use or require - # postal codes to be present, but where they are used, they may trigger - # additional validation with other parts of the address (e.g. state/zip - # validation in the U.S.A.). - # @!attribute [rw] sorting_code - # @return [::String] - # Optional. Additional, country-specific, sorting code. This is not used - # in most regions. Where it is used, the value is either a string like - # "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number - # alone, representing the "sector code" (Jamaica), "delivery area indicator" - # (Malawi) or "post office indicator" (e.g. CĂ´te d'Ivoire). - # @!attribute [rw] administrative_area - # @return [::String] - # Optional. Highest administrative subdivision which is used for postal - # addresses of a country or region. - # For example, this can be a state, a province, an oblast, or a prefecture. - # Specifically, for Spain this is the province and not the autonomous - # community (e.g. "Barcelona" and not "Catalonia"). - # Many countries don't use an administrative area in postal addresses. E.g. - # in Switzerland this should be left unpopulated. - # @!attribute [rw] locality - # @return [::String] - # Optional. Generally refers to the city/town portion of the address. - # Examples: US city, IT comune, UK post town. - # In regions of the world where localities are not well defined or do not fit - # into this structure well, leave locality empty and use address_lines. - # @!attribute [rw] sublocality - # @return [::String] - # Optional. Sublocality of the address. - # For example, this can be neighborhoods, boroughs, districts. - # @!attribute [rw] address_lines - # @return [::Array<::String>] - # Unstructured address lines describing the lower levels of an address. - # - # Because values in address_lines do not have type information and may - # sometimes contain multiple values in a single field (e.g. - # "Austin, TX"), it is important that the line order is clear. The order of - # address lines should be "envelope order" for the country/region of the - # address. In places where this can vary (e.g. Japan), address_language is - # used to make it explicit (e.g. "ja" for large-to-small ordering and - # "ja-Latn" or "en" for small-to-large). This way, the most specific line of - # an address can be selected based on the language. - # - # The minimum permitted structural representation of an address consists - # of a region_code with all remaining information placed in the - # address_lines. It would be possible to format such an address very - # approximately without geocoding, but no semantic reasoning could be - # made about any of the address components until it was at least - # partially resolved. - # - # Creating an address only containing a region_code and address_lines, and - # then geocoding is the recommended way to handle completely unstructured - # addresses (as opposed to guessing which parts of the address should be - # localities or administrative areas). - # @!attribute [rw] recipients - # @return [::Array<::String>] - # Optional. The recipient at the address. - # This field may, under certain circumstances, contain multiline information. - # For example, it might contain "care of" information. - # @!attribute [rw] organization - # @return [::String] - # Optional. The name of the organization at the address. - class PostalAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile deleted file mode 100644 index 2eb7c301c33d..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-channel-v1", path: "../" -else - gem "google-cloud-channel-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb deleted file mode 100644 index b07f42fe9174..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/fetch_report_results.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelReportsService_FetchReportResults_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the fetch_report_results call in the CloudChannelReportsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results. -# -def fetch_report_results - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new - - # Call the fetch_report_results method. - result = client.fetch_report_results request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Row. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelReportsService_FetchReportResults_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb deleted file mode 100644 index 2a67946a2ca5..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/list_reports.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelReportsService_ListReports_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_reports call in the CloudChannelReportsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports. -# -def list_reports - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListReportsRequest.new - - # Call the list_reports method. - result = client.list_reports request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Report. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelReportsService_ListReports_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb deleted file mode 100644 index 5f6e00893014..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_reports_service/run_report_job.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelReportsService_RunReportJob_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the run_report_job call in the CloudChannelReportsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job. -# -def run_report_job - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::RunReportJobRequest.new - - # Call the run_report_job method. - result = client.run_report_job request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelReportsService_RunReportJob_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb deleted file mode 100644 index dc1b9d5debf4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/activate_entitlement.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the activate_entitlement call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement. -# -def activate_entitlement - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new - - # Call the activate_entitlement method. - result = client.activate_entitlement request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb deleted file mode 100644 index 91b448b5c99b..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/cancel_entitlement.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the cancel_entitlement call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement. -# -def cancel_entitlement - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new - - # Call the cancel_entitlement method. - result = client.cancel_entitlement request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb deleted file mode 100644 index 6576645247fc..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_offer.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the change_offer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer. -# -def change_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ChangeOfferRequest.new - - # Call the change_offer method. - result = client.change_offer request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb deleted file mode 100644 index 6e38f1239391..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_parameters.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the change_parameters call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters. -# -def change_parameters - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ChangeParametersRequest.new - - # Call the change_parameters method. - result = client.change_parameters request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb deleted file mode 100644 index 13fafc37ac61..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/change_renewal_settings.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the change_renewal_settings call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings. -# -def change_renewal_settings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new - - # Call the change_renewal_settings method. - result = client.change_renewal_settings request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb deleted file mode 100644 index 8371817b886e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/check_cloud_identity_accounts_exist.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the check_cloud_identity_accounts_exist call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist. -# -def check_cloud_identity_accounts_exist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new - - # Call the check_cloud_identity_accounts_exist method. - result = client.check_cloud_identity_accounts_exist request - - # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb deleted file mode 100644 index 7e0d35383c19..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the create_channel_partner_link call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link. -# -def create_channel_partner_link - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new - - # Call the create_channel_partner_link method. - result = client.create_channel_partner_link request - - # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb deleted file mode 100644 index b33b20d2e9e2..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_channel_partner_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the create_channel_partner_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config. -# -def create_channel_partner_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new - - # Call the create_channel_partner_repricing_config method. - result = client.create_channel_partner_repricing_config request - - # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb deleted file mode 100644 index c5a8259419a8..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the create_customer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer. -# -def create_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CreateCustomerRequest.new - - # Call the create_customer method. - result = client.create_customer request - - # The returned object is of type Google::Cloud::Channel::V1::Customer. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb deleted file mode 100644 index a0040d963608..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_customer_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the create_customer_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config. -# -def create_customer_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new - - # Call the create_customer_repricing_config method. - result = client.create_customer_repricing_config request - - # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb deleted file mode 100644 index 3858b6e489e4..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/create_entitlement.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the create_entitlement call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement. -# -def create_entitlement - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new - - # Call the create_entitlement method. - result = client.create_entitlement request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb deleted file mode 100644 index 37d0dd8bfd77..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_channel_partner_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the delete_channel_partner_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#delete_channel_partner_repricing_config. -# -def delete_channel_partner_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new - - # Call the delete_channel_partner_repricing_config method. - result = client.delete_channel_partner_repricing_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb deleted file mode 100644 index 5751b35ad0c8..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the delete_customer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer. -# -def delete_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new - - # Call the delete_customer method. - result = client.delete_customer request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb deleted file mode 100644 index ba8ccab82cfd..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/delete_customer_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the delete_customer_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config. -# -def delete_customer_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new - - # Call the delete_customer_repricing_config method. - result = client.delete_customer_repricing_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb deleted file mode 100644 index 75d2e5ab59c5..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the get_channel_partner_link call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link. -# -def get_channel_partner_link - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new - - # Call the get_channel_partner_link method. - result = client.get_channel_partner_link request - - # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb deleted file mode 100644 index 1af310ea9b71..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_channel_partner_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the get_channel_partner_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config. -# -def get_channel_partner_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new - - # Call the get_channel_partner_repricing_config method. - result = client.get_channel_partner_repricing_config request - - # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb deleted file mode 100644 index 5d4e74682141..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the get_customer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer. -# -def get_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::GetCustomerRequest.new - - # Call the get_customer method. - result = client.get_customer request - - # The returned object is of type Google::Cloud::Channel::V1::Customer. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb deleted file mode 100644 index a9c2b4fafa78..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_customer_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the get_customer_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config. -# -def get_customer_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new - - # Call the get_customer_repricing_config method. - result = client.get_customer_repricing_config request - - # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb deleted file mode 100644 index 03b72468c556..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/get_entitlement.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the get_entitlement call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement. -# -def get_entitlement - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::GetEntitlementRequest.new - - # Call the get_entitlement method. - result = client.get_entitlement request - - # The returned object is of type Google::Cloud::Channel::V1::Entitlement. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb deleted file mode 100644 index c50b3b9212ea..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/import_customer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the import_customer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer. -# -def import_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ImportCustomerRequest.new - - # Call the import_customer method. - result = client.import_customer request - - # The returned object is of type Google::Cloud::Channel::V1::Customer. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb deleted file mode 100644 index 0a35f7a1109a..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_links.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_channel_partner_links call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links. -# -def list_channel_partner_links - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new - - # Call the list_channel_partner_links method. - result = client.list_channel_partner_links request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb deleted file mode 100644 index 2da049657129..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_channel_partner_repricing_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_channel_partner_repricing_configs call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs. -# -def list_channel_partner_repricing_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new - - # Call the list_channel_partner_repricing_configs method. - result = client.list_channel_partner_repricing_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb deleted file mode 100644 index 86bb6f9e0cc0..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customer_repricing_configs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_customer_repricing_configs call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs. -# -def list_customer_repricing_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new - - # Call the list_customer_repricing_configs method. - result = client.list_customer_repricing_configs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::CustomerRepricingConfig. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb deleted file mode 100644 index c2173646667f..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_customers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_customers call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers. -# -def list_customers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListCustomersRequest.new - - # Call the list_customers method. - result = client.list_customers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Customer. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb deleted file mode 100644 index 6bc86aad2dd9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlement_changes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_entitlement_changes call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes. -# -def list_entitlement_changes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new - - # Call the list_entitlement_changes method. - result = client.list_entitlement_changes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::EntitlementChange. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb deleted file mode 100644 index 957c8c8cbf53..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_entitlements.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_entitlements call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements. -# -def list_entitlements - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new - - # Call the list_entitlements method. - result = client.list_entitlements request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Entitlement. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb deleted file mode 100644 index 5204795d3218..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_offers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListOffers_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_offers call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_offers. -# -def list_offers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListOffersRequest.new - - # Call the list_offers method. - result = client.list_offers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Offer. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListOffers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb deleted file mode 100644 index 588acada53df..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_products.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListProducts_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_products call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_products. -# -def list_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListProductsRequest.new - - # Call the list_products method. - result = client.list_products request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Product. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListProducts_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb deleted file mode 100644 index bda94c36fac9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_offers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_purchasable_offers call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_offers. -# -def list_purchasable_offers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new - - # Call the list_purchasable_offers method. - result = client.list_purchasable_offers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb deleted file mode 100644 index 821d3c24e509..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_purchasable_skus.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_purchasable_skus call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_skus. -# -def list_purchasable_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new - - # Call the list_purchasable_skus method. - result = client.list_purchasable_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb deleted file mode 100644 index 81fcfebe766e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_group_billable_skus.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_sku_group_billable_skus call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus. -# -def list_sku_group_billable_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new - - # Call the list_sku_group_billable_skus method. - result = client.list_sku_group_billable_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::BillableSku. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb deleted file mode 100644 index fb6b93c80b31..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_sku_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_sku_groups call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups. -# -def list_sku_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListSkuGroupsRequest.new - - # Call the list_sku_groups method. - result = client.list_sku_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::SkuGroup. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb deleted file mode 100644 index 822857b8801c..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_skus.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListSkus_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_skus call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_skus. -# -def list_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListSkusRequest.new - - # Call the list_skus method. - result = client.list_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::Sku. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb deleted file mode 100644 index 70df63c5de18..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_subscribers.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_subscribers call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_subscribers. -# -def list_subscribers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListSubscribersRequest.new - - # Call the list_subscribers method. - result = client.list_subscribers request - - # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb deleted file mode 100644 index f211b7c25106..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_offers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_transferable_offers call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers. -# -def list_transferable_offers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new - - # Call the list_transferable_offers method. - result = client.list_transferable_offers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb deleted file mode 100644 index 10340e9ec63e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/list_transferable_skus.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the list_transferable_skus call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus. -# -def list_transferable_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new - - # Call the list_transferable_skus method. - result = client.list_transferable_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku. - p item - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb deleted file mode 100644 index 89e70c127343..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/lookup_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the lookup_offer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#lookup_offer. -# -def lookup_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::LookupOfferRequest.new - - # Call the lookup_offer method. - result = client.lookup_offer request - - # The returned object is of type Google::Cloud::Channel::V1::Offer. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb deleted file mode 100644 index 5e00d0520f14..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/provision_cloud_identity.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the provision_cloud_identity call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity. -# -def provision_cloud_identity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new - - # Call the provision_cloud_identity method. - result = client.provision_cloud_identity request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb deleted file mode 100644 index 4845c73a460a..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/query_eligible_billing_accounts.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_QueryEligibleBillingAccounts_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the query_eligible_billing_accounts call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#query_eligible_billing_accounts. -# -def query_eligible_billing_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new - - # Call the query_eligible_billing_accounts method. - result = client.query_eligible_billing_accounts request - - # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_QueryEligibleBillingAccounts_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb deleted file mode 100644 index c649311cdffa..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/register_subscriber.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the register_subscriber call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#register_subscriber. -# -def register_subscriber - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new - - # Call the register_subscriber method. - result = client.register_subscriber request - - # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb deleted file mode 100644 index 8ee4db7604d9..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/start_paid_service.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the start_paid_service call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service. -# -def start_paid_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new - - # Call the start_paid_service method. - result = client.start_paid_service request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb deleted file mode 100644 index 20fda879155e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/suspend_entitlement.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the suspend_entitlement call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement. -# -def suspend_entitlement - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new - - # Call the suspend_entitlement method. - result = client.suspend_entitlement request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb deleted file mode 100644 index 50b4022092fe..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the transfer_entitlements call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements. -# -def transfer_entitlements - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new - - # Call the transfer_entitlements method. - result = client.transfer_entitlements request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb deleted file mode 100644 index 15c557cbc05e..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/transfer_entitlements_to_google.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the transfer_entitlements_to_google call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google. -# -def transfer_entitlements_to_google - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new - - # Call the transfer_entitlements_to_google method. - result = client.transfer_entitlements_to_google request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb deleted file mode 100644 index aac13d016f1d..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/unregister_subscriber.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the unregister_subscriber call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#unregister_subscriber. -# -def unregister_subscriber - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new - - # Call the unregister_subscriber method. - result = client.unregister_subscriber request - - # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb deleted file mode 100644 index cd321b64caef..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_link.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the update_channel_partner_link call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link. -# -def update_channel_partner_link - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new - - # Call the update_channel_partner_link method. - result = client.update_channel_partner_link request - - # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb deleted file mode 100644 index ecd09d85f4e1..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_channel_partner_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the update_channel_partner_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config. -# -def update_channel_partner_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new - - # Call the update_channel_partner_repricing_config method. - result = client.update_channel_partner_repricing_config request - - # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb deleted file mode 100644 index a303659a9dfd..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the update_customer call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer. -# -def update_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new - - # Call the update_customer method. - result = client.update_customer request - - # The returned object is of type Google::Cloud::Channel::V1::Customer. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb b/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb deleted file mode 100644 index e1eda9dcebc2..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/cloud_channel_service/update_customer_repricing_config.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync] -require "google/cloud/channel/v1" - -## -# Snippet for the update_customer_repricing_config call in the CloudChannelService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config. -# -def update_customer_repricing_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Channel::V1::CloudChannelService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new - - # Call the update_customer_repricing_config method. - result = client.update_customer_repricing_config request - - # The returned object is of type Google::Cloud::Channel::V1::CustomerRepricingConfig. - p result -end -# [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync] diff --git a/owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json b/owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json deleted file mode 100644 index d53beb97d051..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/snippets/snippet_metadata_google.cloud.channel.v1.json +++ /dev/null @@ -1,2095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-channel-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.channel.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudchannel_v1_generated_CloudChannelReportsService_RunReportJob_sync", - "title": "Snippet for the run_report_job call in the CloudChannelReportsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job.", - "file": "cloud_channel_reports_service/run_report_job.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_report_job", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#run_report_job", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::RunReportJobRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelReportsService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client" - }, - "method": { - "short_name": "RunReportJob", - "full_name": "google.cloud.channel.v1.CloudChannelReportsService.RunReportJob", - "service": { - "short_name": "CloudChannelReportsService", - "full_name": "google.cloud.channel.v1.CloudChannelReportsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelReportsService_FetchReportResults_sync", - "title": "Snippet for the fetch_report_results call in the CloudChannelReportsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results.", - "file": "cloud_channel_reports_service/fetch_report_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_report_results", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#fetch_report_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::FetchReportResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::FetchReportResultsResponse", - "client": { - "short_name": "CloudChannelReportsService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client" - }, - "method": { - "short_name": "FetchReportResults", - "full_name": "google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults", - "service": { - "short_name": "CloudChannelReportsService", - "full_name": "google.cloud.channel.v1.CloudChannelReportsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelReportsService_ListReports_sync", - "title": "Snippet for the list_reports call in the CloudChannelReportsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports.", - "file": "cloud_channel_reports_service/list_reports.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reports", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client#list_reports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListReportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListReportsResponse", - "client": { - "short_name": "CloudChannelReportsService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelReportsService::Client" - }, - "method": { - "short_name": "ListReports", - "full_name": "google.cloud.channel.v1.CloudChannelReportsService.ListReports", - "service": { - "short_name": "CloudChannelReportsService", - "full_name": "google.cloud.channel.v1.CloudChannelReportsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync", - "title": "Snippet for the list_customers call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers.", - "file": "cloud_channel_service/list_customers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_customers", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListCustomersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListCustomersResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListCustomers", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListCustomers", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync", - "title": "Snippet for the get_customer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer.", - "file": "cloud_channel_service/get_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_customer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::GetCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::Customer", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "GetCustomer", - "full_name": "google.cloud.channel.v1.CloudChannelService.GetCustomer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync", - "title": "Snippet for the check_cloud_identity_accounts_exist call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist.", - "file": "cloud_channel_service/check_cloud_identity_accounts_exist.rb", - "language": "RUBY", - "client_method": { - "short_name": "check_cloud_identity_accounts_exist", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#check_cloud_identity_accounts_exist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CheckCloudIdentityAccountsExist", - "full_name": "google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync", - "title": "Snippet for the create_customer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer.", - "file": "cloud_channel_service/create_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_customer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CreateCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::Customer", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CreateCustomer", - "full_name": "google.cloud.channel.v1.CloudChannelService.CreateCustomer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync", - "title": "Snippet for the update_customer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer.", - "file": "cloud_channel_service/update_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_customer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::UpdateCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::Customer", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "UpdateCustomer", - "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateCustomer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync", - "title": "Snippet for the delete_customer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer.", - "file": "cloud_channel_service/delete_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_customer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::DeleteCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "DeleteCustomer", - "full_name": "google.cloud.channel.v1.CloudChannelService.DeleteCustomer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ImportCustomer_sync", - "title": "Snippet for the import_customer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer.", - "file": "cloud_channel_service/import_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_customer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#import_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ImportCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::Customer", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ImportCustomer", - "full_name": "google.cloud.channel.v1.CloudChannelService.ImportCustomer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync", - "title": "Snippet for the provision_cloud_identity call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity.", - "file": "cloud_channel_service/provision_cloud_identity.rb", - "language": "RUBY", - "client_method": { - "short_name": "provision_cloud_identity", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#provision_cloud_identity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ProvisionCloudIdentity", - "full_name": "google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync", - "title": "Snippet for the list_entitlements call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements.", - "file": "cloud_channel_service/list_entitlements.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entitlements", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlements", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListEntitlementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListEntitlementsResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListEntitlements", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListEntitlements", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync", - "title": "Snippet for the list_transferable_skus call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus.", - "file": "cloud_channel_service/list_transferable_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transferable_skus", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListTransferableSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListTransferableSkusResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListTransferableSkus", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListTransferableSkus", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync", - "title": "Snippet for the list_transferable_offers call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers.", - "file": "cloud_channel_service/list_transferable_offers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transferable_offers", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_transferable_offers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListTransferableOffersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListTransferableOffersResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListTransferableOffers", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListTransferableOffers", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync", - "title": "Snippet for the get_entitlement call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement.", - "file": "cloud_channel_service/get_entitlement.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_entitlement", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_entitlement", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::GetEntitlementRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::Entitlement", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "GetEntitlement", - "full_name": "google.cloud.channel.v1.CloudChannelService.GetEntitlement", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync", - "title": "Snippet for the create_entitlement call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement.", - "file": "cloud_channel_service/create_entitlement.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_entitlement", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_entitlement", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CreateEntitlementRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CreateEntitlement", - "full_name": "google.cloud.channel.v1.CloudChannelService.CreateEntitlement", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync", - "title": "Snippet for the change_parameters call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters.", - "file": "cloud_channel_service/change_parameters.rb", - "language": "RUBY", - "client_method": { - "short_name": "change_parameters", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#change_parameters", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ChangeParametersRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ChangeParameters", - "full_name": "google.cloud.channel.v1.CloudChannelService.ChangeParameters", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync", - "title": "Snippet for the change_renewal_settings call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings.", - "file": "cloud_channel_service/change_renewal_settings.rb", - "language": "RUBY", - "client_method": { - "short_name": "change_renewal_settings", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#change_renewal_settings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ChangeRenewalSettings", - "full_name": "google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync", - "title": "Snippet for the change_offer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer.", - "file": "cloud_channel_service/change_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "change_offer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#change_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ChangeOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ChangeOffer", - "full_name": "google.cloud.channel.v1.CloudChannelService.ChangeOffer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync", - "title": "Snippet for the start_paid_service call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service.", - "file": "cloud_channel_service/start_paid_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_paid_service", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#start_paid_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::StartPaidServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "StartPaidService", - "full_name": "google.cloud.channel.v1.CloudChannelService.StartPaidService", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync", - "title": "Snippet for the suspend_entitlement call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement.", - "file": "cloud_channel_service/suspend_entitlement.rb", - "language": "RUBY", - "client_method": { - "short_name": "suspend_entitlement", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#suspend_entitlement", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::SuspendEntitlementRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "SuspendEntitlement", - "full_name": "google.cloud.channel.v1.CloudChannelService.SuspendEntitlement", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync", - "title": "Snippet for the cancel_entitlement call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement.", - "file": "cloud_channel_service/cancel_entitlement.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_entitlement", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#cancel_entitlement", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CancelEntitlementRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CancelEntitlement", - "full_name": "google.cloud.channel.v1.CloudChannelService.CancelEntitlement", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync", - "title": "Snippet for the activate_entitlement call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement.", - "file": "cloud_channel_service/activate_entitlement.rb", - "language": "RUBY", - "client_method": { - "short_name": "activate_entitlement", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#activate_entitlement", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ActivateEntitlementRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ActivateEntitlement", - "full_name": "google.cloud.channel.v1.CloudChannelService.ActivateEntitlement", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync", - "title": "Snippet for the transfer_entitlements call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements.", - "file": "cloud_channel_service/transfer_entitlements.rb", - "language": "RUBY", - "client_method": { - "short_name": "transfer_entitlements", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::TransferEntitlementsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "TransferEntitlements", - "full_name": "google.cloud.channel.v1.CloudChannelService.TransferEntitlements", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync", - "title": "Snippet for the transfer_entitlements_to_google call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google.", - "file": "cloud_channel_service/transfer_entitlements_to_google.rb", - "language": "RUBY", - "client_method": { - "short_name": "transfer_entitlements_to_google", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#transfer_entitlements_to_google", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "TransferEntitlementsToGoogle", - "full_name": "google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync", - "title": "Snippet for the list_channel_partner_links call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links.", - "file": "cloud_channel_service/list_channel_partner_links.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_channel_partner_links", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_links", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListChannelPartnerLinks", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync", - "title": "Snippet for the get_channel_partner_link call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link.", - "file": "cloud_channel_service/get_channel_partner_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_channel_partner_link", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerLink", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "GetChannelPartnerLink", - "full_name": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync", - "title": "Snippet for the create_channel_partner_link call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link.", - "file": "cloud_channel_service/create_channel_partner_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_channel_partner_link", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerLink", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CreateChannelPartnerLink", - "full_name": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync", - "title": "Snippet for the update_channel_partner_link call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link.", - "file": "cloud_channel_service/update_channel_partner_link.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_channel_partner_link", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_link", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerLink", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "UpdateChannelPartnerLink", - "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetCustomerRepricingConfig_sync", - "title": "Snippet for the get_customer_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config.", - "file": "cloud_channel_service/get_customer_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_customer_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_customer_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::CustomerRepricingConfig", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "GetCustomerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.GetCustomerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_sync", - "title": "Snippet for the list_customer_repricing_configs call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs.", - "file": "cloud_channel_service/list_customer_repricing_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_customer_repricing_configs", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_customer_repricing_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListCustomerRepricingConfigs", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateCustomerRepricingConfig_sync", - "title": "Snippet for the create_customer_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config.", - "file": "cloud_channel_service/create_customer_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_customer_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_customer_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::CustomerRepricingConfig", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CreateCustomerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateCustomerRepricingConfig_sync", - "title": "Snippet for the update_customer_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config.", - "file": "cloud_channel_service/update_customer_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_customer_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_customer_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::CustomerRepricingConfig", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "UpdateCustomerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateCustomerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_DeleteCustomerRepricingConfig_sync", - "title": "Snippet for the delete_customer_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config.", - "file": "cloud_channel_service/delete_customer_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_customer_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_customer_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "DeleteCustomerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.DeleteCustomerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerRepricingConfig_sync", - "title": "Snippet for the get_channel_partner_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config.", - "file": "cloud_channel_service/get_channel_partner_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_channel_partner_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#get_channel_partner_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "GetChannelPartnerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.GetChannelPartnerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_sync", - "title": "Snippet for the list_channel_partner_repricing_configs call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs.", - "file": "cloud_channel_service/list_channel_partner_repricing_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_channel_partner_repricing_configs", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_channel_partner_repricing_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListChannelPartnerRepricingConfigs", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerRepricingConfig_sync", - "title": "Snippet for the create_channel_partner_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config.", - "file": "cloud_channel_service/create_channel_partner_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_channel_partner_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#create_channel_partner_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "CreateChannelPartnerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerRepricingConfig_sync", - "title": "Snippet for the update_channel_partner_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config.", - "file": "cloud_channel_service/update_channel_partner_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_channel_partner_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#update_channel_partner_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "UpdateChannelPartnerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_DeleteChannelPartnerRepricingConfig_sync", - "title": "Snippet for the delete_channel_partner_repricing_config call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#delete_channel_partner_repricing_config.", - "file": "cloud_channel_service/delete_channel_partner_repricing_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_channel_partner_repricing_config", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#delete_channel_partner_repricing_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "DeleteChannelPartnerRepricingConfig", - "full_name": "google.cloud.channel.v1.CloudChannelService.DeleteChannelPartnerRepricingConfig", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync", - "title": "Snippet for the list_sku_groups call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups.", - "file": "cloud_channel_service/list_sku_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sku_groups", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListSkuGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListSkuGroupsResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListSkuGroups", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListSkuGroups", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync", - "title": "Snippet for the list_sku_group_billable_skus call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus.", - "file": "cloud_channel_service/list_sku_group_billable_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sku_group_billable_skus", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_sku_group_billable_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListSkuGroupBillableSkus", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_LookupOffer_sync", - "title": "Snippet for the lookup_offer call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#lookup_offer.", - "file": "cloud_channel_service/lookup_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_offer", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#lookup_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::LookupOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::Offer", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "LookupOffer", - "full_name": "google.cloud.channel.v1.CloudChannelService.LookupOffer", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListProducts_sync", - "title": "Snippet for the list_products call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_products.", - "file": "cloud_channel_service/list_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_products", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_products", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListProductsResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListProducts", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListProducts", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSkus_sync", - "title": "Snippet for the list_skus call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_skus.", - "file": "cloud_channel_service/list_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_skus", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListSkusResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListSkus", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListSkus", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListOffers_sync", - "title": "Snippet for the list_offers call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_offers.", - "file": "cloud_channel_service/list_offers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_offers", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_offers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListOffersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListOffersResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListOffers", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListOffers", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync", - "title": "Snippet for the list_purchasable_skus call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_skus.", - "file": "cloud_channel_service/list_purchasable_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_purchasable_skus", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListPurchasableSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListPurchasableSkusResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListPurchasableSkus", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListPurchasableSkus", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync", - "title": "Snippet for the list_purchasable_offers call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_offers.", - "file": "cloud_channel_service/list_purchasable_offers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_purchasable_offers", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_purchasable_offers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListPurchasableOffersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListPurchasableOffersResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListPurchasableOffers", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListPurchasableOffers", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_QueryEligibleBillingAccounts_sync", - "title": "Snippet for the query_eligible_billing_accounts call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#query_eligible_billing_accounts.", - "file": "cloud_channel_service/query_eligible_billing_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_eligible_billing_accounts", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#query_eligible_billing_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "QueryEligibleBillingAccounts", - "full_name": "google.cloud.channel.v1.CloudChannelService.QueryEligibleBillingAccounts", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync", - "title": "Snippet for the register_subscriber call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#register_subscriber.", - "file": "cloud_channel_service/register_subscriber.rb", - "language": "RUBY", - "client_method": { - "short_name": "register_subscriber", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#register_subscriber", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::RegisterSubscriberRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::RegisterSubscriberResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "RegisterSubscriber", - "full_name": "google.cloud.channel.v1.CloudChannelService.RegisterSubscriber", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync", - "title": "Snippet for the unregister_subscriber call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#unregister_subscriber.", - "file": "cloud_channel_service/unregister_subscriber.rb", - "language": "RUBY", - "client_method": { - "short_name": "unregister_subscriber", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#unregister_subscriber", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::UnregisterSubscriberRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::UnregisterSubscriberResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "UnregisterSubscriber", - "full_name": "google.cloud.channel.v1.CloudChannelService.UnregisterSubscriber", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync", - "title": "Snippet for the list_subscribers call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_subscribers.", - "file": "cloud_channel_service/list_subscribers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_subscribers", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_subscribers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListSubscribersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListSubscribersResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListSubscribers", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListSubscribers", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync", - "title": "Snippet for the list_entitlement_changes call in the CloudChannelService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes.", - "file": "cloud_channel_service/list_entitlement_changes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_entitlement_changes", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client#list_entitlement_changes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Channel::V1::ListEntitlementChangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Channel::V1::ListEntitlementChangesResponse", - "client": { - "short_name": "CloudChannelService::Client", - "full_name": "::Google::Cloud::Channel::V1::CloudChannelService::Client" - }, - "method": { - "short_name": "ListEntitlementChanges", - "full_name": "google.cloud.channel.v1.CloudChannelService.ListEntitlementChanges", - "service": { - "short_name": "CloudChannelService", - "full_name": "google.cloud.channel.v1.CloudChannelService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb deleted file mode 100644 index 749086160fb1..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/channel/v1/reports_service_pb" -require "google/cloud/channel/v1/reports_service_services_pb" -require "google/cloud/channel/v1/cloud_channel_reports_service" - -class ::Google::Cloud::Channel::V1::CloudChannelReportsService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb deleted file mode 100644 index 03eb92091f3c..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/channel/v1/cloud_channel_reports_service" - -class ::Google::Cloud::Channel::V1::CloudChannelReportsService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_report_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.report_path account: "value0", report: "value1" - assert_equal "accounts/value0/reports/value1", path - end - end - - def test_report_job_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.report_job_path account: "value0", report_job: "value1" - assert_equal "accounts/value0/reportJobs/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb deleted file mode 100644 index 94d81e654a21..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_rest_test.rb +++ /dev/null @@ -1,270 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/channel/v1/reports_service_pb" -require "google/cloud/channel/v1/cloud_channel_reports_service/rest" - - -class ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_run_report_job - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - date_range = {} - filter = "hello world" - language_code = "hello world" - - run_report_job_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.stub :transcode_run_report_job_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_report_job_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_report_job name: name, date_range: date_range, filter: filter, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_report_job ::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_report_job(::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_report_job_client_stub.call_count - end - end - end - - def test_fetch_report_results - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::FetchReportResultsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - report_job = "hello world" - page_size = 42 - page_token = "hello world" - partition_keys = ["hello world"] - - fetch_report_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.stub :transcode_fetch_report_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_report_results_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_report_results report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_report_results ::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_report_results(::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_report_results_client_stub.call_count - end - end - end - - def test_list_reports - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListReportsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_reports_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::ServiceStub.stub :transcode_list_reports_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reports_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_reports parent: parent, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_reports ::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_reports(::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reports_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb deleted file mode 100644 index 04b4e342a4ab..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_reports_service_test.rb +++ /dev/null @@ -1,325 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/channel/v1/reports_service_pb" -require "google/cloud/channel/v1/cloud_channel_reports_service" - -class ::Google::Cloud::Channel::V1::CloudChannelReportsService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_run_report_job - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - date_range = {} - filter = "hello world" - language_code = "hello world" - - run_report_job_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_report_job, name - assert_kind_of ::Google::Cloud::Channel::V1::RunReportJobRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::DateRange), request["date_range"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_report_job_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_report_job name: name, date_range: date_range, filter: filter, language_code: language_code do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_report_job ::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_report_job({ name: name, date_range: date_range, filter: filter, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_report_job(::Google::Cloud::Channel::V1::RunReportJobRequest.new(name: name, date_range: date_range, filter: filter, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_report_job_client_stub.call_rpc_count - end - end - - def test_fetch_report_results - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::FetchReportResultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - report_job = "hello world" - page_size = 42 - page_token = "hello world" - partition_keys = ["hello world"] - - fetch_report_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_report_results, name - assert_kind_of ::Google::Cloud::Channel::V1::FetchReportResultsRequest, request - assert_equal "hello world", request["report_job"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal ["hello world"], request["partition_keys"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_report_results_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_report_results report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_report_results ::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_report_results({ report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_report_results(::Google::Cloud::Channel::V1::FetchReportResultsRequest.new(report_job: report_job, page_size: page_size, page_token: page_token, partition_keys: partition_keys), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_report_results_client_stub.call_rpc_count - end - end - - def test_list_reports - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListReportsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_reports_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reports, name - assert_kind_of ::Google::Cloud::Channel::V1::ListReportsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reports_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_reports parent: parent, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_reports ::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_reports({ parent: parent, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_reports(::Google::Cloud::Channel::V1::ListReportsRequest.new(parent: parent, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_reports_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelReportsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb deleted file mode 100644 index 272abbe14d29..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/channel/v1/service_pb" -require "google/cloud/channel/v1/service_services_pb" -require "google/cloud/channel/v1/cloud_channel_service" - -class ::Google::Cloud::Channel::V1::CloudChannelService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb deleted file mode 100644 index 15da96cff168..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_paths_test.rb +++ /dev/null @@ -1,151 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/channel/v1/cloud_channel_service" - -class ::Google::Cloud::Channel::V1::CloudChannelService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.account_path account: "value0" - assert_equal "accounts/value0", path - end - end - - def test_channel_partner_link_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.channel_partner_link_path account: "value0", channel_partner_link: "value1" - assert_equal "accounts/value0/channelPartnerLinks/value1", path - end - end - - def test_channel_partner_repricing_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.channel_partner_repricing_config_path account: "value0", channel_partner: "value1", channel_partner_repricing_config: "value2" - assert_equal "accounts/value0/channelPartnerLinks/value1/channelPartnerRepricingConfigs/value2", path - end - end - - def test_customer_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.customer_path account: "value0", customer: "value1" - assert_equal "accounts/value0/customers/value1", path - end - end - - def test_customer_repricing_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.customer_repricing_config_path account: "value0", customer: "value1", customer_repricing_config: "value2" - assert_equal "accounts/value0/customers/value1/customerRepricingConfigs/value2", path - end - end - - def test_entitlement_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.entitlement_path account: "value0", customer: "value1", entitlement: "value2" - assert_equal "accounts/value0/customers/value1/entitlements/value2", path - end - end - - def test_offer_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.offer_path account: "value0", offer: "value1" - assert_equal "accounts/value0/offers/value1", path - end - end - - def test_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_path product: "value0" - assert_equal "products/value0", path - end - end - - def test_sku_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.sku_group_path account: "value0", sku_group: "value1" - assert_equal "accounts/value0/skuGroups/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb deleted file mode 100644 index e0ae05730df2..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_rest_test.rb +++ /dev/null @@ -1,2845 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/channel/v1/service_pb" -require "google/cloud/channel/v1/cloud_channel_service/rest" - - -class ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_customers - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListCustomersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_customers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_customers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_customers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_customers parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_customers ::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_customers(::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_customers_client_stub.call_count - end - end - end - - def test_get_customer - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_customer({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_customer name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_customer ::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_customer({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_customer(::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_customer_client_stub.call_count - end - end - end - - def test_check_cloud_identity_accounts_exist - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - domain = "hello world" - primary_admin_email = "hello world" - - check_cloud_identity_accounts_exist_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_check_cloud_identity_accounts_exist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, check_cloud_identity_accounts_exist_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.check_cloud_identity_accounts_exist parent: parent, domain: domain, primary_admin_email: primary_admin_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.check_cloud_identity_accounts_exist ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.check_cloud_identity_accounts_exist(::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, check_cloud_identity_accounts_exist_client_stub.call_count - end - end - end - - def test_create_customer - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - customer = {} - - create_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_customer({ parent: parent, customer: customer }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_customer parent: parent, customer: customer do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_customer ::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_customer({ parent: parent, customer: customer }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_customer(::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_customer_client_stub.call_count - end - end - end - - def test_update_customer - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - customer = {} - update_mask = {} - - update_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_customer({ customer: customer, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_customer customer: customer, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_customer ::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_customer({ customer: customer, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_customer(::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_customer_client_stub.call_count - end - end - end - - def test_delete_customer - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_delete_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_customer({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_customer name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_customer ::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_customer({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_customer(::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_customer_client_stub.call_count - end - end - end - - def test_import_customer - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - domain = "hello world" - parent = "hello world" - auth_token = "hello world" - overwrite_if_exists = true - channel_partner_id = "hello world" - customer = "hello world" - - import_customer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_import_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_customer domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_customer ::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_customer(::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_customer_client_stub.call_count - end - end - end - - def test_provision_cloud_identity - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - customer = "hello world" - cloud_identity_info = {} - user = {} - validate_only = true - - provision_cloud_identity_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_provision_cloud_identity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, provision_cloud_identity_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.provision_cloud_identity customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.provision_cloud_identity ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.provision_cloud_identity(::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, provision_cloud_identity_client_stub.call_count - end - end - end - - def test_list_entitlements - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListEntitlementsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_entitlements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_entitlements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entitlements_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entitlements parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entitlements ::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entitlements(::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entitlements_client_stub.call_count - end - end - end - - def test_list_transferable_skus - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListTransferableSkusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - cloud_identity_id = "hello world" - parent = "hello world" - page_size = 42 - page_token = "hello world" - auth_token = "hello world" - language_code = "hello world" - - list_transferable_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_transferable_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transferable_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_transferable_skus cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_transferable_skus ::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_transferable_skus(::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transferable_skus_client_stub.call_count - end - end - end - - def test_list_transferable_offers - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListTransferableOffersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - cloud_identity_id = "hello world" - parent = "hello world" - page_size = 42 - page_token = "hello world" - sku = "hello world" - language_code = "hello world" - billing_account = "hello world" - - list_transferable_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_transferable_offers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transferable_offers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_transferable_offers cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_transferable_offers ::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_transferable_offers(::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transferable_offers_client_stub.call_count - end - end - end - - def test_get_entitlement - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::Entitlement.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_entitlement_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_entitlement({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_entitlement name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_entitlement ::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_entitlement({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_entitlement(::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_entitlement_client_stub.call_count - end - end - end - - def test_create_entitlement - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entitlement = {} - request_id = "hello world" - - create_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_entitlement_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_entitlement parent: parent, entitlement: entitlement, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_entitlement ::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_entitlement(::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_entitlement_client_stub.call_count - end - end - end - - def test_change_parameters - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parameters = [{}] - request_id = "hello world" - purchase_order_id = "hello world" - - change_parameters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_change_parameters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, change_parameters_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.change_parameters name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.change_parameters ::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.change_parameters(::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, change_parameters_client_stub.call_count - end - end - end - - def test_change_renewal_settings - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - renewal_settings = {} - request_id = "hello world" - - change_renewal_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_change_renewal_settings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, change_renewal_settings_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.change_renewal_settings name: name, renewal_settings: renewal_settings, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.change_renewal_settings ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.change_renewal_settings(::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, change_renewal_settings_client_stub.call_count - end - end - end - - def test_change_offer - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - offer = "hello world" - parameters = [{}] - purchase_order_id = "hello world" - request_id = "hello world" - billing_account = "hello world" - price_reference_id = "hello world" - - change_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_change_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, change_offer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, change_offer_client_stub.call_count - end - end - end - - def test_start_paid_service - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - start_paid_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_start_paid_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_paid_service_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_paid_service({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_paid_service name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_paid_service ::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_paid_service({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_paid_service(::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_paid_service_client_stub.call_count - end - end - end - - def test_suspend_entitlement - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - suspend_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_suspend_entitlement_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, suspend_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.suspend_entitlement({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.suspend_entitlement name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.suspend_entitlement ::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.suspend_entitlement({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.suspend_entitlement(::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, suspend_entitlement_client_stub.call_count - end - end - end - - def test_cancel_entitlement - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - cancel_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_cancel_entitlement_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_entitlement({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_entitlement name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_entitlement ::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_entitlement({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_entitlement(::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_entitlement_client_stub.call_count - end - end - end - - def test_activate_entitlement - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - activate_entitlement_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_activate_entitlement_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, activate_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.activate_entitlement({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.activate_entitlement name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.activate_entitlement ::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.activate_entitlement({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.activate_entitlement(::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, activate_entitlement_client_stub.call_count - end - end - end - - def test_transfer_entitlements - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entitlements = [{}] - auth_token = "hello world" - request_id = "hello world" - - transfer_entitlements_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_transfer_entitlements_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, transfer_entitlements_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.transfer_entitlements parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.transfer_entitlements ::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.transfer_entitlements(::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, transfer_entitlements_client_stub.call_count - end - end - end - - def test_transfer_entitlements_to_google - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entitlements = [{}] - request_id = "hello world" - - transfer_entitlements_to_google_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_transfer_entitlements_to_google_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, transfer_entitlements_to_google_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.transfer_entitlements_to_google parent: parent, entitlements: entitlements, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.transfer_entitlements_to_google ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.transfer_entitlements_to_google(::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, transfer_entitlements_to_google_client_stub.call_count - end - end - end - - def test_list_channel_partner_links - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :UNSPECIFIED - - list_channel_partner_links_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_channel_partner_links_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_channel_partner_links_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_channel_partner_links parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_channel_partner_links ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_channel_partner_links(::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_channel_partner_links_client_stub.call_count - end - end - end - - def test_get_channel_partner_link - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :UNSPECIFIED - - get_channel_partner_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_channel_partner_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_channel_partner_link_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_channel_partner_link({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_channel_partner_link name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_channel_partner_link ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_channel_partner_link({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_channel_partner_link(::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_channel_partner_link_client_stub.call_count - end - end - end - - def test_create_channel_partner_link - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - channel_partner_link = {} - - create_channel_partner_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_channel_partner_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_channel_partner_link_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_channel_partner_link parent: parent, channel_partner_link: channel_partner_link do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_channel_partner_link ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_channel_partner_link(::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_channel_partner_link_client_stub.call_count - end - end - end - - def test_update_channel_partner_link - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - channel_partner_link = {} - update_mask = {} - - update_channel_partner_link_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_channel_partner_link_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_channel_partner_link_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_channel_partner_link name: name, channel_partner_link: channel_partner_link, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_channel_partner_link ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_channel_partner_link(::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_channel_partner_link_client_stub.call_count - end - end - end - - def test_get_customer_repricing_config - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_customer_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_customer_repricing_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_customer_repricing_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_customer_repricing_config ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_customer_repricing_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_customer_repricing_config(::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_customer_repricing_config_client_stub.call_count - end - end - end - - def test_list_customer_repricing_configs - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_customer_repricing_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_customer_repricing_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_customer_repricing_configs_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_customer_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_customer_repricing_configs ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_customer_repricing_configs(::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_customer_repricing_configs_client_stub.call_count - end - end - end - - def test_create_customer_repricing_config - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - customer_repricing_config = {} - - create_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_customer_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_customer_repricing_config parent: parent, customer_repricing_config: customer_repricing_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_customer_repricing_config ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_customer_repricing_config(::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_customer_repricing_config_client_stub.call_count - end - end - end - - def test_update_customer_repricing_config - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - customer_repricing_config = {} - - update_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_customer_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_customer_repricing_config customer_repricing_config: customer_repricing_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_customer_repricing_config ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_customer_repricing_config(::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_customer_repricing_config_client_stub.call_count - end - end - end - - def test_delete_customer_repricing_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_customer_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_delete_customer_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_customer_repricing_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_customer_repricing_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_customer_repricing_config ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_customer_repricing_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_customer_repricing_config(::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_customer_repricing_config_client_stub.call_count - end - end - end - - def test_get_channel_partner_repricing_config - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_get_channel_partner_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_channel_partner_repricing_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_channel_partner_repricing_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_channel_partner_repricing_config ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_channel_partner_repricing_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_channel_partner_repricing_config(::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_channel_partner_repricing_config_client_stub.call_count - end - end - end - - def test_list_channel_partner_repricing_configs - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_channel_partner_repricing_configs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_channel_partner_repricing_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_channel_partner_repricing_configs_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_channel_partner_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_channel_partner_repricing_configs ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_channel_partner_repricing_configs(::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_channel_partner_repricing_configs_client_stub.call_count - end - end - end - - def test_create_channel_partner_repricing_config - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - channel_partner_repricing_config = {} - - create_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_create_channel_partner_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_channel_partner_repricing_config parent: parent, channel_partner_repricing_config: channel_partner_repricing_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_channel_partner_repricing_config ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_channel_partner_repricing_config(::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_channel_partner_repricing_config_client_stub.call_count - end - end - end - - def test_update_channel_partner_repricing_config - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - channel_partner_repricing_config = {} - - update_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_update_channel_partner_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_channel_partner_repricing_config channel_partner_repricing_config: channel_partner_repricing_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_channel_partner_repricing_config ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_channel_partner_repricing_config(::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_channel_partner_repricing_config_client_stub.call_count - end - end - end - - def test_delete_channel_partner_repricing_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_channel_partner_repricing_config_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_delete_channel_partner_repricing_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_channel_partner_repricing_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_channel_partner_repricing_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_channel_partner_repricing_config ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_channel_partner_repricing_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_channel_partner_repricing_config(::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_channel_partner_repricing_config_client_stub.call_count - end - end - end - - def test_list_sku_groups - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListSkuGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_sku_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_sku_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sku_groups_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_sku_groups ::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_sku_groups(::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sku_groups_client_stub.call_count - end - end - end - - def test_list_sku_group_billable_skus - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_sku_group_billable_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_sku_group_billable_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sku_group_billable_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_sku_group_billable_skus parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_sku_group_billable_skus ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_sku_group_billable_skus(::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sku_group_billable_skus_client_stub.call_count - end - end - end - - def test_lookup_offer - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::Offer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - entitlement = "hello world" - - lookup_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_lookup_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_offer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.lookup_offer({ entitlement: entitlement }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.lookup_offer entitlement: entitlement do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.lookup_offer ::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.lookup_offer({ entitlement: entitlement }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.lookup_offer(::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_offer_client_stub.call_count - end - end - end - - def test_list_products - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListProductsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_products_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_products_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_products account: account, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_products ::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_products(::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_products_client_stub.call_count - end - end - end - - def test_list_skus - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListSkusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_skus parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_skus ::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_skus(::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_skus_client_stub.call_count - end - end - end - - def test_list_offers - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListOffersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - language_code = "hello world" - show_future_offers = true - - list_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_offers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_offers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_offers ::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_offers(::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_offers_client_stub.call_count - end - end - end - - def test_list_purchasable_skus - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListPurchasableSkusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - create_entitlement_purchase = {} - customer = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_purchasable_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_purchasable_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_purchasable_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_purchasable_skus create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_purchasable_skus ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_purchasable_skus(::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_purchasable_skus_client_stub.call_count - end - end - end - - def test_list_purchasable_offers - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - create_entitlement_purchase = {} - customer = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_purchasable_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_purchasable_offers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_purchasable_offers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_purchasable_offers create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_purchasable_offers ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_purchasable_offers(::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_purchasable_offers_client_stub.call_count - end - end - end - - def test_query_eligible_billing_accounts - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - customer = "hello world" - skus = ["hello world"] - - query_eligible_billing_accounts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_query_eligible_billing_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_eligible_billing_accounts_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_eligible_billing_accounts({ customer: customer, skus: skus }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.query_eligible_billing_accounts customer: customer, skus: skus do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.query_eligible_billing_accounts ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.query_eligible_billing_accounts({ customer: customer, skus: skus }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.query_eligible_billing_accounts(::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, query_eligible_billing_accounts_client_stub.call_count - end - end - end - - def test_register_subscriber - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::RegisterSubscriberResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = "hello world" - service_account = "hello world" - integrator = "hello world" - - register_subscriber_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_register_subscriber_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, register_subscriber_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.register_subscriber account: account, service_account: service_account, integrator: integrator do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, register_subscriber_client_stub.call_count - end - end - end - - def test_unregister_subscriber - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = "hello world" - service_account = "hello world" - integrator = "hello world" - - unregister_subscriber_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_unregister_subscriber_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unregister_subscriber_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.unregister_subscriber account: account, service_account: service_account, integrator: integrator do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unregister_subscriber_client_stub.call_count - end - end - end - - def test_list_subscribers - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListSubscribersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - account = "hello world" - page_size = 42 - page_token = "hello world" - integrator = "hello world" - - list_subscribers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_subscribers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_subscribers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_subscribers account: account, page_size: page_size, page_token: page_token, integrator: integrator do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_subscribers_client_stub.call_count - end - end - end - - def test_list_entitlement_changes - # Create test objects. - client_result = ::Google::Cloud::Channel::V1::ListEntitlementChangesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entitlement_changes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Channel::V1::CloudChannelService::Rest::ServiceStub.stub :transcode_list_entitlement_changes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_entitlement_changes_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_entitlement_changes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_entitlement_changes ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_entitlement_changes(::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_entitlement_changes_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb b/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb deleted file mode 100644 index 4bf38e6781d5..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/google/cloud/channel/v1/cloud_channel_service_test.rb +++ /dev/null @@ -1,3298 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/channel/v1/service_pb" -require "google/cloud/channel/v1/cloud_channel_service" - -class ::Google::Cloud::Channel::V1::CloudChannelService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_customers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListCustomersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_customers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_customers, name - assert_kind_of ::Google::Cloud::Channel::V1::ListCustomersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_customers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_customers parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_customers ::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_customers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_customers(::Google::Cloud::Channel::V1::ListCustomersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_customers_client_stub.call_rpc_count - end - end - - def test_get_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::Customer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_customer, name - assert_kind_of ::Google::Cloud::Channel::V1::GetCustomerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_customer({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_customer name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_customer ::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_customer({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_customer(::Google::Cloud::Channel::V1::GetCustomerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_customer_client_stub.call_rpc_count - end - end - - def test_check_cloud_identity_accounts_exist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - domain = "hello world" - primary_admin_email = "hello world" - - check_cloud_identity_accounts_exist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :check_cloud_identity_accounts_exist, name - assert_kind_of ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["domain"] - assert_equal "hello world", request["primary_admin_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, check_cloud_identity_accounts_exist_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.check_cloud_identity_accounts_exist parent: parent, domain: domain, primary_admin_email: primary_admin_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.check_cloud_identity_accounts_exist ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.check_cloud_identity_accounts_exist({ parent: parent, domain: domain, primary_admin_email: primary_admin_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.check_cloud_identity_accounts_exist(::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new(parent: parent, domain: domain, primary_admin_email: primary_admin_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, check_cloud_identity_accounts_exist_client_stub.call_rpc_count - end - end - - def test_create_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::Customer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - customer = {} - - create_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_customer, name - assert_kind_of ::Google::Cloud::Channel::V1::CreateCustomerRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::Customer), request["customer"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_customer({ parent: parent, customer: customer }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_customer parent: parent, customer: customer do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_customer ::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_customer({ parent: parent, customer: customer }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_customer(::Google::Cloud::Channel::V1::CreateCustomerRequest.new(parent: parent, customer: customer), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_customer_client_stub.call_rpc_count - end - end - - def test_update_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::Customer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - customer = {} - update_mask = {} - - update_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_customer, name - assert_kind_of ::Google::Cloud::Channel::V1::UpdateCustomerRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::Customer), request["customer"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_customer({ customer: customer, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_customer customer: customer, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_customer ::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_customer({ customer: customer, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_customer(::Google::Cloud::Channel::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_customer_client_stub.call_rpc_count - end - end - - def test_delete_customer - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_customer, name - assert_kind_of ::Google::Cloud::Channel::V1::DeleteCustomerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_customer({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_customer name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_customer ::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_customer({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_customer(::Google::Cloud::Channel::V1::DeleteCustomerRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_customer_client_stub.call_rpc_count - end - end - - def test_import_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::Customer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - domain = "hello world" - parent = "hello world" - auth_token = "hello world" - overwrite_if_exists = true - channel_partner_id = "hello world" - customer = "hello world" - - import_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_customer, name - assert_kind_of ::Google::Cloud::Channel::V1::ImportCustomerRequest, request - assert_equal "hello world", request["domain"] - assert_equal :domain, request.customer_identity - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["auth_token"] - assert_equal true, request["overwrite_if_exists"] - assert_equal "hello world", request["channel_partner_id"] - assert_equal "hello world", request["customer"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_customer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_customer domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_customer ::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_customer({ domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_customer(::Google::Cloud::Channel::V1::ImportCustomerRequest.new(domain: domain, parent: parent, auth_token: auth_token, overwrite_if_exists: overwrite_if_exists, channel_partner_id: channel_partner_id, customer: customer), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_customer_client_stub.call_rpc_count - end - end - - def test_provision_cloud_identity - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - customer = "hello world" - cloud_identity_info = {} - user = {} - validate_only = true - - provision_cloud_identity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :provision_cloud_identity, name - assert_kind_of ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest, request - assert_equal "hello world", request["customer"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::CloudIdentityInfo), request["cloud_identity_info"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::AdminUser), request["user"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, provision_cloud_identity_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.provision_cloud_identity customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.provision_cloud_identity ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.provision_cloud_identity({ customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.provision_cloud_identity(::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new(customer: customer, cloud_identity_info: cloud_identity_info, user: user, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, provision_cloud_identity_client_stub.call_rpc_count - end - end - - def test_list_entitlements - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListEntitlementsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_entitlements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entitlements, name - assert_kind_of ::Google::Cloud::Channel::V1::ListEntitlementsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entitlements_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entitlements parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entitlements ::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entitlements({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entitlements(::Google::Cloud::Channel::V1::ListEntitlementsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entitlements_client_stub.call_rpc_count - end - end - - def test_list_transferable_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListTransferableSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - cloud_identity_id = "hello world" - parent = "hello world" - page_size = 42 - page_token = "hello world" - auth_token = "hello world" - language_code = "hello world" - - list_transferable_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transferable_skus, name - assert_kind_of ::Google::Cloud::Channel::V1::ListTransferableSkusRequest, request - assert_equal "hello world", request["cloud_identity_id"] - assert_equal :cloud_identity_id, request.transferred_customer_identity - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["auth_token"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transferable_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_transferable_skus cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_transferable_skus ::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_transferable_skus({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_transferable_skus(::Google::Cloud::Channel::V1::ListTransferableSkusRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, auth_token: auth_token, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_transferable_skus_client_stub.call_rpc_count - end - end - - def test_list_transferable_offers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListTransferableOffersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - cloud_identity_id = "hello world" - parent = "hello world" - page_size = 42 - page_token = "hello world" - sku = "hello world" - language_code = "hello world" - billing_account = "hello world" - - list_transferable_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transferable_offers, name - assert_kind_of ::Google::Cloud::Channel::V1::ListTransferableOffersRequest, request - assert_equal "hello world", request["cloud_identity_id"] - assert_equal :cloud_identity_id, request.transferred_customer_identity - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["sku"] - assert_equal "hello world", request["language_code"] - assert_equal "hello world", request["billing_account"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transferable_offers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_transferable_offers cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_transferable_offers ::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_transferable_offers({ cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_transferable_offers(::Google::Cloud::Channel::V1::ListTransferableOffersRequest.new(cloud_identity_id: cloud_identity_id, parent: parent, page_size: page_size, page_token: page_token, sku: sku, language_code: language_code, billing_account: billing_account), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_transferable_offers_client_stub.call_rpc_count - end - end - - def test_get_entitlement - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::Entitlement.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_entitlement, name - assert_kind_of ::Google::Cloud::Channel::V1::GetEntitlementRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_entitlement({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_entitlement name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_entitlement ::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_entitlement({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_entitlement(::Google::Cloud::Channel::V1::GetEntitlementRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_entitlement_client_stub.call_rpc_count - end - end - - def test_create_entitlement - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entitlement = {} - request_id = "hello world" - - create_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_entitlement, name - assert_kind_of ::Google::Cloud::Channel::V1::CreateEntitlementRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::Entitlement), request["entitlement"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_entitlement parent: parent, entitlement: entitlement, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_entitlement ::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_entitlement({ parent: parent, entitlement: entitlement, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_entitlement(::Google::Cloud::Channel::V1::CreateEntitlementRequest.new(parent: parent, entitlement: entitlement, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_entitlement_client_stub.call_rpc_count - end - end - - def test_change_parameters - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - parameters = [{}] - request_id = "hello world" - purchase_order_id = "hello world" - - change_parameters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :change_parameters, name - assert_kind_of ::Google::Cloud::Channel::V1::ChangeParametersRequest, request - assert_equal "hello world", request["name"] - assert_kind_of ::Google::Cloud::Channel::V1::Parameter, request["parameters"].first - assert_equal "hello world", request["request_id"] - assert_equal "hello world", request["purchase_order_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, change_parameters_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.change_parameters name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.change_parameters ::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.change_parameters({ name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.change_parameters(::Google::Cloud::Channel::V1::ChangeParametersRequest.new(name: name, parameters: parameters, request_id: request_id, purchase_order_id: purchase_order_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, change_parameters_client_stub.call_rpc_count - end - end - - def test_change_renewal_settings - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - renewal_settings = {} - request_id = "hello world" - - change_renewal_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :change_renewal_settings, name - assert_kind_of ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::RenewalSettings), request["renewal_settings"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, change_renewal_settings_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.change_renewal_settings name: name, renewal_settings: renewal_settings, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.change_renewal_settings ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.change_renewal_settings({ name: name, renewal_settings: renewal_settings, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.change_renewal_settings(::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new(name: name, renewal_settings: renewal_settings, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, change_renewal_settings_client_stub.call_rpc_count - end - end - - def test_change_offer - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - offer = "hello world" - parameters = [{}] - purchase_order_id = "hello world" - request_id = "hello world" - billing_account = "hello world" - price_reference_id = "hello world" - - change_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :change_offer, name - assert_kind_of ::Google::Cloud::Channel::V1::ChangeOfferRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["offer"] - assert_kind_of ::Google::Cloud::Channel::V1::Parameter, request["parameters"].first - assert_equal "hello world", request["purchase_order_id"] - assert_equal "hello world", request["request_id"] - assert_equal "hello world", request["billing_account"] - assert_equal "hello world", request["price_reference_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, change_offer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.change_offer name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.change_offer ::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.change_offer({ name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.change_offer(::Google::Cloud::Channel::V1::ChangeOfferRequest.new(name: name, offer: offer, parameters: parameters, purchase_order_id: purchase_order_id, request_id: request_id, billing_account: billing_account, price_reference_id: price_reference_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, change_offer_client_stub.call_rpc_count - end - end - - def test_start_paid_service - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - start_paid_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_paid_service, name - assert_kind_of ::Google::Cloud::Channel::V1::StartPaidServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_paid_service_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_paid_service({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_paid_service name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_paid_service ::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_paid_service({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_paid_service(::Google::Cloud::Channel::V1::StartPaidServiceRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_paid_service_client_stub.call_rpc_count - end - end - - def test_suspend_entitlement - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - suspend_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :suspend_entitlement, name - assert_kind_of ::Google::Cloud::Channel::V1::SuspendEntitlementRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, suspend_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.suspend_entitlement({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.suspend_entitlement name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.suspend_entitlement ::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.suspend_entitlement({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.suspend_entitlement(::Google::Cloud::Channel::V1::SuspendEntitlementRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, suspend_entitlement_client_stub.call_rpc_count - end - end - - def test_cancel_entitlement - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - cancel_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_entitlement, name - assert_kind_of ::Google::Cloud::Channel::V1::CancelEntitlementRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_entitlement({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_entitlement name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_entitlement ::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_entitlement({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_entitlement(::Google::Cloud::Channel::V1::CancelEntitlementRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_entitlement_client_stub.call_rpc_count - end - end - - def test_activate_entitlement - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - activate_entitlement_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :activate_entitlement, name - assert_kind_of ::Google::Cloud::Channel::V1::ActivateEntitlementRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, activate_entitlement_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.activate_entitlement({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.activate_entitlement name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.activate_entitlement ::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.activate_entitlement({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.activate_entitlement(::Google::Cloud::Channel::V1::ActivateEntitlementRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, activate_entitlement_client_stub.call_rpc_count - end - end - - def test_transfer_entitlements - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entitlements = [{}] - auth_token = "hello world" - request_id = "hello world" - - transfer_entitlements_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :transfer_entitlements, name - assert_kind_of ::Google::Cloud::Channel::V1::TransferEntitlementsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Channel::V1::Entitlement, request["entitlements"].first - assert_equal "hello world", request["auth_token"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, transfer_entitlements_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.transfer_entitlements parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.transfer_entitlements ::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.transfer_entitlements({ parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.transfer_entitlements(::Google::Cloud::Channel::V1::TransferEntitlementsRequest.new(parent: parent, entitlements: entitlements, auth_token: auth_token, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, transfer_entitlements_client_stub.call_rpc_count - end - end - - def test_transfer_entitlements_to_google - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - entitlements = [{}] - request_id = "hello world" - - transfer_entitlements_to_google_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :transfer_entitlements_to_google, name - assert_kind_of ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Channel::V1::Entitlement, request["entitlements"].first - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, transfer_entitlements_to_google_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.transfer_entitlements_to_google parent: parent, entitlements: entitlements, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.transfer_entitlements_to_google ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.transfer_entitlements_to_google({ parent: parent, entitlements: entitlements, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.transfer_entitlements_to_google(::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new(parent: parent, entitlements: entitlements, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, transfer_entitlements_to_google_client_stub.call_rpc_count - end - end - - def test_list_channel_partner_links - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListChannelPartnerLinksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :UNSPECIFIED - - list_channel_partner_links_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_channel_partner_links, name - assert_kind_of ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_channel_partner_links_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_channel_partner_links parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_channel_partner_links ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_channel_partner_links({ parent: parent, page_size: page_size, page_token: page_token, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_channel_partner_links(::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_channel_partner_links_client_stub.call_rpc_count - end - end - - def test_get_channel_partner_link - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :UNSPECIFIED - - get_channel_partner_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_channel_partner_link, name - assert_kind_of ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest, request - assert_equal "hello world", request["name"] - assert_equal :UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_channel_partner_link_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_channel_partner_link({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_channel_partner_link name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_channel_partner_link ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_channel_partner_link({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_channel_partner_link(::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_channel_partner_link_client_stub.call_rpc_count - end - end - - def test_create_channel_partner_link - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - channel_partner_link = {} - - create_channel_partner_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_channel_partner_link, name - assert_kind_of ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerLink), request["channel_partner_link"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_channel_partner_link_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_channel_partner_link parent: parent, channel_partner_link: channel_partner_link do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_channel_partner_link ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_channel_partner_link({ parent: parent, channel_partner_link: channel_partner_link }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_channel_partner_link(::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new(parent: parent, channel_partner_link: channel_partner_link), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_channel_partner_link_client_stub.call_rpc_count - end - end - - def test_update_channel_partner_link - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerLink.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - channel_partner_link = {} - update_mask = {} - - update_channel_partner_link_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_channel_partner_link, name - assert_kind_of ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerLink), request["channel_partner_link"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_channel_partner_link_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_channel_partner_link name: name, channel_partner_link: channel_partner_link, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_channel_partner_link ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_channel_partner_link({ name: name, channel_partner_link: channel_partner_link, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_channel_partner_link(::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new(name: name, channel_partner_link: channel_partner_link, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_channel_partner_link_client_stub.call_rpc_count - end - end - - def test_get_customer_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_customer_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_customer_repricing_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_customer_repricing_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_customer_repricing_config ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_customer_repricing_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_customer_repricing_config(::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_customer_repricing_config_client_stub.call_rpc_count - end - end - - def test_list_customer_repricing_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_customer_repricing_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_customer_repricing_configs, name - assert_kind_of ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_customer_repricing_configs_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_customer_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_customer_repricing_configs ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_customer_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_customer_repricing_configs(::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_customer_repricing_configs_client_stub.call_rpc_count - end - end - - def test_create_customer_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - customer_repricing_config = {} - - create_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_customer_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::CustomerRepricingConfig), request["customer_repricing_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_customer_repricing_config parent: parent, customer_repricing_config: customer_repricing_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_customer_repricing_config ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_customer_repricing_config({ parent: parent, customer_repricing_config: customer_repricing_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_customer_repricing_config(::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest.new(parent: parent, customer_repricing_config: customer_repricing_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_customer_repricing_config_client_stub.call_rpc_count - end - end - - def test_update_customer_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::CustomerRepricingConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - customer_repricing_config = {} - - update_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_customer_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::CustomerRepricingConfig), request["customer_repricing_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_customer_repricing_config customer_repricing_config: customer_repricing_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_customer_repricing_config ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_customer_repricing_config({ customer_repricing_config: customer_repricing_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_customer_repricing_config(::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest.new(customer_repricing_config: customer_repricing_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_customer_repricing_config_client_stub.call_rpc_count - end - end - - def test_delete_customer_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_customer_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_customer_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_customer_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_customer_repricing_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_customer_repricing_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_customer_repricing_config ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_customer_repricing_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_customer_repricing_config(::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_customer_repricing_config_client_stub.call_rpc_count - end - end - - def test_get_channel_partner_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_channel_partner_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_channel_partner_repricing_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_channel_partner_repricing_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_channel_partner_repricing_config ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_channel_partner_repricing_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_channel_partner_repricing_config(::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_channel_partner_repricing_config_client_stub.call_rpc_count - end - end - - def test_list_channel_partner_repricing_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_channel_partner_repricing_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_channel_partner_repricing_configs, name - assert_kind_of ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_channel_partner_repricing_configs_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_channel_partner_repricing_configs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_channel_partner_repricing_configs ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_channel_partner_repricing_configs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_channel_partner_repricing_configs(::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_channel_partner_repricing_configs_client_stub.call_rpc_count - end - end - - def test_create_channel_partner_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - channel_partner_repricing_config = {} - - create_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_channel_partner_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig), request["channel_partner_repricing_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_channel_partner_repricing_config parent: parent, channel_partner_repricing_config: channel_partner_repricing_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_channel_partner_repricing_config ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_channel_partner_repricing_config({ parent: parent, channel_partner_repricing_config: channel_partner_repricing_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_channel_partner_repricing_config(::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest.new(parent: parent, channel_partner_repricing_config: channel_partner_repricing_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_channel_partner_repricing_config_client_stub.call_rpc_count - end - end - - def test_update_channel_partner_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - channel_partner_repricing_config = {} - - update_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_channel_partner_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig), request["channel_partner_repricing_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_channel_partner_repricing_config channel_partner_repricing_config: channel_partner_repricing_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_channel_partner_repricing_config ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_channel_partner_repricing_config({ channel_partner_repricing_config: channel_partner_repricing_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_channel_partner_repricing_config(::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest.new(channel_partner_repricing_config: channel_partner_repricing_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_channel_partner_repricing_config_client_stub.call_rpc_count - end - end - - def test_delete_channel_partner_repricing_config - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_channel_partner_repricing_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_channel_partner_repricing_config, name - assert_kind_of ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_channel_partner_repricing_config_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_channel_partner_repricing_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_channel_partner_repricing_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_channel_partner_repricing_config ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_channel_partner_repricing_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_channel_partner_repricing_config(::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_channel_partner_repricing_config_client_stub.call_rpc_count - end - end - - def test_list_sku_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListSkuGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_sku_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sku_groups, name - assert_kind_of ::Google::Cloud::Channel::V1::ListSkuGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sku_groups_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_sku_groups ::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_sku_groups(::Google::Cloud::Channel::V1::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sku_groups_client_stub.call_rpc_count - end - end - - def test_list_sku_group_billable_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_sku_group_billable_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sku_group_billable_skus, name - assert_kind_of ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sku_group_billable_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_sku_group_billable_skus parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_sku_group_billable_skus ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_sku_group_billable_skus({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_sku_group_billable_skus(::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sku_group_billable_skus_client_stub.call_rpc_count - end - end - - def test_lookup_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::Offer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - entitlement = "hello world" - - lookup_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_offer, name - assert_kind_of ::Google::Cloud::Channel::V1::LookupOfferRequest, request - assert_equal "hello world", request["entitlement"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_offer_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.lookup_offer({ entitlement: entitlement }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.lookup_offer entitlement: entitlement do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.lookup_offer ::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.lookup_offer({ entitlement: entitlement }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.lookup_offer(::Google::Cloud::Channel::V1::LookupOfferRequest.new(entitlement: entitlement), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_offer_client_stub.call_rpc_count - end - end - - def test_list_products - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListProductsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_products, name - assert_kind_of ::Google::Cloud::Channel::V1::ListProductsRequest, request - assert_equal "hello world", request["account"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_products_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_products account: account, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_products ::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_products({ account: account, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_products(::Google::Cloud::Channel::V1::ListProductsRequest.new(account: account, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_products_client_stub.call_rpc_count - end - end - - def test_list_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - account = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_skus, name - assert_kind_of ::Google::Cloud::Channel::V1::ListSkusRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["account"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_skus parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_skus ::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_skus({ parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_skus(::Google::Cloud::Channel::V1::ListSkusRequest.new(parent: parent, account: account, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_skus_client_stub.call_rpc_count - end - end - - def test_list_offers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListOffersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - language_code = "hello world" - show_future_offers = true - - list_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_offers, name - assert_kind_of ::Google::Cloud::Channel::V1::ListOffersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["language_code"] - assert_equal true, request["show_future_offers"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_offers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_offers ::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_offers(::Google::Cloud::Channel::V1::ListOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, language_code: language_code, show_future_offers: show_future_offers), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_offers_client_stub.call_rpc_count - end - end - - def test_list_purchasable_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListPurchasableSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - create_entitlement_purchase = {} - customer = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_purchasable_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_purchasable_skus, name - assert_kind_of ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest::CreateEntitlementPurchase), request["create_entitlement_purchase"] - assert_equal :create_entitlement_purchase, request.purchase_option - assert_equal "hello world", request["customer"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_purchasable_skus_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_purchasable_skus create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_purchasable_skus ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_purchasable_skus({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_purchasable_skus(::Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_purchasable_skus_client_stub.call_rpc_count - end - end - - def test_list_purchasable_offers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListPurchasableOffersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - create_entitlement_purchase = {} - customer = "hello world" - page_size = 42 - page_token = "hello world" - language_code = "hello world" - - list_purchasable_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_purchasable_offers, name - assert_kind_of ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest::CreateEntitlementPurchase), request["create_entitlement_purchase"] - assert_equal :create_entitlement_purchase, request.purchase_option - assert_equal "hello world", request["customer"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["language_code"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_purchasable_offers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_purchasable_offers create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_purchasable_offers ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_purchasable_offers({ create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_purchasable_offers(::Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new(create_entitlement_purchase: create_entitlement_purchase, customer: customer, page_size: page_size, page_token: page_token, language_code: language_code), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_purchasable_offers_client_stub.call_rpc_count - end - end - - def test_query_eligible_billing_accounts - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - customer = "hello world" - skus = ["hello world"] - - query_eligible_billing_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_eligible_billing_accounts, name - assert_kind_of ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, request - assert_equal "hello world", request["customer"] - assert_equal ["hello world"], request["skus"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, query_eligible_billing_accounts_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_eligible_billing_accounts({ customer: customer, skus: skus }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.query_eligible_billing_accounts customer: customer, skus: skus do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.query_eligible_billing_accounts ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.query_eligible_billing_accounts({ customer: customer, skus: skus }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.query_eligible_billing_accounts(::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new(customer: customer, skus: skus), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, query_eligible_billing_accounts_client_stub.call_rpc_count - end - end - - def test_register_subscriber - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::RegisterSubscriberResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = "hello world" - service_account = "hello world" - integrator = "hello world" - - register_subscriber_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :register_subscriber, name - assert_kind_of ::Google::Cloud::Channel::V1::RegisterSubscriberRequest, request - assert_equal "hello world", request["account"] - assert_equal "hello world", request["service_account"] - assert_equal "hello world", request["integrator"] - assert request.has_integrator? - refute_nil options - end - - Gapic::ServiceStub.stub :new, register_subscriber_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.register_subscriber account: account, service_account: service_account, integrator: integrator do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.register_subscriber ::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.register_subscriber({ account: account, service_account: service_account, integrator: integrator }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.register_subscriber(::Google::Cloud::Channel::V1::RegisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, register_subscriber_client_stub.call_rpc_count - end - end - - def test_unregister_subscriber - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = "hello world" - service_account = "hello world" - integrator = "hello world" - - unregister_subscriber_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unregister_subscriber, name - assert_kind_of ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest, request - assert_equal "hello world", request["account"] - assert_equal "hello world", request["service_account"] - assert_equal "hello world", request["integrator"] - assert request.has_integrator? - refute_nil options - end - - Gapic::ServiceStub.stub :new, unregister_subscriber_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.unregister_subscriber account: account, service_account: service_account, integrator: integrator do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.unregister_subscriber ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.unregister_subscriber({ account: account, service_account: service_account, integrator: integrator }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.unregister_subscriber(::Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new(account: account, service_account: service_account, integrator: integrator), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unregister_subscriber_client_stub.call_rpc_count - end - end - - def test_list_subscribers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListSubscribersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - account = "hello world" - page_size = 42 - page_token = "hello world" - integrator = "hello world" - - list_subscribers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_subscribers, name - assert_kind_of ::Google::Cloud::Channel::V1::ListSubscribersRequest, request - assert_equal "hello world", request["account"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["integrator"] - assert request.has_integrator? - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_subscribers_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_subscribers account: account, page_size: page_size, page_token: page_token, integrator: integrator do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_subscribers ::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_subscribers({ account: account, page_size: page_size, page_token: page_token, integrator: integrator }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_subscribers(::Google::Cloud::Channel::V1::ListSubscribersRequest.new(account: account, page_size: page_size, page_token: page_token, integrator: integrator), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_subscribers_client_stub.call_rpc_count - end - end - - def test_list_entitlement_changes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Channel::V1::ListEntitlementChangesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_entitlement_changes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_entitlement_changes, name - assert_kind_of ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_entitlement_changes_client_stub do - # Create client - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_entitlement_changes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_entitlement_changes ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_entitlement_changes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_entitlement_changes(::Google::Cloud::Channel::V1::ListEntitlementChangesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_entitlement_changes_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Channel::V1::CloudChannelService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-channel-v1/test/helper.rb b/owl-bot-staging/google-cloud-channel-v1/test/helper.rb deleted file mode 100644 index 968201e8049d..000000000000 --- a/owl-bot-staging/google-cloud-channel-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2025 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"