lib/google/cloud/compute/v1/instances/rest/client.rb in google-cloud-compute-v1-1.10.0 vs lib/google/cloud/compute/v1/instances/rest/client.rb in google-cloud-compute-v1-2.0.0

- old
+ new

@@ -295,13 +295,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def add_access_config request, options = nil @@ -374,13 +374,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def add_resource_policies request, options = nil @@ -457,13 +457,13 @@ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. # @param project [::String] # Project ID for this request. # @param return_partial_success [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def aggregated_list request, options = nil @@ -491,13 +491,13 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.aggregated_list request, options do |result, response| + @instances_stub.aggregated_list request, options do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :aggregated_list, "items", request, result, options - yield result, response if block_given? + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -530,13 +530,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def attach_disk request, options = nil @@ -607,13 +607,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def bulk_insert request, options = nil @@ -684,13 +684,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def delete request, options = nil @@ -765,13 +765,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def delete_access_config request, options = nil @@ -844,13 +844,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def detach_disk request, options = nil @@ -919,13 +919,13 @@ # Name of the instance resource to return. # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Instance] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Instance] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get request, options = nil @@ -953,12 +953,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get request, options do |result, response| - yield result, response if block_given? + @instances_stub.get request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -987,13 +987,13 @@ # The name of the network interface to get the effective firewalls. # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get_effective_firewalls request, options = nil @@ -1021,12 +1021,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get_effective_firewalls request, options do |result, response| - yield result, response if block_given? + @instances_stub.get_effective_firewalls request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1057,13 +1057,13 @@ # Specifies the guest attributes path to be queried. # @param variable_key [::String] # Specifies the key for the guest attributes entry. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::GuestAttributes] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::GuestAttributes] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get_guest_attributes request, options = nil @@ -1091,12 +1091,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get_guest_attributes request, options do |result, response| - yield result, response if block_given? + @instances_stub.get_guest_attributes request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1125,13 +1125,13 @@ # Project ID for this request. # @param resource [::String] # Name or id of the resource for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Policy] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Policy] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get_iam_policy request, options = nil @@ -1159,12 +1159,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get_iam_policy request, options do |result, response| - yield result, response if block_given? + @instances_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1191,13 +1191,13 @@ # Name of the instance scoping this request. # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Screenshot] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Screenshot] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get_screenshot request, options = nil @@ -1225,12 +1225,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get_screenshot request, options do |result, response| - yield result, response if block_given? + @instances_stub.get_screenshot request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1261,13 +1261,13 @@ # Project ID for this request. # @param start [::Integer] # Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::SerialPortOutput] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::SerialPortOutput] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get_serial_port_output request, options = nil @@ -1295,12 +1295,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get_serial_port_output request, options do |result, response| - yield result, response if block_given? + @instances_stub.get_serial_port_output request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1327,13 +1327,13 @@ # Name or id of the instance scoping this request. # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def get_shielded_instance_identity request, options = nil @@ -1361,12 +1361,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.get_shielded_instance_identity request, options do |result, response| - yield result, response if block_given? + @instances_stub.get_shielded_instance_identity request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1399,13 +1399,13 @@ # Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate # @param source_machine_image [::String] # Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def insert request, options = nil @@ -1482,13 +1482,13 @@ # Project ID for this request. # @param return_partial_success [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def list request, options = nil @@ -1516,13 +1516,13 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.list request, options do |result, response| + @instances_stub.list request, options do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list, "items", request, result, options - yield result, response if block_given? + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1559,13 +1559,13 @@ # Project ID for this request. # @param return_partial_success [::Boolean] # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def list_referrers request, options = nil @@ -1593,13 +1593,13 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.list_referrers request, options do |result, response| + @instances_stub.list_referrers request, options do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list_referrers, "items", request, result, options - yield result, response if block_given? + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1630,13 +1630,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def remove_resource_policies request, options = nil @@ -1707,13 +1707,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def reset request, options = nil @@ -1784,13 +1784,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def resume request, options = nil @@ -1859,13 +1859,13 @@ # Name of the instance scoping this request. # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def send_diagnostic_interrupt request, options = nil @@ -1893,12 +1893,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.send_diagnostic_interrupt request, options do |result, response| - yield result, response if block_given? + @instances_stub.send_diagnostic_interrupt request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -1929,13 +1929,13 @@ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param resource [::String] # Name or id of the resource for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_deletion_protection request, options = nil @@ -2010,13 +2010,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_disk_auto_delete request, options = nil @@ -2087,13 +2087,13 @@ # Name or id of the resource for this request. # @param zone [::String] # The name of the zone for this request. # @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash] # The body resource for this request - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::Policy] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::Policy] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_iam_policy request, options = nil @@ -2121,12 +2121,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.set_iam_policy request, options do |result, response| - yield result, response if block_given? + @instances_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -2157,13 +2157,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_labels request, options = nil @@ -2236,13 +2236,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_machine_resources request, options = nil @@ -2315,13 +2315,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_machine_type request, options = nil @@ -2394,13 +2394,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_metadata request, options = nil @@ -2473,13 +2473,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_min_cpu_platform request, options = nil @@ -2552,13 +2552,13 @@ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param scheduling_resource [::Google::Cloud::Compute::V1::Scheduling, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_scheduling request, options = nil @@ -2631,13 +2631,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_service_account request, options = nil @@ -2710,13 +2710,13 @@ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param shielded_instance_integrity_policy_resource [::Google::Cloud::Compute::V1::ShieldedInstanceIntegrityPolicy, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_shielded_instance_integrity_policy request, options = nil @@ -2789,13 +2789,13 @@ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param tags_resource [::Google::Cloud::Compute::V1::Tags, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def set_tags request, options = nil @@ -2864,13 +2864,13 @@ # Name of the instance scoping this request. # @param project [::String] # Project ID for this request. # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def simulate_maintenance_event request, options = nil @@ -2941,13 +2941,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def start request, options = nil @@ -3020,13 +3020,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def start_with_encryption_key request, options = nil @@ -3099,13 +3099,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def stop request, options = nil @@ -3178,13 +3178,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def suspend request, options = nil @@ -3255,13 +3255,13 @@ # Name or id of the resource for this request. # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def test_iam_permissions request, options = nil @@ -3289,12 +3289,12 @@ options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @instances_stub.test_iam_permissions request, options do |result, response| - yield result, response if block_given? + @instances_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end @@ -3331,13 +3331,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update request, options = nil @@ -3412,13 +3412,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_access_config request, options = nil @@ -3491,13 +3491,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_display_device request, options = nil @@ -3572,13 +3572,13 @@ # Project ID for this request. # @param request_id [::String] # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_network_interface request, options = nil @@ -3651,12 +3651,12 @@ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). # @param shielded_instance_config_resource [::Google::Cloud::Compute::V1::ShieldedInstanceConfig, ::Hash] # The body resource for this request # @param zone [::String] # The name of the zone for this request. - # @yield [result, response] Access the result along with the Faraday response object + # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::GenericLRO::Operation] - # @yieldparam response [::Faraday::Response] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Gapic::GenericLRO::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. def update_shielded_instance_config request, options = nil