# 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! module Google module Cloud module Compute module V1 module RegionInstanceGroupManagers module Rest # GRPC transcoding helper methods for the RegionInstanceGroupManagers REST API. module GrpcTranscoding # @param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_abandon_instances request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/abandonInstances" body = request_pb.region_instance_group_managers_abandon_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_apply_updates_to_instances request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/applyUpdatesToInstances" body = request_pb.region_instance_group_managers_apply_updates_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_create_instances request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/createInstances" body = request_pb.region_instance_group_managers_create_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest] # 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_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_delete_instances request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/deleteInstances" body = request_pb.region_instance_group_managers_delete_instances_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_delete_per_instance_configs request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/deletePerInstanceConfigs" body = request_pb.region_instance_group_manager_delete_instance_config_req_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest] # 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_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = nil query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest] # 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_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers" body = request_pb.instance_group_manager_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest] # 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_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_list_errors request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/listErrors" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_list_managed_instances request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/listManagedInstances" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_list_per_instance_configs request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/listPerInstanceConfigs" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results? query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by? query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token? query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_patch request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = request_pb.instance_group_manager_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_patch_per_instance_configs request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/patchPerInstanceConfigs" body = request_pb.region_instance_group_manager_patch_instance_config_req_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_recreate_instances request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/recreateInstances" body = request_pb.region_instance_group_managers_recreate_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_resize request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/resize" body = nil query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? query_string_params["size"] = request_pb.size.to_s [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_instance_template request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/setInstanceTemplate" body = request_pb.region_instance_group_managers_set_template_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_set_target_pools request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/setTargetPools" body = request_pb.region_instance_group_managers_set_target_pools_request_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def transcode_update_per_instance_configs request_pb uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/updatePerInstanceConfigs" body = request_pb.region_instance_group_manager_update_instance_config_req_resource.to_json query_string_params = {} query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id? [uri, body, query_string_params] end extend self end end end end end end end