# frozen_string_literal: true # Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/recommender/v1/recommender_service_pb" module Google module Cloud module Recommender module V1 module Recommender module Rest ## # REST service stub for the Recommender service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub def initialize endpoint:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: true, raise_faraday_errors: false end ## # Baseline implementation for the list_insights REST call # # @param request_pb [::Google::Cloud::Recommender::V1::ListInsightsRequest] # 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::Recommender::V1::ListInsightsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::ListInsightsResponse] # A result object deserialized from the server's reply def list_insights request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_insights_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::Recommender::V1::ListInsightsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_insight REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetInsightRequest] # 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::Recommender::V1::Insight] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::Insight] # A result object deserialized from the server's reply def get_insight request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_insight_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::Recommender::V1::Insight.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the mark_insight_accepted REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkInsightAcceptedRequest] # 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::Recommender::V1::Insight] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::Insight] # A result object deserialized from the server's reply def mark_insight_accepted request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_mark_insight_accepted_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::Recommender::V1::Insight.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_recommendations REST call # # @param request_pb [::Google::Cloud::Recommender::V1::ListRecommendationsRequest] # 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::Recommender::V1::ListRecommendationsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::ListRecommendationsResponse] # A result object deserialized from the server's reply def list_recommendations request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_recommendations_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::Recommender::V1::ListRecommendationsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_recommendation REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetRecommendationRequest] # 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::Recommender::V1::Recommendation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::Recommendation] # A result object deserialized from the server's reply def get_recommendation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_recommendation_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::Recommender::V1::Recommendation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the mark_recommendation_claimed REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest] # 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::Recommender::V1::Recommendation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::Recommendation] # A result object deserialized from the server's reply def mark_recommendation_claimed request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_mark_recommendation_claimed_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::Recommender::V1::Recommendation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the mark_recommendation_succeeded REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest] # 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::Recommender::V1::Recommendation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::Recommendation] # A result object deserialized from the server's reply def mark_recommendation_succeeded request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_mark_recommendation_succeeded_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::Recommender::V1::Recommendation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the mark_recommendation_failed REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest] # 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::Recommender::V1::Recommendation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::Recommendation] # A result object deserialized from the server's reply def mark_recommendation_failed request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_mark_recommendation_failed_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::Recommender::V1::Recommendation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_recommender_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetRecommenderConfigRequest] # 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::Recommender::V1::RecommenderConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::RecommenderConfig] # A result object deserialized from the server's reply def get_recommender_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_recommender_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::Recommender::V1::RecommenderConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_recommender_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::UpdateRecommenderConfigRequest] # 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::Recommender::V1::RecommenderConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::RecommenderConfig] # A result object deserialized from the server's reply def update_recommender_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_recommender_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::Recommender::V1::RecommenderConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_insight_type_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetInsightTypeConfigRequest] # 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::Recommender::V1::InsightTypeConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::InsightTypeConfig] # A result object deserialized from the server's reply def get_insight_type_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_insight_type_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::Recommender::V1::InsightTypeConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_insight_type_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::UpdateInsightTypeConfigRequest] # 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::Recommender::V1::InsightTypeConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::Recommender::V1::InsightTypeConfig] # A result object deserialized from the server's reply def update_insight_type_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_insight_type_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::Recommender::V1::InsightTypeConfig.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # @private # # GRPC transcoding helper method for the list_insights REST call # # @param request_pb [::Google::Cloud::Recommender::V1::ListInsightsRequest] # 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_insights_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/insights", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/insights", matches: [ ["parent", %r{^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/insights", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/insights", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_insight REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetInsightRequest] # 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_insight_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the mark_insight_accepted REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkInsightAcceptedRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_mark_insight_accepted_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markAccepted", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markAccepted", body: "*", matches: [ ["name", %r{^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markAccepted", body: "*", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markAccepted", body: "*", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_recommendations REST call # # @param request_pb [::Google::Cloud::Recommender::V1::ListRecommendationsRequest] # 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_recommendations_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/recommendations", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/recommendations", matches: [ ["parent", %r{^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/recommendations", matches: [ ["parent", %r{^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/recommendations", matches: [ ["parent", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_recommendation REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetRecommendationRequest] # 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_recommendation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the mark_recommendation_claimed REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_mark_recommendation_claimed_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markClaimed", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markClaimed", body: "*", matches: [ ["name", %r{^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markClaimed", body: "*", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markClaimed", body: "*", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the mark_recommendation_succeeded REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_mark_recommendation_succeeded_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markSucceeded", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markSucceeded", body: "*", matches: [ ["name", %r{^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markSucceeded", body: "*", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markSucceeded", body: "*", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the mark_recommendation_failed REST call # # @param request_pb [::Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_mark_recommendation_failed_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markFailed", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markFailed", body: "*", matches: [ ["name", %r{^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markFailed", body: "*", matches: [ ["name", %r{^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) .with_bindings( uri_method: :post, uri_template: "/v1/{name}:markFailed", body: "*", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_recommender_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetRecommenderConfigRequest] # 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_recommender_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_recommender_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::UpdateRecommenderConfigRequest] # 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_recommender_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{recommender_config.name}", body: "recommender_config", matches: [ ["recommender_config.name", %r{^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v1/{recommender_config.name}", body: "recommender_config", matches: [ ["recommender_config.name", %r{^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_insight_type_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::GetInsightTypeConfigRequest] # 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_insight_type_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config/?$}, false] ] ) .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_insight_type_config REST call # # @param request_pb [::Google::Cloud::Recommender::V1::UpdateInsightTypeConfigRequest] # 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_insight_type_config_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{insight_type_config.name}", body: "insight_type_config", matches: [ ["insight_type_config.name", %r{^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config/?$}, false] ] ) .with_bindings( uri_method: :patch, uri_template: "/v1/{insight_type_config.name}", body: "insight_type_config", matches: [ ["insight_type_config.name", %r{^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end