# frozen_string_literal: true # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/compute/v1/compute_pb" module Google module Cloud module Compute module V1 module Instances module Rest ## # REST service stub for the Instances service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub def initialize endpoint:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: false end ## # Baseline implementation for the add_access_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def add_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_add_access_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the add_resource_policies REST call # # @param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def add_resource_policies request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_add_resource_policies_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the aggregated_list REST call # # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstancesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::InstanceAggregatedList] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::InstanceAggregatedList] # A result object deserialized from the server's reply def aggregated_list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_aggregated_list_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceAggregatedList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the attach_disk REST call # # @param request_pb [::Google::Cloud::Compute::V1::AttachDiskInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def attach_disk request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_attach_disk_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the bulk_insert REST call # # @param request_pb [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def bulk_insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_bulk_insert_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the delete REST call # # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_delete_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the delete_access_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def delete_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_delete_access_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the detach_disk REST call # # @param request_pb [::Google::Cloud::Compute::V1::DetachDiskInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def detach_disk request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_detach_disk_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Instance] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Instance] # A result object deserialized from the server's reply def get request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Instance.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get_effective_firewalls REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse] # A result object deserialized from the server's reply def get_effective_firewalls request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_effective_firewalls_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get_guest_attributes REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::GuestAttributes] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::GuestAttributes] # A result object deserialized from the server's reply def get_guest_attributes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_guest_attributes_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::GuestAttributes.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get_iam_policy REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Policy] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Policy] # A result object deserialized from the server's reply def get_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_iam_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get_screenshot REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetScreenshotInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Screenshot] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Screenshot] # A result object deserialized from the server's reply def get_screenshot request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_screenshot_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Screenshot.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get_serial_port_output REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::SerialPortOutput] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::SerialPortOutput] # A result object deserialized from the server's reply def get_serial_port_output request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_serial_port_output_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::SerialPortOutput.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the get_shielded_instance_identity REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity] # A result object deserialized from the server's reply def get_shielded_instance_identity request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_get_shielded_instance_identity_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the insert REST call # # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def insert request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_insert_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the list REST call # # @param request_pb [::Google::Cloud::Compute::V1::ListInstancesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::InstanceList] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::InstanceList] # A result object deserialized from the server's reply def list request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_list_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceList.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the list_referrers REST call # # @param request_pb [::Google::Cloud::Compute::V1::ListReferrersInstancesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::InstanceListReferrers] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::InstanceListReferrers] # A result object deserialized from the server's reply def list_referrers request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_list_referrers_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::InstanceListReferrers.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the remove_resource_policies REST call # # @param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def remove_resource_policies request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_remove_resource_policies_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the reset REST call # # @param request_pb [::Google::Cloud::Compute::V1::ResetInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def reset request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_reset_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the resume REST call # # @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def resume request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_resume_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the send_diagnostic_interrupt REST call # # @param request_pb [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse] # A result object deserialized from the server's reply def send_diagnostic_interrupt request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_send_diagnostic_interrupt_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_deletion_protection REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_deletion_protection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_deletion_protection_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_disk_auto_delete REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_disk_auto_delete request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_disk_auto_delete_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_iam_policy REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Policy] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Policy] # A result object deserialized from the server's reply def set_iam_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_iam_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_labels REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetLabelsInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_labels request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_labels_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_machine_resources REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_machine_resources request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_machine_resources_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_machine_type REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_machine_type request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_machine_type_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_metadata REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMetadataInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_metadata request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_metadata_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_min_cpu_platform REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_min_cpu_platform request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_min_cpu_platform_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_scheduling REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetSchedulingInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_scheduling request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_scheduling_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_service_account REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_service_account request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_service_account_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_shielded_instance_integrity_policy REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_shielded_instance_integrity_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_shielded_instance_integrity_policy_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the set_tags REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetTagsInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def set_tags request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_set_tags_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the simulate_maintenance_event REST call # # @param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def simulate_maintenance_event request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_simulate_maintenance_event_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the start REST call # # @param request_pb [::Google::Cloud::Compute::V1::StartInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def start request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_start_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the start_with_encryption_key REST call # # @param request_pb [::Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def start_with_encryption_key request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_start_with_encryption_key_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the stop REST call # # @param request_pb [::Google::Cloud::Compute::V1::StopInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def stop request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_stop_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the suspend REST call # # @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def suspend request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_suspend_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the test_iam_permissions REST call # # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse] # A result object deserialized from the server's reply def test_iam_permissions request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_test_iam_permissions_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the update REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def update request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the update_access_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def update_access_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_access_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the update_display_device REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def update_display_device request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_display_device_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the update_network_interface REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def update_network_interface request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_network_interface_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end ## # Baseline implementation for the update_shielded_instance_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateShieldedInstanceConfigInstanceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, response] Access the result along with the Faraday response object # @yieldparam result [::Google::Cloud::Compute::V1::Operation] # @yieldparam response [::Faraday::Response] # # @return [::Google::Cloud::Compute::V1::Operation] # A result object deserialized from the server's reply def update_shielded_instance_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = transcode_update_shielded_instance_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split("=", 2) } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, options: options ) result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, response if block_given? result end private ## # @private # # GRPC transcoding helper method for the add_access_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_add_access_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig", body: "access_config_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the add_resource_policies REST call # # @param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_add_resource_policies_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies", body: "instances_add_resource_policies_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the aggregated_list REST call # # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstancesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_aggregated_list_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/aggregated/instances", matches: [ ["project", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the attach_disk REST call # # @param request_pb [::Google::Cloud::Compute::V1::AttachDiskInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_attach_disk_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk", body: "attached_disk_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the bulk_insert REST call # # @param request_pb [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_bulk_insert_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert", body: "bulk_insert_instance_resource_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete REST call # # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_delete_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_access_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_delete_access_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the detach_disk REST call # # @param request_pb [::Google::Cloud::Compute::V1::DetachDiskInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_detach_disk_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_effective_firewalls REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_effective_firewalls_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_guest_attributes REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_guest_attributes_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_iam_policy REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_iam_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_screenshot REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetScreenshotInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_screenshot_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/screenshot", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_serial_port_output REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_serial_port_output_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/serialPort", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_shielded_instance_identity REST call # # @param request_pb [::Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_get_shielded_instance_identity_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the insert REST call # # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_insert_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances", body: "instance_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list REST call # # @param request_pb [::Google::Cloud::Compute::V1::ListInstancesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_list_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_referrers REST call # # @param request_pb [::Google::Cloud::Compute::V1::ListReferrersInstancesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_list_referrers_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/referrers", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the remove_resource_policies REST call # # @param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_remove_resource_policies_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies", body: "instances_remove_resource_policies_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the reset REST call # # @param request_pb [::Google::Cloud::Compute::V1::ResetInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_reset_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reset", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the resume REST call # # @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_resume_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/resume", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the send_diagnostic_interrupt REST call # # @param request_pb [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_send_diagnostic_interrupt_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_deletion_protection REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_deletion_protection_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_disk_auto_delete REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_disk_auto_delete_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_iam_policy REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_iam_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy", body: "zone_set_policy_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_labels REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetLabelsInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_labels_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setLabels", body: "instances_set_labels_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_machine_resources REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_machine_resources_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineResources", body: "instances_set_machine_resources_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_machine_type REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_machine_type_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineType", body: "instances_set_machine_type_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_metadata REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMetadataInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_metadata_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMetadata", body: "metadata_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_min_cpu_platform REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_min_cpu_platform_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform", body: "instances_set_min_cpu_platform_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_scheduling REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetSchedulingInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_scheduling_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling", body: "scheduling_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_service_account REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_service_account_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", body: "instances_set_service_account_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_shielded_instance_integrity_policy REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_shielded_instance_integrity_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", body: "shielded_instance_integrity_policy_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_tags REST call # # @param request_pb [::Google::Cloud::Compute::V1::SetTagsInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_tags_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setTags", body: "tags_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the simulate_maintenance_event REST call # # @param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_simulate_maintenance_event_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the start REST call # # @param request_pb [::Google::Cloud::Compute::V1::StartInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_start_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the start_with_encryption_key REST call # # @param request_pb [::Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_start_with_encryption_key_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", body: "instances_start_with_encryption_key_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the stop REST call # # @param request_pb [::Google::Cloud::Compute::V1::StopInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_stop_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the suspend REST call # # @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_suspend_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/suspend", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the test_iam_permissions REST call # # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_test_iam_permissions_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions", body: "test_permissions_request_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["resource", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_update_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :put, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}", body: "instance_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_access_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_update_access_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig", body: "access_config_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_display_device REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_update_display_device_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice", body: "display_device_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_network_interface REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_update_network_interface_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", body: "network_interface_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_shielded_instance_config REST call # # @param request_pb [::Google::Cloud::Compute::V1::UpdateShieldedInstanceConfigInstanceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_update_shielded_instance_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig", body: "shielded_instance_config_resource", matches: [ ["project", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["instance", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end