google-cloud-channel-v1 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/channel/v1/billing_accounts_pb.rb +47 -0
  3. data/lib/google/cloud/channel/v1/cloud_channel_reports_service/client.rb +10 -1
  4. data/lib/google/cloud/channel/v1/cloud_channel_reports_service/operations.rb +10 -1
  5. data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/client.rb +63 -0
  6. data/lib/google/cloud/channel/v1/cloud_channel_reports_service/rest/operations.rb +75 -0
  7. data/lib/google/cloud/channel/v1/cloud_channel_service/client.rb +165 -15
  8. data/lib/google/cloud/channel/v1/cloud_channel_service/operations.rb +10 -1
  9. data/lib/google/cloud/channel/v1/cloud_channel_service/rest/client.rb +1053 -14
  10. data/lib/google/cloud/channel/v1/cloud_channel_service/rest/operations.rb +75 -0
  11. data/lib/google/cloud/channel/v1/cloud_channel_service/rest/service_stub.rb +59 -0
  12. data/lib/google/cloud/channel/v1/entitlements_pb.rb +1 -1
  13. data/lib/google/cloud/channel/v1/offers_pb.rb +1 -1
  14. data/lib/google/cloud/channel/v1/repricing_pb.rb +1 -1
  15. data/lib/google/cloud/channel/v1/service_pb.rb +7 -1
  16. data/lib/google/cloud/channel/v1/service_services_pb.rb +47 -12
  17. data/lib/google/cloud/channel/v1/version.rb +1 -1
  18. data/proto_docs/google/api/field_behavior.rb +14 -0
  19. data/proto_docs/google/cloud/channel/v1/billing_accounts.rb +48 -0
  20. data/proto_docs/google/cloud/channel/v1/customers.rb +3 -3
  21. data/proto_docs/google/cloud/channel/v1/entitlements.rb +5 -1
  22. data/proto_docs/google/cloud/channel/v1/offers.rb +3 -0
  23. data/proto_docs/google/cloud/channel/v1/repricing.rb +22 -3
  24. data/proto_docs/google/cloud/channel/v1/service.rb +75 -0
  25. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aa8fc5349ce7d0cfccf288e1191130183a587f46a17fb2a3b5ae9529d4f2ed0
4
- data.tar.gz: 76292b004a004dec6d17510c206830e5bd4e2e1b70798bf9c27c511618361454
3
+ metadata.gz: f31304dc6f21582d45a15345a2baf8f95e8b673c9ee361d74b8f25f0162b6dae
4
+ data.tar.gz: d6766723d3b970849b034e6586c4cb77653402261a952b94994a8ef3984b1ad4
5
5
  SHA512:
6
- metadata.gz: 5c806102daf252edd3dc447a4fac8a969a4a6903f7292abd13794c23dd1cbff5ab6df2ee4f51e9c77e579f518b36734d129fa1f4f47d49363c85618b6375f634
7
- data.tar.gz: 0cca47f4f897f9cd3b4b4e4fb1c9dee96bc5c617524449c4a0d0b7136659d3a2dd9d418c7d5d6a2fd6403062e8d91abd4a505d90dd7c0cdc78344340c565accf
6
+ metadata.gz: 215ec9c6a35ebe36f184f6a4fefae509462d8b7712a057d6ef2e576f32f930bc1f4cfa0c87740a7f412f4d023a8502fca53404706ec0090b769570f199593222
7
+ data.tar.gz: ce5f0e5504cca519fa1473a769cb943efa26b68fbac3faa7b40104b668777c2264cd06ee81482e0a6dff63e62325757349d7aa73da1ef79deb67226408b93d78
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/channel/v1/billing_accounts.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/api/resource_pb'
9
+ require 'google/protobuf/timestamp_pb'
10
+
11
+
12
+ 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"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError => e
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
33
+ end
34
+ end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
37
+ end
38
+
39
+ module Google
40
+ module Cloud
41
+ module Channel
42
+ module V1
43
+ BillingAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.channel.v1.BillingAccount").msgclass
44
+ end
45
+ end
46
+ end
47
+ end
@@ -146,7 +146,8 @@ module Google
146
146
  credentials: credentials,
147
147
  endpoint: @config.endpoint,
148
148
  channel_args: @config.channel_args,
149
- interceptors: @config.interceptors
149
+ interceptors: @config.interceptors,
150
+ channel_pool_config: @config.channel_pool
150
151
  )
151
152
  end
152
153
 
@@ -636,6 +637,14 @@ module Google
636
637
  end
637
638
  end
638
639
 
640
+ ##
641
+ # Configuration for the channel pool
642
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
643
+ #
644
+ def channel_pool
645
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
646
+ end
647
+
639
648
  ##
640
649
  # Configuration RPC class for the CloudChannelReportsService API.
641
650
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -701,6 +702,14 @@ module Google
701
702
  end
702
703
  end
703
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
704
713
  ##
705
714
  # Configuration RPC class for the Operations API.
706
715
  #
@@ -223,6 +223,29 @@ module Google
223
223
  # @return [::Gapic::Operation]
224
224
  #
225
225
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
226
+ #
227
+ # @example Basic example
228
+ # require "google/cloud/channel/v1"
229
+ #
230
+ # # Create a client object. The client can be reused for multiple calls.
231
+ # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new
232
+ #
233
+ # # Create a request. To set request fields, pass in keyword arguments.
234
+ # request = Google::Cloud::Channel::V1::RunReportJobRequest.new
235
+ #
236
+ # # Call the run_report_job method.
237
+ # result = client.run_report_job request
238
+ #
239
+ # # The returned object is of type Gapic::Operation. You can use it to
240
+ # # check the status of an operation, cancel it, or wait for results.
241
+ # # Here is how to wait for a response.
242
+ # result.wait_until_done! timeout: 60
243
+ # if result.response?
244
+ # p result.response
245
+ # else
246
+ # puts "No response received."
247
+ # end
248
+ #
226
249
  def run_report_job request, options = nil
227
250
  raise ::ArgumentError, "request must be provided" if request.nil?
228
251
 
@@ -307,6 +330,26 @@ module Google
307
330
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Row>]
308
331
  #
309
332
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
333
+ #
334
+ # @example Basic example
335
+ # require "google/cloud/channel/v1"
336
+ #
337
+ # # Create a client object. The client can be reused for multiple calls.
338
+ # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new
339
+ #
340
+ # # Create a request. To set request fields, pass in keyword arguments.
341
+ # request = Google::Cloud::Channel::V1::FetchReportResultsRequest.new
342
+ #
343
+ # # Call the fetch_report_results method.
344
+ # result = client.fetch_report_results request
345
+ #
346
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
347
+ # # over elements, and API calls will be issued to fetch pages as needed.
348
+ # result.each do |item|
349
+ # # Each element is of type ::Google::Cloud::Channel::V1::Row.
350
+ # p item
351
+ # end
352
+ #
310
353
  def fetch_report_results request, options = nil
311
354
  raise ::ArgumentError, "request must be provided" if request.nil?
312
355
 
@@ -388,6 +431,26 @@ module Google
388
431
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Channel::V1::Report>]
389
432
  #
390
433
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
434
+ #
435
+ # @example Basic example
436
+ # require "google/cloud/channel/v1"
437
+ #
438
+ # # Create a client object. The client can be reused for multiple calls.
439
+ # client = Google::Cloud::Channel::V1::CloudChannelReportsService::Rest::Client.new
440
+ #
441
+ # # Create a request. To set request fields, pass in keyword arguments.
442
+ # request = Google::Cloud::Channel::V1::ListReportsRequest.new
443
+ #
444
+ # # Call the list_reports method.
445
+ # result = client.list_reports request
446
+ #
447
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
448
+ # # over elements, and API calls will be issued to fetch pages as needed.
449
+ # result.each do |item|
450
+ # # Each element is of type ::Google::Cloud::Channel::V1::Report.
451
+ # p item
452
+ # end
453
+ #
391
454
  def list_reports request, options = nil
392
455
  raise ::ArgumentError, "request must be provided" if request.nil?
393
456
 
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -190,7 +190,8 @@ module Google
190
190
  credentials: credentials,
191
191
  endpoint: @config.endpoint,
192
192
  channel_args: @config.channel_args,
193
- interceptors: @config.interceptors
193
+ interceptors: @config.interceptors,
194
+ channel_pool_config: @config.channel_pool
194
195
  )
195
196
  end
196
197
 
@@ -530,8 +531,11 @@ module Google
530
531
  #
531
532
  # Possible error codes:
532
533
  #
533
- # * PERMISSION_DENIED: The reseller account making the request is different
534
- # from the reseller account in the API request.
534
+ # * PERMISSION_DENIED:
535
+ # * The reseller account making the request is different from the
536
+ # reseller account in the API request.
537
+ # * You are not authorized to create a customer. See
538
+ # https://support.google.com/channelservices/answer/9759265
535
539
  # * INVALID_ARGUMENT:
536
540
  # * Required request parameters are missing or invalid.
537
541
  # * Domain field value doesn't match the primary email domain.
@@ -826,8 +830,11 @@ module Google
826
830
  #
827
831
  # Possible error codes:
828
832
  #
829
- # * PERMISSION_DENIED: The reseller account making the request is different
830
- # from the reseller account in the API request.
833
+ # * PERMISSION_DENIED:
834
+ # * The reseller account making the request is different from the
835
+ # reseller account in the API request.
836
+ # * You are not authorized to import the customer. See
837
+ # https://support.google.com/channelservices/answer/9759265
831
838
  # * NOT_FOUND: Cloud Identity doesn't exist or was deleted.
832
839
  # * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is
833
840
  # expired or invalid.
@@ -949,7 +956,10 @@ module Google
949
956
  #
950
957
  # Possible error codes:
951
958
  #
952
- # * PERMISSION_DENIED: The customer doesn't belong to the reseller.
959
+ # * PERMISSION_DENIED:
960
+ # * The customer doesn't belong to the reseller.
961
+ # * You are not authorized to provision cloud identity id. See
962
+ # https://support.google.com/channelservices/answer/9759265
953
963
  # * INVALID_ARGUMENT: Required request parameters are missing or invalid.
954
964
  # * NOT_FOUND: The customer was not found.
955
965
  # * ALREADY_EXISTS: The customer's primary email already exists. Retry
@@ -1330,6 +1340,8 @@ module Google
1330
1340
  # auth token.
1331
1341
  # * The reseller account making the request is different
1332
1342
  # from the reseller account in the query.
1343
+ # * The reseller is not authorized to transact on this Product. See
1344
+ # https://support.google.com/channelservices/answer/9759265
1333
1345
  # * INVALID_ARGUMENT: Required request parameters are missing or invalid.
1334
1346
  #
1335
1347
  # Return value:
@@ -1346,7 +1358,7 @@ module Google
1346
1358
  # @param options [::Gapic::CallOptions, ::Hash]
1347
1359
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1348
1360
  #
1349
- # @overload list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil)
1361
+ # @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)
1350
1362
  # Pass arguments to `list_transferable_offers` via keyword arguments. Note that at
1351
1363
  # least one keyword argument is required. To specify no parameters, or to keep all
1352
1364
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1375,6 +1387,12 @@ module Google
1375
1387
  # Optional. The BCP-47 language code. For example, "en-US". The
1376
1388
  # response will localize in the corresponding language code, if specified.
1377
1389
  # The default value is "en-US".
1390
+ # @param billing_account [::String]
1391
+ # Optional. The Billing Account to look up Offers for. Format:
1392
+ # accounts/\\{account_id}/billingAccounts/\\{billing_account_id}.
1393
+ #
1394
+ # This field is only relevant for multi-currency accounts. It should be left
1395
+ # empty for single currency accounts.
1378
1396
  #
1379
1397
  # @yield [response, operation] Access the result along with the RPC operation
1380
1398
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>]
@@ -1547,7 +1565,10 @@ module Google
1547
1565
  #
1548
1566
  # Possible error codes:
1549
1567
  #
1550
- # * PERMISSION_DENIED: The customer doesn't belong to the reseller.
1568
+ # * PERMISSION_DENIED:
1569
+ # * The customer doesn't belong to the reseller.
1570
+ # * The reseller is not authorized to transact on this Product. See
1571
+ # https://support.google.com/channelservices/answer/9759265
1551
1572
  # * INVALID_ARGUMENT:
1552
1573
  # * Required request parameters are missing or invalid.
1553
1574
  # * There is already a customer entitlement for a SKU from the same
@@ -1991,7 +2012,7 @@ module Google
1991
2012
  # @param options [::Gapic::CallOptions, ::Hash]
1992
2013
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1993
2014
  #
1994
- # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil)
2015
+ # @overload change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil)
1995
2016
  # Pass arguments to `change_offer` via keyword arguments. Note that at
1996
2017
  # least one keyword argument is required. To specify no parameters, or to keep all
1997
2018
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2023,6 +2044,12 @@ module Google
2023
2044
  # The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
2024
2045
  # with the exception that zero UUID is not supported
2025
2046
  # (`00000000-0000-0000-0000-000000000000`).
2047
+ # @param billing_account [::String]
2048
+ # Optional. The billing account resource name that is used to pay for this
2049
+ # entitlement when setting up billing on a trial subscription.
2050
+ #
2051
+ # This field is only relevant for multi-currency accounts. It should be
2052
+ # left empty for single currency accounts.
2026
2053
  #
2027
2054
  # @yield [response, operation] Access the result along with the RPC operation
2028
2055
  # @yieldparam response [::Gapic::Operation]
@@ -2627,7 +2654,10 @@ module Google
2627
2654
  #
2628
2655
  # Possible error codes:
2629
2656
  #
2630
- # * PERMISSION_DENIED: The customer doesn't belong to the reseller.
2657
+ # * PERMISSION_DENIED:
2658
+ # * The customer doesn't belong to the reseller.
2659
+ # * The reseller is not authorized to transact on this Product. See
2660
+ # https://support.google.com/channelservices/answer/9759265
2631
2661
  # * INVALID_ARGUMENT: Required request parameters are missing or invalid.
2632
2662
  # * NOT_FOUND: The customer or offer resource was not found.
2633
2663
  # * ALREADY_EXISTS: The SKU was already transferred for the customer.
@@ -3606,12 +3636,12 @@ module Google
3606
3636
  # * The new config will not modify exports used with other configs.
3607
3637
  # Changes to the config may be immediate, but may take up to 24 hours.
3608
3638
  # * There is a limit of ten configs for any
3609
- # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}
3610
- # or
3639
+ # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement},
3640
+ # for any
3611
3641
  # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
3612
3642
  # * The contained
3613
3643
  # {::Google::Cloud::Channel::V1::CustomerRepricingConfig#repricing_config CustomerRepricingConfig.repricing_config}
3614
- # vaule must be different from the value used in the current config for a
3644
+ # value must be different from the value used in the current config for a
3615
3645
  # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement}.
3616
3646
  #
3617
3647
  # Possible Error Codes:
@@ -4198,10 +4228,12 @@ module Google
4198
4228
  # * The new config will not modify exports used with other configs.
4199
4229
  # Changes to the config may be immediate, but may take up to 24 hours.
4200
4230
  # * There is a limit of ten configs for any ChannelPartner or
4231
+ # {::Google::Cloud::Channel::V1::RepricingConfig::EntitlementGranularity#entitlement RepricingConfig.EntitlementGranularity.entitlement},
4232
+ # for any
4201
4233
  # {::Google::Cloud::Channel::V1::RepricingConfig#effective_invoice_month RepricingConfig.effective_invoice_month}.
4202
4234
  # * The contained
4203
4235
  # {::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig#repricing_config ChannelPartnerRepricingConfig.repricing_config}
4204
- # vaule must be different from the value used in the current config for a
4236
+ # value must be different from the value used in the current config for a
4205
4237
  # ChannelPartner.
4206
4238
  #
4207
4239
  # Possible Error Codes:
@@ -5305,7 +5337,10 @@ module Google
5305
5337
  #
5306
5338
  # Possible error codes:
5307
5339
  #
5308
- # * PERMISSION_DENIED: The customer doesn't belong to the reseller
5340
+ # * PERMISSION_DENIED:
5341
+ # * The customer doesn't belong to the reseller
5342
+ # * The reseller is not authorized to transact on this Product. See
5343
+ # https://support.google.com/channelservices/answer/9759265
5309
5344
  # * INVALID_ARGUMENT: Required request parameters are missing or invalid.
5310
5345
  #
5311
5346
  # @overload list_purchasable_offers(request, options = nil)
@@ -5410,6 +5445,106 @@ module Google
5410
5445
  raise ::Google::Cloud::Error.from_error(e)
5411
5446
  end
5412
5447
 
5448
+ ##
5449
+ # Lists the billing accounts that are eligible to purchase particular SKUs
5450
+ # for a given customer.
5451
+ #
5452
+ # Possible error codes:
5453
+ #
5454
+ # * PERMISSION_DENIED: The customer doesn't belong to the reseller.
5455
+ # * INVALID_ARGUMENT: Required request parameters are missing or invalid.
5456
+ #
5457
+ # Return value:
5458
+ # Based on the provided list of SKUs, returns a list of SKU groups that must
5459
+ # be purchased using the same billing account and the billing accounts
5460
+ # eligible to purchase each SKU group.
5461
+ #
5462
+ # @overload query_eligible_billing_accounts(request, options = nil)
5463
+ # Pass arguments to `query_eligible_billing_accounts` via a request object, either of type
5464
+ # {::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest} or an equivalent Hash.
5465
+ #
5466
+ # @param request [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest, ::Hash]
5467
+ # A request object representing the call parameters. Required. To specify no
5468
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5469
+ # @param options [::Gapic::CallOptions, ::Hash]
5470
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
5471
+ #
5472
+ # @overload query_eligible_billing_accounts(customer: nil, skus: nil)
5473
+ # Pass arguments to `query_eligible_billing_accounts` via keyword arguments. Note that at
5474
+ # least one keyword argument is required. To specify no parameters, or to keep all
5475
+ # the default parameter values, pass an empty Hash as a request object (see above).
5476
+ #
5477
+ # @param customer [::String]
5478
+ # Required. The resource name of the customer to list eligible billing
5479
+ # accounts for. Format: accounts/\\{account_id}/customers/\\{customer_id}.
5480
+ # @param skus [::Array<::String>]
5481
+ # Required. List of SKUs to list eligible billing accounts for. At least one
5482
+ # SKU is required. Format: products/\\{product_id}/skus/\\{sku_id}.
5483
+ #
5484
+ # @yield [response, operation] Access the result along with the RPC operation
5485
+ # @yieldparam response [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse]
5486
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
5487
+ #
5488
+ # @return [::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse]
5489
+ #
5490
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
5491
+ #
5492
+ # @example Basic example
5493
+ # require "google/cloud/channel/v1"
5494
+ #
5495
+ # # Create a client object. The client can be reused for multiple calls.
5496
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
5497
+ #
5498
+ # # Create a request. To set request fields, pass in keyword arguments.
5499
+ # request = Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest.new
5500
+ #
5501
+ # # Call the query_eligible_billing_accounts method.
5502
+ # result = client.query_eligible_billing_accounts request
5503
+ #
5504
+ # # The returned object is of type Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse.
5505
+ # p result
5506
+ #
5507
+ def query_eligible_billing_accounts request, options = nil
5508
+ raise ::ArgumentError, "request must be provided" if request.nil?
5509
+
5510
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest
5511
+
5512
+ # Converts hash and nil to an options object
5513
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5514
+
5515
+ # Customize the options with defaults
5516
+ metadata = @config.rpcs.query_eligible_billing_accounts.metadata.to_h
5517
+
5518
+ # Set x-goog-api-client and x-goog-user-project headers
5519
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5520
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5521
+ gapic_version: ::Google::Cloud::Channel::V1::VERSION
5522
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5523
+
5524
+ header_params = {}
5525
+ if request.customer
5526
+ header_params["customer"] = request.customer
5527
+ end
5528
+
5529
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
5530
+ metadata[:"x-goog-request-params"] ||= request_params_header
5531
+
5532
+ options.apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout,
5533
+ metadata: metadata,
5534
+ retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy
5535
+
5536
+ options.apply_defaults timeout: @config.timeout,
5537
+ metadata: @config.metadata,
5538
+ retry_policy: @config.retry_policy
5539
+
5540
+ @cloud_channel_service_stub.call_rpc :query_eligible_billing_accounts, request, options: options do |response, operation|
5541
+ yield response, operation if block_given?
5542
+ return response
5543
+ end
5544
+ rescue ::GRPC::BadStatus => e
5545
+ raise ::Google::Cloud::Error.from_error(e)
5546
+ end
5547
+
5413
5548
  ##
5414
5549
  # Registers a service account with subscriber privileges on the Cloud Pub/Sub
5415
5550
  # topic for this Channel Services account. After you create a
@@ -5979,6 +6114,14 @@ module Google
5979
6114
  end
5980
6115
  end
5981
6116
 
6117
+ ##
6118
+ # Configuration for the channel pool
6119
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
6120
+ #
6121
+ def channel_pool
6122
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
6123
+ end
6124
+
5982
6125
  ##
5983
6126
  # Configuration RPC class for the CloudChannelService API.
5984
6127
  #
@@ -6218,6 +6361,11 @@ module Google
6218
6361
  #
6219
6362
  attr_reader :list_purchasable_offers
6220
6363
  ##
6364
+ # RPC-specific configuration for `query_eligible_billing_accounts`
6365
+ # @return [::Gapic::Config::Method]
6366
+ #
6367
+ attr_reader :query_eligible_billing_accounts
6368
+ ##
6221
6369
  # RPC-specific configuration for `register_subscriber`
6222
6370
  # @return [::Gapic::Config::Method]
6223
6371
  #
@@ -6328,6 +6476,8 @@ module Google
6328
6476
  @list_purchasable_skus = ::Gapic::Config::Method.new list_purchasable_skus_config
6329
6477
  list_purchasable_offers_config = parent_rpcs.list_purchasable_offers if parent_rpcs.respond_to? :list_purchasable_offers
6330
6478
  @list_purchasable_offers = ::Gapic::Config::Method.new list_purchasable_offers_config
6479
+ query_eligible_billing_accounts_config = parent_rpcs.query_eligible_billing_accounts if parent_rpcs.respond_to? :query_eligible_billing_accounts
6480
+ @query_eligible_billing_accounts = ::Gapic::Config::Method.new query_eligible_billing_accounts_config
6331
6481
  register_subscriber_config = parent_rpcs.register_subscriber if parent_rpcs.respond_to? :register_subscriber
6332
6482
  @register_subscriber = ::Gapic::Config::Method.new register_subscriber_config
6333
6483
  unregister_subscriber_config = parent_rpcs.unregister_subscriber if parent_rpcs.respond_to? :unregister_subscriber
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -701,6 +702,14 @@ module Google
701
702
  end
702
703
  end
703
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
704
713
  ##
705
714
  # Configuration RPC class for the Operations API.
706
715
  #