google-cloud-redis-cluster-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +144 -0
  6. data/lib/google/cloud/redis/cluster/v1/bindings_override.rb +104 -0
  7. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/client.rb +918 -0
  8. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/credentials.rb +49 -0
  9. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/operations.rb +781 -0
  10. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/paths.rb +71 -0
  11. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/client.rb +861 -0
  12. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/operations.rb +871 -0
  13. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/service_stub.rb +347 -0
  14. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest.rb +76 -0
  15. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb +78 -0
  16. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster_pb.rb +71 -0
  17. data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster_services_pb.rb +95 -0
  18. data/lib/google/cloud/redis/cluster/v1/rest.rb +40 -0
  19. data/lib/google/cloud/redis/cluster/v1/version.rb +30 -0
  20. data/lib/google/cloud/redis/cluster/v1.rb +47 -0
  21. data/lib/google-cloud-redis-cluster-v1.rb +21 -0
  22. data/proto_docs/README.md +4 -0
  23. data/proto_docs/google/api/client.rb +381 -0
  24. data/proto_docs/google/api/field_behavior.rb +85 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +222 -0
  27. data/proto_docs/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb +353 -0
  28. data/proto_docs/google/longrunning/operations.rb +164 -0
  29. data/proto_docs/google/protobuf/any.rb +144 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +34 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. metadata +244 -0
@@ -0,0 +1,347 @@
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/redis/cluster/v1/cloud_redis_cluster_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Redis
24
+ module Cluster
25
+ module V1
26
+ module CloudRedisCluster
27
+ module Rest
28
+ ##
29
+ # REST service stub for the CloudRedisCluster service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the list_clusters REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::ListClustersRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Cloud::Redis::Cluster::V1::ListClustersResponse]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Cloud::Redis::Cluster::V1::ListClustersResponse]
57
+ # A result object deserialized from the server's reply
58
+ def list_clusters request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_clusters_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Cloud::Redis::Cluster::V1::ListClustersResponse.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # Baseline implementation for the get_cluster REST call
84
+ #
85
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::GetClusterRequest]
86
+ # A request object representing the call parameters. Required.
87
+ # @param options [::Gapic::CallOptions]
88
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
89
+ #
90
+ # @yield [result, operation] Access the result along with the TransportOperation object
91
+ # @yieldparam result [::Google::Cloud::Redis::Cluster::V1::Cluster]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Cloud::Redis::Cluster::V1::Cluster]
95
+ # A result object deserialized from the server's reply
96
+ def get_cluster request_pb, options = nil
97
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
98
+
99
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_cluster_request request_pb
100
+ query_string_params = if query_string_params.any?
101
+ query_string_params.to_h { |p| p.split "=", 2 }
102
+ else
103
+ {}
104
+ end
105
+
106
+ response = @client_stub.make_http_request(
107
+ verb,
108
+ uri: uri,
109
+ body: body || "",
110
+ params: query_string_params,
111
+ options: options
112
+ )
113
+ operation = ::Gapic::Rest::TransportOperation.new response
114
+ result = ::Google::Cloud::Redis::Cluster::V1::Cluster.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, operation if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # Baseline implementation for the update_cluster REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::UpdateClusterRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @param options [::Gapic::CallOptions]
126
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
+ #
128
+ # @yield [result, operation] Access the result along with the TransportOperation object
129
+ # @yieldparam result [::Google::Longrunning::Operation]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Longrunning::Operation]
133
+ # A result object deserialized from the server's reply
134
+ def update_cluster request_pb, options = nil
135
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
136
+
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_cluster_request request_pb
138
+ query_string_params = if query_string_params.any?
139
+ query_string_params.to_h { |p| p.split "=", 2 }
140
+ else
141
+ {}
142
+ end
143
+
144
+ response = @client_stub.make_http_request(
145
+ verb,
146
+ uri: uri,
147
+ body: body || "",
148
+ params: query_string_params,
149
+ options: options
150
+ )
151
+ operation = ::Gapic::Rest::TransportOperation.new response
152
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, operation if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # Baseline implementation for the delete_cluster REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @param options [::Gapic::CallOptions]
164
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
165
+ #
166
+ # @yield [result, operation] Access the result along with the TransportOperation object
167
+ # @yieldparam result [::Google::Longrunning::Operation]
168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
169
+ #
170
+ # @return [::Google::Longrunning::Operation]
171
+ # A result object deserialized from the server's reply
172
+ def delete_cluster request_pb, options = nil
173
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
174
+
175
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_cluster_request request_pb
176
+ query_string_params = if query_string_params.any?
177
+ query_string_params.to_h { |p| p.split "=", 2 }
178
+ else
179
+ {}
180
+ end
181
+
182
+ response = @client_stub.make_http_request(
183
+ verb,
184
+ uri: uri,
185
+ body: body || "",
186
+ params: query_string_params,
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
191
+
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+
196
+ ##
197
+ # Baseline implementation for the create_cluster REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::CreateClusterRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @param options [::Gapic::CallOptions]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @yield [result, operation] Access the result along with the TransportOperation object
205
+ # @yieldparam result [::Google::Longrunning::Operation]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Longrunning::Operation]
209
+ # A result object deserialized from the server's reply
210
+ def create_cluster request_pb, options = nil
211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
212
+
213
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_cluster_request request_pb
214
+ query_string_params = if query_string_params.any?
215
+ query_string_params.to_h { |p| p.split "=", 2 }
216
+ else
217
+ {}
218
+ end
219
+
220
+ response = @client_stub.make_http_request(
221
+ verb,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ options: options
226
+ )
227
+ operation = ::Gapic::Rest::TransportOperation.new response
228
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
229
+
230
+ yield result, operation if block_given?
231
+ result
232
+ end
233
+
234
+ ##
235
+ # @private
236
+ #
237
+ # GRPC transcoding helper method for the list_clusters REST call
238
+ #
239
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::ListClustersRequest]
240
+ # A request object representing the call parameters. Required.
241
+ # @return [Array(String, [String, nil], Hash{String => String})]
242
+ # Uri, Body, Query string parameters
243
+ def self.transcode_list_clusters_request request_pb
244
+ transcoder = Gapic::Rest::GrpcTranscoder.new
245
+ .with_bindings(
246
+ uri_method: :get,
247
+ uri_template: "/v1/{parent}/clusters",
248
+ matches: [
249
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
250
+ ]
251
+ )
252
+ transcoder.transcode request_pb
253
+ end
254
+
255
+ ##
256
+ # @private
257
+ #
258
+ # GRPC transcoding helper method for the get_cluster REST call
259
+ #
260
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::GetClusterRequest]
261
+ # A request object representing the call parameters. Required.
262
+ # @return [Array(String, [String, nil], Hash{String => String})]
263
+ # Uri, Body, Query string parameters
264
+ def self.transcode_get_cluster_request request_pb
265
+ transcoder = Gapic::Rest::GrpcTranscoder.new
266
+ .with_bindings(
267
+ uri_method: :get,
268
+ uri_template: "/v1/{name}",
269
+ matches: [
270
+ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
271
+ ]
272
+ )
273
+ transcoder.transcode request_pb
274
+ end
275
+
276
+ ##
277
+ # @private
278
+ #
279
+ # GRPC transcoding helper method for the update_cluster REST call
280
+ #
281
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::UpdateClusterRequest]
282
+ # A request object representing the call parameters. Required.
283
+ # @return [Array(String, [String, nil], Hash{String => String})]
284
+ # Uri, Body, Query string parameters
285
+ def self.transcode_update_cluster_request request_pb
286
+ transcoder = Gapic::Rest::GrpcTranscoder.new
287
+ .with_bindings(
288
+ uri_method: :patch,
289
+ uri_template: "/v1/{cluster.name}",
290
+ body: "cluster",
291
+ matches: [
292
+ ["cluster.name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
293
+ ]
294
+ )
295
+ transcoder.transcode request_pb
296
+ end
297
+
298
+ ##
299
+ # @private
300
+ #
301
+ # GRPC transcoding helper method for the delete_cluster REST call
302
+ #
303
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest]
304
+ # A request object representing the call parameters. Required.
305
+ # @return [Array(String, [String, nil], Hash{String => String})]
306
+ # Uri, Body, Query string parameters
307
+ def self.transcode_delete_cluster_request request_pb
308
+ transcoder = Gapic::Rest::GrpcTranscoder.new
309
+ .with_bindings(
310
+ uri_method: :delete,
311
+ uri_template: "/v1/{name}",
312
+ matches: [
313
+ ["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
314
+ ]
315
+ )
316
+ transcoder.transcode request_pb
317
+ end
318
+
319
+ ##
320
+ # @private
321
+ #
322
+ # GRPC transcoding helper method for the create_cluster REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::Redis::Cluster::V1::CreateClusterRequest]
325
+ # A request object representing the call parameters. Required.
326
+ # @return [Array(String, [String, nil], Hash{String => String})]
327
+ # Uri, Body, Query string parameters
328
+ def self.transcode_create_cluster_request request_pb
329
+ transcoder = Gapic::Rest::GrpcTranscoder.new
330
+ .with_bindings(
331
+ uri_method: :post,
332
+ uri_template: "/v1/{parent}/clusters",
333
+ body: "cluster",
334
+ matches: [
335
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
336
+ ]
337
+ )
338
+ transcoder.transcode request_pb
339
+ end
340
+ end
341
+ end
342
+ end
343
+ end
344
+ end
345
+ end
346
+ end
347
+ end
@@ -0,0 +1,76 @@
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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/redis/cluster/v1/version"
24
+ require "google/cloud/redis/cluster/v1/bindings_override"
25
+
26
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/credentials"
27
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/paths"
28
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/operations"
29
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/client"
30
+
31
+ module Google
32
+ module Cloud
33
+ module Redis
34
+ module Cluster
35
+ module V1
36
+ ##
37
+ # Configures and manages Cloud Memorystore for Redis clusters
38
+ #
39
+ # Google Cloud Memorystore for Redis Cluster
40
+ #
41
+ # The `redis.googleapis.com` service implements the Google Cloud Memorystore
42
+ # for Redis API and defines the following resource model for managing Redis
43
+ # clusters:
44
+ # * The service works with a collection of cloud projects, named: `/projects/*`
45
+ # * Each project has a collection of available locations, named: `/locations/*`
46
+ # * Each location has a collection of Redis clusters, named: `/clusters/*`
47
+ # * As such, Redis clusters are resources of the form:
48
+ # `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
49
+ #
50
+ # Note that location_id must be a GCP `region`; for example:
51
+ # * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
52
+ #
53
+ # We use API version selector for Flex APIs
54
+ # * The versioning strategy is release-based versioning
55
+ # * Our backend CLH only deals with the superset version (called v1main)
56
+ # * Existing backend for Redis Gen1 and MRR is not touched.
57
+ # * More details in go/redis-flex-api-versioning
58
+ #
59
+ # To load this service and instantiate a REST client:
60
+ #
61
+ # require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest"
62
+ # client = ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new
63
+ #
64
+ module CloudRedisCluster
65
+ # Client for the REST transport
66
+ module Rest
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+
75
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
76
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,78 @@
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/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/redis/cluster/v1/version"
24
+
25
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/credentials"
26
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/paths"
27
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/operations"
28
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/client"
29
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest"
30
+
31
+ module Google
32
+ module Cloud
33
+ module Redis
34
+ module Cluster
35
+ module V1
36
+ ##
37
+ # Configures and manages Cloud Memorystore for Redis clusters
38
+ #
39
+ # Google Cloud Memorystore for Redis Cluster
40
+ #
41
+ # The `redis.googleapis.com` service implements the Google Cloud Memorystore
42
+ # for Redis API and defines the following resource model for managing Redis
43
+ # clusters:
44
+ # * The service works with a collection of cloud projects, named: `/projects/*`
45
+ # * Each project has a collection of available locations, named: `/locations/*`
46
+ # * Each location has a collection of Redis clusters, named: `/clusters/*`
47
+ # * As such, Redis clusters are resources of the form:
48
+ # `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
49
+ #
50
+ # Note that location_id must be a GCP `region`; for example:
51
+ # * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
52
+ #
53
+ # We use API version selector for Flex APIs
54
+ # * The versioning strategy is release-based versioning
55
+ # * Our backend CLH only deals with the superset version (called v1main)
56
+ # * Existing backend for Redis Gen1 and MRR is not touched.
57
+ # * More details in go/redis-flex-api-versioning
58
+ #
59
+ # @example Load this service and instantiate a gRPC client
60
+ #
61
+ # require "google/cloud/redis/cluster/v1/cloud_redis_cluster"
62
+ # client = ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
63
+ #
64
+ # @example Load this service and instantiate a REST client
65
+ #
66
+ # require "google/cloud/redis/cluster/v1/cloud_redis_cluster/rest"
67
+ # client = ::Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Rest::Client.new
68
+ #
69
+ module CloudRedisCluster
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
76
+
77
+ helper_path = ::File.join __dir__, "cloud_redis_cluster", "helpers.rb"
78
+ require "google/cloud/redis/cluster/v1/cloud_redis_cluster/helpers" if ::File.file? helper_path
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/longrunning/operations_pb'
12
+ require 'google/protobuf/any_pb'
13
+ require 'google/protobuf/empty_pb'
14
+ require 'google/protobuf/field_mask_pb'
15
+ require 'google/protobuf/timestamp_pb'
16
+
17
+
18
+ descriptor_data = "\n7google/cloud/redis/cluster/v1/cloud_redis_cluster.proto\x12\x1dgoogle.cloud.redis.cluster.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbc\x01\n\x14\x43reateClusterRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\ncluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x07\x63luster\x18\x03 \x01(\x0b\x32&.google.cloud.redis.cluster.v1.ClusterB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"w\n\x13ListClustersRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"~\n\x14ListClustersResponse\x12\x38\n\x08\x63lusters\x18\x01 \x03(\x0b\x32&.google.cloud.redis.cluster.v1.Cluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x9e\x01\n\x14UpdateClusterRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12<\n\x07\x63luster\x18\x02 \x01(\x0b\x32&.google.cloud.redis.cluster.v1.ClusterB\x03\xe0\x41\x02\x12\x12\n\nrequest_id\x18\x03 \x01(\t\"G\n\x11GetClusterRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1credis.googleapis.com/Cluster\"^\n\x14\x44\x65leteClusterRequest\x12\x32\n\x04name\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1credis.googleapis.com/Cluster\x12\x12\n\nrequest_id\x18\x02 \x01(\t\"\xaf\t\n\x07\x43luster\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12@\n\x05state\x18\x04 \x01(\x0e\x32,.google.cloud.redis.cluster.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\rreplica_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12Q\n\x12\x61uthorization_mode\x18\x0b \x01(\x0e\x32\x30.google.cloud.redis.cluster.v1.AuthorizationModeB\x03\xe0\x41\x01\x12Z\n\x17transit_encryption_mode\x18\x0c \x01(\x0e\x32\x34.google.cloud.redis.cluster.v1.TransitEncryptionModeB\x03\xe0\x41\x01\x12\x19\n\x07size_gb\x18\r \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1d\n\x0bshard_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x02H\x02\x88\x01\x01\x12\x42\n\x0bpsc_configs\x18\x0f \x03(\x0b\x32(.google.cloud.redis.cluster.v1.PscConfigB\x03\xe0\x41\x02\x12R\n\x13\x64iscovery_endpoints\x18\x10 \x03(\x0b\x32\x30.google.cloud.redis.cluster.v1.DiscoveryEndpointB\x03\xe0\x41\x03\x12J\n\x0fpsc_connections\x18\x11 \x03(\x0b\x32,.google.cloud.redis.cluster.v1.PscConnectionB\x03\xe0\x41\x03\x12I\n\nstate_info\x18\x12 \x01(\x0b\x32\x30.google.cloud.redis.cluster.v1.Cluster.StateInfoB\x03\xe0\x41\x03\x1a\xea\x01\n\tStateInfo\x12R\n\x0bupdate_info\x18\x01 \x01(\x0b\x32;.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoH\x00\x1a\x80\x01\n\nUpdateInfo\x12\x1f\n\x12target_shard_count\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12!\n\x14target_replica_count\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x15\n\x13_target_shard_countB\x17\n\x15_target_replica_countB\x06\n\x04info\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:]\xea\x41Z\n\x1credis.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}B\x10\n\x0e_replica_countB\n\n\x08_size_gbB\x0e\n\x0c_shard_count\"!\n\tPscConfig\x12\x14\n\x07network\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x7f\n\x11\x44iscoveryEndpoint\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x41\n\npsc_config\x18\x03 \x01(\x0b\x32(.google.cloud.redis.cluster.v1.PscConfigB\x03\xe0\x41\x03\"\x8d\x01\n\rPscConnection\x12\x1e\n\x11psc_connection_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0f\x66orwarding_rule\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x07network\x18\x05 \x01(\t\"\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*^\n\x11\x41uthorizationMode\x12\x19\n\x15\x41UTH_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41UTH_MODE_IAM_AUTH\x10\x01\x12\x16\n\x12\x41UTH_MODE_DISABLED\x10\x02*\x99\x01\n\x15TransitEncryptionMode\x12\'\n#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12$\n TRANSIT_ENCRYPTION_MODE_DISABLED\x10\x01\x12\x31\n-TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION\x10\x02\x32\xd4\x08\n\x11\x43loudRedisCluster\x12\xb6\x01\n\x0cListClusters\x12\x32.google.cloud.redis.cluster.v1.ListClustersRequest\x1a\x33.google.cloud.redis.cluster.v1.ListClustersResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\xda\x41\x06parent\x12\xa3\x01\n\nGetCluster\x12\x30.google.cloud.redis.cluster.v1.GetClusterRequest\x1a&.google.cloud.redis.cluster.v1.Cluster\";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\xda\x41\x04name\x12\xe1\x01\n\rUpdateCluster\x12\x33.google.cloud.redis.cluster.v1.UpdateClusterRequest\x1a\x1d.google.longrunning.Operation\"|\x82\xd3\xe4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07\x63luster\xda\x41\x13\x63luster,update_mask\xca\x41\x1e\n\x07\x43luster\x12\x13google.protobuf.Any\x12\xcf\x01\n\rDeleteCluster\x12\x33.google.cloud.redis.cluster.v1.DeleteClusterRequest\x1a\x1d.google.longrunning.Operation\"j\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\xda\x41\x04name\xca\x41,\n\x15google.protobuf.Empty\x12\x13google.protobuf.Any\x12\xdf\x01\n\rCreateCluster\x12\x33.google.cloud.redis.cluster.v1.CreateClusterRequest\x1a\x1d.google.longrunning.Operation\"z\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/clusters:\x07\x63luster\xda\x41\x19parent,cluster,cluster_id\xca\x41\x1e\n\x07\x43luster\x12\x13google.protobuf.Any\x1aH\xca\x41\x14redis.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x9e\x01\n!com.google.cloud.redis.cluster.v1B\x16\x43loudRedisClusterProtoP\x01Z;cloud.google.com/go/redis/cluster/apiv1/clusterpb;clusterpb\xea\x02!Google::Cloud::Redis::Cluster::V1b\x06proto3"
19
+
20
+ pool = Google::Protobuf::DescriptorPool.generated_pool
21
+
22
+ begin
23
+ pool.add_serialized_file(descriptor_data)
24
+ rescue TypeError => e
25
+ # Compatibility code: will be removed in the next major version.
26
+ require 'google/protobuf/descriptor_pb'
27
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
+ parsed.clear_dependency
29
+ serialized = parsed.class.encode(parsed)
30
+ file = pool.add_serialized_file(serialized)
31
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
+ imports = [
33
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
34
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
35
+ ]
36
+ imports.each do |type_name, expected_filename|
37
+ import_file = pool.lookup(type_name).file_descriptor
38
+ if import_file.name != expected_filename
39
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
40
+ end
41
+ end
42
+ warn "Each proto file must use a consistent fully-qualified name."
43
+ warn "This will become an error in the next major version."
44
+ end
45
+
46
+ module Google
47
+ module Cloud
48
+ module Redis
49
+ module Cluster
50
+ module V1
51
+ CreateClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.CreateClusterRequest").msgclass
52
+ ListClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.ListClustersRequest").msgclass
53
+ ListClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.ListClustersResponse").msgclass
54
+ UpdateClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.UpdateClusterRequest").msgclass
55
+ GetClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.GetClusterRequest").msgclass
56
+ DeleteClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.DeleteClusterRequest").msgclass
57
+ Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.Cluster").msgclass
58
+ Cluster::StateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.Cluster.StateInfo").msgclass
59
+ Cluster::StateInfo::UpdateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo").msgclass
60
+ Cluster::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.Cluster.State").enummodule
61
+ PscConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.PscConfig").msgclass
62
+ DiscoveryEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.DiscoveryEndpoint").msgclass
63
+ PscConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.PscConnection").msgclass
64
+ OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.OperationMetadata").msgclass
65
+ AuthorizationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.AuthorizationMode").enummodule
66
+ TransitEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.cluster.v1.TransitEncryptionMode").enummodule
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end