google-cloud-channel-v1 0.7.2 → 0.9.2

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.
@@ -249,6 +249,27 @@ module Google
249
249
  #
250
250
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
251
251
  #
252
+ # @example Basic example
253
+ # require "google/cloud/channel/v1"
254
+ #
255
+ # # Create a client object. The client can be reused for multiple calls.
256
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
257
+ #
258
+ # # Create a request. To set request fields, pass in keyword arguments.
259
+ # request = Google::Cloud::Channel::V1::ListCustomersRequest.new
260
+ #
261
+ # # Call the list_customers method.
262
+ # result = client.list_customers request
263
+ #
264
+ # # The returned object is of type Gapic::PagedEnumerable. You can
265
+ # # iterate over all elements by calling #each, and the enumerable
266
+ # # will lazily make API calls to fetch subsequent pages. Other
267
+ # # methods are also available for managing paging directly.
268
+ # result.each do |response|
269
+ # # Each element is of type ::Google::Cloud::Channel::V1::Customer.
270
+ # p response
271
+ # end
272
+ #
252
273
  def list_customers request, options = nil
253
274
  raise ::ArgumentError, "request must be provided" if request.nil?
254
275
 
@@ -266,9 +287,11 @@ module Google
266
287
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
267
288
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
268
289
 
269
- header_params = {
270
- "parent" => request.parent
271
- }
290
+ header_params = {}
291
+ if request.parent
292
+ header_params["parent"] = request.parent
293
+ end
294
+
272
295
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
273
296
  metadata[:"x-goog-request-params"] ||= request_params_header
274
297
 
@@ -330,6 +353,21 @@ module Google
330
353
  #
331
354
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
332
355
  #
356
+ # @example Basic example
357
+ # require "google/cloud/channel/v1"
358
+ #
359
+ # # Create a client object. The client can be reused for multiple calls.
360
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
361
+ #
362
+ # # Create a request. To set request fields, pass in keyword arguments.
363
+ # request = Google::Cloud::Channel::V1::GetCustomerRequest.new
364
+ #
365
+ # # Call the get_customer method.
366
+ # result = client.get_customer request
367
+ #
368
+ # # The returned object is of type Google::Cloud::Channel::V1::Customer.
369
+ # p result
370
+ #
333
371
  def get_customer request, options = nil
334
372
  raise ::ArgumentError, "request must be provided" if request.nil?
335
373
 
@@ -347,9 +385,11 @@ module Google
347
385
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
348
386
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
349
387
 
350
- header_params = {
351
- "name" => request.name
352
- }
388
+ header_params = {}
389
+ if request.name
390
+ header_params["name"] = request.name
391
+ end
392
+
353
393
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
354
394
  metadata[:"x-goog-request-params"] ||= request_params_header
355
395
 
@@ -416,6 +456,21 @@ module Google
416
456
  #
417
457
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
418
458
  #
459
+ # @example Basic example
460
+ # require "google/cloud/channel/v1"
461
+ #
462
+ # # Create a client object. The client can be reused for multiple calls.
463
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
464
+ #
465
+ # # Create a request. To set request fields, pass in keyword arguments.
466
+ # request = Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest.new
467
+ #
468
+ # # Call the check_cloud_identity_accounts_exist method.
469
+ # result = client.check_cloud_identity_accounts_exist request
470
+ #
471
+ # # The returned object is of type Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse.
472
+ # p result
473
+ #
419
474
  def check_cloud_identity_accounts_exist request, options = nil
420
475
  raise ::ArgumentError, "request must be provided" if request.nil?
421
476
 
@@ -433,9 +488,11 @@ module Google
433
488
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
434
489
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
435
490
 
436
- header_params = {
437
- "parent" => request.parent
438
- }
491
+ header_params = {}
492
+ if request.parent
493
+ header_params["parent"] = request.parent
494
+ end
495
+
439
496
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
440
497
  metadata[:"x-goog-request-params"] ||= request_params_header
441
498
 
@@ -499,6 +556,21 @@ module Google
499
556
  #
500
557
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
501
558
  #
559
+ # @example Basic example
560
+ # require "google/cloud/channel/v1"
561
+ #
562
+ # # Create a client object. The client can be reused for multiple calls.
563
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
564
+ #
565
+ # # Create a request. To set request fields, pass in keyword arguments.
566
+ # request = Google::Cloud::Channel::V1::CreateCustomerRequest.new
567
+ #
568
+ # # Call the create_customer method.
569
+ # result = client.create_customer request
570
+ #
571
+ # # The returned object is of type Google::Cloud::Channel::V1::Customer.
572
+ # p result
573
+ #
502
574
  def create_customer request, options = nil
503
575
  raise ::ArgumentError, "request must be provided" if request.nil?
504
576
 
@@ -516,9 +588,11 @@ module Google
516
588
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
517
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
518
590
 
519
- header_params = {
520
- "parent" => request.parent
521
- }
591
+ header_params = {}
592
+ if request.parent
593
+ header_params["parent"] = request.parent
594
+ end
595
+
522
596
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
523
597
  metadata[:"x-goog-request-params"] ||= request_params_header
524
598
 
@@ -581,6 +655,21 @@ module Google
581
655
  #
582
656
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
583
657
  #
658
+ # @example Basic example
659
+ # require "google/cloud/channel/v1"
660
+ #
661
+ # # Create a client object. The client can be reused for multiple calls.
662
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
663
+ #
664
+ # # Create a request. To set request fields, pass in keyword arguments.
665
+ # request = Google::Cloud::Channel::V1::UpdateCustomerRequest.new
666
+ #
667
+ # # Call the update_customer method.
668
+ # result = client.update_customer request
669
+ #
670
+ # # The returned object is of type Google::Cloud::Channel::V1::Customer.
671
+ # p result
672
+ #
584
673
  def update_customer request, options = nil
585
674
  raise ::ArgumentError, "request must be provided" if request.nil?
586
675
 
@@ -598,9 +687,11 @@ module Google
598
687
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
599
688
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
600
689
 
601
- header_params = {
602
- "customer.name" => request.customer.name
603
- }
690
+ header_params = {}
691
+ if request.customer&.name
692
+ header_params["customer.name"] = request.customer.name
693
+ end
694
+
604
695
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
605
696
  metadata[:"x-goog-request-params"] ||= request_params_header
606
697
 
@@ -657,6 +748,21 @@ module Google
657
748
  #
658
749
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
659
750
  #
751
+ # @example Basic example
752
+ # require "google/cloud/channel/v1"
753
+ #
754
+ # # Create a client object. The client can be reused for multiple calls.
755
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
756
+ #
757
+ # # Create a request. To set request fields, pass in keyword arguments.
758
+ # request = Google::Cloud::Channel::V1::DeleteCustomerRequest.new
759
+ #
760
+ # # Call the delete_customer method.
761
+ # result = client.delete_customer request
762
+ #
763
+ # # The returned object is of type Google::Protobuf::Empty.
764
+ # p result
765
+ #
660
766
  def delete_customer request, options = nil
661
767
  raise ::ArgumentError, "request must be provided" if request.nil?
662
768
 
@@ -674,9 +780,11 @@ module Google
674
780
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
675
781
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
676
782
 
677
- header_params = {
678
- "name" => request.name
679
- }
783
+ header_params = {}
784
+ if request.name
785
+ header_params["name"] = request.name
786
+ end
787
+
680
788
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
681
789
  metadata[:"x-goog-request-params"] ||= request_params_header
682
790
 
@@ -696,6 +804,130 @@ module Google
696
804
  raise ::Google::Cloud::Error.from_error(e)
697
805
  end
698
806
 
807
+ ##
808
+ # Imports a {::Google::Cloud::Channel::V1::Customer Customer} from the Cloud Identity associated with the provided
809
+ # Cloud Identity ID or domain before a TransferEntitlements call. If a
810
+ # linked Customer already exists and overwrite_if_exists is true, it will
811
+ # update that Customer's data.
812
+ #
813
+ # Possible error codes:
814
+ #
815
+ # * PERMISSION_DENIED: The reseller account making the request is different
816
+ # from the reseller account in the API request.
817
+ # * NOT_FOUND: Cloud Identity doesn't exist or was deleted.
818
+ # * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is
819
+ # expired or invalid.
820
+ # * ALREADY_EXISTS: A customer already exists and has conflicting critical
821
+ # fields. Requires an overwrite.
822
+ #
823
+ # Return value:
824
+ # The {::Google::Cloud::Channel::V1::Customer Customer}.
825
+ #
826
+ # @overload import_customer(request, options = nil)
827
+ # Pass arguments to `import_customer` via a request object, either of type
828
+ # {::Google::Cloud::Channel::V1::ImportCustomerRequest} or an equivalent Hash.
829
+ #
830
+ # @param request [::Google::Cloud::Channel::V1::ImportCustomerRequest, ::Hash]
831
+ # A request object representing the call parameters. Required. To specify no
832
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
833
+ # @param options [::Gapic::CallOptions, ::Hash]
834
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
835
+ #
836
+ # @overload import_customer(domain: nil, cloud_identity_id: nil, parent: nil, auth_token: nil, overwrite_if_exists: nil, channel_partner_id: nil, customer: nil)
837
+ # Pass arguments to `import_customer` via keyword arguments. Note that at
838
+ # least one keyword argument is required. To specify no parameters, or to keep all
839
+ # the default parameter values, pass an empty Hash as a request object (see above).
840
+ #
841
+ # @param domain [::String]
842
+ # Required. Customer domain.
843
+ # @param cloud_identity_id [::String]
844
+ # Required. Customer's Cloud Identity ID
845
+ # @param parent [::String]
846
+ # Required. The resource name of the reseller's account.
847
+ # Parent takes the format: accounts/\\{account_id} or
848
+ # accounts/\\{account_id}/channelPartnerLinks/\\{channel_partner_id}
849
+ # @param auth_token [::String]
850
+ # Optional. The super admin of the resold customer generates this token to
851
+ # authorize a reseller to access their Cloud Identity and purchase
852
+ # entitlements on their behalf. You can omit this token after authorization.
853
+ # See https://support.google.com/a/answer/7643790 for more details.
854
+ # @param overwrite_if_exists [::Boolean]
855
+ # Required. Choose to overwrite an existing customer if found.
856
+ # This must be set to true if there is an existing customer with a
857
+ # conflicting region code or domain.
858
+ # @param channel_partner_id [::String]
859
+ # Optional. Cloud Identity ID of a channel partner who will be the direct reseller for
860
+ # the customer's order. This field is required for 2-tier transfer scenarios
861
+ # and can be provided via the request Parent binding as well.
862
+ # @param customer [::String]
863
+ # Optional. Specifies the customer that will receive imported Cloud Identity
864
+ # information.
865
+ # Format: accounts/\\{account_id}/customers/\\{customer_id}
866
+ #
867
+ # @yield [response, operation] Access the result along with the RPC operation
868
+ # @yieldparam response [::Google::Cloud::Channel::V1::Customer]
869
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
870
+ #
871
+ # @return [::Google::Cloud::Channel::V1::Customer]
872
+ #
873
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
874
+ #
875
+ # @example Basic example
876
+ # require "google/cloud/channel/v1"
877
+ #
878
+ # # Create a client object. The client can be reused for multiple calls.
879
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
880
+ #
881
+ # # Create a request. To set request fields, pass in keyword arguments.
882
+ # request = Google::Cloud::Channel::V1::ImportCustomerRequest.new
883
+ #
884
+ # # Call the import_customer method.
885
+ # result = client.import_customer request
886
+ #
887
+ # # The returned object is of type Google::Cloud::Channel::V1::Customer.
888
+ # p result
889
+ #
890
+ def import_customer request, options = nil
891
+ raise ::ArgumentError, "request must be provided" if request.nil?
892
+
893
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ImportCustomerRequest
894
+
895
+ # Converts hash and nil to an options object
896
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
897
+
898
+ # Customize the options with defaults
899
+ metadata = @config.rpcs.import_customer.metadata.to_h
900
+
901
+ # Set x-goog-api-client and x-goog-user-project headers
902
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
903
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
904
+ gapic_version: ::Google::Cloud::Channel::V1::VERSION
905
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
906
+
907
+ header_params = {}
908
+ if request.parent
909
+ header_params["parent"] = request.parent
910
+ end
911
+
912
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
913
+ metadata[:"x-goog-request-params"] ||= request_params_header
914
+
915
+ options.apply_defaults timeout: @config.rpcs.import_customer.timeout,
916
+ metadata: metadata,
917
+ retry_policy: @config.rpcs.import_customer.retry_policy
918
+
919
+ options.apply_defaults timeout: @config.timeout,
920
+ metadata: @config.metadata,
921
+ retry_policy: @config.retry_policy
922
+
923
+ @cloud_channel_service_stub.call_rpc :import_customer, request, options: options do |response, operation|
924
+ yield response, operation if block_given?
925
+ return response
926
+ end
927
+ rescue ::GRPC::BadStatus => e
928
+ raise ::Google::Cloud::Error.from_error(e)
929
+ end
930
+
699
931
  ##
700
932
  # Creates a Cloud Identity for the given customer using the customer's
701
933
  # information, or the information provided here.
@@ -752,6 +984,28 @@ module Google
752
984
  #
753
985
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
754
986
  #
987
+ # @example Basic example
988
+ # require "google/cloud/channel/v1"
989
+ #
990
+ # # Create a client object. The client can be reused for multiple calls.
991
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
992
+ #
993
+ # # Create a request. To set request fields, pass in keyword arguments.
994
+ # request = Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest.new
995
+ #
996
+ # # Call the provision_cloud_identity method.
997
+ # result = client.provision_cloud_identity request
998
+ #
999
+ # # The returned object is of type Gapic::Operation. You can use this
1000
+ # # object to check the status of an operation, cancel it, or wait
1001
+ # # for results. Here is how to block until completion:
1002
+ # result.wait_until_done! timeout: 60
1003
+ # if result.response?
1004
+ # p result.response
1005
+ # else
1006
+ # puts "Error!"
1007
+ # end
1008
+ #
755
1009
  def provision_cloud_identity request, options = nil
756
1010
  raise ::ArgumentError, "request must be provided" if request.nil?
757
1011
 
@@ -769,9 +1023,11 @@ module Google
769
1023
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
770
1024
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
771
1025
 
772
- header_params = {
773
- "customer" => request.customer
774
- }
1026
+ header_params = {}
1027
+ if request.customer
1028
+ header_params["customer"] = request.customer
1029
+ end
1030
+
775
1031
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
776
1032
  metadata[:"x-goog-request-params"] ||= request_params_header
777
1033
 
@@ -840,6 +1096,27 @@ module Google
840
1096
  #
841
1097
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
842
1098
  #
1099
+ # @example Basic example
1100
+ # require "google/cloud/channel/v1"
1101
+ #
1102
+ # # Create a client object. The client can be reused for multiple calls.
1103
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1104
+ #
1105
+ # # Create a request. To set request fields, pass in keyword arguments.
1106
+ # request = Google::Cloud::Channel::V1::ListEntitlementsRequest.new
1107
+ #
1108
+ # # Call the list_entitlements method.
1109
+ # result = client.list_entitlements request
1110
+ #
1111
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1112
+ # # iterate over all elements by calling #each, and the enumerable
1113
+ # # will lazily make API calls to fetch subsequent pages. Other
1114
+ # # methods are also available for managing paging directly.
1115
+ # result.each do |response|
1116
+ # # Each element is of type ::Google::Cloud::Channel::V1::Entitlement.
1117
+ # p response
1118
+ # end
1119
+ #
843
1120
  def list_entitlements request, options = nil
844
1121
  raise ::ArgumentError, "request must be provided" if request.nil?
845
1122
 
@@ -857,9 +1134,11 @@ module Google
857
1134
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
858
1135
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
859
1136
 
860
- header_params = {
861
- "parent" => request.parent
862
- }
1137
+ header_params = {}
1138
+ if request.parent
1139
+ header_params["parent"] = request.parent
1140
+ end
1141
+
863
1142
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
864
1143
  metadata[:"x-goog-request-params"] ||= request_params_header
865
1144
 
@@ -955,6 +1234,27 @@ module Google
955
1234
  #
956
1235
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
957
1236
  #
1237
+ # @example Basic example
1238
+ # require "google/cloud/channel/v1"
1239
+ #
1240
+ # # Create a client object. The client can be reused for multiple calls.
1241
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1242
+ #
1243
+ # # Create a request. To set request fields, pass in keyword arguments.
1244
+ # request = Google::Cloud::Channel::V1::ListTransferableSkusRequest.new
1245
+ #
1246
+ # # Call the list_transferable_skus method.
1247
+ # result = client.list_transferable_skus request
1248
+ #
1249
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1250
+ # # iterate over all elements by calling #each, and the enumerable
1251
+ # # will lazily make API calls to fetch subsequent pages. Other
1252
+ # # methods are also available for managing paging directly.
1253
+ # result.each do |response|
1254
+ # # Each element is of type ::Google::Cloud::Channel::V1::TransferableSku.
1255
+ # p response
1256
+ # end
1257
+ #
958
1258
  def list_transferable_skus request, options = nil
959
1259
  raise ::ArgumentError, "request must be provided" if request.nil?
960
1260
 
@@ -972,9 +1272,11 @@ module Google
972
1272
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
973
1273
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
974
1274
 
975
- header_params = {
976
- "parent" => request.parent
977
- }
1275
+ header_params = {}
1276
+ if request.parent
1277
+ header_params["parent"] = request.parent
1278
+ end
1279
+
978
1280
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
979
1281
  metadata[:"x-goog-request-params"] ||= request_params_header
980
1282
 
@@ -1061,6 +1363,27 @@ module Google
1061
1363
  #
1062
1364
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1063
1365
  #
1366
+ # @example Basic example
1367
+ # require "google/cloud/channel/v1"
1368
+ #
1369
+ # # Create a client object. The client can be reused for multiple calls.
1370
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1371
+ #
1372
+ # # Create a request. To set request fields, pass in keyword arguments.
1373
+ # request = Google::Cloud::Channel::V1::ListTransferableOffersRequest.new
1374
+ #
1375
+ # # Call the list_transferable_offers method.
1376
+ # result = client.list_transferable_offers request
1377
+ #
1378
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1379
+ # # iterate over all elements by calling #each, and the enumerable
1380
+ # # will lazily make API calls to fetch subsequent pages. Other
1381
+ # # methods are also available for managing paging directly.
1382
+ # result.each do |response|
1383
+ # # Each element is of type ::Google::Cloud::Channel::V1::TransferableOffer.
1384
+ # p response
1385
+ # end
1386
+ #
1064
1387
  def list_transferable_offers request, options = nil
1065
1388
  raise ::ArgumentError, "request must be provided" if request.nil?
1066
1389
 
@@ -1078,9 +1401,11 @@ module Google
1078
1401
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1079
1402
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1080
1403
 
1081
- header_params = {
1082
- "parent" => request.parent
1083
- }
1404
+ header_params = {}
1405
+ if request.parent
1406
+ header_params["parent"] = request.parent
1407
+ end
1408
+
1084
1409
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1085
1410
  metadata[:"x-goog-request-params"] ||= request_params_header
1086
1411
 
@@ -1141,6 +1466,21 @@ module Google
1141
1466
  #
1142
1467
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1143
1468
  #
1469
+ # @example Basic example
1470
+ # require "google/cloud/channel/v1"
1471
+ #
1472
+ # # Create a client object. The client can be reused for multiple calls.
1473
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1474
+ #
1475
+ # # Create a request. To set request fields, pass in keyword arguments.
1476
+ # request = Google::Cloud::Channel::V1::GetEntitlementRequest.new
1477
+ #
1478
+ # # Call the get_entitlement method.
1479
+ # result = client.get_entitlement request
1480
+ #
1481
+ # # The returned object is of type Google::Cloud::Channel::V1::Entitlement.
1482
+ # p result
1483
+ #
1144
1484
  def get_entitlement request, options = nil
1145
1485
  raise ::ArgumentError, "request must be provided" if request.nil?
1146
1486
 
@@ -1158,9 +1498,11 @@ module Google
1158
1498
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1159
1499
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1160
1500
 
1161
- header_params = {
1162
- "name" => request.name
1163
- }
1501
+ header_params = {}
1502
+ if request.name
1503
+ header_params["name"] = request.name
1504
+ end
1505
+
1164
1506
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1165
1507
  metadata[:"x-goog-request-params"] ||= request_params_header
1166
1508
 
@@ -1260,6 +1602,28 @@ module Google
1260
1602
  #
1261
1603
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1262
1604
  #
1605
+ # @example Basic example
1606
+ # require "google/cloud/channel/v1"
1607
+ #
1608
+ # # Create a client object. The client can be reused for multiple calls.
1609
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1610
+ #
1611
+ # # Create a request. To set request fields, pass in keyword arguments.
1612
+ # request = Google::Cloud::Channel::V1::CreateEntitlementRequest.new
1613
+ #
1614
+ # # Call the create_entitlement method.
1615
+ # result = client.create_entitlement request
1616
+ #
1617
+ # # The returned object is of type Gapic::Operation. You can use this
1618
+ # # object to check the status of an operation, cancel it, or wait
1619
+ # # for results. Here is how to block until completion:
1620
+ # result.wait_until_done! timeout: 60
1621
+ # if result.response?
1622
+ # p result.response
1623
+ # else
1624
+ # puts "Error!"
1625
+ # end
1626
+ #
1263
1627
  def create_entitlement request, options = nil
