# frozen_string_literal: true # Copyright 2024 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/container/v1/cluster_service_pb" module Google module Cloud module Container module V1 module ClusterManager module Rest ## # REST service stub for the ClusterManager service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub def initialize endpoint:, endpoint_template:, universe_domain:, 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, endpoint_template: endpoint_template, universe_domain: universe_domain, credentials: credentials, numeric_enums: true, raise_faraday_errors: false end ## # The effective universe domain # # @return [String] # def universe_domain @client_stub.universe_domain end ## # The effective endpoint # # @return [String] # def endpoint @client_stub.endpoint end ## # Baseline implementation for the list_clusters REST call # # @param request_pb [::Google::Cloud::Container::V1::ListClustersRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::ListClustersResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::ListClustersResponse] # A result object deserialized from the server's reply def list_clusters request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_clusters_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::ListClustersResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::GetClusterRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Cluster] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Cluster] # A result object deserialized from the server's reply def get_cluster request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_cluster_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Cluster.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::CreateClusterRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def create_cluster request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_cluster_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::UpdateClusterRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def update_cluster request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_cluster_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::UpdateNodePoolRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def update_node_pool request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_node_pool_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_node_pool_autoscaling REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNodePoolAutoscalingRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_node_pool_autoscaling request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_node_pool_autoscaling_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_logging_service REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLoggingServiceRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_logging_service request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_logging_service_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_monitoring_service REST call # # @param request_pb [::Google::Cloud::Container::V1::SetMonitoringServiceRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_monitoring_service request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_monitoring_service_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_addons_config REST call # # @param request_pb [::Google::Cloud::Container::V1::SetAddonsConfigRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_addons_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_addons_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_locations REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLocationsRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_locations request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_locations_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_master REST call # # @param request_pb [::Google::Cloud::Container::V1::UpdateMasterRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def update_master request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_master_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_master_auth REST call # # @param request_pb [::Google::Cloud::Container::V1::SetMasterAuthRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_master_auth request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_master_auth_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::DeleteClusterRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def delete_cluster request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_cluster_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_operations REST call # # @param request_pb [::Google::Cloud::Container::V1::ListOperationsRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::ListOperationsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::ListOperationsResponse] # A result object deserialized from the server's reply def list_operations request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_operations_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_operation REST call # # @param request_pb [::Google::Cloud::Container::V1::GetOperationRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def get_operation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_operation_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the cancel_operation REST call # # @param request_pb [::Google::Cloud::Container::V1::CancelOperationRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply def cancel_operation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_cancel_operation_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_server_config REST call # # @param request_pb [::Google::Cloud::Container::V1::GetServerConfigRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::ServerConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::ServerConfig] # A result object deserialized from the server's reply def get_server_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_server_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::ServerConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_json_web_keys REST call # # @param request_pb [::Google::Cloud::Container::V1::GetJSONWebKeysRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::GetJSONWebKeysResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::GetJSONWebKeysResponse] # A result object deserialized from the server's reply def get_json_web_keys request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_json_web_keys_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::GetJSONWebKeysResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_node_pools REST call # # @param request_pb [::Google::Cloud::Container::V1::ListNodePoolsRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::ListNodePoolsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::ListNodePoolsResponse] # A result object deserialized from the server's reply def list_node_pools request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_node_pools_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::ListNodePoolsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::GetNodePoolRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::NodePool] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::NodePool] # A result object deserialized from the server's reply def get_node_pool request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_node_pool_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::NodePool.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::CreateNodePoolRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def create_node_pool request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_node_pool_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::DeleteNodePoolRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def delete_node_pool request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_node_pool_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the complete_node_pool_upgrade REST call # # @param request_pb [::Google::Cloud::Container::V1::CompleteNodePoolUpgradeRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply def complete_node_pool_upgrade request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_complete_node_pool_upgrade_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the rollback_node_pool_upgrade REST call # # @param request_pb [::Google::Cloud::Container::V1::RollbackNodePoolUpgradeRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def rollback_node_pool_upgrade request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_rollback_node_pool_upgrade_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_node_pool_management REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNodePoolManagementRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_node_pool_management request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_node_pool_management_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_labels REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLabelsRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::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 = ServiceStub.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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_legacy_abac REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLegacyAbacRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_legacy_abac request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_legacy_abac_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the start_ip_rotation REST call # # @param request_pb [::Google::Cloud::Container::V1::StartIPRotationRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def start_ip_rotation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_start_ip_rotation_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the complete_ip_rotation REST call # # @param request_pb [::Google::Cloud::Container::V1::CompleteIPRotationRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def complete_ip_rotation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_complete_ip_rotation_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_node_pool_size REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNodePoolSizeRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_node_pool_size request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_node_pool_size_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_network_policy REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNetworkPolicyRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_network_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_network_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the set_maintenance_policy REST call # # @param request_pb [::Google::Cloud::Container::V1::SetMaintenancePolicyRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::Operation] # A result object deserialized from the server's reply def set_maintenance_policy request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_set_maintenance_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_usable_subnetworks REST call # # @param request_pb [::Google::Cloud::Container::V1::ListUsableSubnetworksRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::ListUsableSubnetworksResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::ListUsableSubnetworksResponse] # A result object deserialized from the server's reply def list_usable_subnetworks request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_subnetworks_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::ListUsableSubnetworksResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the check_autopilot_compatibility REST call # # @param request_pb [::Google::Cloud::Container::V1::CheckAutopilotCompatibilityRequest] # 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, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::Container::V1::CheckAutopilotCompatibilityResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Container::V1::CheckAutopilotCompatibilityResponse] # A result object deserialized from the server's reply def check_autopilot_compatibility request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_check_autopilot_compatibility_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 ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::Container::V1::CheckAutopilotCompatibilityResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # @private # # GRPC transcoding helper method for the list_clusters REST call # # @param request_pb [::Google::Cloud::Container::V1::ListClustersRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_clusters_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/clusters", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::GetClusterRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_cluster_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::CreateClusterRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_cluster_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/clusters", body: "*", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::UpdateClusterRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_cluster_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :put, uri_template: "/v1/{name}", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :put, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::UpdateNodePoolRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_node_pool_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :put, uri_template: "/v1/{name}", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/update", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_node_pool_autoscaling REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNodePoolAutoscalingRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_node_pool_autoscaling_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setAutoscaling", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/autoscaling", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_logging_service REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLoggingServiceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_logging_service_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setLogging", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/logging", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_monitoring_service REST call # # @param request_pb [::Google::Cloud::Container::V1::SetMonitoringServiceRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_monitoring_service_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setMonitoring", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/monitoring", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_addons_config REST call # # @param request_pb [::Google::Cloud::Container::V1::SetAddonsConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_addons_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setAddons", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/addons", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_locations REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLocationsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_locations_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setLocations", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/locations", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_master REST call # # @param request_pb [::Google::Cloud::Container::V1::UpdateMasterRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_update_master_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:updateMaster", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/master", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_master_auth REST call # # @param request_pb [::Google::Cloud::Container::V1::SetMasterAuthRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_master_auth_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setMasterAuth", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMasterAuth", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_cluster REST call # # @param request_pb [::Google::Cloud::Container::V1::DeleteClusterRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_delete_cluster_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_operations REST call # # @param request_pb [::Google::Cloud::Container::V1::ListOperationsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_operations_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/operations", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/operations", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_operation REST call # # @param request_pb [::Google::Cloud::Container::V1::GetOperationRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_operation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["operation_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the cancel_operation REST call # # @param request_pb [::Google::Cloud::Container::V1::CancelOperationRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_cancel_operation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:cancel", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/operations/{operation_id}:cancel", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["operation_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_server_config REST call # # @param request_pb [::Google::Cloud::Container::V1::GetServerConfigRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_server_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}/serverConfig", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/serverconfig", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_json_web_keys REST call # # @param request_pb [::Google::Cloud::Container::V1::GetJSONWebKeysRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_json_web_keys_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/jwks", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_node_pools REST call # # @param request_pb [::Google::Cloud::Container::V1::ListNodePoolsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_node_pools_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/nodePools", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::GetNodePoolRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_get_node_pool_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::CreateNodePoolRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_create_node_pool_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/nodePools", body: "*", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_node_pool REST call # # @param request_pb [::Google::Cloud::Container::V1::DeleteNodePoolRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_delete_node_pool_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :delete, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the complete_node_pool_upgrade REST call # # @param request_pb [::Google::Cloud::Container::V1::CompleteNodePoolUpgradeRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_complete_node_pool_upgrade_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:completeUpgrade", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the rollback_node_pool_upgrade REST call # # @param request_pb [::Google::Cloud::Container::V1::RollbackNodePoolUpgradeRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_rollback_node_pool_upgrade_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:rollback", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}:rollback", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_node_pool_management REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNodePoolManagementRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_node_pool_management_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setManagement", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setManagement", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_labels REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLabelsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_labels_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setResourceLabels", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/resourceLabels", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_legacy_abac REST call # # @param request_pb [::Google::Cloud::Container::V1::SetLegacyAbacRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_legacy_abac_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setLegacyAbac", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/legacyAbac", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the start_ip_rotation REST call # # @param request_pb [::Google::Cloud::Container::V1::StartIPRotationRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_start_ip_rotation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:startIpRotation", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:startIpRotation", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the complete_ip_rotation REST call # # @param request_pb [::Google::Cloud::Container::V1::CompleteIPRotationRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_complete_ip_rotation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:completeIpRotation", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:completeIpRotation", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_node_pool_size REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNodePoolSizeRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_node_pool_size_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setSize", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}/nodePools/{node_pool_id}/setSize", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false], ["node_pool_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_network_policy REST call # # @param request_pb [::Google::Cloud::Container::V1::SetNetworkPolicyRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_network_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setNetworkPolicy", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setNetworkPolicy", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the set_maintenance_policy REST call # # @param request_pb [::Google::Cloud::Container::V1::SetMaintenancePolicyRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_set_maintenance_policy_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:setMaintenancePolicy", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/projects/{project_id}/zones/{zone}/clusters/{cluster_id}:setMaintenancePolicy", body: "*", matches: [ ["project_id", %r{^[^/]+/?$}, false], ["zone", %r{^[^/]+/?$}, false], ["cluster_id", %r{^[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_usable_subnetworks REST call # # @param request_pb [::Google::Cloud::Container::V1::ListUsableSubnetworksRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_list_usable_subnetworks_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/aggregated/usableSubnetworks", matches: [ ["parent", %r{^projects/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the check_autopilot_compatibility REST call # # @param request_pb [::Google::Cloud::Container::V1::CheckAutopilotCompatibilityRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_check_autopilot_compatibility_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}:checkAutopilotCompatibility", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end