# 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/developerconnect/v1/developer_connect_pb" module Google module Cloud module DeveloperConnect module V1 module DeveloperConnect module Rest ## # REST service stub for the DeveloperConnect service. # Service stub contains baseline method implementations # including transcoding, making the REST call, and deserialing the response. # class ServiceStub def initialize endpoint:, endpoint_template:, universe_domain:, credentials: # These require statements are intentionally placed here to initialize # the REST modules only when it's required. require "gapic/rest" @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, endpoint_template: endpoint_template, universe_domain: universe_domain, credentials: credentials, numeric_enums: true, raise_faraday_errors: false end ## # The effective universe domain # # @return [String] # def universe_domain @client_stub.universe_domain end ## # The effective endpoint # # @return [String] # def endpoint @client_stub.endpoint end ## # Baseline implementation for the list_connections REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest] # 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::DeveloperConnect::V1::ListConnectionsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::ListConnectionsResponse] # A result object deserialized from the server's reply def list_connections request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_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::DeveloperConnect::V1::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest] # 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::DeveloperConnect::V1::Connection] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::Connection] # A result object deserialized from the server's reply def get_connection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_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::DeveloperConnect::V1::Connection.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest] # 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::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply def create_connection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_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::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the update_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest] # 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::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply def update_connection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_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::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest] # 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::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply def delete_connection request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_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::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the create_git_repository_link REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest] # 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::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply def create_git_repository_link request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_create_git_repository_link_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::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the delete_git_repository_link REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest] # 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::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply def delete_git_repository_link request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_delete_git_repository_link_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::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the list_git_repository_links REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest] # 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::DeveloperConnect::V1::ListGitRepositoryLinksResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksResponse] # A result object deserialized from the server's reply def list_git_repository_links request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_list_git_repository_links_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::DeveloperConnect::V1::ListGitRepositoryLinksResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the get_git_repository_link REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest] # 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::DeveloperConnect::V1::GitRepositoryLink] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink] # A result object deserialized from the server's reply def get_git_repository_link request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_get_git_repository_link_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::DeveloperConnect::V1::GitRepositoryLink.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the fetch_read_write_token REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest] # 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::DeveloperConnect::V1::FetchReadWriteTokenResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse] # A result object deserialized from the server's reply def fetch_read_write_token request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_fetch_read_write_token_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::DeveloperConnect::V1::FetchReadWriteTokenResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the fetch_read_token REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest] # 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::DeveloperConnect::V1::FetchReadTokenResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse] # A result object deserialized from the server's reply def fetch_read_token request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_fetch_read_token_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::DeveloperConnect::V1::FetchReadTokenResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the fetch_linkable_git_repositories REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest] # 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::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse] # A result object deserialized from the server's reply def fetch_linkable_git_repositories request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_fetch_linkable_git_repositories_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::DeveloperConnect::V1::FetchLinkableGitRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the fetch_git_hub_installations REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest] # 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::DeveloperConnect::V1::FetchGitHubInstallationsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse] # A result object deserialized from the server's reply def fetch_git_hub_installations request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_hub_installations_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::DeveloperConnect::V1::FetchGitHubInstallationsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # Baseline implementation for the fetch_git_refs REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest] # 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::DeveloperConnect::V1::FetchGitRefsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # # @return [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse] # A result object deserialized from the server's reply def fetch_git_refs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_refs_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::DeveloperConnect::V1::FetchGitRefsResponse.decode_json response.body, ignore_unknown_fields: true yield result, operation if block_given? result end ## # @private # # GRPC transcoding helper method for the list_connections REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest] # 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_connections_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/connections", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest] # 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_connection_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest] # 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_connection_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/connections", body: "connection", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the update_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest] # 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_connection_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, uri_template: "/v1/{connection.name}", body: "connection", matches: [ ["connection.name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_connection REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest] # 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_connection_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the create_git_repository_link REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest] # 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_git_repository_link_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{parent}/gitRepositoryLinks", body: "git_repository_link", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the delete_git_repository_link REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest] # 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_git_repository_link_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the list_git_repository_links REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest] # 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_git_repository_links_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{parent}/gitRepositoryLinks", matches: [ ["parent", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the get_git_repository_link REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest] # 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_git_repository_link_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{name}", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the fetch_read_write_token REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_fetch_read_write_token_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{git_repository_link}:fetchReadWriteToken", body: "*", matches: [ ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the fetch_read_token REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_fetch_read_token_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :post, uri_template: "/v1/{git_repository_link}:fetchReadToken", body: "*", matches: [ ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the fetch_linkable_git_repositories REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_fetch_linkable_git_repositories_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{connection}:fetchLinkableGitRepositories", matches: [ ["connection", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the fetch_git_hub_installations REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_fetch_git_hub_installations_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{connection}:fetchGitHubInstallations", matches: [ ["connection", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end ## # @private # # GRPC transcoding helper method for the fetch_git_refs REST call # # @param request_pb [::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters def self.transcode_fetch_git_refs_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, uri_template: "/v1/{git_repository_link}:fetchGitRefs", matches: [ ["git_repository_link", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/gitRepositoryLinks/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end end end end end end end