google-cloud-backupdr-v1 0.a → 0.2.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/backupdr/v1/backupdr/client.rb +833 -0
  6. data/lib/google/cloud/backupdr/v1/backupdr/credentials.rb +47 -0
  7. data/lib/google/cloud/backupdr/v1/backupdr/operations.rb +809 -0
  8. data/lib/google/cloud/backupdr/v1/backupdr/paths.rb +69 -0
  9. data/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +787 -0
  10. data/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb +902 -0
  11. data/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +306 -0
  12. data/lib/google/cloud/backupdr/v1/backupdr/rest.rb +54 -0
  13. data/lib/google/cloud/backupdr/v1/backupdr.rb +56 -0
  14. data/lib/google/cloud/backupdr/v1/backupdr_pb.rb +66 -0
  15. data/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +51 -0
  16. data/lib/google/cloud/backupdr/v1/bindings_override.rb +135 -0
  17. data/lib/google/cloud/backupdr/v1/rest.rb +38 -0
  18. data/lib/google/cloud/backupdr/v1/version.rb +8 -3
  19. data/lib/google/cloud/backupdr/v1.rb +45 -0
  20. data/lib/google-cloud-backupdr-v1.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +399 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +222 -0
  26. data/proto_docs/google/cloud/backupdr/v1/backupdr.rb +362 -0
  27. data/proto_docs/google/longrunning/operations.rb +164 -0
  28. data/proto_docs/google/protobuf/any.rb +145 -0
  29. data/proto_docs/google/protobuf/duration.rb +98 -0
  30. data/proto_docs/google/protobuf/empty.rb +34 -0
  31. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  32. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  33. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. data/proto_docs/google/type/expr.rb +75 -0
  36. metadata +115 -10
@@ -0,0 +1,362 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 BackupDR
23
+ module V1
24
+ # Network configuration for ManagementServer instance.
25
+ # @!attribute [rw] network
26
+ # @return [::String]
27
+ # Optional. The resource name of the Google Compute Engine VPC network to
28
+ # which the ManagementServer instance is connected.
29
+ # @!attribute [rw] peering_mode
30
+ # @return [::Google::Cloud::BackupDR::V1::NetworkConfig::PeeringMode]
31
+ # Optional. The network connect mode of the ManagementServer instance. For
32
+ # this version, only PRIVATE_SERVICE_ACCESS is supported.
33
+ class NetworkConfig
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # VPC peering modes supported by Cloud BackupDR.
38
+ module PeeringMode
39
+ # Peering mode not set.
40
+ PEERING_MODE_UNSPECIFIED = 0
41
+
42
+ # Connect using Private Service Access to the Management Server. Private
43
+ # services access provides an IP address range for multiple Google Cloud
44
+ # services, including Cloud BackupDR.
45
+ PRIVATE_SERVICE_ACCESS = 1
46
+ end
47
+ end
48
+
49
+ # ManagementURI for the Management Server resource.
50
+ # @!attribute [r] web_ui
51
+ # @return [::String]
52
+ # Output only. The ManagementServer AGM/RD WebUI URL.
53
+ # @!attribute [r] api
54
+ # @return [::String]
55
+ # Output only. The ManagementServer AGM/RD API URL.
56
+ class ManagementURI
57
+ include ::Google::Protobuf::MessageExts
58
+ extend ::Google::Protobuf::MessageExts::ClassMethods
59
+ end
60
+
61
+ # ManagementURI depending on the Workforce Identity i.e. either 1p or 3p.
62
+ # @!attribute [r] first_party_management_uri
63
+ # @return [::String]
64
+ # Output only. First party Management URI for Google Identities.
65
+ # @!attribute [r] third_party_management_uri
66
+ # @return [::String]
67
+ # Output only. Third party Management URI for External Identity Providers.
68
+ class WorkforceIdentityBasedManagementURI
69
+ include ::Google::Protobuf::MessageExts
70
+ extend ::Google::Protobuf::MessageExts::ClassMethods
71
+ end
72
+
73
+ # OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p,
74
+ # @!attribute [r] first_party_oauth2_client_id
75
+ # @return [::String]
76
+ # Output only. First party OAuth Client ID for Google Identities.
77
+ # @!attribute [r] third_party_oauth2_client_id
78
+ # @return [::String]
79
+ # Output only. Third party OAuth Client ID for External Identity Providers.
80
+ class WorkforceIdentityBasedOAuth2ClientID
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+
85
+ # ManagementServer describes a single BackupDR ManagementServer instance.
86
+ # @!attribute [r] name
87
+ # @return [::String]
88
+ # Output only. Identifier. The resource name.
89
+ # @!attribute [rw] description
90
+ # @return [::String]
91
+ # Optional. The description of the ManagementServer instance (2048 characters
92
+ # or less).
93
+ # @!attribute [rw] labels
94
+ # @return [::Google::Protobuf::Map{::String => ::String}]
95
+ # Optional. Resource labels to represent user provided metadata.
96
+ # Labels currently defined:
97
+ # 1. migrate_from_go=<false|true>
98
+ # If set to true, the MS is created in migration ready mode.
99
+ # @!attribute [r] create_time
100
+ # @return [::Google::Protobuf::Timestamp]
101
+ # Output only. The time when the instance was created.
102
+ # @!attribute [r] update_time
103
+ # @return [::Google::Protobuf::Timestamp]
104
+ # Output only. The time when the instance was updated.
105
+ # @!attribute [rw] type
106
+ # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceType]
107
+ # Optional. The type of the ManagementServer resource.
108
+ # @!attribute [r] management_uri
109
+ # @return [::Google::Cloud::BackupDR::V1::ManagementURI]
110
+ # Output only. The hostname or ip address of the exposed AGM endpoints, used
111
+ # by clients to connect to AGM/RD graphical user interface and APIs.
112
+ # @!attribute [r] workforce_identity_based_management_uri
113
+ # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedManagementURI]
114
+ # Output only. The hostnames of the exposed AGM endpoints for both types of
115
+ # user i.e. 1p and 3p, used to connect AGM/RM UI.
116
+ # @!attribute [r] state
117
+ # @return [::Google::Cloud::BackupDR::V1::ManagementServer::InstanceState]
118
+ # Output only. The ManagementServer state.
119
+ # @!attribute [rw] networks
120
+ # @return [::Array<::Google::Cloud::BackupDR::V1::NetworkConfig>]
121
+ # Required. VPC networks to which the ManagementServer instance is connected.
122
+ # For this version, only a single network is supported.
123
+ # @!attribute [rw] etag
124
+ # @return [::String]
125
+ # Optional. Server specified ETag for the ManagementServer resource to
126
+ # prevent simultaneous updates from overwiting each other.
127
+ # @!attribute [r] oauth2_client_id
128
+ # @return [::String]
129
+ # Output only. The OAuth 2.0 client id is required to make API calls to the
130
+ # BackupDR instance API of this ManagementServer. This is the value that
131
+ # should be provided in the ‘aud’ field of the OIDC ID Token (see openid
132
+ # specification
133
+ # https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
134
+ # @!attribute [r] workforce_identity_based_oauth2_client_id
135
+ # @return [::Google::Cloud::BackupDR::V1::WorkforceIdentityBasedOAuth2ClientID]
136
+ # Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
137
+ # @!attribute [r] ba_proxy_uri
138
+ # @return [::Array<::String>]
139
+ # Output only. The hostname or ip address of the exposed AGM endpoints, used
140
+ # by BAs to connect to BA proxy.
141
+ # @!attribute [r] satisfies_pzs
142
+ # @return [::Google::Protobuf::BoolValue]
143
+ # Output only. Reserved for future use.
144
+ # @!attribute [r] satisfies_pzi
145
+ # @return [::Boolean]
146
+ # Output only. Reserved for future use.
147
+ class ManagementServer
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+
151
+ # @!attribute [rw] key
152
+ # @return [::String]
153
+ # @!attribute [rw] value
154
+ # @return [::String]
155
+ class LabelsEntry
156
+ include ::Google::Protobuf::MessageExts
157
+ extend ::Google::Protobuf::MessageExts::ClassMethods
158
+ end
159
+
160
+ # Type of backup service resource.
161
+ module InstanceType
162
+ # Instance type is not mentioned.
163
+ INSTANCE_TYPE_UNSPECIFIED = 0
164
+
165
+ # Instance for backup and restore management (i.e., AGM).
166
+ BACKUP_RESTORE = 1
167
+ end
168
+
169
+ # State of Management server instance.
170
+ module InstanceState
171
+ # State not set.
172
+ INSTANCE_STATE_UNSPECIFIED = 0
173
+
174
+ # The instance is being created.
175
+ CREATING = 1
176
+
177
+ # The instance has been created and is fully usable.
178
+ READY = 2
179
+
180
+ # The instance configuration is being updated. Certain kinds of updates
181
+ # may cause the instance to become unusable while the update is in
182
+ # progress.
183
+ UPDATING = 3
184
+
185
+ # The instance is being deleted.
186
+ DELETING = 4
187
+
188
+ # The instance is being repaired and may be unstable.
189
+ REPAIRING = 5
190
+
191
+ # Maintenance is being performed on this instance.
192
+ MAINTENANCE = 6
193
+
194
+ # The instance is experiencing an issue and might be unusable. You can get
195
+ # further details from the statusMessage field of Instance resource.
196
+ ERROR = 7
197
+ end
198
+ end
199
+
200
+ # Request message for listing management servers.
201
+ # @!attribute [rw] parent
202
+ # @return [::String]
203
+ # Required. The project and location for which to retrieve management servers
204
+ # information, in the format `projects/{project_id}/locations/{location}`. In
205
+ # Cloud BackupDR, locations map to GCP regions, for example **us-central1**.
206
+ # To retrieve management servers for all locations, use "-" for the
207
+ # `{location}` value.
208
+ # @!attribute [rw] page_size
209
+ # @return [::Integer]
210
+ # Optional. Requested page size. Server may return fewer items than
211
+ # requested. If unspecified, server will pick an appropriate default.
212
+ # @!attribute [rw] page_token
213
+ # @return [::String]
214
+ # Optional. A token identifying a page of results the server should return.
215
+ # @!attribute [rw] filter
216
+ # @return [::String]
217
+ # Optional. Filtering results.
218
+ # @!attribute [rw] order_by
219
+ # @return [::String]
220
+ # Optional. Hint for how to order the results.
221
+ class ListManagementServersRequest
222
+ include ::Google::Protobuf::MessageExts
223
+ extend ::Google::Protobuf::MessageExts::ClassMethods
224
+ end
225
+
226
+ # Response message for listing management servers.
227
+ # @!attribute [rw] management_servers
228
+ # @return [::Array<::Google::Cloud::BackupDR::V1::ManagementServer>]
229
+ # The list of ManagementServer instances in the project for the specified
230
+ # location.
231
+ #
232
+ # If the `{location}` value in the request is "-", the response contains a
233
+ # list of instances from all locations. In case any location is unreachable,
234
+ # the response will only return management servers in reachable locations and
235
+ # the 'unreachable' field will be populated with a list of unreachable
236
+ # locations.
237
+ # @!attribute [rw] next_page_token
238
+ # @return [::String]
239
+ # A token identifying a page of results the server should return.
240
+ # @!attribute [rw] unreachable
241
+ # @return [::Array<::String>]
242
+ # Locations that could not be reached.
243
+ class ListManagementServersResponse
244
+ include ::Google::Protobuf::MessageExts
245
+ extend ::Google::Protobuf::MessageExts::ClassMethods
246
+ end
247
+
248
+ # Request message for getting a management server instance.
249
+ # @!attribute [rw] name
250
+ # @return [::String]
251
+ # Required. Name of the management server resource name, in the format
252
+ # `projects/{project_id}/locations/{location}/managementServers/{resource_name}`
253
+ class GetManagementServerRequest
254
+ include ::Google::Protobuf::MessageExts
255
+ extend ::Google::Protobuf::MessageExts::ClassMethods
256
+ end
257
+
258
+ # Request message for creating a management server instance.
259
+ # @!attribute [rw] parent
260
+ # @return [::String]
261
+ # Required. The management server project and location in the format
262
+ # `projects/{project_id}/locations/{location}`. In Cloud Backup and DR
263
+ # locations map to GCP regions, for example **us-central1**.
264
+ # @!attribute [rw] management_server_id
265
+ # @return [::String]
266
+ # Required. The name of the management server to create. The name must be
267
+ # unique for the specified project and location.
268
+ # @!attribute [rw] management_server
269
+ # @return [::Google::Cloud::BackupDR::V1::ManagementServer]
270
+ # Required. A [management server
271
+ # resource][google.cloud.backupdr.v1.ManagementServer]
272
+ # @!attribute [rw] request_id
273
+ # @return [::String]
274
+ # Optional. An optional request ID to identify requests. Specify a unique
275
+ # request ID so that if you must retry your request, the server will know to
276
+ # ignore the request if it has already been completed. The server will
277
+ # guarantee that for at least 60 minutes since the first request.
278
+ #
279
+ # For example, consider a situation where you make an initial request and
280
+ # the request times out. If you make the request again with the same request
281
+ # ID, the server can check if original operation with the same request ID
282
+ # was received, and if so, will ignore the second request. This prevents
283
+ # clients from accidentally creating duplicate commitments.
284
+ #
285
+ # The request ID must be a valid UUID with the exception that zero UUID is
286
+ # not supported (00000000-0000-0000-0000-000000000000).
287
+ class CreateManagementServerRequest
288
+ include ::Google::Protobuf::MessageExts
289
+ extend ::Google::Protobuf::MessageExts::ClassMethods
290
+ end
291
+
292
+ # Request message for deleting a management server instance.
293
+ # @!attribute [rw] name
294
+ # @return [::String]
295
+ # Required. Name of the resource
296
+ # @!attribute [rw] request_id
297
+ # @return [::String]
298
+ # Optional. An optional request ID to identify requests. Specify a unique
299
+ # request ID so that if you must retry your request, the server will know to
300
+ # ignore the request if it has already been completed. The server will
301
+ # guarantee that for at least 60 minutes after the first request.
302
+ #
303
+ # For example, consider a situation where you make an initial request and
304
+ # the request times out. If you make the request again with the same request
305
+ # ID, the server can check if original operation with the same request ID
306
+ # was received, and if so, will ignore the second request. This prevents
307
+ # clients from accidentally creating duplicate commitments.
308
+ #
309
+ # The request ID must be a valid UUID with the exception that zero UUID is
310
+ # not supported (00000000-0000-0000-0000-000000000000).
311
+ class DeleteManagementServerRequest
312
+ include ::Google::Protobuf::MessageExts
313
+ extend ::Google::Protobuf::MessageExts::ClassMethods
314
+ end
315
+
316
+ # Represents the metadata of the long-running operation.
317
+ # @!attribute [r] create_time
318
+ # @return [::Google::Protobuf::Timestamp]
319
+ # Output only. The time the operation was created.
320
+ # @!attribute [r] end_time
321
+ # @return [::Google::Protobuf::Timestamp]
322
+ # Output only. The time the operation finished running.
323
+ # @!attribute [r] target
324
+ # @return [::String]
325
+ # Output only. Server-defined resource path for the target of the operation.
326
+ # @!attribute [r] verb
327
+ # @return [::String]
328
+ # Output only. Name of the verb executed by the operation.
329
+ # @!attribute [r] status_message
330
+ # @return [::String]
331
+ # Output only. Human-readable status of the operation, if any.
332
+ # @!attribute [r] requested_cancellation
333
+ # @return [::Boolean]
334
+ # Output only. Identifies whether the user has requested cancellation
335
+ # of the operation. Operations that have successfully been cancelled
336
+ # have [Operation.error][] value with a
337
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
338
+ # `Code.CANCELLED`.
339
+ # @!attribute [r] api_version
340
+ # @return [::String]
341
+ # Output only. API version used to start the operation.
342
+ # @!attribute [r] additional_info
343
+ # @return [::Google::Protobuf::Map{::String => ::String}]
344
+ # Output only. AdditionalInfo contains additional Info related to backup plan
345
+ # association resource.
346
+ class OperationMetadata
347
+ include ::Google::Protobuf::MessageExts
348
+ extend ::Google::Protobuf::MessageExts::ClassMethods
349
+
350
+ # @!attribute [rw] key
351
+ # @return [::String]
352
+ # @!attribute [rw] value
353
+ # @return [::String]
354
+ class AdditionalInfoEntry
355
+ include ::Google::Protobuf::MessageExts
356
+ extend ::Google::Protobuf::MessageExts::ClassMethods
357
+ end
358
+ end
359
+ end
360
+ end
361
+ end
362
+ end
@@ -0,0 +1,164 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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,145 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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. As of May 2023, there are no widely used type server
133
+ # implementations and no plans to implement one.
134
+ #
135
+ # Schemes other than `http`, `https` (or the empty scheme) might be
136
+ # used with implementation specific semantics.
137
+ # @!attribute [rw] value
138
+ # @return [::String]
139
+ # Must be a valid serialized protocol buffer of the above specified type.
140
+ class Any
141
+ include ::Google::Protobuf::MessageExts
142
+ extend ::Google::Protobuf::MessageExts::ClassMethods
143
+ end
144
+ end
145
+ end