google-cloud-domains-v1beta1 0.2.1 → 0.3.1

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.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Domains::V1beta1::Domains::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Domains clients:
47
- #
48
- # ::Google::Cloud::Domains::V1beta1::Domains::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all Domains clients
47
+ # ::Google::Cloud::Domains::V1beta1::Domains::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -94,19 +93,15 @@ module Google
94
93
  ##
95
94
  # Create a new Domains client object.
96
95
  #
97
- # ## Examples
98
- #
99
- # To create a new Domains client with the default
100
- # configuration:
96
+ # @example
101
97
  #
102
- # client = ::Google::Cloud::Domains::V1beta1::Domains::Client.new
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::Domains::V1beta1::Domains::Client.new
103
100
  #
104
- # To create a new Domains client with a custom
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Domains::V1beta1::Domains::Client.new do |config|
108
- # config.timeout = 10.0
109
- # end
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::Domains::V1beta1::Domains::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
110
105
  #
111
106
  # @yield [config] Configure the Domains client.
112
107
  # @yieldparam config [Client::Configuration]
@@ -126,14 +121,13 @@ module Google
126
121
 
127
122
  # Create credentials
128
123
  credentials = @config.credentials
129
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
130
125
  # but only if the default endpoint does not have a region prefix.
131
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
132
- @config.endpoint == Client.configure.endpoint &&
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
127
  !@config.endpoint.split(".").first.include?("-")
134
128
  credentials ||= Credentials.default scope: @config.scope,
135
129
  enable_self_signed_jwt: enable_self_signed_jwt
136
- if credentials.is_a?(String) || credentials.is_a?(Hash)
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
131
  credentials = Credentials.new credentials, scope: @config.scope
138
132
  end
139
133
  @quota_project_id = @config.quota_project
@@ -197,6 +191,21 @@ module Google
197
191
  #
198
192
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
193
  #
194
+ # @example Basic example
195
+ # require "google/cloud/domains/v1beta1"
196
+ #
197
+ # # Create a client object. The client can be reused for multiple calls.
198
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
199
+ #
200
+ # # Create a request. To set request fields, pass in keyword arguments.
201
+ # request = Google::Cloud::Domains::V1beta1::SearchDomainsRequest.new
202
+ #
203
+ # # Call the search_domains method.
204
+ # result = client.search_domains request
205
+ #
206
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::SearchDomainsResponse.
207
+ # p result
208
+ #
200
209
  def search_domains request, options = nil
201
210
  raise ::ArgumentError, "request must be provided" if request.nil?
202
211
 
@@ -214,16 +223,20 @@ module Google
214
223
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
215
224
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
216
225
 
217
- header_params = {
218
- "location" => request.location
219
- }
226
+ header_params = {}
227
+ if request.location
228
+ header_params["location"] = request.location
229
+ end
230
+
220
231
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
221
232
  metadata[:"x-goog-request-params"] ||= request_params_header
222
233
 
223
234
  options.apply_defaults timeout: @config.rpcs.search_domains.timeout,
224
235
  metadata: metadata,
225
236
  retry_policy: @config.rpcs.search_domains.retry_policy
226
- options.apply_defaults metadata: @config.metadata,
237
+
238
+ options.apply_defaults timeout: @config.timeout,
239
+ metadata: @config.metadata,
227
240
  retry_policy: @config.retry_policy
228
241
 
229
242
  @domains_stub.call_rpc :search_domains, request, options: options do |response, operation|
@@ -266,6 +279,21 @@ module Google
266
279
  #
267
280
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
268
281
  #
282
+ # @example Basic example
283
+ # require "google/cloud/domains/v1beta1"
284
+ #
285
+ # # Create a client object. The client can be reused for multiple calls.
286
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
287
+ #
288
+ # # Create a request. To set request fields, pass in keyword arguments.
289
+ # request = Google::Cloud::Domains::V1beta1::RetrieveRegisterParametersRequest.new
290
+ #
291
+ # # Call the retrieve_register_parameters method.
292
+ # result = client.retrieve_register_parameters request
293
+ #
294
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::RetrieveRegisterParametersResponse.
295
+ # p result
296
+ #
269
297
  def retrieve_register_parameters request, options = nil
270
298
  raise ::ArgumentError, "request must be provided" if request.nil?
271
299
 
@@ -283,16 +311,20 @@ module Google
283
311
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
284
312
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
313
 
286
- header_params = {
287
- "location" => request.location
288
- }
314
+ header_params = {}
315
+ if request.location
316
+ header_params["location"] = request.location
317
+ end
318
+
289
319
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
290
320
  metadata[:"x-goog-request-params"] ||= request_params_header
291
321
 
292
322
  options.apply_defaults timeout: @config.rpcs.retrieve_register_parameters.timeout,
293
323
  metadata: metadata,
294
324
  retry_policy: @config.rpcs.retrieve_register_parameters.retry_policy
295
- options.apply_defaults metadata: @config.metadata,
325
+
326
+ options.apply_defaults timeout: @config.timeout,
327
+ metadata: @config.metadata,
296
328
  retry_policy: @config.retry_policy
297
329
 
298
330
  @domains_stub.call_rpc :retrieve_register_parameters, request, options: options do |response, operation|
@@ -343,14 +375,14 @@ module Google
343
375
  # `RetrieveRegisterParameters` to see the notices that need acknowledgement.
344
376
  # @param contact_notices [::Array<::Google::Cloud::Domains::V1beta1::ContactNotice>]
345
377
  # The list of contact notices that the caller acknowledges. The notices
346
- # required here depend on the values specified in
378
+ # needed here depend on the values specified in
347
379
  # `registration.contact_settings`.
348
380
  # @param yearly_price [::Google::Type::Money, ::Hash]
349
381
  # Required. Yearly price to register or renew the domain.
350
382
  # The value that should be put here can be obtained from
351
383
  # RetrieveRegisterParameters or SearchDomains calls.
352
384
  # @param validate_only [::Boolean]
353
- # When true, only validation will be performed, without actually registering
385
+ # When true, only validation is performed, without actually registering
354
386
  # the domain. Follows:
355
387
  # https://cloud.google.com/apis/design/design_patterns#request_validation
356
388
  #
@@ -362,6 +394,28 @@ module Google
362
394
  #
363
395
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
364
396
  #
397
+ # @example Basic example
398
+ # require "google/cloud/domains/v1beta1"
399
+ #
400
+ # # Create a client object. The client can be reused for multiple calls.
401
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
402
+ #
403
+ # # Create a request. To set request fields, pass in keyword arguments.
404
+ # request = Google::Cloud::Domains::V1beta1::RegisterDomainRequest.new
405
+ #
406
+ # # Call the register_domain method.
407
+ # result = client.register_domain request
408
+ #
409
+ # # The returned object is of type Gapic::Operation. You can use this
410
+ # # object to check the status of an operation, cancel it, or wait
411
+ # # for results. Here is how to block until completion:
412
+ # result.wait_until_done! timeout: 60
413
+ # if result.response?
414
+ # p result.response
415
+ # else
416
+ # puts "Error!"
417
+ # end
418
+ #
365
419
  def register_domain request, options = nil
366
420
  raise ::ArgumentError, "request must be provided" if request.nil?
367
421
 
@@ -379,16 +433,20 @@ module Google
379
433
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
380
434
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
381
435
 
382
- header_params = {
383
- "parent" => request.parent
384
- }
436
+ header_params = {}
437
+ if request.parent
438
+ header_params["parent"] = request.parent
439
+ end
440
+
385
441
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
386
442
  metadata[:"x-goog-request-params"] ||= request_params_header
387
443
 
388
444
  options.apply_defaults timeout: @config.rpcs.register_domain.timeout,
389
445
  metadata: metadata,
390
446
  retry_policy: @config.rpcs.register_domain.retry_policy
391
- options.apply_defaults metadata: @config.metadata,
447
+
448
+ options.apply_defaults timeout: @config.timeout,
449
+ metadata: @config.metadata,
392
450
  retry_policy: @config.retry_policy
393
451
 
394
452
  @domains_stub.call_rpc :register_domain, request, options: options do |response, operation|
@@ -400,6 +458,233 @@ module Google
400
458
  raise ::Google::Cloud::Error.from_error(e)
401
459
  end
402
460
 
