lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb in google-cloud-bigquery-reservation-v1-0.9.0 vs lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb in google-cloud-bigquery-reservation-v1-0.10.0

- old
+ new

@@ -250,10 +250,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + # + # # Call the create_reservation method. + # result = client.create_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # def create_reservation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest @@ -317,10 +333,30 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + # + # # Call the list_reservations method. + # result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. + # p item + # end + # def list_reservations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest @@ -381,10 +417,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + # + # # Call the get_reservation method. + # result = client.get_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # def get_reservation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest @@ -446,10 +498,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + # + # # Call the delete_reservation method. + # result = client.delete_reservation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def delete_reservation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest @@ -510,10 +578,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + # + # # Call the update_reservation method. + # result = client.update_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # def update_reservation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest @@ -584,10 +668,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + # + # # Call the create_capacity_commitment method. + # result = client.create_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # def create_capacity_commitment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest @@ -651,10 +751,30 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + # + # # Call the list_capacity_commitments method. + # result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. + # p item + # end + # def list_capacity_commitments request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest @@ -715,10 +835,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + # + # # Call the get_capacity_commitment method. + # result = client.get_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # def get_capacity_commitment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest @@ -784,10 +920,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + # + # # Call the delete_capacity_commitment method. + # result = client.delete_capacity_commitment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def delete_capacity_commitment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest @@ -854,10 +1006,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + # + # # Call the update_capacity_commitment method. + # result = client.update_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # def update_capacity_commitment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest @@ -926,10 +1094,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + # + # # Call the split_capacity_commitment method. + # result = client.split_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + # p result + # def split_capacity_commitment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest @@ -1001,10 +1185,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + # + # # Call the merge_capacity_commitments method. + # result = client.merge_capacity_commitments request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # def merge_capacity_commitments request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest @@ -1105,10 +1305,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + # + # # Call the create_assignment method. + # result = client.create_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # def create_assignment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest @@ -1197,10 +1413,30 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + # + # # Call the list_assignments method. + # result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # def list_assignments request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest @@ -1275,10 +1511,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + # + # # Call the delete_assignment method. + # result = client.delete_assignment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def delete_assignment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest @@ -1373,10 +1625,30 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + # + # # Call the search_assignments method. + # result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # def search_assignments request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest @@ -1469,10 +1741,30 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + # + # # Call the search_all_assignments method. + # result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # def search_all_assignments request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest @@ -1547,10 +1839,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + # + # # Call the move_assignment method. + # result = client.move_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # def move_assignment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest @@ -1613,10 +1921,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + # + # # Call the update_assignment method. + # result = client.update_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # def update_assignment request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest @@ -1676,10 +2000,26 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + # + # # Call the get_bi_reservation method. + # result = client.get_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # def get_bi_reservation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest @@ -1747,9 +2087,25 @@ # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + # + # # Call the update_bi_reservation method. + # result = client.update_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # def update_bi_reservation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest