google-cloud-connectors-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +141 -8
  5. data/lib/google/cloud/connectors/v1/authconfig_pb.rb +52 -0
  6. data/lib/google/cloud/connectors/v1/bindings_override.rb +159 -0
  7. data/lib/google/cloud/connectors/v1/common_pb.rb +58 -0
  8. data/lib/google/cloud/connectors/v1/connection_pb.rb +84 -0
  9. data/lib/google/cloud/connectors/v1/connector_pb.rb +51 -0
  10. data/lib/google/cloud/connectors/v1/connector_version_pb.rb +63 -0
  11. data/lib/google/cloud/connectors/v1/connectors/client.rb +2189 -0
  12. data/lib/google/cloud/connectors/v1/connectors/credentials.rb +47 -0
  13. data/lib/google/cloud/connectors/v1/connectors/operations.rb +809 -0
  14. data/lib/google/cloud/connectors/v1/connectors/paths.rb +182 -0
  15. data/lib/google/cloud/connectors/v1/connectors/rest/client.rb +2049 -0
  16. data/lib/google/cloud/connectors/v1/connectors/rest/operations.rb +902 -0
  17. data/lib/google/cloud/connectors/v1/connectors/rest/service_stub.rb +1075 -0
  18. data/lib/google/cloud/connectors/v1/connectors/rest.rb +54 -0
  19. data/lib/google/cloud/connectors/v1/connectors.rb +56 -0
  20. data/lib/google/cloud/connectors/v1/connectors_service_pb.rb +53 -0
  21. data/lib/google/cloud/connectors/v1/connectors_service_services_pb.rb +80 -0
  22. data/lib/google/cloud/connectors/v1/destination_config_pb.rb +43 -0
  23. data/lib/google/cloud/connectors/v1/provider_pb.rb +51 -0
  24. data/lib/google/cloud/connectors/v1/rest.rb +38 -0
  25. data/lib/google/cloud/connectors/v1/runtime_pb.rb +47 -0
  26. data/lib/google/cloud/connectors/v1/settings_pb.rb +46 -0
  27. data/lib/google/cloud/connectors/v1/ssl_config_pb.rb +49 -0
  28. data/lib/google/cloud/connectors/v1/version.rb +7 -2
  29. data/lib/google/cloud/connectors/v1.rb +45 -0
  30. data/lib/google-cloud-connectors-v1.rb +21 -0
  31. data/proto_docs/README.md +4 -0
  32. data/proto_docs/google/api/client.rb +399 -0
  33. data/proto_docs/google/api/field_behavior.rb +85 -0
  34. data/proto_docs/google/api/launch_stage.rb +71 -0
  35. data/proto_docs/google/api/resource.rb +222 -0
  36. data/proto_docs/google/cloud/connectors/v1/authconfig.rb +165 -0
  37. data/proto_docs/google/cloud/connectors/v1/common.rb +287 -0
  38. data/proto_docs/google/cloud/connectors/v1/connection.rb +678 -0
  39. data/proto_docs/google/cloud/connectors/v1/connector.rb +119 -0
  40. data/proto_docs/google/cloud/connectors/v1/connector_version.rb +234 -0
  41. data/proto_docs/google/cloud/connectors/v1/destination_config.rb +53 -0
  42. data/proto_docs/google/cloud/connectors/v1/provider.rb +118 -0
  43. data/proto_docs/google/cloud/connectors/v1/runtime.rb +106 -0
  44. data/proto_docs/google/cloud/connectors/v1/settings.rb +51 -0
  45. data/proto_docs/google/cloud/connectors/v1/ssl_config.rb +117 -0
  46. data/proto_docs/google/longrunning/operations.rb +164 -0
  47. data/proto_docs/google/protobuf/any.rb +145 -0
  48. data/proto_docs/google/protobuf/duration.rb +98 -0
  49. data/proto_docs/google/protobuf/empty.rb +34 -0
  50. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  51. data/proto_docs/google/protobuf/struct.rb +96 -0
  52. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  53. data/proto_docs/google/rpc/status.rb +48 -0
  54. data/proto_docs/google/type/expr.rb +75 -0
  55. metadata +136 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fa61f022f83c61e1a4bb7e0325f89f249dee225b0a8078bfb5402f9ae554cd1
4
- data.tar.gz: 29911a87f9cdaab2856ecbf7d911e08c851afbd3d331d164895ee930c3bee9c9
3
+ metadata.gz: cdf683eecc50ebeaac2c88ecd6c2a17c53eed2796ee737b3d481d7b2ae0080b6
4
+ data.tar.gz: 7e6714ba9939674858ae12eafb7aa70d3cd66eccfca340a385e0646949193302
5
5
  SHA512:
6
- metadata.gz: 01231a9560fdd0648bf449ee1638ecc8788739f36a42719d900f6b5581f25f686c66180de9790e267a832b8b452dd56df3456a2d45832601b369de17a9225ddf
7
- data.tar.gz: f0487bb380bda5a232d26b29d30a7b01c13a816fb03523329f3ff563f6ba4b30ebc79fddc31c272b3e26702ec62aca7578b6c382dafcb97e1c77be8c4ed66d6a
6
+ metadata.gz: 7b053fe08f1ded72a2c458569e7c7d726fb09ad6d62e02025e5830064b769ff57ce6e870f2606ac243d49ede6e35cd8289245c3dbeb95aaa20aa7c39b1296ea0
7
+ data.tar.gz: 89d3a111cb56d3de5956e36cece51534da50d6bdef9a063e64827d5ab2420bd0d48b69c9f44d7586275727fee9b812b8c99dc3ec3c40f1a358b22629982e1cf4
data/.yardopts ADDED
@@ -0,0 +1,12 @@
1
+ --no-private
2
+ --title="Connectors V1 API"
3
+ --exclude _pb\.rb$
4
+ --markup markdown
5
+ --markup-provider redcarpet
6
+
7
+ ./lib/**/*.rb
8
+ ./proto_docs/**/*.rb
9
+ -
10
+ README.md
11
+ LICENSE.md
12
+ AUTHENTICATION.md
data/AUTHENTICATION.md ADDED
@@ -0,0 +1,122 @@
1
+ # Authentication
2
+
3
+ The recommended way to authenticate to the google-cloud-connectors-v1 library is to use
4
+ [Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials).
5
+ To review all of your authentication options, see [Credentials lookup](#credential-lookup).
6
+
7
+ ## Quickstart
8
+
9
+ The following example shows how to set up authentication for a local development
10
+ environment with your user credentials.
11
+
12
+ **NOTE:** This method is _not_ recommended for running in production. User credentials
13
+ should be used only during development.
14
+
15
+ 1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk).
16
+ 2. Set up a local ADC file with your user credentials:
17
+
18
+ ```sh
19
+ gcloud auth application-default login
20
+ ```
21
+
22
+ 3. Write code as if already authenticated.
23
+
24
+ For more information about setting up authentication for a local development environment, see
25
+ [Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev).
26
+
27
+ ## Credential Lookup
28
+
29
+ The google-cloud-connectors-v1 library provides several mechanisms to configure your system.
30
+ Generally, using Application Default Credentials to facilitate automatic
31
+ credentials discovery is the easist method. But if you need to explicitly specify
32
+ credentials, there are several methods available to you.
33
+
34
+ Credentials are accepted in the following ways, in the following order or precedence:
35
+
36
+ 1. Credentials specified in method arguments
37
+ 2. Credentials specified in configuration
38
+ 3. Credentials pointed to or included in environment variables
39
+ 4. Credentials found in local ADC file
40
+ 5. Credentials returned by the metadata server for the attached service account (GCP)
41
+
42
+ ### Configuration
43
+
44
+ You can configure a path to a JSON credentials file, either for an individual client object or
45
+ globally, for all client objects. The JSON file can contain credentials created for
46
+ [workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation),
47
+ [workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a
48
+ [service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key).
49
+
50
+ Note: Service account keys are a security risk if not managed correctly. You should
51
+ [choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
52
+ whenever possible.
53
+
54
+ To configure a credentials file for an individual client initialization:
55
+
56
+ ```ruby
57
+ require "google/cloud/connectors/v1"
58
+
59
+ client = ::Google::Cloud::Connectors::V1::Connectors::Client.new do |config|
60
+ config.credentials = "path/to/credentialfile.json"
61
+ end
62
+ ```
63
+
64
+ To configure a credentials file globally for all clients:
65
+
66
+ ```ruby
67
+ require "google/cloud/connectors/v1"
68
+
69
+ ::Google::Cloud::Connectors::V1::Connectors::Client.configure do |config|
70
+ config.credentials = "path/to/credentialfile.json"
71
+ end
72
+
73
+ client = ::Google::Cloud::Connectors::V1::Connectors::Client.new
74
+ ```
75
+
76
+ ### Environment Variables
77
+
78
+ You can also use an environment variable to provide a JSON credentials file.
79
+ The environment variable can contain a path to the credentials file or, for
80
+ environments such as Docker containers where writing files is not encouraged,
81
+ you can include the credentials file itself.
82
+
83
+ The JSON file can contain credentials created for
84
+ [workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation),
85
+ [workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a
86
+ [service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key).
87
+
88
+ Note: Service account keys are a security risk if not managed correctly. You should
89
+ [choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree)
90
+ whenever possible.
91
+
92
+ The environment variables that google-cloud-connectors-v1
93
+ checks for credentials are:
94
+
95
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
96
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
97
+
98
+ ```ruby
99
+ require "google/cloud/connectors/v1"
100
+
101
+ ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
102
+
103
+ client = ::Google::Cloud::Connectors::V1::Connectors::Client.new
104
+ ```
105
+
106
+ ### Local ADC file
107
+
108
+ You can set up a local ADC file with your user credentials for authentication during
109
+ development. If credentials are not provided in code or in environment variables,
110
+ then the local ADC credentials are discovered.
111
+
112
+ Follow the steps in [Quickstart](#quickstart) to set up a local ADC file.
113
+
114
+ ### Google Cloud Platform environments
115
+
116
+ When running on Google Cloud Platform (GCP), including Google Compute Engine
117
+ (GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud
118
+ Functions (GCF) and Cloud Run, credentials are retrieved from the attached
119
+ service account automatically. Code should be written as if already authenticated.
120
+
121
+ For more information, see
122
+ [Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa).
data/README.md CHANGED
@@ -1,8 +1,141 @@
1
- # Placeholder for Ruby gem google-cloud-connectors-v1
2
-
3
- This is a placeholder for the future Google-authored gem google-cloud-connectors-v1.
4
- This placeholder is being released on 2024-05-23 in order to reserve the name.
5
- The final gem should be available shortly after that date. If it has not been
6
- released in a timely manner, or if this placeholder interferes with your work,
7
- you can contact the Google Ruby team by opening an issue in the GitHub
8
- repository https://github.com/googleapis/google-cloud-ruby.
1
+ # Ruby Client for the Connectors V1 API
2
+
3
+ Enables users to create and manage connections to Google Cloud services and third-party business applications using the Connectors interface.
4
+
5
+ Enables users to create and manage connections to Google Cloud services and third-party business applications using the Connectors interface.
6
+
7
+ https://github.com/googleapis/google-cloud-ruby
8
+
9
+ This gem is a _versioned_ client. It provides basic client classes for a
10
+ specific version of the Connectors V1 API. Most users should consider using
11
+ the main client gem,
12
+ [google-cloud-connectors](https://rubygems.org/gems/google-cloud-connectors).
13
+ See the section below titled *Which client should I use?* for more information.
14
+
15
+ ## Installation
16
+
17
+ ```
18
+ $ gem install google-cloud-connectors-v1
19
+ ```
20
+
21
+ ## Before You Begin
22
+
23
+ In order to use this library, you first need to go through the following steps:
24
+
25
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
26
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
27
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/connectors.googleapis.com)
28
+ 1. {file:AUTHENTICATION.md Set up authentication.}
29
+
30
+ ## Quick Start
31
+
32
+ ```ruby
33
+ require "google/cloud/connectors/v1"
34
+
35
+ client = ::Google::Cloud::Connectors::V1::Connectors::Client.new
36
+ request = ::Google::Cloud::Connectors::V1::ListConnectionsRequest.new # (request fields as keyword arguments...)
37
+ response = client.list_connections request
38
+ ```
39
+
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-connectors-v1/latest)
41
+ for class and method documentation.
42
+
43
+ ## Enabling Logging
44
+
45
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
46
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
47
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
48
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
49
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
50
+
51
+ Configuring a Ruby stdlib logger:
52
+
53
+ ```ruby
54
+ require "logger"
55
+
56
+ module MyLogger
57
+ LOGGER = Logger.new $stderr, level: Logger::WARN
58
+ def logger
59
+ LOGGER
60
+ end
61
+ end
62
+
63
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
64
+ module GRPC
65
+ extend MyLogger
66
+ end
67
+ ```
68
+
69
+
70
+ ## Google Cloud Samples
71
+
72
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
73
+
74
+ ## Supported Ruby Versions
75
+
76
+ This library is supported on Ruby 2.7+.
77
+
78
+ Google provides official support for Ruby versions that are actively supported
79
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
80
+ in security maintenance, and not end of life. Older versions of Ruby _may_
81
+ still work, but are unsupported and not recommended. See
82
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
83
+ support schedule.
84
+
85
+ ## Which client should I use?
86
+
87
+ Most modern Ruby client libraries for Google APIs come in two flavors: the main
88
+ client library with a name such as `google-cloud-connectors`,
89
+ and lower-level _versioned_ client libraries with names such as
90
+ `google-cloud-connectors-v1`.
91
+ _In most cases, you should install the main client._
92
+
93
+ ### What's the difference between the main client and a versioned client?
94
+
95
+ A _versioned client_ provides a basic set of data types and client classes for
96
+ a _single version_ of a specific service. (That is, for a service with multiple
97
+ versions, there might be a separate versioned client for each service version.)
98
+ Most versioned clients are written and maintained by a code generator.
99
+
100
+ The _main client_ is designed to provide you with the _recommended_ client
101
+ interfaces for the service. There will be only one main client for any given
102
+ service, even a service with multiple versions. The main client includes
103
+ factory methods for constructing the client objects we recommend for most
104
+ users. In some cases, those will be classes provided by an underlying versioned
105
+ client; in other cases, they will be handwritten higher-level client objects
106
+ with additional capabilities, convenience methods, or best practices built in.
107
+ Generally, the main client will default to a recommended service version,
108
+ although in some cases you can override this if you need to talk to a specific
109
+ service version.
110
+
111
+ ### Why would I want to use the main client?
112
+
113
+ We recommend that most users install the main client gem for a service. You can
114
+ identify this gem as the one _without_ a version in its name, e.g.
115
+ `google-cloud-connectors`.
116
+ The main client is recommended because it will embody the best practices for
117
+ accessing the service, and may also provide more convenient interfaces or
118
+ tighter integration into frameworks and third-party libraries. In addition, the
119
+ documentation and samples published by Google will generally demonstrate use of
120
+ the main client.
121
+
122
+ ### Why would I want to use a versioned client?
123
+
124
+ You can use a versioned client if you are content with a possibly lower-level
125
+ class interface, you explicitly want to avoid features provided by the main
126
+ client, or you want to access a specific service version not be covered by the
127
+ main client. You can identify versioned client gems because the service version
128
+ is part of the name, e.g. `google-cloud-connectors-v1`.
129
+
130
+ ### What about the google-apis-<name> clients?
131
+
132
+ Client library gems with names that begin with `google-apis-` are based on an
133
+ older code generation technology. They talk to a REST/JSON backend (whereas
134
+ most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
135
+ not offer the same performance, features, and ease of use provided by more
136
+ modern clients.
137
+
138
+ The `google-apis-` clients have wide coverage across Google services, so you
139
+ might need to use one if there is no modern client available for the service.
140
+ However, if a modern client is available, we generally recommend it over the
141
+ older `google-apis-` clients.
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/connectors/v1/authconfig.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/cloud/connectors/v1/common_pb'
8
+
9
+
10
+ descriptor_data = "\n+google/cloud/connectors/v1/authconfig.proto\x12\x1agoogle.cloud.connectors.v1\x1a\'google/cloud/connectors/v1/common.proto\"\xc6\x08\n\nAuthConfig\x12\x37\n\tauth_type\x18\x01 \x01(\x0e\x32$.google.cloud.connectors.v1.AuthType\x12L\n\ruser_password\x18\x02 \x01(\x0b\x32\x33.google.cloud.connectors.v1.AuthConfig.UserPasswordH\x00\x12S\n\x11oauth2_jwt_bearer\x18\x03 \x01(\x0b\x32\x36.google.cloud.connectors.v1.AuthConfig.Oauth2JwtBearerH\x00\x12\x63\n\x19oauth2_client_credentials\x18\x04 \x01(\x0b\x32>.google.cloud.connectors.v1.AuthConfig.Oauth2ClientCredentialsH\x00\x12M\n\x0essh_public_key\x18\x06 \x01(\x0b\x32\x33.google.cloud.connectors.v1.AuthConfig.SshPublicKeyH\x00\x12H\n\x14\x61\x64\x64itional_variables\x18\x05 \x03(\x0b\x32*.google.cloud.connectors.v1.ConfigVariable\x1aV\n\x0cUserPassword\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x34\n\x08password\x18\x02 \x01(\x0b\x32\".google.cloud.connectors.v1.Secret\x1a\xdf\x01\n\x0fOauth2JwtBearer\x12\x36\n\nclient_key\x18\x01 \x01(\x0b\x32\".google.cloud.connectors.v1.Secret\x12T\n\njwt_claims\x18\x02 \x01(\x0b\x32@.google.cloud.connectors.v1.AuthConfig.Oauth2JwtBearer.JwtClaims\x1a>\n\tJwtClaims\x12\x0e\n\x06issuer\x18\x01 \x01(\t\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12\x10\n\x08\x61udience\x18\x03 \x01(\t\x1ag\n\x17Oauth2ClientCredentials\x12\x11\n\tclient_id\x18\x01 \x01(\t\x12\x39\n\rclient_secret\x18\x02 \x01(\x0b\x32\".google.cloud.connectors.v1.Secret\x1a\xb2\x01\n\x0cSshPublicKey\x12\x10\n\x08username\x18\x01 \x01(\t\x12;\n\x0fssh_client_cert\x18\x03 \x01(\x0b\x32\".google.cloud.connectors.v1.Secret\x12\x11\n\tcert_type\x18\x04 \x01(\t\x12@\n\x14ssh_client_cert_pass\x18\x05 \x01(\x0b\x32\".google.cloud.connectors.v1.SecretB\x06\n\x04type\"\xcf\x01\n\x12\x41uthConfigTemplate\x12\x37\n\tauth_type\x18\x01 \x01(\x0e\x32$.google.cloud.connectors.v1.AuthType\x12U\n\x19\x63onfig_variable_templates\x18\x02 \x03(\x0b\x32\x32.google.cloud.connectors.v1.ConfigVariableTemplate\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t*\x9d\x01\n\x08\x41uthType\x12\x19\n\x15\x41UTH_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rUSER_PASSWORD\x10\x01\x12\x15\n\x11OAUTH2_JWT_BEARER\x10\x02\x12\x1d\n\x19OAUTH2_CLIENT_CREDENTIALS\x10\x03\x12\x12\n\x0eSSH_PUBLIC_KEY\x10\x04\x12\x19\n\x15OAUTH2_AUTH_CODE_FLOW\x10\x05\x42s\n\x1e\x63om.google.cloud.connectors.v1B\x0f\x41uthConfigProtoP\x01Z>cloud.google.com/go/connectors/apiv1/connectorspb;connectorspbb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.cloud.connectors.v1.ConfigVariable", "google/cloud/connectors/v1/common.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
+ end
32
+ end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
35
+ end
36
+
37
+ module Google
38
+ module Cloud
39
+ module Connectors
40
+ module V1
41
+ AuthConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfig").msgclass
42
+ AuthConfig::UserPassword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfig.UserPassword").msgclass
43
+ AuthConfig::Oauth2JwtBearer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfig.Oauth2JwtBearer").msgclass
44
+ AuthConfig::Oauth2JwtBearer::JwtClaims = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfig.Oauth2JwtBearer.JwtClaims").msgclass
45
+ AuthConfig::Oauth2ClientCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfig.Oauth2ClientCredentials").msgclass
46
+ AuthConfig::SshPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfig.SshPublicKey").msgclass
47
+ AuthConfigTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthConfigTemplate").msgclass
48
+ AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthType").enummodule
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,159 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Connectors
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/connectors/v1/rest"
28
+ # client = ::Google::Cloud::Connectors::V1::Connectors::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Connectors"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
68
+
69
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
70
+ uri_method: :get,
71
+ uri_template: "/v1/{resource}:getIamPolicy",
72
+ matches: [
73
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false]
74
+ ],
75
+ body: nil
76
+ ),
77
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
78
+ uri_method: :get,
79
+ uri_template: "/v1/{resource}:getIamPolicy",
80
+ matches: [
81
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/providers/[^/]+/?$}, false]
82
+ ],
83
+ body: nil
84
+ )
85
+ ]
86
+ default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
87
+
88
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
89
+ uri_method: :post,
90
+ uri_template: "/v1/{resource}:setIamPolicy",
91
+ matches: [
92
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false]
93
+ ],
94
+ body: "*"
95
+ ),
96
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
97
+ uri_method: :post,
98
+ uri_template: "/v1/{resource}:setIamPolicy",
99
+ matches: [
100
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/providers/[^/]+/?$}, false]
101
+ ],
102
+ body: "*"
103
+ )
104
+ ]
105
+ default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
106
+
107
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
108
+ uri_method: :post,
109
+ uri_template: "/v1/{resource}:testIamPermissions",
110
+ matches: [
111
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false]
112
+ ],
113
+ body: "*"
114
+ ),
115
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
116
+ uri_method: :post,
117
+ uri_template: "/v1/{resource}:testIamPermissions",
118
+ matches: [
119
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/providers/[^/]+/?$}, false]
120
+ ],
121
+ body: "*"
122
+ )
123
+ ]
124
+ default_config
125
+ end
126
+ yield @configure if block_given?
127
+ @configure
128
+ end
129
+
130
+ ##
131
+ # @private
132
+ # Configuration class for the google.cloud.connectors.v1 package.
133
+ #
134
+ # This class contains common configuration for all services
135
+ # of the google.cloud.connectors.v1 package.
136
+ #
137
+ # This configuration is for internal use of the client library classes,
138
+ # and it is not intended that the end-users will read or change it.
139
+ #
140
+ class Configuration
141
+ extend ::Gapic::Config
142
+
143
+ # @private
144
+ # Overrides for http bindings for the RPC of the mixins for this package.
145
+ # Services in this package should use these when creating clients for the mixin services.
146
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
147
+ config_attr :bindings_override, {}, ::Hash, nil
148
+
149
+ # @private
150
+ def initialize parent_config = nil
151
+ @parent_config = parent_config unless parent_config.nil?
152
+
153
+ yield self if block_given?
154
+ end
155
+ end
156
+ end
157
+ end
158
+ end
159
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/connectors/v1/common.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+
10
+
11
+ descriptor_data = "\n\'google/cloud/connectors/v1/common.proto\x12\x1agoogle.cloud.connectors.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xab\x05\n\x16\x43onfigVariableTemplate\x12\x0b\n\x03key\x18\x01 \x01(\t\x12P\n\nvalue_type\x18\x02 \x01(\x0e\x32<.google.cloud.connectors.v1.ConfigVariableTemplate.ValueType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x18\n\x10validation_regex\x18\x05 \x01(\t\x12\x10\n\x08required\x18\x06 \x01(\x08\x12\x39\n\nrole_grant\x18\x07 \x01(\x0b\x32%.google.cloud.connectors.v1.RoleGrant\x12<\n\x0c\x65num_options\x18\x08 \x03(\x0b\x32&.google.cloud.connectors.v1.EnumOption\x12R\n\x17\x61uthorization_code_link\x18\t \x01(\x0b\x32\x31.google.cloud.connectors.v1.AuthorizationCodeLink\x12G\n\x05state\x18\n \x01(\x0e\x32\x38.google.cloud.connectors.v1.ConfigVariableTemplate.State\x12\x13\n\x0bis_advanced\x18\x0b \x01(\x08\"t\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\n\n\x06SECRET\x10\x04\x12\x08\n\x04\x45NUM\x10\x05\x12\x16\n\x12\x41UTHORIZATION_CODE\x10\x06\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0e\n\nDEPRECATED\x10\x02\" \n\x06Secret\x12\x16\n\x0esecret_version\x18\x01 \x01(\t\".\n\nEnumOption\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xa5\x01\n\x0e\x43onfigVariable\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12:\n\x0csecret_value\x18\x05 \x01(\x0b\x32\".google.cloud.connectors.v1.SecretH\x00\x42\x07\n\x05value\"\xe5\x03\n\tRoleGrant\x12\x42\n\tprincipal\x18\x01 \x01(\x0e\x32/.google.cloud.connectors.v1.RoleGrant.Principal\x12\r\n\x05roles\x18\x02 \x03(\t\x12@\n\x08resource\x18\x03 \x01(\x0b\x32..google.cloud.connectors.v1.RoleGrant.Resource\x12\x1c\n\x14helper_text_template\x18\x04 \x01(\t\x1a\xea\x01\n\x08Resource\x12\x41\n\x04type\x18\x01 \x01(\x0e\x32\x33.google.cloud.connectors.v1.RoleGrant.Resource.Type\x12\x15\n\rpath_template\x18\x03 \x01(\t\"\x83\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bGCP_PROJECT\x10\x01\x12\x10\n\x0cGCP_RESOURCE\x10\x02\x12\x1c\n\x18GCP_SECRETMANAGER_SECRET\x10\x03\x12$\n GCP_SECRETMANAGER_SECRET_VERSION\x10\x04\"8\n\tPrincipal\x12\x19\n\x15PRINCIPAL_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43ONNECTOR_SA\x10\x01\"\\\n\x15\x41uthorizationCodeLink\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x0e\n\x06scopes\x18\x02 \x03(\t\x12\x11\n\tclient_id\x18\x03 \x01(\t\x12\x13\n\x0b\x65nable_pkce\x18\x04 \x01(\x08*e\n\x0bLaunchStage\x12\x1c\n\x18LAUNCH_STAGE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PREVIEW\x10\x01\x12\x06\n\x02GA\x10\x02\x12\x0e\n\nDEPRECATED\x10\x03\x12\x13\n\x0fPRIVATE_PREVIEW\x10\x05\x42o\n\x1e\x63om.google.cloud.connectors.v1B\x0b\x43ommonProtoP\x01Z>cloud.google.com/go/connectors/apiv1/connectorspb;connectorspbb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
27
+ ]
28
+ imports.each do |type_name, expected_filename|
29
+ import_file = pool.lookup(type_name).file_descriptor
30
+ if import_file.name != expected_filename
31
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
32
+ end
33
+ end
34
+ warn "Each proto file must use a consistent fully-qualified name."
35
+ warn "This will become an error in the next major version."
36
+ end
37
+
38
+ module Google
39
+ module Cloud
40
+ module Connectors
41
+ module V1
42
+ OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.OperationMetadata").msgclass
43
+ ConfigVariableTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.ConfigVariableTemplate").msgclass
44
+ ConfigVariableTemplate::ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.ConfigVariableTemplate.ValueType").enummodule
45
+ ConfigVariableTemplate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.ConfigVariableTemplate.State").enummodule
46
+ Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.Secret").msgclass
47
+ EnumOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.EnumOption").msgclass
48
+ ConfigVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.ConfigVariable").msgclass
49
+ RoleGrant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.RoleGrant").msgclass
50
+ RoleGrant::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.RoleGrant.Resource").msgclass
51
+ RoleGrant::Resource::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.RoleGrant.Resource.Type").enummodule
52
+ RoleGrant::Principal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.RoleGrant.Principal").enummodule
53
+ AuthorizationCodeLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.AuthorizationCodeLink").msgclass
54
+ LaunchStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.connectors.v1.LaunchStage").enummodule
55
+ end
56
+ end
57
+ end
58
+ end