461
+ ##
462
+ # Gets parameters needed to transfer a domain name from another registrar to
463
+ # Cloud Domains. For domains managed by Google Domains, transferring to Cloud
464
+ # Domains is not supported.
465
+ #
466
+ #
467
+ # Use the returned values to call `TransferDomain`.
468
+ #
469
+ # @overload retrieve_transfer_parameters(request, options = nil)
470
+ # Pass arguments to `retrieve_transfer_parameters` via a request object, either of type
471
+ # {::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest} or an equivalent Hash.
472
+ #
473
+ # @param request [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest, ::Hash]
474
+ # A request object representing the call parameters. Required. To specify no
475
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
476
+ # @param options [::Gapic::CallOptions, ::Hash]
477
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
478
+ #
479
+ # @overload retrieve_transfer_parameters(domain_name: nil, location: nil)
480
+ # Pass arguments to `retrieve_transfer_parameters` via keyword arguments. Note that at
481
+ # least one keyword argument is required. To specify no parameters, or to keep all
482
+ # the default parameter values, pass an empty Hash as a request object (see above).
483
+ #
484
+ # @param domain_name [::String]
485
+ # Required. The domain name. Unicode domain names must be expressed in Punycode format.
486
+ # @param location [::String]
487
+ # Required. The location. Must be in the format `projects/*/locations/*`.
488
+ #
489
+ # @yield [response, operation] Access the result along with the RPC operation
490
+ # @yieldparam response [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse]
491
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
492
+ #
493
+ # @return [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse]
494
+ #
495
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
496
+ #
497
+ # @example Basic example
498
+ # require "google/cloud/domains/v1beta1"
499
+ #
500
+ # # Create a client object. The client can be reused for multiple calls.
501
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
502
+ #
503
+ # # Create a request. To set request fields, pass in keyword arguments.
504
+ # request = Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest.new
505
+ #
506
+ # # Call the retrieve_transfer_parameters method.
507
+ # result = client.retrieve_transfer_parameters request
508
+ #
509
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse.
510
+ # p result
511
+ #
512
+ def retrieve_transfer_parameters request, options = nil
513
+ raise ::ArgumentError, "request must be provided" if request.nil?
514
+
515
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest
516
+
517
+ # Converts hash and nil to an options object
518
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
519
+
520
+ # Customize the options with defaults
521
+ metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h
522
+
523
+ # Set x-goog-api-client and x-goog-user-project headers
524
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
525
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
526
+ gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
527
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
528
+
529
+ header_params = {}
530
+ if request.location
531
+ header_params["location"] = request.location
532
+ end
533
+
534
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
535
+ metadata[:"x-goog-request-params"] ||= request_params_header
536
+
537
+ options.apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout,
538
+ metadata: metadata,
539
+ retry_policy: @config.rpcs.retrieve_transfer_parameters.retry_policy
540
+
541
+ options.apply_defaults timeout: @config.timeout,
542
+ metadata: @config.metadata,
543
+ retry_policy: @config.retry_policy
544
+
545
+ @domains_stub.call_rpc :retrieve_transfer_parameters, request, options: options do |response, operation|
546
+ yield response, operation if block_given?
547
+ return response
548
+ end
549
+ rescue ::GRPC::BadStatus => e
550
+ raise ::Google::Cloud::Error.from_error(e)
551
+ end
552
+
553
+ ##
554
+ # Transfers a domain name from another registrar to Cloud Domains. For
555
+ # domains managed by Google Domains, transferring to Cloud Domains is not
556
+ # supported.
557
+ #
558
+ #
559
+ # Before calling this method, go to the domain's current registrar to unlock
560
+ # the domain for transfer and retrieve the domain's transfer authorization
561
+ # code. Then call `RetrieveTransferParameters` to confirm that the domain is
562
+ # unlocked and to get values needed to build a call to this method.
563
+ #
564
+ # A successful call creates a `Registration` resource in state
565
+ # `TRANSFER_PENDING`. It can take several days to complete the transfer
566
+ # process. The registrant can often speed up this process by approving the
567
+ # transfer through the current registrar, either by clicking a link in an
568
+ # email from the registrar or by visiting the registrar's website.
569
+ #
570
+ # A few minutes after transfer approval, the resource transitions to state
571
+ # `ACTIVE`, indicating that the transfer was successful. If the transfer is
572
+ # rejected or the request expires without being approved, the resource can
573
+ # end up in state `TRANSFER_FAILED`. If transfer fails, you can safely delete
574
+ # the resource and retry the transfer.
575
+ #
576
+ # @overload transfer_domain(request, options = nil)
577
+ # Pass arguments to `transfer_domain` via a request object, either of type
578
+ # {::Google::Cloud::Domains::V1beta1::TransferDomainRequest} or an equivalent Hash.
579
+ #
580
+ # @param request [::Google::Cloud::Domains::V1beta1::TransferDomainRequest, ::Hash]
581
+ # A request object representing the call parameters. Required. To specify no
582
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
583
+ # @param options [::Gapic::CallOptions, ::Hash]
584
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
585
+ #
586
+ # @overload transfer_domain(parent: nil, registration: nil, contact_notices: nil, yearly_price: nil, authorization_code: nil, validate_only: nil)
587
+ # Pass arguments to `transfer_domain` via keyword arguments. Note that at
588
+ # least one keyword argument is required. To specify no parameters, or to keep all
589
+ # the default parameter values, pass an empty Hash as a request object (see above).
590
+ #
591
+ # @param parent [::String]
592
+ # Required. The parent resource of the `Registration`. Must be in the
593
+ # format `projects/*/locations/*`.
594
+ # @param registration [::Google::Cloud::Domains::V1beta1::Registration, ::Hash]
595
+ # Required. The complete `Registration` resource to be created.
596
+ #
597
+ # You can leave `registration.dns_settings` unset to import the
598
+ # domain's current DNS configuration from its current registrar. Use this
599
+ # option only if you are sure that the domain's current DNS service
600
+ # does not cease upon transfer, as is often the case for DNS services
601
+ # provided for free by the registrar.
602
+ # @param contact_notices [::Array<::Google::Cloud::Domains::V1beta1::ContactNotice>]
603
+ # The list of contact notices that you acknowledge. The notices
604
+ # needed here depend on the values specified in
605
+ # `registration.contact_settings`.
606
+ # @param yearly_price [::Google::Type::Money, ::Hash]
607
+ # Required. Acknowledgement of the price to transfer or renew the domain for one year.
608
+ # Call `RetrieveTransferParameters` to obtain the price, which you must
609
+ # acknowledge.
610
+ # @param authorization_code [::Google::Cloud::Domains::V1beta1::AuthorizationCode, ::Hash]
611
+ # The domain's transfer authorization code. You can obtain this from the
612
+ # domain's current registrar.
613
+ # @param validate_only [::Boolean]
614
+ # Validate the request without actually transferring the domain.
615
+ #
616
+ # @yield [response, operation] Access the result along with the RPC operation
617
+ # @yieldparam response [::Gapic::Operation]
618
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
619
+ #
620
+ # @return [::Gapic::Operation]
621
+ #
622
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
623
+ #
624
+ # @example Basic example
625
+ # require "google/cloud/domains/v1beta1"
626
+ #
627
+ # # Create a client object. The client can be reused for multiple calls.
628
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
629
+ #
630
+ # # Create a request. To set request fields, pass in keyword arguments.
631
+ # request = Google::Cloud::Domains::V1beta1::TransferDomainRequest.new
632
+ #
633
+ # # Call the transfer_domain method.
634
+ # result = client.transfer_domain request
635
+ #
636
+ # # The returned object is of type Gapic::Operation. You can use this
637
+ # # object to check the status of an operation, cancel it, or wait
638
+ # # for results. Here is how to block until completion:
639
+ # result.wait_until_done! timeout: 60
640
+ # if result.response?
641
+ # p result.response
642
+ # else
643
+ # puts "Error!"
644
+ # end
645
+ #
646
+ def transfer_domain request, options = nil
647
+ raise ::ArgumentError, "request must be provided" if request.nil?
648
+
649
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::TransferDomainRequest
650
+
651
+ # Converts hash and nil to an options object
652
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
653
+
654
+ # Customize the options with defaults
655
+ metadata = @config.rpcs.transfer_domain.metadata.to_h
656
+
657
+ # Set x-goog-api-client and x-goog-user-project headers
658
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
659
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
660
+ gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
661
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
662
+
663
+ header_params = {}
664
+ if request.parent
665
+ header_params["parent"] = request.parent
666
+ end
667
+
668
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
669
+ metadata[:"x-goog-request-params"] ||= request_params_header
670
+
671
+ options.apply_defaults timeout: @config.rpcs.transfer_domain.timeout,
672
+ metadata: metadata,
673
+ retry_policy: @config.rpcs.transfer_domain.retry_policy
674
+
675
+ options.apply_defaults timeout: @config.timeout,
676
+ metadata: @config.metadata,
677
+ retry_policy: @config.retry_policy
678
+
679
+ @domains_stub.call_rpc :transfer_domain, request, options: options do |response, operation|
680
+ response = ::Gapic::Operation.new response, @operations_client, options: options
681
+ yield response, operation if block_given?
682
+ return response
683
+ end
684
+ rescue ::GRPC::BadStatus => e
685
+ raise ::Google::Cloud::Error.from_error(e)
686
+ end
687
+
403
688
  ##
