lib/google/cloud/app_engine/v1/services/rest/client.rb in google-cloud-app_engine-v1-0.7.0 vs lib/google/cloud/app_engine/v1/services/rest/client.rb in google-cloud-app_engine-v1-0.8.0
- old
+ new
@@ -175,10 +175,30 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::Service>]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/app_engine/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::AppEngine::V1::ListServicesRequest.new
+ #
+ # # Call the list_services method.
+ # result = client.list_services 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::AppEngine::V1::Service.
+ # p item
+ # end
+ #
def list_services request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListServicesRequest
@@ -238,10 +258,26 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::AppEngine::V1::Service]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
+ #
+ # @example Basic example
+ # require "google/cloud/app_engine/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::AppEngine::V1::GetServiceRequest.new
+ #
+ # # Call the get_service method.
+ # result = client.get_service request
+ #
+ # # The returned object is of type Google::Cloud::AppEngine::V1::Service.
+ # p result
+ #
def get_service request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetServiceRequest
@@ -318,10 +354,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/app_engine/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::AppEngine::V1::UpdateServiceRequest.new
+ #
+ # # Call the update_service method.
+ # result = client.update_service 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_service request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateServiceRequest
@@ -381,9 +440,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/app_engine/v1"
+ #
+ # # Create a client object. The client can be reused for multiple calls.
+ # client = Google::Cloud::AppEngine::V1::Services::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::AppEngine::V1::DeleteServiceRequest.new
+ #
+ # # Call the delete_service method.
+ # result = client.delete_service 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_service request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteServiceRequest