Class: Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb
Overview
REST client for the DeveloperConnect service.
Service describing handlers for resources
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DeveloperConnect Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DeveloperConnect Client instance.
-
#create_connection(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Connection in a given project and location.
-
#create_git_repository_link(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a GitRepositoryLink.
-
#delete_connection(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single Connection.
-
#delete_git_repository_link(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single GitRepositoryLink.
-
#fetch_git_hub_installations(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse
FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection.
-
#fetch_git_refs(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse
Fetch the list of branches or tags for a given repository.
-
#fetch_linkable_git_repositories(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>
FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.
-
#fetch_read_token(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse
Fetches read token of a given gitRepositoryLink.
-
#fetch_read_write_token(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse
Fetches read/write token of a given gitRepositoryLink.
-
#get_connection(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::DeveloperConnect::V1::Connection
Gets details of a single Connection.
-
#get_git_repository_link(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink
Gets details of a single GitRepositoryLink.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DeveloperConnect REST client object.
-
#list_connections(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>
Lists Connections in a given project and location.
-
#list_git_repository_links(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>
Lists GitRepositoryLinks in a given project, location, and connection.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_connection(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a single Connection.
Methods included from Paths
#connection_path, #crypto_key_path, #git_repository_link_path, #location_path, #secret_version_path, #service_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new DeveloperConnect REST client object.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 187 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @developer_connect_stub = ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @developer_connect_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @developer_connect_stub.endpoint config.universe_domain = @developer_connect_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @developer_connect_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
257 258 259 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 257 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::DeveloperConnect::V1::DeveloperConnect::Rest::Operations (readonly)
Get the associated client for long-running operations.
250 251 252 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 250 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the DeveloperConnect Client class.
See Configuration for a description of the configuration fields.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 65 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "DeveloperConnect", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.list_connections.timeout = 60.0 default_config.rpcs.list_connections.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_connection.timeout = 60.0 default_config.rpcs.get_connection.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_connection.timeout = 60.0 default_config.rpcs.create_connection.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.update_connection.timeout = 60.0 default_config.rpcs.update_connection.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.delete_connection.timeout = 60.0 default_config.rpcs.delete_connection.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_git_repository_link.timeout = 60.0 default_config.rpcs.create_git_repository_link.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.delete_git_repository_link.timeout = 60.0 default_config.rpcs.delete_git_repository_link.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_git_repository_link.timeout = 60.0 default_config.rpcs.get_git_repository_link.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.fetch_read_write_token.timeout = 60.0 default_config.rpcs.fetch_read_write_token.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.fetch_read_token.timeout = 60.0 default_config.rpcs.fetch_read_token.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.fetch_linkable_git_repositories.timeout = 60.0 default_config.rpcs.fetch_linkable_git_repositories.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.fetch_git_hub_installations.timeout = 60.0 default_config.rpcs.fetch_git_hub_installations.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the DeveloperConnect Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
157 158 159 160 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 157 def configure yield @config if block_given? @config end |
#create_connection(request, options = nil) ⇒ ::Gapic::Operation #create_connection(parent: nil, connection_id: nil, connection: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new Connection in a given project and location.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 513 def create_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_connection.timeout, metadata: , retry_policy: @config.rpcs.create_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.create_connection request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_git_repository_link(request, options = nil) ⇒ ::Gapic::Operation #create_git_repository_link(parent: nil, git_repository_link: nil, git_repository_link_id: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 849 def create_git_repository_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::CreateGitRepositoryLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_git_repository_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_git_repository_link.timeout, metadata: , retry_policy: @config.rpcs.create_git_repository_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.create_git_repository_link request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_connection(request, options = nil) ⇒ ::Gapic::Operation #delete_connection(name: nil, request_id: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a single Connection.
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 735 def delete_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_connection.timeout, metadata: , retry_policy: @config.rpcs.delete_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.delete_connection request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_git_repository_link(request, options = nil) ⇒ ::Gapic::Operation #delete_git_repository_link(name: nil, request_id: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a single GitRepositoryLink.
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 956 def delete_git_repository_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::DeleteGitRepositoryLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_git_repository_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_git_repository_link.timeout, metadata: , retry_policy: @config.rpcs.delete_git_repository_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.delete_git_repository_link request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_git_hub_installations(request, options = nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse #fetch_git_hub_installations(connection: nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsResponse
FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.
1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1459 def fetch_git_hub_installations request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitHubInstallationsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_git_hub_installations..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_git_hub_installations.timeout, metadata: , retry_policy: @config.rpcs.fetch_git_hub_installations.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.fetch_git_hub_installations request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_git_refs(request, options = nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse #fetch_git_refs(git_repository_link: nil, ref_type: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsResponse
Fetch the list of branches or tags for a given repository.
1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1544 def fetch_git_refs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchGitRefsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_git_refs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_git_refs.timeout, metadata: , retry_policy: @config.rpcs.fetch_git_refs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.fetch_git_refs request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_linkable_git_repositories(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository> #fetch_linkable_git_repositories(connection: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::LinkableGitRepository>
FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1375 def fetch_linkable_git_repositories request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchLinkableGitRepositoriesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_linkable_git_repositories..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_linkable_git_repositories.timeout, metadata: , retry_policy: @config.rpcs.fetch_linkable_git_repositories.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.fetch_linkable_git_repositories request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :fetch_linkable_git_repositories, "linkable_git_repositories", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_read_token(request, options = nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse #fetch_read_token(git_repository_link: nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenResponse
Fetches read token of a given gitRepositoryLink.
1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1287 def fetch_read_token request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadTokenRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_read_token..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_read_token.timeout, metadata: , retry_policy: @config.rpcs.fetch_read_token.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.fetch_read_token request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_read_write_token(request, options = nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse #fetch_read_write_token(git_repository_link: nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenResponse
Fetches read/write token of a given gitRepositoryLink.
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1208 def fetch_read_write_token request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::FetchReadWriteTokenRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_read_write_token..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_read_write_token.timeout, metadata: , retry_policy: @config.rpcs.fetch_read_write_token.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.fetch_read_write_token request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_connection(request, options = nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::Connection #get_connection(name: nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::Connection
Gets details of a single Connection.
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 406 def get_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_connection.timeout, metadata: , retry_policy: @config.rpcs.get_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.get_connection request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_git_repository_link(request, options = nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink #get_git_repository_link(name: nil) ⇒ ::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink
Gets details of a single GitRepositoryLink.
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1129 def get_git_repository_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::GetGitRepositoryLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_git_repository_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_git_repository_link.timeout, metadata: , retry_policy: @config.rpcs.get_git_repository_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.get_git_repository_link request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection> #list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::Connection>
Lists Connections in a given project and location.
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 326 def list_connections request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListConnectionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_connections..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_connections.timeout, metadata: , retry_policy: @config.rpcs.list_connections.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.list_connections request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_connections, "connections", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_git_repository_links(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink> #list_git_repository_links(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DeveloperConnect::V1::GitRepositoryLink>
Lists GitRepositoryLinks in a given project, location, and connection.
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 1049 def list_git_repository_links request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::ListGitRepositoryLinksRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_git_repository_links..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_git_repository_links.timeout, metadata: , retry_policy: @config.rpcs.list_git_repository_links.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.list_git_repository_links request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @developer_connect_stub, :list_git_repository_links, "git_repository_links", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
264 265 266 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 264 def logger @developer_connect_stub.logger end |
#universe_domain ⇒ String
The effective universe domain
167 168 169 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 167 def universe_domain @developer_connect_stub.universe_domain end |
#update_connection(request, options = nil) ⇒ ::Gapic::Operation #update_connection(update_mask: nil, connection: nil, request_id: nil, allow_missing: nil, validate_only: nil) ⇒ ::Gapic::Operation
Updates the parameters of a single Connection.
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'lib/google/cloud/developer_connect/v1/developer_connect/rest/client.rb', line 628 def update_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeveloperConnect::V1::UpdateConnectionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_connection..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DeveloperConnect::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_connection.timeout, metadata: , retry_policy: @config.rpcs.update_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @developer_connect_stub.update_connection request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |