google-cloud-redis-cluster-v1 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/client.rb +32 -7
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/operations.rb +12 -15
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/client.rb +31 -7
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/operations.rb +43 -38
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/service_stub.rb +62 -38
- data/lib/google/cloud/redis/cluster/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d506089f75c1b9320d5dc06269b1edaf29692bd6e177cbc669adfd76771c47f2
|
4
|
+
data.tar.gz: 240a608a07a0959988b7ab65689be98e3464e81f9157b636eeee6bfc0a258c3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5da9b7656a650a5980f5eb4d9ab85b90526466621dc607f487c1e3400b485f80cbf210aab5c3caf12144064e23452718a824d3f363182c52532549e11f4de180
|
7
|
+
data.tar.gz: a87759ca3f987476fe7d5d256e8aa1f4256e298816d56feaf073c6ab7453f26d633acbdd4a56674edd3ffa5f62f30dcac87bf994cc6b13fdc836fbb941199941
|
data/README.md
CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
|
|
42
42
|
See also the [Product Documentation](https://cloud.google.com/memorystore/docs/cluster)
|
43
43
|
for general usage information.
|
44
44
|
|
45
|
-
##
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
## Debug Logging
|
46
|
+
|
47
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
48
|
+
your application's integration with the API. When logging is activated, key
|
49
|
+
events such as requests and responses, along with data payloads and metadata
|
50
|
+
such as headers and client configuration, are logged to the standard error
|
51
|
+
stream.
|
52
|
+
|
53
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
54
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
55
|
+
customers, private keys, or other security data that could be compromising if
|
56
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
57
|
+
the principle of least access. Google also recommends that Client Library Debug
|
58
|
+
Logging be enabled only temporarily during active debugging, and not used
|
59
|
+
permanently in production.
|
60
|
+
|
61
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
62
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
63
|
+
list of client library gem names. This will select the default logging behavior,
|
64
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
65
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
66
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
67
|
+
results in logs appearing alongside your application logs in the
|
68
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
69
|
+
|
70
|
+
You can customize logging by modifying the `logger` configuration when
|
71
|
+
constructing a client object. For example:
|
54
72
|
|
55
73
|
```ruby
|
74
|
+
require "google/cloud/redis/cluster/v1"
|
56
75
|
require "logger"
|
57
76
|
|
58
|
-
|
59
|
-
|
60
|
-
def logger
|
61
|
-
LOGGER
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
66
|
-
module GRPC
|
67
|
-
extend MyLogger
|
77
|
+
client = ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new do |config|
|
78
|
+
config.logger = Logger.new "my-app.log"
|
68
79
|
end
|
69
80
|
```
|
70
81
|
|
71
|
-
|
72
82
|
## Google Cloud Samples
|
73
83
|
|
74
84
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -198,14 +198,26 @@ module Google
|
|
198
198
|
universe_domain: @config.universe_domain,
|
199
199
|
channel_args: @config.channel_args,
|
200
200
|
interceptors: @config.interceptors,
|
201
|
-
channel_pool_config: @config.channel_pool
|
201
|
+
channel_pool_config: @config.channel_pool,
|
202
|
+
logger: @config.logger
|
202
203
|
)
|
203
204
|
|
205
|
+
@cloud_redis_cluster_stub.stub_logger&.info do |entry|
|
206
|
+
entry.set_system_name
|
207
|
+
entry.set_service
|
208
|
+
entry.message = "Created client for #{entry.service}"
|
209
|
+
entry.set_credentials_fields credentials
|
210
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
211
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
212
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
213
|
+
end
|
214
|
+
|
204
215
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
205
216
|
config.credentials = credentials
|
206
217
|
config.quota_project = @quota_project_id
|
207
218
|
config.endpoint = @cloud_redis_cluster_stub.endpoint
|
208
219
|
config.universe_domain = @cloud_redis_cluster_stub.universe_domain
|
220
|
+
config.logger = @cloud_redis_cluster_stub.logger if config.respond_to? :logger=
|
209
221
|
end
|
210
222
|
end
|
211
223
|
|
@@ -223,6 +235,15 @@ module Google
|
|
223
235
|
#
|
224
236
|
attr_reader :location_client
|
225
237
|
|
238
|
+
##
|
239
|
+
# The logger used for request/response debug logging.
|
240
|
+
#
|
241
|
+
# @return [Logger]
|
242
|
+
#
|
243
|
+
def logger
|
244
|
+
@cloud_redis_cluster_stub.logger
|
245
|
+
end
|
246
|
+
|
226
247
|
# Service calls
|
227
248
|
|
228
249
|
##
|
@@ -331,7 +352,7 @@ module Google
|
|
331
352
|
@cloud_redis_cluster_stub.call_rpc :list_clusters, request, options: options do |response, operation|
|
332
353
|
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_clusters, request, response, operation, options
|
333
354
|
yield response, operation if block_given?
|
334
|
-
|
355
|
+
throw :response, response
|
335
356
|
end
|
336
357
|
rescue ::GRPC::BadStatus => e
|
337
358
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -419,7 +440,6 @@ module Google
|
|
419
440
|
|
420
441
|
@cloud_redis_cluster_stub.call_rpc :get_cluster, request, options: options do |response, operation|
|
421
442
|
yield response, operation if block_given?
|
422
|
-
return response
|
423
443
|
end
|
424
444
|
rescue ::GRPC::BadStatus => e
|
425
445
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -527,7 +547,7 @@ module Google
|
|
527
547
|
@cloud_redis_cluster_stub.call_rpc :update_cluster, request, options: options do |response, operation|
|
528
548
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
529
549
|
yield response, operation if block_given?
|
530
|
-
|
550
|
+
throw :response, response
|
531
551
|
end
|
532
552
|
rescue ::GRPC::BadStatus => e
|
533
553
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -626,7 +646,7 @@ module Google
|
|
626
646
|
@cloud_redis_cluster_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
627
647
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
628
648
|
yield response, operation if block_given?
|
629
|
-
|
649
|
+
throw :response, response
|
630
650
|
end
|
631
651
|
rescue ::GRPC::BadStatus => e
|
632
652
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -742,7 +762,7 @@ module Google
|
|
742
762
|
@cloud_redis_cluster_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
743
763
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
744
764
|
yield response, operation if block_given?
|
745
|
-
|
765
|
+
throw :response, response
|
746
766
|
end
|
747
767
|
rescue ::GRPC::BadStatus => e
|
748
768
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -830,7 +850,6 @@ module Google
|
|
830
850
|
|
831
851
|
@cloud_redis_cluster_stub.call_rpc :get_cluster_certificate_authority, request, options: options do |response, operation|
|
832
852
|
yield response, operation if block_given?
|
833
|
-
return response
|
834
853
|
end
|
835
854
|
rescue ::GRPC::BadStatus => e
|
836
855
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -919,6 +938,11 @@ module Google
|
|
919
938
|
# default endpoint URL. The default value of nil uses the environment
|
920
939
|
# universe (usually the default "googleapis.com" universe).
|
921
940
|
# @return [::String,nil]
|
941
|
+
# @!attribute [rw] logger
|
942
|
+
# A custom logger to use for request/response debug logging, or the value
|
943
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
944
|
+
# explicitly disable logging.
|
945
|
+
# @return [::Logger,:default,nil]
|
922
946
|
#
|
923
947
|
class Configuration
|
924
948
|
extend ::Gapic::Config
|
@@ -943,6 +967,7 @@ module Google
|
|
943
967
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
944
968
|
config_attr :quota_project, nil, ::String, nil
|
945
969
|
config_attr :universe_domain, nil, ::String, nil
|
970
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
946
971
|
|
947
972
|
# @private
|
948
973
|
def initialize parent_config = nil
|
@@ -125,14 +125,6 @@ module Google
|
|
125
125
|
# Lists operations that match the specified filter in the request. If the
|
126
126
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
127
127
|
#
|
128
|
-
# NOTE: the `name` binding allows API services to override the binding
|
129
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
130
|
-
# override the binding, API services can add a binding such as
|
131
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
132
|
-
# For backwards compatibility, the default name includes the operations
|
133
|
-
# collection id, however overriding users must ensure the name binding
|
134
|
-
# is the parent resource, without the operations collection id.
|
135
|
-
#
|
136
128
|
# @overload list_operations(request, options = nil)
|
137
129
|
# Pass arguments to `list_operations` via a request object, either of type
|
138
130
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -222,7 +214,7 @@ module Google
|
|
222
214
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
223
215
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
224
216
|
yield response, operation if block_given?
|
225
|
-
|
217
|
+
throw :response, response
|
226
218
|
end
|
227
219
|
rescue ::GRPC::BadStatus => e
|
228
220
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -318,7 +310,7 @@ module Google
|
|
318
310
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
319
311
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
320
312
|
yield response, operation if block_given?
|
321
|
-
|
313
|
+
throw :response, response
|
322
314
|
end
|
323
315
|
rescue ::GRPC::BadStatus => e
|
324
316
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -407,7 +399,6 @@ module Google
|
|
407
399
|
|
408
400
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
409
401
|
yield response, operation if block_given?
|
410
|
-
return response
|
411
402
|
end
|
412
403
|
rescue ::GRPC::BadStatus => e
|
413
404
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -422,8 +413,9 @@ module Google
|
|
422
413
|
# other methods to check whether the cancellation succeeded or whether the
|
423
414
|
# operation completed despite cancellation. On successful cancellation,
|
424
415
|
# the operation is not deleted; instead, it becomes an operation with
|
425
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
426
|
-
# corresponding to
|
416
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
417
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
418
|
+
# `Code.CANCELLED`.
|
427
419
|
#
|
428
420
|
# @overload cancel_operation(request, options = nil)
|
429
421
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -502,7 +494,6 @@ module Google
|
|
502
494
|
|
503
495
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
504
496
|
yield response, operation if block_given?
|
505
|
-
return response
|
506
497
|
end
|
507
498
|
rescue ::GRPC::BadStatus => e
|
508
499
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -600,7 +591,7 @@ module Google
|
|
600
591
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
601
592
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
602
593
|
yield response, operation if block_given?
|
603
|
-
|
594
|
+
throw :response, response
|
604
595
|
end
|
605
596
|
rescue ::GRPC::BadStatus => e
|
606
597
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -689,6 +680,11 @@ module Google
|
|
689
680
|
# default endpoint URL. The default value of nil uses the environment
|
690
681
|
# universe (usually the default "googleapis.com" universe).
|
691
682
|
# @return [::String,nil]
|
683
|
+
# @!attribute [rw] logger
|
684
|
+
# A custom logger to use for request/response debug logging, or the value
|
685
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
686
|
+
# explicitly disable logging.
|
687
|
+
# @return [::Logger,:default,nil]
|
692
688
|
#
|
693
689
|
class Configuration
|
694
690
|
extend ::Gapic::Config
|
@@ -713,6 +709,7 @@ module Google
|
|
713
709
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
714
710
|
config_attr :quota_project, nil, ::String, nil
|
715
711
|
config_attr :universe_domain, nil, ::String, nil
|
712
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
716
713
|
|
717
714
|
# @private
|
718
715
|
def initialize parent_config = nil
|
@@ -191,15 +191,27 @@ module Google
|
|
191
191
|
endpoint: @config.endpoint,
|
192
192
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
193
193
|
universe_domain: @config.universe_domain,
|
194
|
-
credentials: credentials
|
194
|
+
credentials: credentials,
|
195
|
+
logger: @config.logger
|
195
196
|
)
|
196
197
|
|
198
|
+
@cloud_redis_cluster_stub.logger(stub: true)&.info do |entry|
|
199
|
+
entry.set_system_name
|
200
|
+
entry.set_service
|
201
|
+
entry.message = "Created client for #{entry.service}"
|
202
|
+
entry.set_credentials_fields credentials
|
203
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
204
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
205
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
206
|
+
end
|
207
|
+
|
197
208
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
198
209
|
config.credentials = credentials
|
199
210
|
config.quota_project = @quota_project_id
|
200
211
|
config.endpoint = @cloud_redis_cluster_stub.endpoint
|
201
212
|
config.universe_domain = @cloud_redis_cluster_stub.universe_domain
|
202
213
|
config.bindings_override = @config.bindings_override
|
214
|
+
config.logger = @cloud_redis_cluster_stub.logger if config.respond_to? :logger=
|
203
215
|
end
|
204
216
|
end
|
205
217
|
|
@@ -217,6 +229,15 @@ module Google
|
|
217
229
|
#
|
218
230
|
attr_reader :location_client
|
219
231
|
|
232
|
+
##
|
233
|
+
# The logger used for request/response debug logging.
|
234
|
+
#
|
235
|
+
# @return [Logger]
|
236
|
+
#
|
237
|
+
def logger
|
238
|
+
@cloud_redis_cluster_stub.logger
|
239
|
+
end
|
240
|
+
|
220
241
|
# Service calls
|
221
242
|
|
222
243
|
##
|
@@ -317,7 +338,6 @@ module Google
|
|
317
338
|
|
318
339
|
@cloud_redis_cluster_stub.list_clusters request, options do |result, operation|
|
319
340
|
yield result, operation if block_given?
|
320
|
-
return result
|
321
341
|
end
|
322
342
|
rescue ::Gapic::Rest::Error => e
|
323
343
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +418,6 @@ module Google
|
|
398
418
|
|
399
419
|
@cloud_redis_cluster_stub.get_cluster request, options do |result, operation|
|
400
420
|
yield result, operation if block_given?
|
401
|
-
return result
|
402
421
|
end
|
403
422
|
rescue ::Gapic::Rest::Error => e
|
404
423
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -499,7 +518,7 @@ module Google
|
|
499
518
|
@cloud_redis_cluster_stub.update_cluster request, options do |result, operation|
|
500
519
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
501
520
|
yield result, operation if block_given?
|
502
|
-
|
521
|
+
throw :response, result
|
503
522
|
end
|
504
523
|
rescue ::Gapic::Rest::Error => e
|
505
524
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -591,7 +610,7 @@ module Google
|
|
591
610
|
@cloud_redis_cluster_stub.delete_cluster request, options do |result, operation|
|
592
611
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
593
612
|
yield result, operation if block_given?
|
594
|
-
|
613
|
+
throw :response, result
|
595
614
|
end
|
596
615
|
rescue ::Gapic::Rest::Error => e
|
597
616
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -700,7 +719,7 @@ module Google
|
|
700
719
|
@cloud_redis_cluster_stub.create_cluster request, options do |result, operation|
|
701
720
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
702
721
|
yield result, operation if block_given?
|
703
|
-
|
722
|
+
throw :response, result
|
704
723
|
end
|
705
724
|
rescue ::Gapic::Rest::Error => e
|
706
725
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -781,7 +800,6 @@ module Google
|
|
781
800
|
|
782
801
|
@cloud_redis_cluster_stub.get_cluster_certificate_authority request, options do |result, operation|
|
783
802
|
yield result, operation if block_given?
|
784
|
-
return result
|
785
803
|
end
|
786
804
|
rescue ::Gapic::Rest::Error => e
|
787
805
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -861,6 +879,11 @@ module Google
|
|
861
879
|
# default endpoint URL. The default value of nil uses the environment
|
862
880
|
# universe (usually the default "googleapis.com" universe).
|
863
881
|
# @return [::String,nil]
|
882
|
+
# @!attribute [rw] logger
|
883
|
+
# A custom logger to use for request/response debug logging, or the value
|
884
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
885
|
+
# explicitly disable logging.
|
886
|
+
# @return [::Logger,:default,nil]
|
864
887
|
#
|
865
888
|
class Configuration
|
866
889
|
extend ::Gapic::Config
|
@@ -889,6 +912,7 @@ module Google
|
|
889
912
|
# by the host service.
|
890
913
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
891
914
|
config_attr :bindings_override, {}, ::Hash, nil
|
915
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
892
916
|
|
893
917
|
# @private
|
894
918
|
def initialize parent_config = nil
|
@@ -116,14 +116,6 @@ module Google
|
|
116
116
|
# Lists operations that match the specified filter in the request. If the
|
117
117
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
118
118
|
#
|
119
|
-
# NOTE: the `name` binding allows API services to override the binding
|
120
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
121
|
-
# override the binding, API services can add a binding such as
|
122
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
123
|
-
# For backwards compatibility, the default name includes the operations
|
124
|
-
# collection id, however overriding users must ensure the name binding
|
125
|
-
# is the parent resource, without the operations collection id.
|
126
|
-
#
|
127
119
|
# @overload list_operations(request, options = nil)
|
128
120
|
# Pass arguments to `list_operations` via a request object, either of type
|
129
121
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -205,7 +197,7 @@ module Google
|
|
205
197
|
@operations_stub.list_operations request, options do |result, operation|
|
206
198
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
207
199
|
yield result, operation if block_given?
|
208
|
-
|
200
|
+
throw :response, result
|
209
201
|
end
|
210
202
|
rescue ::Gapic::Rest::Error => e
|
211
203
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -294,7 +286,7 @@ module Google
|
|
294
286
|
@operations_stub.get_operation request, options do |result, operation|
|
295
287
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
296
288
|
yield result, operation if block_given?
|
297
|
-
|
289
|
+
throw :response, result
|
298
290
|
end
|
299
291
|
rescue ::Gapic::Rest::Error => e
|
300
292
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -376,7 +368,6 @@ module Google
|
|
376
368
|
|
377
369
|
@operations_stub.delete_operation request, options do |result, operation|
|
378
370
|
yield result, operation if block_given?
|
379
|
-
return result
|
380
371
|
end
|
381
372
|
rescue ::Gapic::Rest::Error => e
|
382
373
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -391,8 +382,9 @@ module Google
|
|
391
382
|
# other methods to check whether the cancellation succeeded or whether the
|
392
383
|
# operation completed despite cancellation. On successful cancellation,
|
393
384
|
# the operation is not deleted; instead, it becomes an operation with
|
394
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
395
|
-
# corresponding to
|
385
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
386
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
387
|
+
# `Code.CANCELLED`.
|
396
388
|
#
|
397
389
|
# @overload cancel_operation(request, options = nil)
|
398
390
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -464,7 +456,6 @@ module Google
|
|
464
456
|
|
465
457
|
@operations_stub.cancel_operation request, options do |result, operation|
|
466
458
|
yield result, operation if block_given?
|
467
|
-
return result
|
468
459
|
end
|
469
460
|
rescue ::Gapic::Rest::Error => e
|
470
461
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -544,6 +535,11 @@ module Google
|
|
544
535
|
# default endpoint URL. The default value of nil uses the environment
|
545
536
|
# universe (usually the default "googleapis.com" universe).
|
546
537
|
# @return [::String,nil]
|
538
|
+
# @!attribute [rw] logger
|
539
|
+
# A custom logger to use for request/response debug logging, or the value
|
540
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
541
|
+
# explicitly disable logging.
|
542
|
+
# @return [::Logger,:default,nil]
|
547
543
|
#
|
548
544
|
class Configuration
|
549
545
|
extend ::Gapic::Config
|
@@ -565,6 +561,7 @@ module Google
|
|
565
561
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
566
562
|
config_attr :quota_project, nil, ::String, nil
|
567
563
|
config_attr :universe_domain, nil, ::String, nil
|
564
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
568
565
|
|
569
566
|
# @private
|
570
567
|
def initialize parent_config = nil
|
@@ -684,16 +681,18 @@ module Google
|
|
684
681
|
|
685
682
|
response = @client_stub.make_http_request(
|
686
683
|
verb,
|
687
|
-
uri:
|
688
|
-
body:
|
689
|
-
params:
|
684
|
+
uri: uri,
|
685
|
+
body: body || "",
|
686
|
+
params: query_string_params,
|
687
|
+
method_name: "list_operations",
|
690
688
|
options: options
|
691
689
|
)
|
692
690
|
operation = ::Gapic::Rest::TransportOperation.new response
|
693
691
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
694
|
-
|
695
|
-
|
696
|
-
|
692
|
+
catch :response do
|
693
|
+
yield result, operation if block_given?
|
694
|
+
result
|
695
|
+
end
|
697
696
|
end
|
698
697
|
|
699
698
|
##
|
@@ -722,16 +721,18 @@ module Google
|
|
722
721
|
|
723
722
|
response = @client_stub.make_http_request(
|
724
723
|
verb,
|
725
|
-
uri:
|
726
|
-
body:
|
727
|
-
params:
|
724
|
+
uri: uri,
|
725
|
+
body: body || "",
|
726
|
+
params: query_string_params,
|
727
|
+
method_name: "get_operation",
|
728
728
|
options: options
|
729
729
|
)
|
730
730
|
operation = ::Gapic::Rest::TransportOperation.new response
|
731
731
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
732
|
-
|
733
|
-
|
734
|
-
|
732
|
+
catch :response do
|
733
|
+
yield result, operation if block_given?
|
734
|
+
result
|
735
|
+
end
|
735
736
|
end
|
736
737
|
|
737
738
|
##
|
@@ -760,16 +761,18 @@ module Google
|
|
760
761
|
|
761
762
|
response = @client_stub.make_http_request(
|
762
763
|
verb,
|
763
|
-
uri:
|
764
|
-
body:
|
765
|
-
params:
|
764
|
+
uri: uri,
|
765
|
+
body: body || "",
|
766
|
+
params: query_string_params,
|
767
|
+
method_name: "delete_operation",
|
766
768
|
options: options
|
767
769
|
)
|
768
770
|
operation = ::Gapic::Rest::TransportOperation.new response
|
769
771
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
770
|
-
|
771
|
-
|
772
|
-
|
772
|
+
catch :response do
|
773
|
+
yield result, operation if block_given?
|
774
|
+
result
|
775
|
+
end
|
773
776
|
end
|
774
777
|
|
775
778
|
##
|
@@ -798,16 +801,18 @@ module Google
|
|
798
801
|
|
799
802
|
response = @client_stub.make_http_request(
|
800
803
|
verb,
|
801
|
-
uri:
|
802
|
-
body:
|
803
|
-
params:
|
804
|
+
uri: uri,
|
805
|
+
body: body || "",
|
806
|
+
params: query_string_params,
|
807
|
+
method_name: "cancel_operation",
|
804
808
|
options: options
|
805
809
|
)
|
806
810
|
operation = ::Gapic::Rest::TransportOperation.new response
|
807
811
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
808
|
-
|
809
|
-
|
810
|
-
|
812
|
+
catch :response do
|
813
|
+
yield result, operation if block_given?
|
814
|
+
result
|
815
|
+
end
|
811
816
|
end
|
812
817
|
|
813
818
|
##
|
@@ -31,7 +31,8 @@ module Google
|
|
31
31
|
# including transcoding, making the REST call, and deserialing the response.
|
32
32
|
#
|
33
33
|
class ServiceStub
|
34
|
-
|
34
|
+
# @private
|
35
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
36
|
# These require statements are intentionally placed here to initialize
|
36
37
|
# the REST modules only when it's required.
|
37
38
|
require "gapic/rest"
|
@@ -41,7 +42,9 @@ module Google
|
|
41
42
|
universe_domain: universe_domain,
|
42
43
|
credentials: credentials,
|
43
44
|
numeric_enums: true,
|
44
|
-
|
45
|
+
service_name: self.class,
|
46
|
+
raise_faraday_errors: false,
|
47
|
+
logger: logger
|
45
48
|
end
|
46
49
|
|
47
50
|
##
|
@@ -62,6 +65,15 @@ module Google
|
|
62
65
|
@client_stub.endpoint
|
63
66
|
end
|
64
67
|
|
68
|
+
##
|
69
|
+
# The logger used for request/response debug logging.
|
70
|
+
#
|
71
|
+
# @return [Logger]
|
72
|
+
#
|
73
|
+
def logger stub: false
|
74
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
75
|
+
end
|
76
|
+
|
65
77
|
##
|
66
78
|
# Baseline implementation for the list_clusters REST call
|
67
79
|
#
|
@@ -88,16 +100,18 @@ module Google
|
|
88
100
|
|
89
101
|
response = @client_stub.make_http_request(
|
90
102
|
verb,
|
91
|
-
uri:
|
92
|
-
body:
|
93
|
-
params:
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "list_clusters",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Cloud::Redis::Cluster::V1::ListClustersResponse.decode_json response.body, ignore_unknown_fields: true
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
101
115
|
end
|
102
116
|
|
103
117
|
##
|
@@ -126,16 +140,18 @@ module Google
|
|
126
140
|
|
127
141
|
response = @client_stub.make_http_request(
|
128
142
|
verb,
|
129
|
-
uri:
|
130
|
-
body:
|
131
|
-
params:
|
143
|
+
uri: uri,
|
144
|
+
body: body || "",
|
145
|
+
params: query_string_params,
|
146
|
+
method_name: "get_cluster",
|
132
147
|
options: options
|
133
148
|
)
|
134
149
|
operation = ::Gapic::Rest::TransportOperation.new response
|
135
150
|
result = ::Google::Cloud::Redis::Cluster::V1::Cluster.decode_json response.body, ignore_unknown_fields: true
|
136
|
-
|
137
|
-
|
138
|
-
|
151
|
+
catch :response do
|
152
|
+
yield result, operation if block_given?
|
153
|
+
result
|
154
|
+
end
|
139
155
|
end
|
140
156
|
|
141
157
|
##
|
@@ -164,16 +180,18 @@ module Google
|
|
164
180
|
|
165
181
|
response = @client_stub.make_http_request(
|
166
182
|
verb,
|
167
|
-
uri:
|
168
|
-
body:
|
169
|
-
params:
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
method_name: "update_cluster",
|
170
187
|
options: options
|
171
188
|
)
|
172
189
|
operation = ::Gapic::Rest::TransportOperation.new response
|
173
190
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
174
|
-
|
175
|
-
|
176
|
-
|
191
|
+
catch :response do
|
192
|
+
yield result, operation if block_given?
|
193
|
+
result
|
194
|
+
end
|
177
195
|
end
|
178
196
|
|
179
197
|
##
|
@@ -202,16 +220,18 @@ module Google
|
|
202
220
|
|
203
221
|
response = @client_stub.make_http_request(
|
204
222
|
verb,
|
205
|
-
uri:
|
206
|
-
body:
|
207
|
-
params:
|
223
|
+
uri: uri,
|
224
|
+
body: body || "",
|
225
|
+
params: query_string_params,
|
226
|
+
method_name: "delete_cluster",
|
208
227
|
options: options
|
209
228
|
)
|
210
229
|
operation = ::Gapic::Rest::TransportOperation.new response
|
211
230
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
212
|
-
|
213
|
-
|
214
|
-
|
231
|
+
catch :response do
|
232
|
+
yield result, operation if block_given?
|
233
|
+
result
|
234
|
+
end
|
215
235
|
end
|
216
236
|
|
217
237
|
##
|
@@ -240,16 +260,18 @@ module Google
|
|
240
260
|
|
241
261
|
response = @client_stub.make_http_request(
|
242
262
|
verb,
|
243
|
-
uri:
|
244
|
-
body:
|
245
|
-
params:
|
263
|
+
uri: uri,
|
264
|
+
body: body || "",
|
265
|
+
params: query_string_params,
|
266
|
+
method_name: "create_cluster",
|
246
267
|
options: options
|
247
268
|
)
|
248
269
|
operation = ::Gapic::Rest::TransportOperation.new response
|
249
270
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
250
|
-
|
251
|
-
|
252
|
-
|
271
|
+
catch :response do
|
272
|
+
yield result, operation if block_given?
|
273
|
+
result
|
274
|
+
end
|
253
275
|
end
|
254
276
|
|
255
277
|
##
|
@@ -278,16 +300,18 @@ module Google
|
|
278
300
|
|
279
301
|
response = @client_stub.make_http_request(
|
280
302
|
verb,
|
281
|
-
uri:
|
282
|
-
body:
|
283
|
-
params:
|
303
|
+
uri: uri,
|
304
|
+
body: body || "",
|
305
|
+
params: query_string_params,
|
306
|
+
method_name: "get_cluster_certificate_authority",
|
284
307
|
options: options
|
285
308
|
)
|
286
309
|
operation = ::Gapic::Rest::TransportOperation.new response
|
287
310
|
result = ::Google::Cloud::Redis::Cluster::V1::CertificateAuthority.decode_json response.body, ignore_unknown_fields: true
|
288
|
-
|
289
|
-
|
290
|
-
|
311
|
+
catch :response do
|
312
|
+
yield result, operation if block_given?
|
313
|
+
result
|
314
|
+
end
|
291
315
|
end
|
292
316
|
|
293
317
|
##
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] destinations
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
30
30
|
# The destination where API teams want this client library to be published.
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
31
34
|
class CommonLanguageSettings
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -212,6 +215,12 @@ module Google
|
|
212
215
|
# enabled. By default, asynchronous REST clients will not be generated.
|
213
216
|
# This feature will be enabled by default 1 month after launching the
|
214
217
|
# feature in preview packages.
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
219
|
+
# @return [::Boolean]
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
223
|
+
# packages.
|
215
224
|
class ExperimentalFeatures
|
216
225
|
include ::Google::Protobuf::MessageExts
|
217
226
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,9 +306,28 @@ module Google
|
|
297
306
|
# @!attribute [rw] common
|
298
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
299
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
300
319
|
class GoSettings
|
301
320
|
include ::Google::Protobuf::MessageExts
|
302
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
303
331
|
end
|
304
332
|
|
305
333
|
# Describes the generator configuration for a method.
|
@@ -375,6 +403,17 @@ module Google
|
|
375
403
|
end
|
376
404
|
end
|
377
405
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
407
|
+
# a service for client libraries.
|
408
|
+
# @!attribute [rw] methods
|
409
|
+
# @return [::Array<::String>]
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
411
|
+
# on public client surfaces.
|
412
|
+
class SelectiveGapicGeneration
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
378
417
|
# The organization for which the client libraries are being published.
|
379
418
|
# Affects the url where generated docs are published, etc.
|
380
419
|
module ClientLibraryOrganization
|
@@ -42,7 +42,7 @@ module Google
|
|
42
42
|
# The error result of the operation in case of failure or cancellation.
|
43
43
|
# @!attribute [rw] response
|
44
44
|
# @return [::Google::Protobuf::Any]
|
45
|
-
# The normal response of the operation
|
45
|
+
# The normal, successful response of the operation. If the original
|
46
46
|
# method returns no data on success, such as `Delete`, the response is
|
47
47
|
# `google.protobuf.Empty`. If the original method is standard
|
48
48
|
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
@@ -55,7 +55,8 @@ module Google
|
|
55
55
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
56
|
end
|
57
57
|
|
58
|
-
# The request message for
|
58
|
+
# The request message for
|
59
|
+
# Operations.GetOperation.
|
59
60
|
# @!attribute [rw] name
|
60
61
|
# @return [::String]
|
61
62
|
# The name of the operation resource.
|
@@ -64,7 +65,8 @@ module Google
|
|
64
65
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
65
66
|
end
|
66
67
|
|
67
|
-
# The request message for
|
68
|
+
# The request message for
|
69
|
+
# Operations.ListOperations.
|
68
70
|
# @!attribute [rw] name
|
69
71
|
# @return [::String]
|
70
72
|
# The name of the operation's parent resource.
|
@@ -82,7 +84,8 @@ module Google
|
|
82
84
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
85
|
end
|
84
86
|
|
85
|
-
# The response message for
|
87
|
+
# The response message for
|
88
|
+
# Operations.ListOperations.
|
86
89
|
# @!attribute [rw] operations
|
87
90
|
# @return [::Array<::Google::Longrunning::Operation>]
|
88
91
|
# A list of operations that matches the specified filter in the request.
|
@@ -94,7 +97,8 @@ module Google
|
|
94
97
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
95
98
|
end
|
96
99
|
|
97
|
-
# The request message for
|
100
|
+
# The request message for
|
101
|
+
# Operations.CancelOperation.
|
98
102
|
# @!attribute [rw] name
|
99
103
|
# @return [::String]
|
100
104
|
# The name of the operation resource to be cancelled.
|
@@ -103,7 +107,8 @@ module Google
|
|
103
107
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
104
108
|
end
|
105
109
|
|
106
|
-
# The request message for
|
110
|
+
# The request message for
|
111
|
+
# Operations.DeleteOperation.
|
107
112
|
# @!attribute [rw] name
|
108
113
|
# @return [::String]
|
109
114
|
# The name of the operation resource to be deleted.
|
@@ -112,7 +117,8 @@ module Google
|
|
112
117
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
118
|
end
|
114
119
|
|
115
|
-
# The request message for
|
120
|
+
# The request message for
|
121
|
+
# Operations.WaitOperation.
|
116
122
|
# @!attribute [rw] name
|
117
123
|
# @return [::String]
|
118
124
|
# The name of the operation resource to wait on.
|
@@ -130,13 +136,12 @@ module Google
|
|
130
136
|
#
|
131
137
|
# Example:
|
132
138
|
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# }
|
139
|
-
# }
|
139
|
+
# rpc Export(ExportRequest) returns (google.longrunning.Operation) {
|
140
|
+
# option (google.longrunning.operation_info) = {
|
141
|
+
# response_type: "ExportResponse"
|
142
|
+
# metadata_type: "ExportMetadata"
|
143
|
+
# };
|
144
|
+
# }
|
140
145
|
# @!attribute [rw] response_type
|
141
146
|
# @return [::String]
|
142
147
|
# Required. The message name of the primary return type for this
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-redis-cluster-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-10 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.24.0
|
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.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
rubygems_version: 3.5.
|
128
|
+
rubygems_version: 3.5.23
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Creates and manages Redis instances on the Google Cloud Platform.
|