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