lib/google/cloud/memcache/v1beta2/cloud_memcache/rest/client.rb in google-cloud-memcache-v1beta2-0.6.1 vs lib/google/cloud/memcache/v1beta2/cloud_memcache/rest/client.rb in google-cloud-memcache-v1beta2-0.7.0
- old
+ new
@@ -237,10 +237,30 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Memcache::V1beta2::ListInstancesResponse]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::ListInstancesRequest.new
+ #
+ # # Call the list_instances method.
+ # result = client.list_instances request
+ #
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
+ # # over elements, and API calls will be issued to fetch pages as needed.
+ # result.each do |item|
+ # # Each element is of type ::Google::Cloud::Memcache::V1beta2::Instance.
+ # p item
+ # end
+ #
def list_instances request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::ListInstancesRequest
@@ -301,10 +321,26 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Memcache::V1beta2::Instance]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::GetInstanceRequest.new
+ #
+ # # Call the get_instance method.
+ # result = client.get_instance request
+ #
+ # # The returned object is of type Google::Cloud::Memcache::V1beta2::Instance.
+ # p result
+ #
def get_instance request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::GetInstanceRequest
@@ -378,10 +414,33 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::CreateInstanceRequest.new
+ #
+ # # Call the create_instance method.
+ # result = client.create_instance request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def create_instance request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::CreateInstanceRequest
@@ -446,10 +505,33 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::UpdateInstanceRequest.new
+ #
+ # # Call the update_instance method.
+ # result = client.update_instance request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def update_instance request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::UpdateInstanceRequest
@@ -517,10 +599,33 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::UpdateParametersRequest.new
+ #
+ # # Call the update_parameters method.
+ # result = client.update_parameters request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def update_parameters request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::UpdateParametersRequest
@@ -582,10 +687,33 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::DeleteInstanceRequest.new
+ #
+ # # Call the delete_instance method.
+ # result = client.delete_instance request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def delete_instance request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::DeleteInstanceRequest
@@ -653,10 +781,33 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::ApplyParametersRequest.new
+ #
+ # # Call the apply_parameters method.
+ # result = client.apply_parameters request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def apply_parameters request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::ApplyParametersRequest
@@ -724,10 +875,33 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::ApplySoftwareUpdateRequest.new
+ #
+ # # Call the apply_software_update method.
+ # result = client.apply_software_update request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def apply_software_update request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::ApplySoftwareUpdateRequest
@@ -795,9 +969,32 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Operation]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/memcache/v1beta2"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::Memcache::V1beta2::CloudMemcache::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Memcache::V1beta2::RescheduleMaintenanceRequest.new
+ #
+ # # Call the reschedule_maintenance method.
+ # result = client.reschedule_maintenance request
+ #
+ # # The returned object is of type Gapic::Operation. You can use it to
+ # # check the status of an operation, cancel it, or wait for results.
+ # # Here is how to wait for a response.
+ # result.wait_until_done! timeout: 60
+ # if result.response?
+ # p result.response
+ # else
+ # puts "No response received."
+ # end
+ #
def reschedule_maintenance request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1beta2::RescheduleMaintenanceRequest