1264
1628
  raise ::ArgumentError, "request must be provided" if request.nil?
1265
1629
 
@@ -1277,9 +1641,11 @@ module Google
1277
1641
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1278
1642
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1279
1643
 
1280
- header_params = {
1281
- "parent" => request.parent
1282
- }
1644
+ header_params = {}
1645
+ if request.parent
1646
+ header_params["parent"] = request.parent
1647
+ end
1648
+
1283
1649
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1284
1650
  metadata[:"x-goog-request-params"] ||= request_params_header
1285
1651
 
@@ -1346,6 +1712,9 @@ module Google
1346
1712
  # accounts/\\{account_id}/customers/\\{customer_id}/entitlements/\\{entitlement_id}
1347
1713
  # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>]
1348
1714
  # Required. Entitlement parameters to update. You can only change editable parameters.
1715
+ #
1716
+ # To view the available Parameters for a request, refer to the
1717
+ # {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} from the desired offer.
1349
1718
  # @param request_id [::String]
1350
1719
  # Optional. You can specify an optional unique request ID, and if you need to retry
1351
1720
  # your request, the server will know to ignore the request if it's complete.
@@ -1369,6 +1738,28 @@ module Google
1369
1738
  #
1370
1739
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1371
1740
  #
1741
+ # @example Basic example
1742
+ # require "google/cloud/channel/v1"
1743
+ #
1744
+ # # Create a client object. The client can be reused for multiple calls.
1745
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1746
+ #
1747
+ # # Create a request. To set request fields, pass in keyword arguments.
1748
+ # request = Google::Cloud::Channel::V1::ChangeParametersRequest.new
1749
+ #
1750
+ # # Call the change_parameters method.
1751
+ # result = client.change_parameters request
1752
+ #
1753
+ # # The returned object is of type Gapic::Operation. You can use this
1754
+ # # object to check the status of an operation, cancel it, or wait
1755
+ # # for results. Here is how to block until completion:
1756
+ # result.wait_until_done! timeout: 60
1757
+ # if result.response?
1758
+ # p result.response
1759
+ # else
1760
+ # puts "Error!"
1761
+ # end
1762
+ #
1372
1763
  def change_parameters request, options = nil
1373
1764
  raise ::ArgumentError, "request must be provided" if request.nil?
1374
1765
 
@@ -1386,9 +1777,11 @@ module Google
1386
1777
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1387
1778
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1388
1779
 
1389
- header_params = {
1390
- "name" => request.name
1391
- }
1780
+ header_params = {}
1781
+ if request.name
1782
+ header_params["name"] = request.name
1783
+ end
1784
+
1392
1785
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1393
1786
  metadata[:"x-goog-request-params"] ||= request_params_header
1394
1787
 
@@ -1476,6 +1869,28 @@ module Google
1476
1869
  #
1477
1870
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1478
1871
  #
1872
+ # @example Basic example
1873
+ # require "google/cloud/channel/v1"
1874
+ #
1875
+ # # Create a client object. The client can be reused for multiple calls.
1876
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
1877
+ #
1878
+ # # Create a request. To set request fields, pass in keyword arguments.
1879
+ # request = Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest.new
1880
+ #
1881
+ # # Call the change_renewal_settings method.
1882
+ # result = client.change_renewal_settings request
1883
+ #
1884
+ # # The returned object is of type Gapic::Operation. You can use this
1885
+ # # object to check the status of an operation, cancel it, or wait
1886
+ # # for results. Here is how to block until completion:
1887
+ # result.wait_until_done! timeout: 60
1888
+ # if result.response?
1889
+ # p result.response
1890
+ # else
1891
+ # puts "Error!"
1892
+ # end
1893
+ #
1479
1894
  def change_renewal_settings request, options = nil
1480
1895
  raise ::ArgumentError, "request must be provided" if request.nil?
1481
1896
 
@@ -1493,9 +1908,11 @@ module Google
1493
1908
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1494
1909
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1495
1910
 
1496
- header_params = {
1497
- "name" => request.name
1498
- }
1911
+ header_params = {}
1912
+ if request.name
1913
+ header_params["name"] = request.name
1914
+ end
1915
+
1499
1916
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1500
1917
  metadata[:"x-goog-request-params"] ||= request_params_header
1501
1918
 
@@ -1562,7 +1979,8 @@ module Google
1562
1979
  # Required. New Offer.
1563
1980
  # Format: accounts/\\{account_id}/offers/\\{offer_id}.
1564
1981
  # @param parameters [::Array<::Google::Cloud::Channel::V1::Parameter, ::Hash>]
1565
- # Optional. Parameters needed to purchase the Offer.
1982
+ # Optional. Parameters needed to purchase the Offer. To view the available Parameters
1983
+ # refer to the {::Google::Cloud::Channel::V1::Offer#parameter_definitions Offer.parameter_definitions} from the desired offer.
1566
1984
  # @param purchase_order_id [::String]
1567
1985
  # Optional. Purchase order id provided by the reseller.
1568
1986
  # @param request_id [::String]
@@ -1586,6 +2004,28 @@ module Google
1586
2004
  #
1587
2005
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1588
2006
  #
2007
+ # @example Basic example
2008
+ # require "google/cloud/channel/v1"
2009
+ #
2010
+ # # Create a client object. The client can be reused for multiple calls.
2011
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2012
+ #
2013
+ # # Create a request. To set request fields, pass in keyword arguments.
2014
+ # request = Google::Cloud::Channel::V1::ChangeOfferRequest.new
2015
+ #
2016
+ # # Call the change_offer method.
2017
+ # result = client.change_offer request
2018
+ #
2019
+ # # The returned object is of type Gapic::Operation. You can use this
2020
+ # # object to check the status of an operation, cancel it, or wait
2021
+ # # for results. Here is how to block until completion:
2022
+ # result.wait_until_done! timeout: 60
2023
+ # if result.response?
2024
+ # p result.response
2025
+ # else
2026
+ # puts "Error!"
2027
+ # end
2028
+ #
1589
2029
  def change_offer request, options = nil
1590
2030
  raise ::ArgumentError, "request must be provided" if request.nil?
1591
2031
 
@@ -1603,9 +2043,11 @@ module Google
1603
2043
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1604
2044
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1605
2045
 
1606
- header_params = {
1607
- "name" => request.name
1608
- }
2046
+ header_params = {}
2047
+ if request.name
2048
+ header_params["name"] = request.name
2049
+ end
2050
+
1609
2051
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1610
2052
  metadata[:"x-goog-request-params"] ||= request_params_header
1611
2053
 
@@ -1692,6 +2134,28 @@ module Google
1692
2134
  #
1693
2135
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1694
2136
  #
2137
+ # @example Basic example
2138
+ # require "google/cloud/channel/v1"
2139
+ #
2140
+ # # Create a client object. The client can be reused for multiple calls.
2141
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2142
+ #
2143
+ # # Create a request. To set request fields, pass in keyword arguments.
2144
+ # request = Google::Cloud::Channel::V1::StartPaidServiceRequest.new
2145
+ #
2146
+ # # Call the start_paid_service method.
2147
+ # result = client.start_paid_service request
2148
+ #
2149
+ # # The returned object is of type Gapic::Operation. You can use this
2150
+ # # object to check the status of an operation, cancel it, or wait
2151
+ # # for results. Here is how to block until completion:
2152
+ # result.wait_until_done! timeout: 60
2153
+ # if result.response?
2154
+ # p result.response
2155
+ # else
2156
+ # puts "Error!"
2157
+ # end
2158
+ #
1695
2159
  def start_paid_service request, options = nil
1696
2160
  raise ::ArgumentError, "request must be provided" if request.nil?
1697
2161
 
@@ -1709,9 +2173,11 @@ module Google
1709
2173
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1710
2174
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1711
2175
 
1712
- header_params = {
1713
- "name" => request.name
1714
- }
2176
+ header_params = {}
2177
+ if request.name
2178
+ header_params["name"] = request.name
2179
+ end
2180
+
1715
2181
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1716
2182
  metadata[:"x-goog-request-params"] ||= request_params_header
1717
2183
 
@@ -1795,6 +2261,28 @@ module Google
1795
2261
  #
1796
2262
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1797
2263
  #
2264
+ # @example Basic example
2265
+ # require "google/cloud/channel/v1"
2266
+ #
2267
+ # # Create a client object. The client can be reused for multiple calls.
2268
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2269
+ #
2270
+ # # Create a request. To set request fields, pass in keyword arguments.
2271
+ # request = Google::Cloud::Channel::V1::SuspendEntitlementRequest.new
2272
+ #
2273
+ # # Call the suspend_entitlement method.
2274
+ # result = client.suspend_entitlement request
2275
+ #
2276
+ # # The returned object is of type Gapic::Operation. You can use this
2277
+ # # object to check the status of an operation, cancel it, or wait
2278
+ # # for results. Here is how to block until completion:
2279
+ # result.wait_until_done! timeout: 60
2280
+ # if result.response?
2281
+ # p result.response
2282
+ # else
2283
+ # puts "Error!"
2284
+ # end
2285
+ #
1798
2286
  def suspend_entitlement request, options = nil
1799
2287
  raise ::ArgumentError, "request must be provided" if request.nil?
1800
2288
 
@@ -1812,9 +2300,11 @@ module Google
1812
2300
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1813
2301
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1814
2302
 
1815
- header_params = {
1816
- "name" => request.name
1817
- }
2303
+ header_params = {}
2304
+ if request.name
2305
+ header_params["name"] = request.name
2306
+ end
2307
+
1818
2308
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1819
2309
  metadata[:"x-goog-request-params"] ||= request_params_header
1820
2310
 
@@ -1903,6 +2393,28 @@ module Google
1903
2393
  #
1904
2394
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1905
2395
  #
2396
+ # @example Basic example
2397
+ # require "google/cloud/channel/v1"
2398
+ #
2399
+ # # Create a client object. The client can be reused for multiple calls.
2400
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2401
+ #
2402
+ # # Create a request. To set request fields, pass in keyword arguments.
2403
+ # request = Google::Cloud::Channel::V1::CancelEntitlementRequest.new
2404
+ #
2405
+ # # Call the cancel_entitlement method.
2406
+ # result = client.cancel_entitlement request
2407
+ #
2408
+ # # The returned object is of type Gapic::Operation. You can use this
2409
+ # # object to check the status of an operation, cancel it, or wait
2410
+ # # for results. Here is how to block until completion:
2411
+ # result.wait_until_done! timeout: 60
2412
+ # if result.response?
2413
+ # p result.response
2414
+ # else
2415
+ # puts "Error!"
2416
+ # end
2417
+ #
1906
2418
  def cancel_entitlement request, options = nil
1907
2419
  raise ::ArgumentError, "request must be provided" if request.nil?
1908
2420
 
@@ -1920,9 +2432,11 @@ module Google
1920
2432
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
1921
2433
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1922
2434
 
1923
- header_params = {
1924
- "name" => request.name
1925
- }
2435
+ header_params = {}
2436
+ if request.name
2437
+ header_params["name"] = request.name
2438
+ end
2439
+
1926
2440
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1927
2441
  metadata[:"x-goog-request-params"] ||= request_params_header
1928
2442
 
@@ -2012,6 +2526,28 @@ module Google
2012
2526
  #
2013
2527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2014
2528
  #
2529
+ # @example Basic example
2530
+ # require "google/cloud/channel/v1"
2531
+ #
2532
+ # # Create a client object. The client can be reused for multiple calls.
2533
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2534
+ #
2535
+ # # Create a request. To set request fields, pass in keyword arguments.
2536
+ # request = Google::Cloud::Channel::V1::ActivateEntitlementRequest.new
2537
+ #
2538
+ # # Call the activate_entitlement method.
2539
+ # result = client.activate_entitlement request
2540
+ #
2541
+ # # The returned object is of type Gapic::Operation. You can use this
2542
+ # # object to check the status of an operation, cancel it, or wait
2543
+ # # for results. Here is how to block until completion:
2544
+ # result.wait_until_done! timeout: 60
2545
+ # if result.response?
2546
+ # p result.response
2547
+ # else
2548
+ # puts "Error!"
2549
+ # end
2550
+ #
2015
2551
  def activate_entitlement request, options = nil
2016
2552
  raise ::ArgumentError, "request must be provided" if request.nil?
2017
2553
 
@@ -2029,9 +2565,11 @@ module Google
2029
2565
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2030
2566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2031
2567
 
2032
- header_params = {
2033
- "name" => request.name
2034
- }
2568
+ header_params = {}
2569
+ if request.name
2570
+ header_params["name"] = request.name
2571
+ end
2572
+
2035
2573
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2036
2574
  metadata[:"x-goog-request-params"] ||= request_params_header
2037
2575
 
@@ -2130,6 +2668,28 @@ module Google
2130
2668
  #
2131
2669
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2132
2670
  #
2671
+ # @example Basic example
2672
+ # require "google/cloud/channel/v1"
2673
+ #
2674
+ # # Create a client object. The client can be reused for multiple calls.
2675
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2676
+ #
2677
+ # # Create a request. To set request fields, pass in keyword arguments.
2678
+ # request = Google::Cloud::Channel::V1::TransferEntitlementsRequest.new
2679
+ #
2680
+ # # Call the transfer_entitlements method.
2681
+ # result = client.transfer_entitlements request
2682
+ #
2683
+ # # The returned object is of type Gapic::Operation. You can use this
2684
+ # # object to check the status of an operation, cancel it, or wait
2685
+ # # for results. Here is how to block until completion:
2686
+ # result.wait_until_done! timeout: 60
2687
+ # if result.response?
2688
+ # p result.response
2689
+ # else
2690
+ # puts "Error!"
2691
+ # end
2692
+ #
2133
2693
  def transfer_entitlements request, options = nil
2134
2694
  raise ::ArgumentError, "request must be provided" if request.nil?