404
689
  # Lists the `Registration` resources in a project.
405
690
  #
@@ -452,6 +737,27 @@ module Google
452
737
  #
453
738
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
454
739
  #
740
+ # @example Basic example
741
+ # require "google/cloud/domains/v1beta1"
742
+ #
743
+ # # Create a client object. The client can be reused for multiple calls.
744
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
745
+ #
746
+ # # Create a request. To set request fields, pass in keyword arguments.
747
+ # request = Google::Cloud::Domains::V1beta1::ListRegistrationsRequest.new
748
+ #
749
+ # # Call the list_registrations method.
750
+ # result = client.list_registrations request
751
+ #
752
+ # # The returned object is of type Gapic::PagedEnumerable. You can
753
+ # # iterate over all elements by calling #each, and the enumerable
754
+ # # will lazily make API calls to fetch subsequent pages. Other
755
+ # # methods are also available for managing paging directly.
756
+ # result.each do |response|
757
+ # # Each element is of type ::Google::Cloud::Domains::V1beta1::Registration.
758
+ # p response
759
+ # end
760
+ #
455
761
  def list_registrations request, options = nil
456
762
  raise ::ArgumentError, "request must be provided" if request.nil?
457
763
 
@@ -469,16 +775,20 @@ module Google
469
775
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
470
776
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
471
777
 
472
- header_params = {
473
- "parent" => request.parent
474
- }
778
+ header_params = {}
779
+ if request.parent
780
+ header_params["parent"] = request.parent
781
+ end
782
+
475
783
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
476
784
  metadata[:"x-goog-request-params"] ||= request_params_header
477
785
 
478
786
  options.apply_defaults timeout: @config.rpcs.list_registrations.timeout,
479
787
  metadata: metadata,
480
788
  retry_policy: @config.rpcs.list_registrations.retry_policy
481
- options.apply_defaults metadata: @config.metadata,
789
+
790
+ options.apply_defaults timeout: @config.timeout,
791
+ metadata: @config.metadata,
482
792
  retry_policy: @config.retry_policy
483
793
 
484
794
  @domains_stub.call_rpc :list_registrations, request, options: options do |response, operation|
@@ -520,6 +830,21 @@ module Google
520
830
  #
521
831
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
522
832
  #
833
+ # @example Basic example
834
+ # require "google/cloud/domains/v1beta1"
835
+ #
836
+ # # Create a client object. The client can be reused for multiple calls.
837
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
838
+ #
839
+ # # Create a request. To set request fields, pass in keyword arguments.
840
+ # request = Google::Cloud::Domains::V1beta1::GetRegistrationRequest.new
841
+ #
842
+ # # Call the get_registration method.
843
+ # result = client.get_registration request
844
+ #
845
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::Registration.
846
+ # p result
847
+ #
523
848
  def get_registration request, options = nil
524
849
  raise ::ArgumentError, "request must be provided" if request.nil?
525
850
 
@@ -537,16 +862,20 @@ module Google
537
862
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
538
863
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
539
864
 
540
- header_params = {
541
- "name" => request.name
542
- }
865
+ header_params = {}
866
+ if request.name
867
+ header_params["name"] = request.name
868
+ end
869
+
543
870
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
544
871
  metadata[:"x-goog-request-params"] ||= request_params_header
545
872
 
546
873
  options.apply_defaults timeout: @config.rpcs.get_registration.timeout,
547
874
  metadata: metadata,
548
875
  retry_policy: @config.rpcs.get_registration.retry_policy
549
- options.apply_defaults metadata: @config.metadata,
876
+
877
+ options.apply_defaults timeout: @config.timeout,
878
+ metadata: @config.metadata,
550
879
  retry_policy: @config.retry_policy
551
880
 
552
881
  @domains_stub.call_rpc :get_registration, request, options: options do |response, operation|
@@ -584,8 +913,8 @@ module Google
584
913
  # Fields of the `Registration` to update.
585
914
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
586
915
  # Required. The field mask describing which fields to update as a comma-separated list.
587
- # For example, if only the labels are being updated, the `update_mask` would
588
- # be `"labels"`.
916
+ # For example, if only the labels are being updated, the `update_mask` is
917
+ # `"labels"`.
589
918
  #
590
919
  # @yield [response, operation] Access the result along with the RPC operation
591
920
  # @yieldparam response [::Gapic::Operation]
@@ -595,6 +924,28 @@ module Google
595
924
  #
596
925
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
597
926
  #
927
+ # @example Basic example
928
+ # require "google/cloud/domains/v1beta1"
929
+ #
930
+ # # Create a client object. The client can be reused for multiple calls.
931
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
932
+ #
933
+ # # Create a request. To set request fields, pass in keyword arguments.
934
+ # request = Google::Cloud::Domains::V1beta1::UpdateRegistrationRequest.new
935
+ #
936
+ # # Call the update_registration method.
937
+ # result = client.update_registration request
938
+ #
939
+ # # The returned object is of type Gapic::Operation. You can use this
940
+ # # object to check the status of an operation, cancel it, or wait
941
+ # # for results. Here is how to block until completion:
942
+ # result.wait_until_done! timeout: 60
943
+ # if result.response?
944
+ # p result.response
945
+ # else
946
+ # puts "Error!"
947
+ # end
948
+ #
598
949
  def update_registration request, options = nil
599
950
  raise ::ArgumentError, "request must be provided" if request.nil?
600
951
 
@@ -612,16 +963,20 @@ module Google
612
963
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
613
964
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
614
965
 
615
- header_params = {
616
- "registration.name" => request.registration.name
617
- }
966
+ header_params = {}
967
+ if request.registration&.name
968
+ header_params["registration.name"] = request.registration.name
969
+ end
970
+
618
971
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
619
972
  metadata[:"x-goog-request-params"] ||= request_params_header
620
973
 
621
974
  options.apply_defaults timeout: @config.rpcs.update_registration.timeout,
622
975
  metadata: metadata,
623
976
  retry_policy: @config.rpcs.update_registration.retry_policy
624
- options.apply_defaults metadata: @config.metadata,
977
+
978
+ options.apply_defaults timeout: @config.timeout,
979
+ metadata: @config.metadata,
625
980
  retry_policy: @config.retry_policy
626
981
 
627
982
  @domains_stub.call_rpc :update_registration, request, options: options do |response, operation|
@@ -659,7 +1014,7 @@ module Google
659
1014
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
660
1015
  # Required. The field mask describing which fields to update as a comma-separated list.
661
1016
  # For example, if only the transfer lock is being updated, the `update_mask`
662
- # would be `"transfer_lock_state"`.
1017
+ # is `"transfer_lock_state"`.
663
1018
  #
664
1019
  # @yield [response, operation] Access the result along with the RPC operation
665
1020
  # @yieldparam response [::Gapic::Operation]
@@ -669,6 +1024,28 @@ module Google
669
1024
  #
670
1025
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
671
1026
  #
1027
+ # @example Basic example
1028
+ # require "google/cloud/domains/v1beta1"
1029
+ #
1030
+ # # Create a client object. The client can be reused for multiple calls.
1031
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1032
+ #
1033
+ # # Create a request. To set request fields, pass in keyword arguments.
1034
+ # request = Google::Cloud::Domains::V1beta1::ConfigureManagementSettingsRequest.new
1035
+ #
1036
+ # # Call the configure_management_settings method.
1037
+ # result = client.configure_management_settings request
1038
+ #
1039
+ # # The returned object is of type Gapic::Operation. You can use this
1040
+ # # object to check the status of an operation, cancel it, or wait
1041
+ # # for results. Here is how to block until completion:
1042
+ # result.wait_until_done! timeout: 60
1043
+ # if result.response?
1044
+ # p result.response
1045
+ # else
1046
+ # puts "Error!"
1047
+ # end
1048
+ #
672
1049
  def configure_management_settings request, options = nil
673
1050
  raise ::ArgumentError, "request must be provided" if request.nil?
674
1051
 
@@ -686,16 +1063,20 @@ module Google
686
1063
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
687
1064
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
688
1065
 
689
- header_params = {
690
- "registration" => request.registration
691
- }
1066
+ header_params = {}
1067
+ if request.registration
1068
+ header_params["registration"] = request.registration
1069
+ end
1070
+
692
1071
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
693
1072
  metadata[:"x-goog-request-params"] ||= request_params_header
694
1073
 
695
1074
  options.apply_defaults timeout: @config.rpcs.configure_management_settings.timeout,
696
1075
  metadata: metadata,
697
1076
  retry_policy: @config.rpcs.configure_management_settings.retry_policy
698
- options.apply_defaults metadata: @config.metadata,
1077
+
1078
+ options.apply_defaults timeout: @config.timeout,
1079
+ metadata: @config.metadata,
699
1080
  retry_policy: @config.retry_policy
700
1081
 
701
1082
  @domains_stub.call_rpc :configure_management_settings, request, options: options do |response, operation|
@@ -733,13 +1114,13 @@ module Google
733
1114
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
734
1115
  # Required. The field mask describing which fields to update as a comma-separated list.
735
1116
  # For example, if only the name servers are being updated for an existing
736
- # Custom DNS configuration, the `update_mask` would be
1117
+ # Custom DNS configuration, the `update_mask` is
737
1118
  # `"custom_dns.name_servers"`.
738
1119
  #
739
1120
  # When changing the DNS provider from one type to another, pass the new
740
1121
  # provider's field name as part of the field mask. For example, when changing
741
1122
  # from a Google Domains DNS configuration to a Custom DNS configuration, the
742
- # `update_mask` would be `"custom_dns"`. //
1123
+ # `update_mask` is `"custom_dns"`. //
743
1124
  # @param validate_only [::Boolean]
744
1125
  # Validate the request without actually updating the DNS settings.
745
1126
  #
@@ -751,6 +1132,28 @@ module Google
751
1132
  #
752
1133
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
753
1134
  #
1135
+ # @example Basic example
1136
+ # require "google/cloud/domains/v1beta1"
1137
+ #
1138
+ # # Create a client object. The client can be reused for multiple calls.
1139
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1140
+ #
1141
+ # # Create a request. To set request fields, pass in keyword arguments.
1142
+ # request = Google::Cloud::Domains::V1beta1::ConfigureDnsSettingsRequest.new
1143
+ #
1144
+ # # Call the configure_dns_settings method.
1145
+ # result = client.configure_dns_settings request
1146
+ #
1147
+ # # The returned object is of type Gapic::Operation. You can use this
1148
+ # # object to check the status of an operation, cancel it, or wait
1149
+ # # for results. Here is how to block until completion:
1150
+ # result.wait_until_done! timeout: 60
1151
+ # if result.response?
1152
+ # p result.response
1153
+ # else
1154
+ # puts "Error!"
1155
+ # end
1156
+ #
754
1157
  def configure_dns_settings request, options = nil
755
1158
  raise ::ArgumentError, "request must be provided" if request.nil?
756
1159
 
@@ -768,16 +1171,20 @@ module Google
768
1171
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
769
1172
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
770
1173
 
771
- header_params = {
772
- "registration" => request.registration
773
- }
1174
+ header_params = {}
1175
+ if request.registration
1176
+ header_params["registration"] = request.registration
1177
+ end
1178
+
774
1179
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
775
1180
  metadata[:"x-goog-request-params"] ||= request_params_header
776
1181
 
777
1182
  options.apply_defaults timeout: @config.rpcs.configure_dns_settings.timeout,
778
1183
  metadata: metadata,
779
1184
  retry_policy: @config.rpcs.configure_dns_settings.retry_policy
780
- options.apply_defaults metadata: @config.metadata,
1185
+
1186
+ options.apply_defaults timeout: @config.timeout,
1187
+ metadata: @config.metadata,
781
1188
  retry_policy: @config.retry_policy
782
1189
 
783
1190
  @domains_stub.call_rpc :configure_dns_settings, request, options: options do |response, operation|
@@ -816,10 +1223,10 @@ module Google
816
1223
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
817
1224
  # Required. The field mask describing which fields to update as a comma-separated list.
818
1225
  # For example, if only the registrant contact is being updated, the
819
- # `update_mask` would be `"registrant_contact"`.
1226
+ # `update_mask` is `"registrant_contact"`.
820
1227
  # @param contact_notices [::Array<::Google::Cloud::Domains::V1beta1::ContactNotice>]
821
1228
  # The list of contact notices that the caller acknowledges. The notices
822
- # required here depend on the values specified in `contact_settings`.
1229
+ # needed here depend on the values specified in `contact_settings`.
823
1230
  # @param validate_only [::Boolean]
824
1231
  # Validate the request without actually updating the contact settings.
825
1232
  #
@@ -831,6 +1238,28 @@ module Google
831
1238
  #
832
1239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
833
1240
  #
1241
+ # @example Basic example
1242
+ # require "google/cloud/domains/v1beta1"
1243
+ #
1244
+ # # Create a client object. The client can be reused for multiple calls.
1245
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1246
+ #
1247
+ # # Create a request. To set request fields, pass in keyword arguments.
1248
+ # request = Google::Cloud::Domains::V1beta1::ConfigureContactSettingsRequest.new
1249
+ #
1250
+ # # Call the configure_contact_settings method.
1251
+ # result = client.configure_contact_settings request
1252
+ #
1253
+ # # The returned object is of type Gapic::Operation. You can use this
1254
+ # # object to check the status of an operation, cancel it, or wait
1255
+ # # for results. Here is how to block until completion:
1256
+ # result.wait_until_done! timeout: 60
1257
+ # if result.response?
1258
+ # p result.response
1259
+ # else
1260
+ # puts "Error!"
1261
+ # end
1262
+ #
834
1263
  def configure_contact_settings request, options = nil
835
1264
  raise ::ArgumentError, "request must be provided" if request.nil?
836
1265
 
@@ -848,16 +1277,20 @@ module Google
848
1277
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
849
1278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
850
1279
 
851
- header_params = {
852
- "registration" => request.registration
853
- }
1280
+ header_params = {}
1281
+ if request.registration
1282
+ header_params["registration"] = request.registration
1283
+ end
1284
+
854
1285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
855
1286
  metadata[:"x-goog-request-params"] ||= request_params_header
856
1287
 
857
1288
  options.apply_defaults timeout: @config.rpcs.configure_contact_settings.timeout,
858
1289
  metadata: metadata,
859
1290
  retry_policy: @config.rpcs.configure_contact_settings.retry_policy
860
- options.apply_defaults metadata: @config.metadata,
1291
+
1292
+ options.apply_defaults timeout: @config.timeout,
1293
+ metadata: @config.metadata,
861
1294
  retry_policy: @config.retry_policy
862
1295
 
863
1296
  @domains_stub.call_rpc :configure_contact_settings, request, options: options do |response, operation|
@@ -870,20 +1303,15 @@ module Google
870
1303
  end
871
1304
 
872
1305
  ##
873
- # Exports a `Registration` that you no longer want to use with
874
- # Cloud Domains. You can continue to use the domain in
875
- # [Google Domains](https://domains.google/) until it expires.
1306
+ # Exports a `Registration` resource, such that it is no longer managed by
1307
+ # Cloud Domains.
876
1308
  #
877
- # If the export is successful:
878
- #
879
- # * The resource's `state` becomes `EXPORTED`, meaning that it is no longer
880
- # managed by Cloud Domains
881
- # * Because individual users can own domains in Google Domains, the calling
882
- # user becomes the domain's sole owner. Permissions for the domain are
883
- # subsequently managed in Google Domains.
884
- # * Without further action, the domain does not renew automatically.
885
- # The new owner can set up billing in Google Domains to renew the domain
886
- # if needed.
1309
+ # When an active domain is successfully exported, you can continue to use the
1310
+ # domain in [Google Domains](https://domains.google/) until it expires. The
1311
+ # calling user becomes the domain's sole owner in Google Domains, and
1312
+ # permissions for the domain are subsequently managed there. The domain does
1313
+ # not renew automatically unless the new owner sets up billing in Google
1314
+ # Domains.
887
1315
  #
888
1316
  # @overload export_registration(request, options = nil)
889
1317
  # Pass arguments to `export_registration` via a request object, either of type
@@ -912,6 +1340,28 @@ module Google
912
1340
  #
913
1341
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
914
1342
  #
1343
+ # @example Basic example
1344
+ # require "google/cloud/domains/v1beta1"
1345
+ #
1346
+ # # Create a client object. The client can be reused for multiple calls.
1347
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1348
+ #
1349
+ # # Create a request. To set request fields, pass in keyword arguments.
1350
+ # request = Google::Cloud::Domains::V1beta1::ExportRegistrationRequest.new
1351
+ #
1352
+ # # Call the export_registration method.
1353
+ # result = client.export_registration request
1354
+ #
1355
+ # # The returned object is of type Gapic::Operation. You can use this
1356
+ # # object to check the status of an operation, cancel it, or wait
1357
+ # # for results. Here is how to block until completion:
1358
+ # result.wait_until_done! timeout: 60
1359
+ # if result.response?
1360
+ # p result.response
1361
+ # else
1362
+ # puts "Error!"
1363
+ # end
1364
+ #
915
1365
  def export_registration request, options = nil
916
1366
  raise ::ArgumentError, "request must be provided" if request.nil?
917
1367
 
@@ -929,16 +1379,20 @@ module Google
929
1379
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
930
1380
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
931
1381
 
932
- header_params = {
933
- "name" => request.name
934
- }
1382
+ header_params = {}
1383
+ if request.name
1384
+ header_params["name"] = request.name
1385
+ end
1386
+
935
1387
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
936
1388
  metadata[:"x-goog-request-params"] ||= request_params_header
937
1389
 
938
1390
  options.apply_defaults timeout: @config.rpcs.export_registration.timeout,
939
1391
  metadata: metadata,
940
1392
  retry_policy: @config.rpcs.export_registration.retry_policy
941
- options.apply_defaults metadata: @config.metadata,
1393
+
1394
+ options.apply_defaults timeout: @config.timeout,
1395
+ metadata: @config.metadata,
942
1396
  retry_policy: @config.retry_policy
943
1397
 
944
1398
  @domains_stub.call_rpc :export_registration, request, options: options do |response, operation|
@@ -953,10 +1407,23 @@ module Google
953
1407
  ##
954
1408
  # Deletes a `Registration` resource.
955
1409
  #
956
- # This method only works on resources in one of the following states:
1410
+ # This method works on any `Registration` resource using [Subscription or
1411
+ # Commitment billing](/domains/pricing#billing-models), provided that the
1412
+ # resource was created at least 1 day in the past.
1413
+ #
1414
+ # For `Registration` resources using
1415
+ # [Monthly billing](/domains/pricing#billing-models), this method works if:
957
1416
  #
958
1417
  # * `state` is `EXPORTED` with `expire_time` in the past
959
1418
  # * `state` is `REGISTRATION_FAILED`
1419
+ # * `state` is `TRANSFER_FAILED`
1420
+ #
1421
+ # When an active registration is successfully deleted, you can continue to
1422
+ # use the domain in [Google Domains](https://domains.google/) until it
1423
+ # expires. The calling user becomes the domain's sole owner in Google
1424
+ # Domains, and permissions for the domain are subsequently managed there. The
1425
+ # domain does not renew automatically unless the new owner sets up billing in
1426
+ # Google Domains.
960
1427
  #
961
1428
  # @overload delete_registration(request, options = nil)
962
1429
  # Pass arguments to `delete_registration` via a request object, either of type
@@ -985,6 +1452,28 @@ module Google
985
1452
  #
986
1453
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
987
1454
  #
1455
+ # @example Basic example
1456
+ # require "google/cloud/domains/v1beta1"
1457
+ #
1458
+ # # Create a client object. The client can be reused for multiple calls.
1459
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1460
+ #
1461
+ # # Create a request. To set request fields, pass in keyword arguments.
1462
+ # request = Google::Cloud::Domains::V1beta1::DeleteRegistrationRequest.new
1463
+ #
1464
+ # # Call the delete_registration method.
1465
+ # result = client.delete_registration request
1466
+ #
1467
+ # # The returned object is of type Gapic::Operation. You can use this
1468
+ # # object to check the status of an operation, cancel it, or wait
1469
+ # # for results. Here is how to block until completion:
1470
+ # result.wait_until_done! timeout: 60
1471
+ # if result.response?
1472
+ # p result.response
1473
+ # else
1474
+ # puts "Error!"
1475
+ # end
1476
+ #
988
1477
  def delete_registration request, options = nil
989
1478
  raise ::ArgumentError, "request must be provided" if request.nil?
990
1479
 
@@ -1002,16 +1491,20 @@ module Google
1002
1491
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
1003
1492
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1004
1493
 
1005
- header_params = {
1006
- "name" => request.name
1007
- }
1494
+ header_params = {}
1495
+ if request.name
1496
+ header_params["name"] = request.name
1497
+ end
1498
+
1008
1499
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1009
1500
  metadata[:"x-goog-request-params"] ||= request_params_header
1010
1501
 
1011
1502
  options.apply_defaults timeout: @config.rpcs.delete_registration.timeout,
1012
1503
  metadata: metadata,
1013
1504
  retry_policy: @config.rpcs.delete_registration.retry_policy
1014
- options.apply_defaults metadata: @config.metadata,
1505
+
1506
+ options.apply_defaults timeout: @config.timeout,
1507
+ metadata: @config.metadata,
1015
1508
  retry_policy: @config.retry_policy
1016
1509
 
1017
1510
  @domains_stub.call_rpc :delete_registration, request, options: options do |response, operation|
@@ -1057,6 +1550,21 @@ module Google
1057
1550
  #
1058
1551
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1059
1552
  #
1553
+ # @example Basic example
1554
+ # require "google/cloud/domains/v1beta1"
1555
+ #
1556
+ # # Create a client object. The client can be reused for multiple calls.
1557
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1558
+ #
1559
+ # # Create a request. To set request fields, pass in keyword arguments.
1560
+ # request = Google::Cloud::Domains::V1beta1::RetrieveAuthorizationCodeRequest.new
1561
+ #
1562
+ # # Call the retrieve_authorization_code method.
1563
+ # result = client.retrieve_authorization_code request
1564
+ #
1565
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::AuthorizationCode.
1566
+ # p result
1567
+ #
1060
1568
  def retrieve_authorization_code request, options = nil
1061
1569
  raise ::ArgumentError, "request must be provided" if request.nil?
1062
1570
 
@@ -1074,16 +1582,20 @@ module Google
1074
1582
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
1075
1583
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1076
1584
 
1077
- header_params = {
1078
- "registration" => request.registration
1079
- }
1585
+ header_params = {}
1586
+ if request.registration
1587
+ header_params["registration"] = request.registration
1588
+ end
1589
+
1080
1590
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1081
1591
  metadata[:"x-goog-request-params"] ||= request_params_header
1082
1592
 
1083
1593
  options.apply_defaults timeout: @config.rpcs.retrieve_authorization_code.timeout,
1084
1594
  metadata: metadata,
1085
1595
  retry_policy: @config.rpcs.retrieve_authorization_code.retry_policy
