# 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 InstanceGroupManagers module Rest # GRPC transcoding helper methods for the InstanceGroupManagers REST API. module GrpcTranscoding # @param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/abandonInstances" body = request_pb.instance_group_managers_abandon_instances_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest] # 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_pb uri = "/compute/v1/projects/#{request_pb.project}/aggregated/instanceGroupManagers" body = nil query_string_params = {} query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter? query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes? 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::ApplyUpdatesToInstancesInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/applyUpdatesToInstances" body = request_pb.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::CreateInstancesInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/createInstances" body = request_pb.instance_group_managers_create_instances_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/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::DeleteInstancesInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/deleteInstances" body = request_pb.instance_group_managers_delete_instances_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/deletePerInstanceConfigs" body = request_pb.instance_group_managers_delete_per_instance_configs_req_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = nil query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers" body = request_pb.instance_group_manager_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest] # 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}/zones/#{request_pb.zone}/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::ListErrorsInstanceGroupManagersRequest] # 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}/zones/#{request_pb.zone}/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::ListManagedInstancesInstanceGroupManagersRequest] # 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}/zones/#{request_pb.zone}/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::ListPerInstanceConfigsInstanceGroupManagersRequest] # 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}/zones/#{request_pb.zone}/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::PatchInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}" body = request_pb.instance_group_manager_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/patchPerInstanceConfigs" body = request_pb.instance_group_managers_patch_per_instance_configs_req_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/recreateInstances" body = request_pb.instance_group_managers_recreate_instances_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/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::SetInstanceTemplateInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/setInstanceTemplate" body = request_pb.instance_group_managers_set_instance_template_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/setTargetPools" body = request_pb.instance_group_managers_set_target_pools_request_resource.to_json query_string_params = {} [uri, body, query_string_params] end # @param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest] # 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}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/updatePerInstanceConfigs" body = request_pb.instance_group_managers_update_per_instance_configs_req_resource.to_json query_string_params = {} [uri, body, query_string_params] end extend self end end end end end end end