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,353 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module Redis
23
+ module Cluster
24
+ module V1
25
+ # Request for [CreateCluster][CloudRedis.CreateCluster].
26
+ # @!attribute [rw] parent
27
+ # @return [::String]
28
+ # Required. The resource name of the cluster location using the form:
29
+ # `projects/{project_id}/locations/{location_id}`
30
+ # where `location_id` refers to a GCP region.
31
+ # @!attribute [rw] cluster_id
32
+ # @return [::String]
33
+ # Required. The logical name of the Redis cluster in the customer project
34
+ # with the following restrictions:
35
+ #
36
+ # * Must contain only lowercase letters, numbers, and hyphens.
37
+ # * Must start with a letter.
38
+ # * Must be between 1-63 characters.
39
+ # * Must end with a number or a letter.
40
+ # * Must be unique within the customer project / location
41
+ # @!attribute [rw] cluster
42
+ # @return [::Google::Cloud::Redis::Cluster::V1::Cluster]
43
+ # Required. The cluster that is to be created.
44
+ # @!attribute [rw] request_id
45
+ # @return [::String]
46
+ # Idempotent request UUID.
47
+ class CreateClusterRequest
48
+ include ::Google::Protobuf::MessageExts
49
+ extend ::Google::Protobuf::MessageExts::ClassMethods
50
+ end
51
+
52
+ # Request for [ListClusters][CloudRedis.ListClusters].
53
+ # @!attribute [rw] parent
54
+ # @return [::String]
55
+ # Required. The resource name of the cluster location using the form:
56
+ # `projects/{project_id}/locations/{location_id}`
57
+ # where `location_id` refers to a GCP region.
58
+ # @!attribute [rw] page_size
59
+ # @return [::Integer]
60
+ # The maximum number of items to return.
61
+ #
62
+ # If not specified, a default value of 1000 will be used by the service.
63
+ # Regardless of the page_size value, the response may include a partial list
64
+ # and a caller should only rely on response's
65
+ # {::Google::Cloud::Redis::Cluster::V1::ListClustersResponse#next_page_token `next_page_token`}
66
+ # to determine if there are more clusters left to be queried.
67
+ # @!attribute [rw] page_token
68
+ # @return [::String]
69
+ # The `next_page_token` value returned from a previous
70
+ # [ListClusters][CloudRedis.ListClusters] request, if any.
71
+ class ListClustersRequest
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # Response for [ListClusters][CloudRedis.ListClusters].
77
+ # @!attribute [rw] clusters
78
+ # @return [::Array<::Google::Cloud::Redis::Cluster::V1::Cluster>]
79
+ # A list of Redis clusters in the project in the specified location,
80
+ # or across all locations.
81
+ #
82
+ # If the `location_id` in the parent field of the request is "-", all regions
83
+ # available to the project are queried, and the results aggregated.
84
+ # If in such an aggregated query a location is unavailable, a placeholder
85
+ # Redis entry is included in the response with the `name` field set to a
86
+ # value of the form
87
+ # `projects/{project_id}/locations/{location_id}/clusters/`- and the
88
+ # `status` field set to ERROR and `status_message` field set to "location not
89
+ # available for ListClusters".
90
+ # @!attribute [rw] next_page_token
91
+ # @return [::String]
92
+ # Token to retrieve the next page of results, or empty if there are no more
93
+ # results in the list.
94
+ # @!attribute [rw] unreachable
95
+ # @return [::Array<::String>]
96
+ # Locations that could not be reached.
97
+ class ListClustersResponse
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+
102
+ # Request for [UpdateCluster][CloudRedis.UpdateCluster].
103
+ # @!attribute [rw] update_mask
104
+ # @return [::Google::Protobuf::FieldMask]
105
+ # Required. Mask of fields to update. At least one path must be supplied in
106
+ # this field. The elements of the repeated paths field may only include these
107
+ # fields from {::Google::Cloud::Redis::Cluster::V1::Cluster Cluster}:
108
+ #
109
+ # * `size_gb`
110
+ # * `replica_count`
111
+ # @!attribute [rw] cluster
112
+ # @return [::Google::Cloud::Redis::Cluster::V1::Cluster]
113
+ # Required. Update description.
114
+ # Only fields specified in update_mask are updated.
115
+ # @!attribute [rw] request_id
116
+ # @return [::String]
117
+ # Idempotent request UUID.
118
+ class UpdateClusterRequest
119
+ include ::Google::Protobuf::MessageExts
120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
121
+ end
122
+
123
+ # Request for [GetCluster][CloudRedis.GetCluster].
124
+ # @!attribute [rw] name
125
+ # @return [::String]
126
+ # Required. Redis cluster resource name using the form:
127
+ # `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
128
+ # where `location_id` refers to a GCP region.
129
+ class GetClusterRequest
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
+ end
133
+
134
+ # Request for [DeleteCluster][CloudRedis.DeleteCluster].
135
+ # @!attribute [rw] name
136
+ # @return [::String]
137
+ # Required. Redis cluster resource name using the form:
138
+ # `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
139
+ # where `location_id` refers to a GCP region.
140
+ # @!attribute [rw] request_id
141
+ # @return [::String]
142
+ # Idempotent request UUID.
143
+ class DeleteClusterRequest
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+ end
147
+
148
+ # A cluster instance.
149
+ # @!attribute [rw] name
150
+ # @return [::String]
151
+ # Required. Unique name of the resource in this scope including project and
152
+ # location using the form:
153
+ # `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
154
+ # @!attribute [r] create_time
155
+ # @return [::Google::Protobuf::Timestamp]
156
+ # Output only. The timestamp associated with the cluster creation request.
157
+ # @!attribute [r] state
158
+ # @return [::Google::Cloud::Redis::Cluster::V1::Cluster::State]
159
+ # Output only. The current state of this cluster.
160
+ # Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
161
+ # @!attribute [r] uid
162
+ # @return [::String]
163
+ # Output only. System assigned, unique identifier for the cluster.
164
+ # @!attribute [rw] replica_count
165
+ # @return [::Integer]
166
+ # Optional. The number of replica nodes per shard.
167
+ # @!attribute [rw] authorization_mode
168
+ # @return [::Google::Cloud::Redis::Cluster::V1::AuthorizationMode]
169
+ # Optional. The authorization mode of the Redis cluster.
170
+ # If not provided, auth feature is disabled for the cluster.
171
+ # @!attribute [rw] transit_encryption_mode
172
+ # @return [::Google::Cloud::Redis::Cluster::V1::TransitEncryptionMode]
173
+ # Optional. The in-transit encryption for the Redis cluster.
174
+ # If not provided, encryption is disabled for the cluster.
175
+ # @!attribute [r] size_gb
176
+ # @return [::Integer]
177
+ # Output only. Redis memory size in GB for the entire cluster.
178
+ # @!attribute [rw] shard_count
179
+ # @return [::Integer]
180
+ # Required. Number of shards for the Redis cluster.
181
+ # @!attribute [rw] psc_configs
182
+ # @return [::Array<::Google::Cloud::Redis::Cluster::V1::PscConfig>]
183
+ # Required. Each PscConfig configures the consumer network where IPs will
184
+ # be designated to the cluster for client access through Private Service
185
+ # Connect Automation. Currently, only one PscConfig is supported.
186
+ # @!attribute [r] discovery_endpoints
187
+ # @return [::Array<::Google::Cloud::Redis::Cluster::V1::DiscoveryEndpoint>]
188
+ # Output only. Endpoints created on each given network, for Redis clients to
189
+ # connect to the cluster. Currently only one discovery endpoint is supported.
190
+ # @!attribute [r] psc_connections
191
+ # @return [::Array<::Google::Cloud::Redis::Cluster::V1::PscConnection>]
192
+ # Output only. PSC connections for discovery of the cluster topology and
193
+ # accessing the cluster.
194
+ # @!attribute [r] state_info
195
+ # @return [::Google::Cloud::Redis::Cluster::V1::Cluster::StateInfo]
196
+ # Output only. Additional information about the current state of the cluster.
197
+ class Cluster
198
+ include ::Google::Protobuf::MessageExts
199
+ extend ::Google::Protobuf::MessageExts::ClassMethods
200
+
201
+ # Represents additional information about the state of the cluster.
202
+ # @!attribute [rw] update_info
203
+ # @return [::Google::Cloud::Redis::Cluster::V1::Cluster::StateInfo::UpdateInfo]
204
+ # Describes ongoing update on the cluster when cluster state is UPDATING.
205
+ class StateInfo
206
+ include ::Google::Protobuf::MessageExts
207
+ extend ::Google::Protobuf::MessageExts::ClassMethods
208
+
209
+ # Represents information about an updating cluster.
210
+ # @!attribute [rw] target_shard_count
211
+ # @return [::Integer]
212
+ # Target number of shards for redis cluster
213
+ # @!attribute [rw] target_replica_count
214
+ # @return [::Integer]
215
+ # Target number of replica nodes per shard.
216
+ class UpdateInfo
217
+ include ::Google::Protobuf::MessageExts
218
+ extend ::Google::Protobuf::MessageExts::ClassMethods
219
+ end
220
+ end
221
+
222
+ # Represents the different states of a Redis cluster.
223
+ module State
224
+ # Not set.
225
+ STATE_UNSPECIFIED = 0
226
+
227
+ # Redis cluster is being created.
228
+ CREATING = 1
229
+
230
+ # Redis cluster has been created and is fully usable.
231
+ ACTIVE = 2
232
+
233
+ # Redis cluster configuration is being updated.
234
+ UPDATING = 3
235
+
236
+ # Redis cluster is being deleted.
237
+ DELETING = 4
238
+ end
239
+ end
240
+
241
+ # @!attribute [rw] network
242
+ # @return [::String]
243
+ # Required. The network where the IP address of the discovery endpoint will
244
+ # be reserved, in the form of
245
+ # projects/\\{network_project}/global/networks/\\{network_id}.
246
+ class PscConfig
247
+ include ::Google::Protobuf::MessageExts
248
+ extend ::Google::Protobuf::MessageExts::ClassMethods
249
+ end
250
+
251
+ # Endpoints on each network, for Redis clients to connect to the cluster.
252
+ # @!attribute [r] address
253
+ # @return [::String]
254
+ # Output only. Address of the exposed Redis endpoint used by clients to
255
+ # connect to the service. The address could be either IP or hostname.
256
+ # @!attribute [r] port
257
+ # @return [::Integer]
258
+ # Output only. The port number of the exposed Redis endpoint.
259
+ # @!attribute [r] psc_config
260
+ # @return [::Google::Cloud::Redis::Cluster::V1::PscConfig]
261
+ # Output only. Customer configuration for where the endpoint is created and
262
+ # accessed from.
263
+ class DiscoveryEndpoint
264
+ include ::Google::Protobuf::MessageExts
265
+ extend ::Google::Protobuf::MessageExts::ClassMethods
266
+ end
267
+
268
+ # Details of consumer resources in a PSC connection.
269
+ # @!attribute [r] psc_connection_id
270
+ # @return [::String]
271
+ # Output only. The PSC connection id of the forwarding rule connected to the
272
+ # service attachment.
273
+ # @!attribute [r] address
274
+ # @return [::String]
275
+ # Output only. The IP allocated on the consumer network for the PSC
276
+ # forwarding rule.
277
+ # @!attribute [r] forwarding_rule
278
+ # @return [::String]
279
+ # Output only. The URI of the consumer side forwarding rule.
280
+ # Example:
281
+ # projects/\\{projectNumOrId}/regions/us-east1/forwardingRules/\\{resourceId}.
282
+ # @!attribute [r] project_id
283
+ # @return [::String]
284
+ # Output only. The consumer project_id where the forwarding rule is created
285
+ # from.
286
+ # @!attribute [rw] network
287
+ # @return [::String]
288
+ # The consumer network where the IP address resides, in the form of
289
+ # projects/\\{project_id}/global/networks/\\{network_id}.
290
+ class PscConnection
291
+ include ::Google::Protobuf::MessageExts
292
+ extend ::Google::Protobuf::MessageExts::ClassMethods
293
+ end
294
+
295
+ # Pre-defined metadata fields.
296
+ # @!attribute [r] create_time
297
+ # @return [::Google::Protobuf::Timestamp]
298
+ # Output only. The time the operation was created.
299
+ # @!attribute [r] end_time
300
+ # @return [::Google::Protobuf::Timestamp]
301
+ # Output only. The time the operation finished running.
302
+ # @!attribute [r] target
303
+ # @return [::String]
304
+ # Output only. Server-defined resource path for the target of the operation.
305
+ # @!attribute [r] verb
306
+ # @return [::String]
307
+ # Output only. Name of the verb executed by the operation.
308
+ # @!attribute [r] status_message
309
+ # @return [::String]
310
+ # Output only. Human-readable status of the operation, if any.
311
+ # @!attribute [r] requested_cancellation
312
+ # @return [::Boolean]
313
+ # Output only. Identifies whether the user has requested cancellation
314
+ # of the operation. Operations that have successfully been cancelled
315
+ # have [Operation.error][] value with a
316
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
317
+ # `Code.CANCELLED`.
318
+ # @!attribute [r] api_version
319
+ # @return [::String]
320
+ # Output only. API version used to start the operation.
321
+ class OperationMetadata
322
+ include ::Google::Protobuf::MessageExts
323
+ extend ::Google::Protobuf::MessageExts::ClassMethods
324
+ end
325
+
326
+ # Available authorization mode of a Redis cluster.
327
+ module AuthorizationMode
328
+ # Not set.
329
+ AUTH_MODE_UNSPECIFIED = 0
330
+
331
+ # IAM basic authorization mode
332
+ AUTH_MODE_IAM_AUTH = 1
333
+
334
+ # Authorization disabled mode
335
+ AUTH_MODE_DISABLED = 2
336
+ end
337
+
338
+ # Available mode of in-transit encryption.
339
+ module TransitEncryptionMode
340
+ # In-transit encryption not set.
341
+ TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0
342
+
343
+ # In-transit encryption disabled.
344
+ TRANSIT_ENCRYPTION_MODE_DISABLED = 1
345
+
346
+ # Use server managed encryption for in-transit encryption.
347
+ TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2
348
+ end
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end
@@ -0,0 +1,164 @@
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
+
20
+ module Google
21
+ module Longrunning
22
+ # This resource represents a long-running operation that is the result of a
23
+ # network API call.
24
+ # @!attribute [rw] name
25
+ # @return [::String]
26
+ # The server-assigned name, which is only unique within the same service that
27
+ # originally returns it. If you use the default HTTP mapping, the
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
+ # @!attribute [rw] metadata
30
+ # @return [::Google::Protobuf::Any]
31
+ # Service-specific metadata associated with the operation. It typically
32
+ # contains progress information and common metadata such as create time.
33
+ # Some services might not provide such metadata. Any method that returns a
34
+ # long-running operation should document the metadata type, if any.
35
+ # @!attribute [rw] done
36
+ # @return [::Boolean]
37
+ # If the value is `false`, it means the operation is still in progress.
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
+ # available.
40
+ # @!attribute [rw] error
41
+ # @return [::Google::Rpc::Status]
42
+ # The error result of the operation in case of failure or cancellation.
43
+ # @!attribute [rw] response
44
+ # @return [::Google::Protobuf::Any]
45
+ # The normal response of the operation in case of success. If the original
46
+ # method returns no data on success, such as `Delete`, the response is
47
+ # `google.protobuf.Empty`. If the original method is standard
48
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
49
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
50
+ # is the original method name. For example, if the original method name
51
+ # is `TakeSnapshot()`, the inferred response type is
52
+ # `TakeSnapshotResponse`.
53
+ class Operation
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # The request message for Operations.GetOperation.
59
+ # @!attribute [rw] name
60
+ # @return [::String]
61
+ # The name of the operation resource.
62
+ class GetOperationRequest
63
+ include ::Google::Protobuf::MessageExts
64
+ extend ::Google::Protobuf::MessageExts::ClassMethods
65
+ end
66
+
67
+ # The request message for Operations.ListOperations.
68
+ # @!attribute [rw] name
69
+ # @return [::String]
70
+ # The name of the operation's parent resource.
71
+ # @!attribute [rw] filter
72
+ # @return [::String]
73
+ # The standard list filter.
74
+ # @!attribute [rw] page_size
75
+ # @return [::Integer]
76
+ # The standard list page size.
77
+ # @!attribute [rw] page_token
78
+ # @return [::String]
79
+ # The standard list page token.
80
+ class ListOperationsRequest
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+
85
+ # The response message for Operations.ListOperations.
86
+ # @!attribute [rw] operations
87
+ # @return [::Array<::Google::Longrunning::Operation>]
88
+ # A list of operations that matches the specified filter in the request.
89
+ # @!attribute [rw] next_page_token
90
+ # @return [::String]
91
+ # The standard List next-page token.
92
+ class ListOperationsResponse
93
+ include ::Google::Protobuf::MessageExts
94
+ extend ::Google::Protobuf::MessageExts::ClassMethods
95
+ end
96
+
97
+ # The request message for Operations.CancelOperation.
98
+ # @!attribute [rw] name
99
+ # @return [::String]
100
+ # The name of the operation resource to be cancelled.
101
+ class CancelOperationRequest
102
+ include ::Google::Protobuf::MessageExts
103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
104
+ end
105
+
106
+ # The request message for Operations.DeleteOperation.
107
+ # @!attribute [rw] name
108
+ # @return [::String]
109
+ # The name of the operation resource to be deleted.
110
+ class DeleteOperationRequest
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # A message representing the message types used by a long-running operation.
130
+ #
131
+ # Example:
132
+ #
133
+ # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
+ # returns (google.longrunning.Operation) {
135
+ # option (google.longrunning.operation_info) = {
136
+ # response_type: "LongRunningRecognizeResponse"
137
+ # metadata_type: "LongRunningRecognizeMetadata"
138
+ # };
139
+ # }
140
+ # @!attribute [rw] response_type
141
+ # @return [::String]
142
+ # Required. The message name of the primary return type for this
143
+ # long-running operation.
144
+ # This type will be used to deserialize the LRO's response.
145
+ #
146
+ # If the response is in a different package from the rpc, a fully-qualified
147
+ # message name must be used (e.g. `google.protobuf.Struct`).
148
+ #
149
+ # Note: Altering this value constitutes a breaking change.
150
+ # @!attribute [rw] metadata_type
151
+ # @return [::String]
152
+ # Required. The message name of the metadata type for this long-running
153
+ # operation.
154
+ #
155
+ # If the response is in a different package from the rpc, a fully-qualified
156
+ # message name must be used (e.g. `google.protobuf.Struct`).
157
+ #
158
+ # Note: Altering this value constitutes a breaking change.
159
+ class OperationInfo
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,144 @@
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
+
20
+ module Google
21
+ module Protobuf
22
+ # `Any` contains an arbitrary serialized protocol buffer message along with a
23
+ # URL that describes the type of the serialized message.
24
+ #
25
+ # Protobuf library provides support to pack/unpack Any values in the form
26
+ # of utility functions or additional generated methods of the Any type.
27
+ #
28
+ # Example 1: Pack and unpack a message in C++.
29
+ #
30
+ # Foo foo = ...;
31
+ # Any any;
32
+ # any.PackFrom(foo);
33
+ # ...
34
+ # if (any.UnpackTo(&foo)) {
35
+ # ...
36
+ # }
37
+ #
38
+ # Example 2: Pack and unpack a message in Java.
39
+ #
40
+ # Foo foo = ...;
41
+ # Any any = Any.pack(foo);
42
+ # ...
43
+ # if (any.is(Foo.class)) {
44
+ # foo = any.unpack(Foo.class);
45
+ # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
50
+ #
51
+ # Example 3: Pack and unpack a message in Python.
52
+ #
53
+ # foo = Foo(...)
54
+ # any = Any()
55
+ # any.Pack(foo)
56
+ # ...
57
+ # if any.Is(Foo.DESCRIPTOR):
58
+ # any.Unpack(foo)
59
+ # ...
60
+ #
61
+ # Example 4: Pack and unpack a message in Go
62
+ #
63
+ # foo := &pb.Foo{...}
64
+ # any, err := anypb.New(foo)
65
+ # if err != nil {
66
+ # ...
67
+ # }
68
+ # ...
69
+ # foo := &pb.Foo{}
70
+ # if err := any.UnmarshalTo(foo); err != nil {
71
+ # ...
72
+ # }
73
+ #
74
+ # The pack methods provided by protobuf library will by default use
75
+ # 'type.googleapis.com/full.type.name' as the type URL and the unpack
76
+ # methods only use the fully qualified type name after the last '/'
77
+ # in the type URL, for example "foo.bar.com/x/y.z" will yield type
78
+ # name "y.z".
79
+ #
80
+ # JSON
81
+ # ====
82
+ # The JSON representation of an `Any` value uses the regular
83
+ # representation of the deserialized, embedded message, with an
84
+ # additional field `@type` which contains the type URL. Example:
85
+ #
86
+ # package google.profile;
87
+ # message Person {
88
+ # string first_name = 1;
89
+ # string last_name = 2;
90
+ # }
91
+ #
92
+ # {
93
+ # "@type": "type.googleapis.com/google.profile.Person",
94
+ # "firstName": <string>,
95
+ # "lastName": <string>
96
+ # }
97
+ #
98
+ # If the embedded message type is well-known and has a custom JSON
99
+ # representation, that representation will be embedded adding a field
100
+ # `value` which holds the custom JSON in addition to the `@type`
101
+ # field. Example (for message [google.protobuf.Duration][]):
102
+ #
103
+ # {
104
+ # "@type": "type.googleapis.com/google.protobuf.Duration",
105
+ # "value": "1.212s"
106
+ # }
107
+ # @!attribute [rw] type_url
108
+ # @return [::String]
109
+ # A URL/resource name that uniquely identifies the type of the serialized
110
+ # protocol buffer message. This string must contain at least
111
+ # one "/" character. The last segment of the URL's path must represent
112
+ # the fully qualified name of the type (as in
113
+ # `path/google.protobuf.Duration`). The name should be in a canonical form
114
+ # (e.g., leading "." is not accepted).
115
+ #
116
+ # In practice, teams usually precompile into the binary all types that they
117
+ # expect it to use in the context of Any. However, for URLs which use the
118
+ # scheme `http`, `https`, or no scheme, one can optionally set up a type
119
+ # server that maps type URLs to message definitions as follows:
120
+ #
121
+ # * If no scheme is provided, `https` is assumed.
122
+ # * An HTTP GET on the URL must yield a [google.protobuf.Type][]
123
+ # value in binary format, or produce an error.
124
+ # * Applications are allowed to cache lookup results based on the
125
+ # URL, or have them precompiled into a binary to avoid any
126
+ # lookup. Therefore, binary compatibility needs to be preserved
127
+ # on changes to types. (Use versioned type names to manage
128
+ # breaking changes.)
129
+ #
130
+ # Note: this functionality is not currently available in the official
131
+ # protobuf release, and it is not used for type URLs beginning with
132
+ # type.googleapis.com.
133
+ #
134
+ # Schemes other than `http`, `https` (or the empty scheme) might be
135
+ # used with implementation specific semantics.
136
+ # @!attribute [rw] value
137
+ # @return [::String]
138
+ # Must be a valid serialized protocol buffer of the above specified type.
139
+ class Any
140
+ include ::Google::Protobuf::MessageExts
141
+ extend ::Google::Protobuf::MessageExts::ClassMethods
142
+ end
143
+ end
144
+ end