2135
2695
 
@@ -2147,9 +2707,11 @@ module Google
2147
2707
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2148
2708
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2149
2709
 
2150
- header_params = {
2151
- "parent" => request.parent
2152
- }
2710
+ header_params = {}
2711
+ if request.parent
2712
+ header_params["parent"] = request.parent
2713
+ end
2714
+
2153
2715
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2154
2716
  metadata[:"x-goog-request-params"] ||= request_params_header
2155
2717
 
@@ -2243,6 +2805,28 @@ module Google
2243
2805
  #
2244
2806
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2245
2807
  #
2808
+ # @example Basic example
2809
+ # require "google/cloud/channel/v1"
2810
+ #
2811
+ # # Create a client object. The client can be reused for multiple calls.
2812
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2813
+ #
2814
+ # # Create a request. To set request fields, pass in keyword arguments.
2815
+ # request = Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest.new
2816
+ #
2817
+ # # Call the transfer_entitlements_to_google method.
2818
+ # result = client.transfer_entitlements_to_google request
2819
+ #
2820
+ # # The returned object is of type Gapic::Operation. You can use this
2821
+ # # object to check the status of an operation, cancel it, or wait
2822
+ # # for results. Here is how to block until completion:
2823
+ # result.wait_until_done! timeout: 60
2824
+ # if result.response?
2825
+ # p result.response
2826
+ # else
2827
+ # puts "Error!"
2828
+ # end
2829
+ #
2246
2830
  def transfer_entitlements_to_google request, options = nil
2247
2831
  raise ::ArgumentError, "request must be provided" if request.nil?
2248
2832
 
@@ -2260,9 +2844,11 @@ module Google
2260
2844
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2261
2845
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2262
2846
 
2263
- header_params = {
2264
- "parent" => request.parent
2265
- }
2847
+ header_params = {}
2848
+ if request.parent
2849
+ header_params["parent"] = request.parent
2850
+ end
2851
+
2266
2852
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2267
2853
  metadata[:"x-goog-request-params"] ||= request_params_header
2268
2854
 
@@ -2335,6 +2921,27 @@ module Google
2335
2921
  #
2336
2922
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2337
2923
  #
2924
+ # @example Basic example
2925
+ # require "google/cloud/channel/v1"
2926
+ #
2927
+ # # Create a client object. The client can be reused for multiple calls.
2928
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
2929
+ #
2930
+ # # Create a request. To set request fields, pass in keyword arguments.
2931
+ # request = Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest.new
2932
+ #
2933
+ # # Call the list_channel_partner_links method.
2934
+ # result = client.list_channel_partner_links request
2935
+ #
2936
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2937
+ # # iterate over all elements by calling #each, and the enumerable
2938
+ # # will lazily make API calls to fetch subsequent pages. Other
2939
+ # # methods are also available for managing paging directly.
2940
+ # result.each do |response|
2941
+ # # Each element is of type ::Google::Cloud::Channel::V1::ChannelPartnerLink.
2942
+ # p response
2943
+ # end
2944
+ #
2338
2945
  def list_channel_partner_links request, options = nil
2339
2946
  raise ::ArgumentError, "request must be provided" if request.nil?
2340
2947
 
@@ -2352,9 +2959,11 @@ module Google
2352
2959
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2353
2960
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2354
2961
 
2355
- header_params = {
2356
- "parent" => request.parent
2357
- }
2962
+ header_params = {}
2963
+ if request.parent
2964
+ header_params["parent"] = request.parent
2965
+ end
2966
+
2358
2967
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2359
2968
  metadata[:"x-goog-request-params"] ||= request_params_header
2360
2969
 
@@ -2420,6 +3029,21 @@ module Google
2420
3029
  #
2421
3030
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2422
3031
  #
3032
+ # @example Basic example
3033
+ # require "google/cloud/channel/v1"
3034
+ #
3035
+ # # Create a client object. The client can be reused for multiple calls.
3036
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3037
+ #
3038
+ # # Create a request. To set request fields, pass in keyword arguments.
3039
+ # request = Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest.new
3040
+ #
3041
+ # # Call the get_channel_partner_link method.
3042
+ # result = client.get_channel_partner_link request
3043
+ #
3044
+ # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink.
3045
+ # p result
3046
+ #
2423
3047
  def get_channel_partner_link request, options = nil
2424
3048
  raise ::ArgumentError, "request must be provided" if request.nil?
2425
3049
 
@@ -2437,9 +3061,11 @@ module Google
2437
3061
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2438
3062
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2439
3063
 
2440
- header_params = {
2441
- "name" => request.name
2442
- }
3064
+ header_params = {}
3065
+ if request.name
3066
+ header_params["name"] = request.name
3067
+ end
3068
+
2443
3069
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2444
3070
  metadata[:"x-goog-request-params"] ||= request_params_header
2445
3071
 
@@ -2515,6 +3141,21 @@ module Google
2515
3141
  #
2516
3142
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2517
3143
  #
3144
+ # @example Basic example
3145
+ # require "google/cloud/channel/v1"
3146
+ #
3147
+ # # Create a client object. The client can be reused for multiple calls.
3148
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3149
+ #
3150
+ # # Create a request. To set request fields, pass in keyword arguments.
3151
+ # request = Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest.new
3152
+ #
3153
+ # # Call the create_channel_partner_link method.
3154
+ # result = client.create_channel_partner_link request
3155
+ #
3156
+ # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink.
3157
+ # p result
3158
+ #
2518
3159
  def create_channel_partner_link request, options = nil
2519
3160
  raise ::ArgumentError, "request must be provided" if request.nil?
2520
3161
 
@@ -2532,9 +3173,11 @@ module Google
2532
3173
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2533
3174
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2534
3175
 
2535
- header_params = {
2536
- "parent" => request.parent
2537
- }
3176
+ header_params = {}
3177
+ if request.parent
3178
+ header_params["parent"] = request.parent
3179
+ end
3180
+
2538
3181
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2539
3182
  metadata[:"x-goog-request-params"] ||= request_params_header
2540
3183
 
@@ -2612,6 +3255,21 @@ module Google
2612
3255
  #
2613
3256
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2614
3257
  #
3258
+ # @example Basic example
3259
+ # require "google/cloud/channel/v1"
3260
+ #
3261
+ # # Create a client object. The client can be reused for multiple calls.
3262
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3263
+ #
3264
+ # # Create a request. To set request fields, pass in keyword arguments.
3265
+ # request = Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest.new
3266
+ #
3267
+ # # Call the update_channel_partner_link method.
3268
+ # result = client.update_channel_partner_link request
3269
+ #
3270
+ # # The returned object is of type Google::Cloud::Channel::V1::ChannelPartnerLink.
3271
+ # p result
3272
+ #
2615
3273
  def update_channel_partner_link request, options = nil
2616
3274
  raise ::ArgumentError, "request must be provided" if request.nil?
2617
3275
 
@@ -2629,9 +3287,11 @@ module Google
2629
3287
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2630
3288
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2631
3289
 
2632
- header_params = {
2633
- "name" => request.name
2634
- }
3290
+ header_params = {}
3291
+ if request.name
3292
+ header_params["name"] = request.name
3293
+ end
3294
+
2635
3295
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2636
3296
  metadata[:"x-goog-request-params"] ||= request_params_header
2637
3297
 
@@ -2691,6 +3351,21 @@ module Google
2691
3351
  #
2692
3352
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2693
3353
  #
3354
+ # @example Basic example
3355
+ # require "google/cloud/channel/v1"
3356
+ #
3357
+ # # Create a client object. The client can be reused for multiple calls.
3358
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3359
+ #
3360
+ # # Create a request. To set request fields, pass in keyword arguments.
3361
+ # request = Google::Cloud::Channel::V1::LookupOfferRequest.new
3362
+ #
3363
+ # # Call the lookup_offer method.
3364
+ # result = client.lookup_offer request
3365
+ #
3366
+ # # The returned object is of type Google::Cloud::Channel::V1::Offer.
3367
+ # p result
3368
+ #
2694
3369
  def lookup_offer request, options = nil
2695
3370
  raise ::ArgumentError, "request must be provided" if request.nil?
2696
3371
 
@@ -2708,9 +3383,11 @@ module Google
2708
3383
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2709
3384
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2710
3385
 
2711
- header_params = {
2712
- "entitlement" => request.entitlement
2713
- }
3386
+ header_params = {}
3387
+ if request.entitlement
3388
+ header_params["entitlement"] = request.entitlement
3389
+ end
3390
+
2714
3391
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2715
3392
  metadata[:"x-goog-request-params"] ||= request_params_header
2716
3393
 
@@ -2774,6 +3451,27 @@ module Google
2774
3451
  #
2775
3452
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2776
3453
  #
3454
+ # @example Basic example
3455
+ # require "google/cloud/channel/v1"
3456
+ #
3457
+ # # Create a client object. The client can be reused for multiple calls.
3458
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3459
+ #
3460
+ # # Create a request. To set request fields, pass in keyword arguments.
3461
+ # request = Google::Cloud::Channel::V1::ListProductsRequest.new
3462
+ #
3463
+ # # Call the list_products method.
3464
+ # result = client.list_products request
3465
+ #
3466
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3467
+ # # iterate over all elements by calling #each, and the enumerable
3468
+ # # will lazily make API calls to fetch subsequent pages. Other
3469
+ # # methods are also available for managing paging directly.
3470
+ # result.each do |response|
3471
+ # # Each element is of type ::Google::Cloud::Channel::V1::Product.
3472
+ # p response
3473
+ # end
3474
+ #
2777
3475
  def list_products request, options = nil
2778
3476
  raise ::ArgumentError, "request must be provided" if request.nil?
2779
3477
 
@@ -2857,6 +3555,27 @@ module Google
2857
3555
  #
2858
3556
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2859
3557
  #
3558
+ # @example Basic example
3559
+ # require "google/cloud/channel/v1"
3560
+ #
3561
+ # # Create a client object. The client can be reused for multiple calls.
3562
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3563
+ #
3564
+ # # Create a request. To set request fields, pass in keyword arguments.
3565
+ # request = Google::Cloud::Channel::V1::ListSkusRequest.new
3566
+ #
3567
+ # # Call the list_skus method.
3568
+ # result = client.list_skus request
3569
+ #
3570
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3571
+ # # iterate over all elements by calling #each, and the enumerable
3572
+ # # will lazily make API calls to fetch subsequent pages. Other
3573
+ # # methods are also available for managing paging directly.
3574
+ # result.each do |response|
3575
+ # # Each element is of type ::Google::Cloud::Channel::V1::Sku.
3576
+ # p response
3577
+ # end
3578
+ #
2860
3579
  def list_skus request, options = nil
2861
3580
  raise ::ArgumentError, "request must be provided" if request.nil?
2862
3581
 
@@ -2874,9 +3593,11 @@ module Google
2874
3593
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2875
3594
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2876
3595
 
2877
- header_params = {
2878
- "parent" => request.parent
2879
- }
3596
+ header_params = {}
3597
+ if request.parent
3598
+ header_params["parent"] = request.parent
3599
+ end
3600
+
2880
3601
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2881
3602
  metadata[:"x-goog-request-params"] ||= request_params_header
2882
3603
 
@@ -2947,6 +3668,27 @@ module Google
2947
3668
  #
2948
3669
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2949
3670
  #
3671
+ # @example Basic example
3672
+ # require "google/cloud/channel/v1"
3673
+ #
3674
+ # # Create a client object. The client can be reused for multiple calls.
3675
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3676
+ #
3677
+ # # Create a request. To set request fields, pass in keyword arguments.
3678
+ # request = Google::Cloud::Channel::V1::ListOffersRequest.new
3679
+ #
3680
+ # # Call the list_offers method.
3681
+ # result = client.list_offers request
3682
+ #
3683
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3684
+ # # iterate over all elements by calling #each, and the enumerable
3685
+ # # will lazily make API calls to fetch subsequent pages. Other
3686
+ # # methods are also available for managing paging directly.
3687
+ # result.each do |response|
3688
+ # # Each element is of type ::Google::Cloud::Channel::V1::Offer.
3689
+ # p response
3690
+ # end
3691
+ #
2950
3692
  def list_offers request, options = nil
2951
3693
  raise ::ArgumentError, "request must be provided" if request.nil?
2952
3694
 
@@ -2964,9 +3706,11 @@ module Google
2964
3706
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
2965
3707
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2966
3708
 
2967
- header_params = {
2968
- "parent" => request.parent
2969
- }
3709
+ header_params = {}
3710
+ if request.parent
3711
+ header_params["parent"] = request.parent
3712
+ end
3713
+
2970
3714
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2971
3715
  metadata[:"x-goog-request-params"] ||= request_params_header
2972
3716
 
@@ -3039,6 +3783,27 @@ module Google
3039
3783
  #
3040
3784
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
3041
3785
  #
3786
+ # @example Basic example
3787
+ # require "google/cloud/channel/v1"
3788
+ #
3789
+ # # Create a client object. The client can be reused for multiple calls.
3790
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3791
+ #
3792
+ # # Create a request. To set request fields, pass in keyword arguments.
3793
+ # request = Google::Cloud::Channel::V1::ListPurchasableSkusRequest.new
3794
+ #
3795
+ # # Call the list_purchasable_skus method.
3796
+ # result = client.list_purchasable_skus request
3797
+ #
3798
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3799
+ # # iterate over all elements by calling #each, and the enumerable
3800
+ # # will lazily make API calls to fetch subsequent pages. Other
3801
+ # # methods are also available for managing paging directly.
3802
+ # result.each do |response|
3803
+ # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableSku.
3804
+ # p response
3805
+ # end
3806
+ #
3042
3807
  def list_purchasable_skus request, options = nil
3043
3808
  raise ::ArgumentError, "request must be provided" if request.nil?
3044
3809
 
@@ -3056,9 +3821,11 @@ module Google
3056
3821
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
3057
3822
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3058
3823
 
3059
- header_params = {
3060
- "customer" => request.customer
3061
- }
3824
+ header_params = {}
3825
+ if request.customer
3826
+ header_params["customer"] = request.customer
3827
+ end
3828
+
3062
3829
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3063
3830
  metadata[:"x-goog-request-params"] ||= request_params_header
3064
3831
 
@@ -3131,6 +3898,27 @@ module Google
3131
3898
  #
3132
3899
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
3133
3900
  #
3901
+ # @example Basic example
3902
+ # require "google/cloud/channel/v1"
3903
+ #
3904
+ # # Create a client object. The client can be reused for multiple calls.
3905
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
3906
+ #
3907
+ # # Create a request. To set request fields, pass in keyword arguments.
3908
+ # request = Google::Cloud::Channel::V1::ListPurchasableOffersRequest.new
3909
+ #
3910
+ # # Call the list_purchasable_offers method.
3911
+ # result = client.list_purchasable_offers request
3912
+ #
3913
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3914
+ # # iterate over all elements by calling #each, and the enumerable
3915
+ # # will lazily make API calls to fetch subsequent pages. Other
3916
+ # # methods are also available for managing paging directly.
3917
+ # result.each do |response|
3918
+ # # Each element is of type ::Google::Cloud::Channel::V1::PurchasableOffer.
3919
+ # p response
3920
+ # end
3921
+ #
3134
3922
  def list_purchasable_offers request, options = nil
3135
3923
  raise ::ArgumentError, "request must be provided" if request.nil?
3136
3924
 
@@ -3148,9 +3936,11 @@ module Google
3148
3936
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
3149
3937
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3150
3938
 
3151
- header_params = {
3152
- "customer" => request.customer
3153
- }
3939
+ header_params = {}
3940
+ if request.customer
3941
+ header_params["customer"] = request.customer
3942
+ end
3943
+
3154
3944
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3155
3945
  metadata[:"x-goog-request-params"] ||= request_params_header
3156
3946
 
@@ -3218,6 +4008,21 @@ module Google
3218
4008
  #
3219
4009
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
3220
4010
  #
4011
+ # @example Basic example
4012
+ # require "google/cloud/channel/v1"
4013
+ #
4014
+ # # Create a client object. The client can be reused for multiple calls.
4015
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
4016
+ #
4017
+ # # Create a request. To set request fields, pass in keyword arguments.
4018
+ # request = Google::Cloud::Channel::V1::RegisterSubscriberRequest.new
4019
+ #
4020
+ # # Call the register_subscriber method.
4021
+ # result = client.register_subscriber request
4022
+ #
4023
+ # # The returned object is of type Google::Cloud::Channel::V1::RegisterSubscriberResponse.
4024
+ # p result
4025
+ #
3221
4026
  def register_subscriber request, options = nil
3222
4027
  raise ::ArgumentError, "request must be provided" if request.nil?
3223
4028
 
@@ -3235,9 +4040,11 @@ module Google
3235
4040
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
3236
4041
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3237
4042
 
3238
- header_params = {
3239
- "account" => request.account
3240
- }
4043
+ header_params = {}
4044
+ if request.account
4045
+ header_params["account"] = request.account
4046
+ end
4047
+
3241
4048
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3242
4049
  metadata[:"x-goog-request-params"] ||= request_params_header
3243
4050
 
@@ -3308,6 +4115,21 @@ module Google
3308
4115
  #
3309
4116
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
3310
4117
  #
4118
+ # @example Basic example
4119
+ # require "google/cloud/channel/v1"
4120
+ #
4121
+ # # Create a client object. The client can be reused for multiple calls.
4122
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
4123
+ #
4124
+ # # Create a request. To set request fields, pass in keyword arguments.
4125
+ # request = Google::Cloud::Channel::V1::UnregisterSubscriberRequest.new
4126
+ #
4127
+ # # Call the unregister_subscriber method.
4128
+ # result = client.unregister_subscriber request
4129
+ #
4130
+ # # The returned object is of type Google::Cloud::Channel::V1::UnregisterSubscriberResponse.
4131
+ # p result
4132
+ #
3311
4133
  def unregister_subscriber request, options = nil
3312
4134
  raise ::ArgumentError, "request must be provided" if request.nil?
3313
4135
 
@@ -3325,9 +4147,11 @@ module Google
3325
4147
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
3326
4148
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3327
4149
 
3328
- header_params = {
3329
- "account" => request.account
3330
- }
4150
+ header_params = {}
4151
+ if request.account
4152
+ header_params["account"] = request.account
4153
+ end
4154
+
3331
4155
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3332
4156
  metadata[:"x-goog-request-params"] ||= request_params_header
3333
4157
 
@@ -3403,6 +4227,21 @@ module Google
3403
4227
  #
3404
4228
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
3405
4229
  #
4230
+ # @example Basic example
4231
+ # require "google/cloud/channel/v1"
4232
+ #
4233
+ # # Create a client object. The client can be reused for multiple calls.
4234
+ # client = Google::Cloud::Channel::V1::CloudChannelService::Client.new
4235
+ #
4236
+ # # Create a request. To set request fields, pass in keyword arguments.
4237
+ # request = Google::Cloud::Channel::V1::ListSubscribersRequest.new
4238
+ #
4239
+ # # Call the list_subscribers method.
4240
+ # result = client.list_subscribers request
4241
+ #
4242
+ # # The returned object is of type Google::Cloud::Channel::V1::ListSubscribersResponse.
4243
+ # p result
4244
+ #
3406
4245
  def list_subscribers request, options = nil
3407
4246
  raise ::ArgumentError, "request must be provided" if request.nil?
3408
4247
 
@@ -3420,9 +4259,11 @@ module Google
3420
4259
  gapic_version: ::Google::Cloud::Channel::V1::VERSION
3421
4260
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3422
4261
 
3423
- header_params = {
3424
- "account" => request.account
3425
- }
4262
+ header_params = {}
4263
+ if request.account
4264
+ header_params["account"] = request.account
4265
+ end
4266
+
3426
4267
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3427
4268
  metadata[:"x-goog-request-params"] ||= request_params_header
3428
4269
 
@@ -3608,6 +4449,11 @@ module Google
3608
4449
  #
3609
4450
  attr_reader :delete_customer
3610
4451
  ##
4452
+ # RPC-specific configuration for `import_customer`
4453
+ # @return [::Gapic::Config::Method]
4454
+ #
4455
+ attr_reader :import_customer
4456
+ ##
3611
4457
  # RPC-specific configuration for `provision_cloud_identity`
3612
4458
  # @return [::Gapic::Config::Method]
3613
4459
  #
@@ -3762,6 +4608,8 @@ module Google
3762
4608
  @update_customer = ::Gapic::Config::Method.new update_customer_config
3763
4609
  delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer
3764
4610
  @delete_customer = ::Gapic::Config::Method.new delete_customer_config
4611
+ import_customer_config = parent_rpcs.import_customer if parent_rpcs.respond_to? :import_customer
4612
+ @import_customer = ::Gapic::Config::Method.new import_customer_config
3765
4613
  provision_cloud_identity_config = parent_rpcs.provision_cloud_identity if parent_rpcs.respond_to? :provision_cloud_identity
3766
4614
  @provision_cloud_identity = ::Gapic::Config::Method.new provision_cloud_identity_config
3767
4615
  list_entitlements_config = parent_rpcs.list_entitlements if parent_rpcs.respond_to? :list_entitlements