lib/google/cloud/domains/v1beta1/domains/client.rb in google-cloud-domains-v1beta1-0.3.0 vs lib/google/cloud/domains/v1beta1/domains/client.rb in google-cloud-domains-v1beta1-0.3.1
- old
+ new
@@ -189,10 +189,25 @@
#
# @return [::Google::Cloud::Domains::V1beta1::SearchDomainsResponse]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::SearchDomainsRequest.new
+ #
+ # # Call the search_domains method.
+ # result = client.search_domains request
+ #
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::SearchDomainsResponse.
+ # p result
+ #
def search_domains request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::SearchDomainsRequest
@@ -206,13 +221,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "location" => request.location
- }
+ header_params = {}
+ if request.location
+ header_params["location"] = request.location
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.search_domains.timeout,
metadata: metadata,
@@ -260,10 +277,25 @@
#
# @return [::Google::Cloud::Domains::V1beta1::RetrieveRegisterParametersResponse]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::RetrieveRegisterParametersRequest.new
+ #
+ # # Call the retrieve_register_parameters method.
+ # result = client.retrieve_register_parameters request
+ #
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::RetrieveRegisterParametersResponse.
+ # p result
+ #
def retrieve_register_parameters request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::RetrieveRegisterParametersRequest
@@ -277,13 +309,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "location" => request.location
- }
+ header_params = {}
+ if request.location
+ header_params["location"] = request.location
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.retrieve_register_parameters.timeout,
metadata: metadata,
@@ -358,10 +392,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::RegisterDomainRequest.new
+ #
+ # # Call the register_domain method.
+ # result = client.register_domain request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def register_domain request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::RegisterDomainRequest
@@ -375,13 +431,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "parent" => request.parent
- }
+ header_params = {}
+ if request.parent
+ header_params["parent"] = request.parent
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.register_domain.timeout,
metadata: metadata,
@@ -434,10 +492,25 @@
#
# @return [::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest.new
+ #
+ # # Call the retrieve_transfer_parameters method.
+ # result = client.retrieve_transfer_parameters request
+ #
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::RetrieveTransferParametersResponse.
+ # p result
+ #
def retrieve_transfer_parameters request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::RetrieveTransferParametersRequest
@@ -451,13 +524,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "location" => request.location
- }
+ header_params = {}
+ if request.location
+ header_params["location"] = request.location
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout,
metadata: metadata,
@@ -544,10 +619,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::TransferDomainRequest.new
+ #
+ # # Call the transfer_domain method.
+ # result = client.transfer_domain request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def transfer_domain request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::TransferDomainRequest
@@ -561,13 +658,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "parent" => request.parent
- }
+ header_params = {}
+ if request.parent
+ header_params["parent"] = request.parent
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.transfer_domain.timeout,
metadata: metadata,
@@ -636,10 +735,31 @@
#
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Domains::V1beta1::Registration>]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::ListRegistrationsRequest.new
+ #
+ # # Call the list_registrations method.
+ # result = client.list_registrations request
+ #
+ # # The returned object is of type Gapic::PagedEnumerable. You can
+ # # iterate over all elements by calling #each, and the enumerable
+ # # will lazily make API calls to fetch subsequent pages. Other
+ # # methods are also available for managing paging directly.
+ # result.each do |response|
+ # # Each element is of type ::Google::Cloud::Domains::V1beta1::Registration.
+ # p response
+ # end
+ #
def list_registrations request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::ListRegistrationsRequest
@@ -653,13 +773,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "parent" => request.parent
- }
+ header_params = {}
+ if request.parent
+ header_params["parent"] = request.parent
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.list_registrations.timeout,
metadata: metadata,
@@ -706,10 +828,25 @@
#
# @return [::Google::Cloud::Domains::V1beta1::Registration]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::GetRegistrationRequest.new
+ #
+ # # Call the get_registration method.
+ # result = client.get_registration request
+ #
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::Registration.
+ # p result
+ #
def get_registration request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::GetRegistrationRequest
@@ -723,13 +860,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "name" => request.name
- }
+ header_params = {}
+ if request.name
+ header_params["name"] = request.name
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.get_registration.timeout,
metadata: metadata,
@@ -783,10 +922,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::UpdateRegistrationRequest.new
+ #
+ # # Call the update_registration method.
+ # result = client.update_registration request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def update_registration request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::UpdateRegistrationRequest
@@ -800,13 +961,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "registration.name" => request.registration.name
- }
+ header_params = {}
+ if request.registration&.name
+ header_params["registration.name"] = request.registration.name
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.update_registration.timeout,
metadata: metadata,
@@ -859,10 +1022,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::ConfigureManagementSettingsRequest.new
+ #
+ # # Call the configure_management_settings method.
+ # result = client.configure_management_settings request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def configure_management_settings request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::ConfigureManagementSettingsRequest
@@ -876,13 +1061,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "registration" => request.registration
- }
+ header_params = {}
+ if request.registration
+ header_params["registration"] = request.registration
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.configure_management_settings.timeout,
metadata: metadata,
@@ -943,10 +1130,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::ConfigureDnsSettingsRequest.new
+ #
+ # # Call the configure_dns_settings method.
+ # result = client.configure_dns_settings request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def configure_dns_settings request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::ConfigureDnsSettingsRequest
@@ -960,13 +1169,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "registration" => request.registration
- }
+ header_params = {}
+ if request.registration
+ header_params["registration"] = request.registration
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.configure_dns_settings.timeout,
metadata: metadata,
@@ -1025,10 +1236,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::ConfigureContactSettingsRequest.new
+ #
+ # # Call the configure_contact_settings method.
+ # result = client.configure_contact_settings request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def configure_contact_settings request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::ConfigureContactSettingsRequest
@@ -1042,13 +1275,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "registration" => request.registration
- }
+ header_params = {}
+ if request.registration
+ header_params["registration"] = request.registration
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.configure_contact_settings.timeout,
metadata: metadata,
@@ -1103,10 +1338,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::ExportRegistrationRequest.new
+ #
+ # # Call the export_registration method.
+ # result = client.export_registration request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def export_registration request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::ExportRegistrationRequest
@@ -1120,13 +1377,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "name" => request.name
- }
+ header_params = {}
+ if request.name
+ header_params["name"] = request.name
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.export_registration.timeout,
metadata: metadata,
@@ -1191,10 +1450,32 @@
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::DeleteRegistrationRequest.new
+ #
+ # # Call the delete_registration method.
+ # result = client.delete_registration request
+ #
+ # # The returned object is of type Gapic::Operation. You can use this
+ # # object to check the status of an operation, cancel it, or wait
+ # # for results. Here is how to block until completion:
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "Error!"
+ # end
+ #
def delete_registration request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::DeleteRegistrationRequest
@@ -1208,13 +1489,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "name" => request.name
- }
+ header_params = {}
+ if request.name
+ header_params["name"] = request.name
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.delete_registration.timeout,
metadata: metadata,
@@ -1265,10 +1548,25 @@
#
# @return [::Google::Cloud::Domains::V1beta1::AuthorizationCode]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::RetrieveAuthorizationCodeRequest.new
+ #
+ # # Call the retrieve_authorization_code method.
+ # result = client.retrieve_authorization_code request
+ #
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::AuthorizationCode.
+ # p result
+ #
def retrieve_authorization_code request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::RetrieveAuthorizationCodeRequest
@@ -1282,13 +1580,15 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "registration" => request.registration
- }
+ header_params = {}
+ if request.registration
+ header_params["registration"] = request.registration
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.retrieve_authorization_code.timeout,
metadata: metadata,
@@ -1337,10 +1637,25 @@
#
# @return [::Google::Cloud::Domains::V1beta1::AuthorizationCode]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
+ # @example Basic example
+ # require "google/cloud/domains/v1beta1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Domains::V1beta1::Domains::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Domains::V1beta1::ResetAuthorizationCodeRequest.new
+ #
+ # # Call the reset_authorization_code method.
+ # result = client.reset_authorization_code request
+ #
+ # # The returned object is of type Google::Cloud::Domains::V1beta1::AuthorizationCode.
+ # p result
+ #
def reset_authorization_code request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Domains::V1beta1::ResetAuthorizationCodeRequest
@@ -1354,12 +1669,14 @@
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
- header_params = {
- "registration" => request.registration
- }
+ header_params = {}
+ if request.registration
+ header_params["registration"] = request.registration
+ end
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header
options.apply_defaults timeout: @config.rpcs.reset_authorization_code.timeout,
metadata: metadata,