lib/google/cloud/compute/v1/reservations/rest/client.rb in google-cloud-compute-v1-2.4.0 vs lib/google/cloud/compute/v1/reservations/rest/client.rb in google-cloud-compute-v1-2.5.0

- old
+ new

@@ -216,10 +216,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::ReservationsScopedList>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::AggregatedListReservationsRequest.new + # + # # Call the aggregated_list method. + # result = client.aggregated_list request + # + # # The returned object is of type Google::Cloud::Compute::V1::ReservationAggregatedList. + # p result + # def aggregated_list request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListReservationsRequest @@ -285,10 +301,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::DeleteReservationRequest.new + # + # # Call the delete method. + # result = client.delete request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def delete request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteReservationRequest @@ -360,10 +392,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Reservation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetReservationRequest.new + # + # # Call the get method. + # result = client.get request + # + # # The returned object is of type Google::Cloud::Compute::V1::Reservation. + # p result + # def get request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetReservationRequest @@ -428,10 +476,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Policy] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::GetIamPolicyReservationRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # def get_iam_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyReservationRequest @@ -496,10 +560,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::InsertReservationRequest.new + # + # # Call the insert method. + # result = client.insert request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def insert request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertReservationRequest @@ -579,10 +659,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reservation>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ListReservationsRequest.new + # + # # Call the list method. + # result = client.list request + # + # # The returned object is of type Google::Cloud::Compute::V1::ReservationList. + # p result + # def list request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListReservationsRequest @@ -650,10 +746,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::ResizeReservationRequest.new + # + # # Call the resize method. + # result = client.resize request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def resize request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ResizeReservationRequest @@ -727,10 +839,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Policy] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::SetIamPolicyReservationRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Cloud::Compute::V1::Policy. + # p result + # def set_iam_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyReservationRequest @@ -795,10 +923,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::TestIamPermissionsReservationRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse. + # p result + # def test_iam_permissions request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsReservationRequest @@ -868,9 +1012,25 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/compute/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Compute::V1::Reservations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Compute::V1::UpdateReservationRequest.new + # + # # Call the update method. + # result = client.update request + # + # # The returned object is of type Google::Cloud::Compute::V1::Operation. + # p result + # def update request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateReservationRequest