google-cloud-gke_connect-gateway-v1beta1 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/gke_connect/gateway/v1beta1/gateway_service/client.rb +120 -42
- data/lib/google/cloud/gke_connect/gateway/v1beta1/version.rb +1 -1
- data/lib/google/cloud/gkeconnect/gateway/v1beta1/gateway_pb.rb +2 -2
- data/lib/google/cloud/gkeconnect/gateway/v1beta1/gateway_services_pb.rb +1 -1
- data/proto_docs/google/api/httpbody.rb +7 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f4540be1b2dd3e1a4b7b3c0f377641eac0f3ab84677fc4fa8d06d6b63c8828d
|
4
|
+
data.tar.gz: 69ab0236168202e5a3012c30781503fc4d13597a729cee1b510647baeb9e73be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d455d8afa191a12d10707ceb1e9a7ace8b755f900c56305241b93135f89ae2049ce80c150bdf4b089c7b8644fce7bfbdc55f69f6bdfdca60da8965deb33d3e
|
7
|
+
data.tar.gz: 2d559d172620788e829d80e277276fa985cfe9c26d791eb7f51fab5cbae2c56173ec057514994b8e704e45974a1a3584281f748ff376cc59ecb32beb467bd982
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-gke_connect-gateway-v1beta1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `GKE_CONNECT_GATEWAY_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `GKE_CONNECT_GATEWAY_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/gke_connect/gateway/v1beta1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.n
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/gke_connect/gateway/v1beta1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.n
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/gke_connect/gateway/v1beta1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/gke_connect/gateway/v1beta1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Api::HttpBody.new # (request fields as keyword arguments...)
|
37
37
|
response = client.get_resource request
|
38
38
|
```
|
39
39
|
|
@@ -44,13 +44,12 @@ module Google
|
|
44
44
|
# See {::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client::Configuration}
|
45
45
|
# for a description of the configuration fields.
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# @example
|
48
48
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# end
|
49
|
+
# # Modify the configuration for all GatewayService clients
|
50
|
+
# ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
52
|
+
# end
|
54
53
|
#
|
55
54
|
# @yield [config] Configure the Client client.
|
56
55
|
# @yieldparam config [Client::Configuration]
|
@@ -97,19 +96,15 @@ module Google
|
|
97
96
|
##
|
98
97
|
# Create a new GatewayService client object.
|
99
98
|
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
# To create a new GatewayService client with the default
|
103
|
-
# configuration:
|
104
|
-
#
|
105
|
-
# client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
99
|
+
# @example
|
106
100
|
#
|
107
|
-
#
|
108
|
-
#
|
101
|
+
# # Create a client using the default configuration
|
102
|
+
# client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
109
103
|
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
104
|
+
# # Create a client using a custom configuration
|
105
|
+
# client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new do |config|
|
106
|
+
# config.timeout = 10.0
|
107
|
+
# end
|
113
108
|
#
|
114
109
|
# @yield [config] Configure the GatewayService client.
|
115
110
|
# @yieldparam config [Client::Configuration]
|
@@ -129,14 +124,13 @@ module Google
|
|
129
124
|
|
130
125
|
# Create credentials
|
131
126
|
credentials = @config.credentials
|
132
|
-
# Use self-signed JWT if the
|
127
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
133
128
|
# but only if the default endpoint does not have a region prefix.
|
134
|
-
enable_self_signed_jwt = @config.
|
135
|
-
@config.endpoint == Client.configure.endpoint &&
|
129
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
136
130
|
!@config.endpoint.split(".").first.include?("-")
|
137
131
|
credentials ||= Credentials.default scope: @config.scope,
|
138
132
|
enable_self_signed_jwt: enable_self_signed_jwt
|
139
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
133
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
140
134
|
credentials = Credentials.new credentials, scope: @config.scope
|
141
135
|
end
|
142
136
|
@quota_project_id = @config.quota_project
|
@@ -187,6 +181,21 @@ module Google
|
|
187
181
|
#
|
188
182
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
189
183
|
#
|
184
|
+
# @example Basic example
|
185
|
+
# require "google/cloud/gke_connect/gateway/v1beta1"
|
186
|
+
#
|
187
|
+
# # Create a client object. The client can be reused for multiple calls.
|
188
|
+
# client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
189
|
+
#
|
190
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
191
|
+
# request = Google::Api::HttpBody.new
|
192
|
+
#
|
193
|
+
# # Call the get_resource method.
|
194
|
+
# result = client.get_resource request
|
195
|
+
#
|
196
|
+
# # The returned object is of type Google::Api::HttpBody.
|
197
|
+
# p result
|
198
|
+
#
|
190
199
|
def get_resource request, options = nil
|
191
200
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
192
201
|
|
@@ -207,7 +216,9 @@ module Google
|
|
207
216
|
options.apply_defaults timeout: @config.rpcs.get_resource.timeout,
|
208
217
|
metadata: metadata,
|
209
218
|
retry_policy: @config.rpcs.get_resource.retry_policy
|
210
|
-
|
219
|
+
|
220
|
+
options.apply_defaults timeout: @config.timeout,
|
221
|
+
metadata: @config.metadata,
|
211
222
|
retry_policy: @config.retry_policy
|
212
223
|
|
213
224
|
@gateway_service_stub.call_rpc :get_resource, request, options: options do |response, operation|
|
@@ -252,6 +263,21 @@ module Google
|
|
252
263
|
#
|
253
264
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
254
265
|
#
|
266
|
+
# @example Basic example
|
267
|
+
# require "google/cloud/gke_connect/gateway/v1beta1"
|
268
|
+
#
|
269
|
+
# # Create a client object. The client can be reused for multiple calls.
|
270
|
+
# client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
271
|
+
#
|
272
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
273
|
+
# request = Google::Api::HttpBody.new
|
274
|
+
#
|
275
|
+
# # Call the post_resource method.
|
276
|
+
# result = client.post_resource request
|
277
|
+
#
|
278
|
+
# # The returned object is of type Google::Api::HttpBody.
|
279
|
+
# p result
|
280
|
+
#
|
255
281
|
def post_resource request, options = nil
|
256
282
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
257
283
|
|
@@ -272,7 +298,9 @@ module Google
|
|
272
298
|
options.apply_defaults timeout: @config.rpcs.post_resource.timeout,
|
273
299
|
metadata: metadata,
|
274
300
|
retry_policy: @config.rpcs.post_resource.retry_policy
|
275
|
-
|
301
|
+
|
302
|
+
options.apply_defaults timeout: @config.timeout,
|
303
|
+
metadata: @config.metadata,
|
276
304
|
retry_policy: @config.retry_policy
|
277
305
|
|
278
306
|
@gateway_service_stub.call_rpc :post_resource, request, options: options do |response, operation|
|
@@ -317,6 +345,21 @@ module Google
|
|
317
345
|
#
|
318
346
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
319
347
|
#
|
348
|
+
# @example Basic example
|
349
|
+
# require "google/cloud/gke_connect/gateway/v1beta1"
|
350
|
+
#
|
351
|
+
# # Create a client object. The client can be reused for multiple calls.
|
352
|
+
# client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
353
|
+
#
|
354
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
355
|
+
# request = Google::Api::HttpBody.new
|
356
|
+
#
|
357
|
+
# # Call the delete_resource method.
|
358
|
+
# result = client.delete_resource request
|
359
|
+
#
|
360
|
+
# # The returned object is of type Google::Api::HttpBody.
|
361
|
+
# p result
|
362
|
+
#
|
320
363
|
def delete_resource request, options = nil
|
321
364
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
322
365
|
|
@@ -337,7 +380,9 @@ module Google
|
|
337
380
|
options.apply_defaults timeout: @config.rpcs.delete_resource.timeout,
|
338
381
|
metadata: metadata,
|
339
382
|
retry_policy: @config.rpcs.delete_resource.retry_policy
|
340
|
-
|
383
|
+
|
384
|
+
options.apply_defaults timeout: @config.timeout,
|
385
|
+
metadata: @config.metadata,
|
341
386
|
retry_policy: @config.retry_policy
|
342
387
|
|
343
388
|
@gateway_service_stub.call_rpc :delete_resource, request, options: options do |response, operation|
|
@@ -382,6 +427,21 @@ module Google
|
|
382
427
|
#
|
383
428
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
384
429
|
#
|
430
|
+
# @example Basic example
|
431
|
+
# require "google/cloud/gke_connect/gateway/v1beta1"
|
432
|
+
#
|
433
|
+
# # Create a client object. The client can be reused for multiple calls.
|
434
|
+
# client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
435
|
+
#
|
436
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
437
|
+
# request = Google::Api::HttpBody.new
|
438
|
+
#
|
439
|
+
# # Call the put_resource method.
|
440
|
+
# result = client.put_resource request
|
441
|
+
#
|
442
|
+
# # The returned object is of type Google::Api::HttpBody.
|
443
|
+
# p result
|
444
|
+
#
|
385
445
|
def put_resource request, options = nil
|
386
446
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
387
447
|
|
@@ -402,7 +462,9 @@ module Google
|
|
402
462
|
options.apply_defaults timeout: @config.rpcs.put_resource.timeout,
|
403
463
|
metadata: metadata,
|
404
464
|
retry_policy: @config.rpcs.put_resource.retry_policy
|
405
|
-
|
465
|
+
|
466
|
+
options.apply_defaults timeout: @config.timeout,
|
467
|
+
metadata: @config.metadata,
|
406
468
|
retry_policy: @config.retry_policy
|
407
469
|
|
408
470
|
@gateway_service_stub.call_rpc :put_resource, request, options: options do |response, operation|
|
@@ -447,6 +509,21 @@ module Google
|
|
447
509
|
#
|
448
510
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
449
511
|
#
|
512
|
+
# @example Basic example
|
513
|
+
# require "google/cloud/gke_connect/gateway/v1beta1"
|
514
|
+
#
|
515
|
+
# # Create a client object. The client can be reused for multiple calls.
|
516
|
+
# client = Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new
|
517
|
+
#
|
518
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
519
|
+
# request = Google::Api::HttpBody.new
|
520
|
+
#
|
521
|
+
# # Call the patch_resource method.
|
522
|
+
# result = client.patch_resource request
|
523
|
+
#
|
524
|
+
# # The returned object is of type Google::Api::HttpBody.
|
525
|
+
# p result
|
526
|
+
#
|
450
527
|
def patch_resource request, options = nil
|
451
528
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
452
529
|
|
@@ -467,7 +544,9 @@ module Google
|
|
467
544
|
options.apply_defaults timeout: @config.rpcs.patch_resource.timeout,
|
468
545
|
metadata: metadata,
|
469
546
|
retry_policy: @config.rpcs.patch_resource.retry_policy
|
470
|
-
|
547
|
+
|
548
|
+
options.apply_defaults timeout: @config.timeout,
|
549
|
+
metadata: @config.metadata,
|
471
550
|
retry_policy: @config.retry_policy
|
472
551
|
|
473
552
|
@gateway_service_stub.call_rpc :patch_resource, request, options: options do |response, operation|
|
@@ -491,22 +570,21 @@ module Google
|
|
491
570
|
# Configuration can be applied globally to all clients, or to a single client
|
492
571
|
# on construction.
|
493
572
|
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
# to 20 seconds,
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
#
|
502
|
-
#
|
503
|
-
#
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
#
|
509
|
-
# end
|
573
|
+
# @example
|
574
|
+
#
|
575
|
+
# # Modify the global config, setting the timeout for
|
576
|
+
# # get_resource to 20 seconds,
|
577
|
+
# # and all remaining timeouts to 10 seconds.
|
578
|
+
# ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.configure do |config|
|
579
|
+
# config.timeout = 10.0
|
580
|
+
# config.rpcs.get_resource.timeout = 20.0
|
581
|
+
# end
|
582
|
+
#
|
583
|
+
# # Apply the above configuration only to a new client.
|
584
|
+
# client = ::Google::Cloud::GkeConnect::Gateway::V1beta1::GatewayService::Client.new do |config|
|
585
|
+
# config.timeout = 10.0
|
586
|
+
# config.rpcs.get_resource.timeout = 20.0
|
587
|
+
# end
|
510
588
|
#
|
511
589
|
# @!attribute [rw] endpoint
|
512
590
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/gkeconnect/gateway/v1beta1/gateway.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/httpbody_pb'
|
7
|
+
require 'google/protobuf'
|
8
|
+
|
9
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
10
|
add_file("google/cloud/gkeconnect/gateway/v1beta1/gateway.proto", :syntax => :proto3) do
|
11
11
|
end
|
@@ -39,12 +39,15 @@ module Google
|
|
39
39
|
#
|
40
40
|
# // The raw HTTP body is bound to this field.
|
41
41
|
# google.api.HttpBody http_body = 2;
|
42
|
+
#
|
42
43
|
# }
|
43
44
|
#
|
44
45
|
# service ResourceService {
|
45
|
-
# rpc GetResource(GetResourceRequest)
|
46
|
-
#
|
47
|
-
# (google.
|
46
|
+
# rpc GetResource(GetResourceRequest)
|
47
|
+
# returns (google.api.HttpBody);
|
48
|
+
# rpc UpdateResource(google.api.HttpBody)
|
49
|
+
# returns (google.protobuf.Empty);
|
50
|
+
#
|
48
51
|
# }
|
49
52
|
#
|
50
53
|
# Example with streaming methods:
|
@@ -54,6 +57,7 @@ module Google
|
|
54
57
|
# returns (stream google.api.HttpBody);
|
55
58
|
# rpc UpdateCalendar(stream google.api.HttpBody)
|
56
59
|
# returns (stream google.api.HttpBody);
|
60
|
+
#
|
57
61
|
# }
|
58
62
|
#
|
59
63
|
# Use of this type only changes how the request and response bodies are
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-gke_connect-gateway-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|