1086
- options.apply_defaults metadata: @config.metadata,
1596
+
1597
+ options.apply_defaults timeout: @config.timeout,
1598
+ metadata: @config.metadata,
1087
1599
  retry_policy: @config.retry_policy
1088
1600
 
1089
1601
  @domains_stub.call_rpc :retrieve_authorization_code, request, options: options do |response, operation|
@@ -1127,6 +1639,21 @@ module Google
1127
1639
  #
1128
1640
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1129
1641
  #
1642
+ # @example Basic example
1643
+ # require "google/cloud/domains/v1beta1"
1644
+ #
1645
+ # # Create a client object. The client can be reused for multiple calls.
1646
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
1647
+ #
1648
+ # # Create a request. To set request fields, pass in keyword arguments.
1649
+ # request = Google::Cloud::Domains::V1beta1::ResetAuthorizationCodeRequest.new
1650
+ #
1651
+ # # Call the reset_authorization_code method.
1652
+ # result = client.reset_authorization_code request
1653
+ #
1654
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::AuthorizationCode.
1655
+ # p result
1656
+ #
1130
1657
  def reset_authorization_code request, options = nil
1131
1658
  raise ::ArgumentError, "request must be provided" if request.nil?
1132
1659
 
@@ -1144,16 +1671,20 @@ module Google
1144
1671
  gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
1145
1672
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1146
1673
 
1147
- header_params = {
1148
- "registration" => request.registration
1149
- }
1674
+ header_params = {}
1675
+ if request.registration
1676
+ header_params["registration"] = request.registration
1677
+ end
1678
+
1150
1679
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1151
1680
  metadata[:"x-goog-request-params"] ||= request_params_header
1152
1681
 
1153
1682
  options.apply_defaults timeout: @config.rpcs.reset_authorization_code.timeout,
1154
1683
  metadata: metadata,
1155
1684
  retry_policy: @config.rpcs.reset_authorization_code.retry_policy
1156
- options.apply_defaults metadata: @config.metadata,
1685
+
1686
+ options.apply_defaults timeout: @config.timeout,
1687
+ metadata: @config.metadata,
1157
1688
  retry_policy: @config.retry_policy
1158
1689
 
1159
1690
  @domains_stub.call_rpc :reset_authorization_code, request, options: options do |response, operation|
@@ -1177,22 +1708,21 @@ module Google
1177
1708
  # Configuration can be applied globally to all clients, or to a single client
1178
1709
  # on construction.
1179
1710
  #
1180
- # # Examples
1181
- #
1182
- # To modify the global config, setting the timeout for search_domains
1183
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1711
+ # @example
1184
1712
  #
1185
- # ::Google::Cloud::Domains::V1beta1::Domains::Client.configure do |config|
1186
- # config.timeout = 10.0
1187
- # config.rpcs.search_domains.timeout = 20.0
1188
- # end
1713
+ # # Modify the global config, setting the timeout for
1714
+ # # search_domains to 20 seconds,
1715
+ # # and all remaining timeouts to 10 seconds.
1716
+ # ::Google::Cloud::Domains::V1beta1::Domains::Client.configure do |config|
1717
+ # config.timeout = 10.0
1718
+ # config.rpcs.search_domains.timeout = 20.0
1719
+ # end
1189
1720
  #
1190
- # To apply the above configuration only to a new client:
1191
- #
1192
- # client = ::Google::Cloud::Domains::V1beta1::Domains::Client.new do |config|
1193
- # config.timeout = 10.0
1194
- # config.rpcs.search_domains.timeout = 20.0
1195
- # end
1721
+ # # Apply the above configuration only to a new client.
1722
+ # client = ::Google::Cloud::Domains::V1beta1::Domains::Client.new do |config|
1723
+ # config.timeout = 10.0
1724
+ # config.rpcs.search_domains.timeout = 20.0
1725
+ # end
1196
1726
  #
1197
1727
  # @!attribute [rw] endpoint
1198
1728
  # The hostname or hostname:port of the service endpoint.
@@ -1316,6 +1846,16 @@ module Google
1316
1846
  #
1317
1847
  attr_reader :register_domain
1318
1848
  ##
1849
+ # RPC-specific configuration for `retrieve_transfer_parameters`
1850
+ # @return [::Gapic::Config::Method]
1851
+ #
1852
+ attr_reader :retrieve_transfer_parameters
1853
+ ##
1854
+ # RPC-specific configuration for `transfer_domain`
1855
+ # @return [::Gapic::Config::Method]
1856
+ #
1857
+ attr_reader :transfer_domain
1858
+ ##
1319
1859
  # RPC-specific configuration for `list_registrations`
1320
1860
  # @return [::Gapic::Config::Method]
1321
1861
  #
@@ -1374,6 +1914,10 @@ module Google
1374
1914
  @retrieve_register_parameters = ::Gapic::Config::Method.new retrieve_register_parameters_config
1375
1915
  register_domain_config = parent_rpcs.register_domain if parent_rpcs.respond_to? :register_domain
1376
1916
  @register_domain = ::Gapic::Config::Method.new register_domain_config
1917
+ retrieve_transfer_parameters_config = parent_rpcs.retrieve_transfer_parameters if parent_rpcs.respond_to? :retrieve_transfer_parameters
1918
+ @retrieve_transfer_parameters = ::Gapic::Config::Method.new retrieve_transfer_parameters_config
1919
+ transfer_domain_config = parent_rpcs.transfer_domain if parent_rpcs.respond_to? :transfer_domain
1920
+ @transfer_domain = ::Gapic::Config::Method.new transfer_domain_config
1377
1921
  list_registrations_config = parent_rpcs.list_registrations if parent_rpcs.respond_to? :list_registrations
1378
1922
  @list_registrations = ::Gapic::Config::Method.new list_registrations_config
1379
1923
  get_registration_config = parent_rpcs.get_registration if parent_rpcs.respond_to? :get_registration