# 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/cloud/apihub/v1/apihub_service_pb" module Google module Cloud module ApiHub module V1 module ApiHub module Rest ## # REST service stub for the ApiHub service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub # @private def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: # 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, service_name: self.class, raise_faraday_errors: false, logger: logger 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 ## # The logger used for request/response debug logging. # # @return [Logger] # def logger stub: false stub ? @client_stub.stub_logger : @client_stub.logger end ## # Baseline implementation for the create_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateApiRequest] # 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::ApiHub::V1::Api] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Api] # A result object deserialized from the server's reply def create_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_api_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, method_name: "create_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Api.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetApiRequest] # 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::ApiHub::V1::Api] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Api] # A result object deserialized from the server's reply def get_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_api_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, method_name: "get_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Api.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_apis REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListApisRequest] # 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::ApiHub::V1::ListApisResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListApisResponse] # A result object deserialized from the server's reply def list_apis request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_apis_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, method_name: "list_apis", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListApisResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the update_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateApiRequest] # 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::ApiHub::V1::Api] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Api] # A result object deserialized from the server's reply def update_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_api_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, method_name: "update_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Api.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the delete_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteApiRequest] # 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 delete_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_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, method_name: "delete_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the create_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateVersionRequest] # 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::ApiHub::V1::Version] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Version] # A result object deserialized from the server's reply def create_version request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_version_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, method_name: "create_version", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Version.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetVersionRequest] # 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::ApiHub::V1::Version] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Version] # A result object deserialized from the server's reply def get_version request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_version_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, method_name: "get_version", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Version.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_versions REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListVersionsRequest] # 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::ApiHub::V1::ListVersionsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListVersionsResponse] # A result object deserialized from the server's reply def list_versions request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_versions_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, method_name: "list_versions", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListVersionsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the update_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateVersionRequest] # 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::ApiHub::V1::Version] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Version] # A result object deserialized from the server's reply def update_version request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_version_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, method_name: "update_version", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Version.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the delete_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteVersionRequest] # 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 delete_version request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_version_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, method_name: "delete_version", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the create_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateSpecRequest] # 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::ApiHub::V1::Spec] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Spec] # A result object deserialized from the server's reply def create_spec request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_spec_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, method_name: "create_spec", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Spec.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetSpecRequest] # 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::ApiHub::V1::Spec] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Spec] # A result object deserialized from the server's reply def get_spec request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_spec_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, method_name: "get_spec", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Spec.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_spec_contents REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetSpecContentsRequest] # 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::ApiHub::V1::SpecContents] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::SpecContents] # A result object deserialized from the server's reply def get_spec_contents request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_spec_contents_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, method_name: "get_spec_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::SpecContents.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_specs REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListSpecsRequest] # 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::ApiHub::V1::ListSpecsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListSpecsResponse] # A result object deserialized from the server's reply def list_specs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_specs_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, method_name: "list_specs", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListSpecsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the update_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateSpecRequest] # 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::ApiHub::V1::Spec] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Spec] # A result object deserialized from the server's reply def update_spec request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_spec_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, method_name: "update_spec", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Spec.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the delete_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteSpecRequest] # 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 delete_spec request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_spec_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, method_name: "delete_spec", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_api_operation REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetApiOperationRequest] # 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::ApiHub::V1::ApiOperation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ApiOperation] # A result object deserialized from the server's reply def get_api_operation request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_api_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, method_name: "get_api_operation", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ApiOperation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_api_operations REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListApiOperationsRequest] # 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::ApiHub::V1::ListApiOperationsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListApiOperationsResponse] # A result object deserialized from the server's reply def list_api_operations request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_api_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, method_name: "list_api_operations", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListApiOperationsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_definition REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetDefinitionRequest] # 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::ApiHub::V1::Definition] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Definition] # A result object deserialized from the server's reply def get_definition request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_definition_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, method_name: "get_definition", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Definition.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the create_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateDeploymentRequest] # 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::ApiHub::V1::Deployment] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Deployment] # A result object deserialized from the server's reply def create_deployment request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_deployment_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, method_name: "create_deployment", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Deployment.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetDeploymentRequest] # 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::ApiHub::V1::Deployment] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Deployment] # A result object deserialized from the server's reply def get_deployment request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_deployment_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, method_name: "get_deployment", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Deployment.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_deployments REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListDeploymentsRequest] # 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::ApiHub::V1::ListDeploymentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListDeploymentsResponse] # A result object deserialized from the server's reply def list_deployments request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_deployments_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, method_name: "list_deployments", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the update_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateDeploymentRequest] # 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::ApiHub::V1::Deployment] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Deployment] # A result object deserialized from the server's reply def update_deployment request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_deployment_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, method_name: "update_deployment", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Deployment.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the delete_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteDeploymentRequest] # 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 delete_deployment request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_deployment_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, method_name: "delete_deployment", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the create_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateAttributeRequest] # 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::ApiHub::V1::Attribute] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Attribute] # A result object deserialized from the server's reply def create_attribute request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_attribute_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, method_name: "create_attribute", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Attribute.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetAttributeRequest] # 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::ApiHub::V1::Attribute] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Attribute] # A result object deserialized from the server's reply def get_attribute request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_attribute_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, method_name: "get_attribute", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Attribute.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the update_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateAttributeRequest] # 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::ApiHub::V1::Attribute] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::Attribute] # A result object deserialized from the server's reply def update_attribute request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_attribute_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, method_name: "update_attribute", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::Attribute.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the delete_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteAttributeRequest] # 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 delete_attribute request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_attribute_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, method_name: "delete_attribute", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_attributes REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListAttributesRequest] # 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::ApiHub::V1::ListAttributesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListAttributesResponse] # A result object deserialized from the server's reply def list_attributes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_attributes_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "list_attributes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListAttributesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the search_resources REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::SearchResourcesRequest] # 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::ApiHub::V1::SearchResourcesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::SearchResourcesResponse] # A result object deserialized from the server's reply def search_resources request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_search_resources_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else {} end response = @client_stub.make_http_request( verb, uri: uri, body: body || "", params: query_string_params, method_name: "search_resources", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::SearchResourcesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the create_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateExternalApiRequest] # 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::ApiHub::V1::ExternalApi] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ExternalApi] # A result object deserialized from the server's reply def create_external_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_external_api_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, method_name: "create_external_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ExternalApi.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the get_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetExternalApiRequest] # 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::ApiHub::V1::ExternalApi] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ExternalApi] # A result object deserialized from the server's reply def get_external_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_external_api_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, method_name: "get_external_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ExternalApi.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the update_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateExternalApiRequest] # 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::ApiHub::V1::ExternalApi] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ExternalApi] # A result object deserialized from the server's reply def update_external_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_external_api_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, method_name: "update_external_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ExternalApi.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the delete_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteExternalApiRequest] # 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 delete_external_api request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_external_api_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, method_name: "delete_external_api", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # Baseline implementation for the list_external_apis REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListExternalApisRequest] # 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::ApiHub::V1::ListExternalApisResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::ApiHub::V1::ListExternalApisResponse] # A result object deserialized from the server's reply def list_external_apis request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_external_apis_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, method_name: "list_external_apis", options: options ) operation = ::Gapic::Rest::TransportOperation.new response result = ::Google::Cloud::ApiHub::V1::ListExternalApisResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result end end ## # @private # # GRPC transcoding helper method for the create_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateApiRequest] # 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_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/apis", body: "api", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetApiRequest] # 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_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_apis REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListApisRequest] # 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_apis_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/apis", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateApiRequest] # 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_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{api.name}", body: "api", matches: [ ["api.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteApiRequest] # 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_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateVersionRequest] # 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_version_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/versions", body: "version", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetVersionRequest] # 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_version_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_versions REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListVersionsRequest] # 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_versions_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/versions", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateVersionRequest] # 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_version_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{version.name}", body: "version", matches: [ ["version.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_version REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteVersionRequest] # 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_version_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateSpecRequest] # 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_spec_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/specs", body: "spec", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetSpecRequest] # 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_spec_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_spec_contents REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetSpecContentsRequest] # 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_spec_contents_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}:contents", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_specs REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListSpecsRequest] # 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_specs_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/specs", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateSpecRequest] # 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_spec_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{spec.name}", body: "spec", matches: [ ["spec.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_spec REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteSpecRequest] # 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_spec_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_api_operation REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetApiOperationRequest] # 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_api_operation_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/operations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_api_operations REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListApiOperationsRequest] # 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_api_operations_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/operations", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_definition REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetDefinitionRequest] # 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_definition_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/definitions/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateDeploymentRequest] # 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_deployment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/deployments", body: "deployment", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetDeploymentRequest] # 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_deployment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_deployments REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListDeploymentsRequest] # 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_deployments_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/deployments", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateDeploymentRequest] # 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_deployment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{deployment.name}", body: "deployment", matches: [ ["deployment.name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_deployment REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteDeploymentRequest] # 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_deployment_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/deployments/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateAttributeRequest] # 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_attribute_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/attributes", body: "attribute", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetAttributeRequest] # 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_attribute_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/attributes/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateAttributeRequest] # 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_attribute_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{attribute.name}", body: "attribute", matches: [ ["attribute.name", %r{^projects/[^/]+/locations/[^/]+/attributes/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_attribute REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteAttributeRequest] # 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_attribute_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/attributes/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_attributes REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListAttributesRequest] # 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_attributes_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/attributes", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the search_resources REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::SearchResourcesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_search_resources_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{location}:searchResources", body: "*", matches: [ ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::CreateExternalApiRequest] # 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_external_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/externalApis", body: "external_api", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::GetExternalApiRequest] # 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_external_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/externalApis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::UpdateExternalApiRequest] # 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_external_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{external_api.name}", body: "external_api", matches: [ ["external_api.name", %r{^projects/[^/]+/locations/[^/]+/externalApis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_external_api REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::DeleteExternalApiRequest] # 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_external_api_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/externalApis/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_external_apis REST call # # @param request_pb [::Google::Cloud::ApiHub::V1::ListExternalApisRequest] # 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_external_apis_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/externalApis", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end