lib/google/cloud/compute/v1/region_disks/rest/client.rb in google-cloud-compute-v1-2.4.0 vs lib/google/cloud/compute/v1/region_disks/rest/client.rb in google-cloud-compute-v1-2.5.0
- old
+ new
@@ -223,10 +223,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::AddResourcePoliciesRegionDiskRequest.new
+ #
+ # # Call the add_resource_policies method.
+ # result = client.add_resource_policies request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def add_resource_policies request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AddResourcePoliciesRegionDiskRequest
@@ -300,10 +316,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest.new
+ #
+ # # Call the bulk_insert method.
+ # result = client.bulk_insert request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def bulk_insert request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertRegionDiskRequest
@@ -379,10 +411,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::CreateSnapshotRegionDiskRequest.new
+ #
+ # # Call the create_snapshot method.
+ # result = client.create_snapshot request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def create_snapshot request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CreateSnapshotRegionDiskRequest
@@ -456,10 +504,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::DeleteRegionDiskRequest.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::DeleteRegionDiskRequest
@@ -531,10 +595,26 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::Compute::V1::Disk]
#
# @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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::GetRegionDiskRequest.new
+ #
+ # # Call the get method.
+ # result = client.get request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Disk.
+ # 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::GetRegionDiskRequest
@@ -599,10 +679,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::GetIamPolicyRegionDiskRequest.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::GetIamPolicyRegionDiskRequest
@@ -669,10 +765,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::InsertRegionDiskRequest.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::InsertRegionDiskRequest
@@ -752,10 +864,26 @@
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Disk>]
#
# @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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::ListRegionDisksRequest.new
+ #
+ # # Call the list method.
+ # result = client.list request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::DiskList.
+ # 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::ListRegionDisksRequest
@@ -823,10 +951,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::RemoveResourcePoliciesRegionDiskRequest.new
+ #
+ # # Call the remove_resource_policies method.
+ # result = client.remove_resource_policies request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def remove_resource_policies request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RemoveResourcePoliciesRegionDiskRequest
@@ -902,10 +1046,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::ResizeRegionDiskRequest.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::ResizeRegionDiskRequest
@@ -979,10 +1139,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::SetIamPolicyRegionDiskRequest.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::SetIamPolicyRegionDiskRequest
@@ -1049,10 +1225,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::SetLabelsRegionDiskRequest.new
+ #
+ # # Call the set_labels method.
+ # result = client.set_labels request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def set_labels request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsRegionDiskRequest
@@ -1128,10 +1320,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest.new
+ #
+ # # Call the start_async_replication method.
+ # result = client.start_async_replication request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def start_async_replication request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StartAsyncReplicationRegionDiskRequest
@@ -1205,10 +1413,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest.new
+ #
+ # # Call the stop_async_replication method.
+ # result = client.stop_async_replication request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def stop_async_replication request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopAsyncReplicationRegionDiskRequest
@@ -1282,10 +1506,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest.new
+ #
+ # # Call the stop_group_async_replication method.
+ # result = client.stop_group_async_replication request
+ #
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
+ # p result
+ #
def stop_group_async_replication request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::StopGroupAsyncReplicationRegionDiskRequest
@@ -1359,10 +1599,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsRegionDiskRequest.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::TestIamPermissionsRegionDiskRequest
@@ -1432,9 +1688,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::RegionDisks::Rest::Client.new
+ #
+ # # Create a request. To set request fields, pass in keyword arguments.
+ # request = Google::Cloud::Compute::V1::UpdateRegionDiskRequest.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::UpdateRegionDiskRequest