google-cloud-vpc_access-v1 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40f5e9d2781852fdaa4c3586562f6b5c2fb1cb5ccfb75625515c053181fb664d
4
- data.tar.gz: acd5345f4a3a95bb9f669f07cbe1316cb5bea4365868c9b4ac26cda1fe1975a4
3
+ metadata.gz: 1c5b88ef1d180ae64d10ba0ccd1bbfb0ae8461401f422a9bc37ecad78d6fe952
4
+ data.tar.gz: 82b4c8e0707112158b4e533b315b737f4efc21601f1580a31dc0d883c45f1c6c
5
5
  SHA512:
6
- metadata.gz: 2ac47f528690d084e4030f33e7e6b6dd5989a62d17688d6a40fd4df619a8c82b9a8d9b8818f7c6836c24c0b675a88c06d70447bd320a22bc2069d5c6fa94f212
7
- data.tar.gz: 41a92721d2ab5348041e77217a201ba5dadc83bba9ef747b65360b5215c27f3810b4f3a605b66b06d3d1eb04a5d26b42206a27c3ce064398fdab3869e3cea771
6
+ metadata.gz: 3697eb17f217fabde0ccd47899a14c32089b5ae7f4e1ae46ef8de27e92860facf02ece1d40158fe44568b3d2017b1923571704868b4e652ea2d5f0ad60a23700
7
+ data.tar.gz: fbfd9f8f8f471b033f85cb9faefb4cea5d86a23a811630aeb6b292eadf1661a0760bda66b1999f4b0cc1997255d1d4e05bca7ed68131637e8072d5c4b33c94f3
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Serverless VPC Access V1 API
2
2
 
3
- API Client library for the Serverless VPC Access V1 API
3
+ API for managing VPC access connectors.
4
4
 
5
5
  Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  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)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 VpcAccess
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/vpc_access/v1/rest"
28
+ # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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", "VpcAccess"]
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.ListLocations"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}/locations",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config
57
+ end
58
+ yield @configure if block_given?
59
+ @configure
60
+ end
61
+
62
+ ##
63
+ # @private
64
+ # Configuration class for the google.cloud.vpcaccess.v1 package.
65
+ #
66
+ # This class contains common configuration for all services
67
+ # of the google.cloud.vpcaccess.v1 package.
68
+ #
69
+ # This configuration is for internal use of the client library classes,
70
+ # and it is not intended that the end-users will read or change it.
71
+ #
72
+ class Configuration
73
+ extend ::Gapic::Config
74
+
75
+ # @private
76
+ # Overrides for http bindings for the RPC of the mixins for this package.
77
+ # Services in this package should use these when creating clients for the mixin services.
78
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
79
+ config_attr :bindings_override, {}, ::Hash, nil
80
+
81
+ # @private
82
+ def initialize parent_config = nil
83
+ @parent_config = parent_config unless parent_config.nil?
84
+
85
+ yield self if block_given?
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 "google/cloud/vpc_access/v1/vpc_access_service/rest"
20
+ require "google/cloud/vpc_access/v1/bindings_override"
21
+ require "google/cloud/vpc_access/v1/version"
22
+
23
+ module Google
24
+ module Cloud
25
+ module VpcAccess
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/vpc_access/v1/rest"
32
+ # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new
33
+ #
34
+ module V1
35
+ end
36
+ end
37
+ end
38
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module VpcAccess
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/vpcaccess/v1/vpc_access_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -154,6 +155,12 @@ module Google
154
155
  config.endpoint = @config.endpoint
155
156
  end
156
157
 
158
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
159
+ config.credentials = credentials
160
+ config.quota_project = @quota_project_id
161
+ config.endpoint = @config.endpoint
162
+ end
163
+
157
164
  @vpc_access_service_stub = ::Gapic::ServiceStub.new(
158
165
  ::Google::Cloud::VpcAccess::V1::VpcAccessService::Stub,
159
166
  credentials: credentials,
@@ -170,6 +177,13 @@ module Google
170
177
  #
171
178
  attr_reader :operations_client
172
179
 
180
+ ##
181
+ # Get the associated client for mix-in of the Locations.
182
+ #
183
+ # @return [Google::Cloud::Location::Locations::Client]
184
+ #
185
+ attr_reader :location_client
186
+
173
187
  # Service calls
174
188
 
175
189
  ##
@@ -218,14 +232,14 @@ module Google
218
232
  # # Call the create_connector method.
219
233
  # result = client.create_connector request
220
234
  #
221
- # # The returned object is of type Gapic::Operation. You can use this
222
- # # object to check the status of an operation, cancel it, or wait
223
- # # for results. Here is how to block until completion:
235
+ # # The returned object is of type Gapic::Operation. You can use it to
236
+ # # check the status of an operation, cancel it, or wait for results.
237
+ # # Here is how to wait for a response.
224
238
  # result.wait_until_done! timeout: 60
225
239
  # if result.response?
226
240
  # p result.response
227
241
  # else
228
- # puts "Error!"
242
+ # puts "No response received."
229
243
  # end
230
244
  #
231
245
  def create_connector request, options = nil
@@ -401,13 +415,11 @@ module Google
401
415
  # # Call the list_connectors method.
402
416
  # result = client.list_connectors request
403
417
  #
404
- # # The returned object is of type Gapic::PagedEnumerable. You can
405
- # # iterate over all elements by calling #each, and the enumerable
406
- # # will lazily make API calls to fetch subsequent pages. Other
407
- # # methods are also available for managing paging directly.
408
- # result.each do |response|
418
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
419
+ # # over elements, and API calls will be issued to fetch pages as needed.
420
+ # result.each do |item|
409
421
  # # Each element is of type ::Google::Cloud::VpcAccess::V1::Connector.
410
- # p response
422
+ # p item
411
423
  # end
412
424
  #
413
425
  def list_connectors request, options = nil
@@ -494,14 +506,14 @@ module Google
494
506
  # # Call the delete_connector method.
495
507
  # result = client.delete_connector request
496
508
  #
497
- # # The returned object is of type Gapic::Operation. You can use this
498
- # # object to check the status of an operation, cancel it, or wait
499
- # # for results. Here is how to block until completion:
509
+ # # The returned object is of type Gapic::Operation. You can use it to
510
+ # # check the status of an operation, cancel it, or wait for results.
511
+ # # Here is how to wait for a response.
500
512
  # result.wait_until_done! timeout: 60
501
513
  # if result.response?
502
514
  # p result.response
503
515
  # else
504
- # puts "Error!"
516
+ # puts "No response received."
505
517
  # end
506
518
  #
507
519
  def delete_connector request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil