google-cloud-lustre-v1 0.a → 0.1.1

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/lustre/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/lustre/v1/instance_pb.rb +58 -0
  7. data/lib/google/cloud/lustre/v1/lustre/client.rb +1193 -0
  8. data/lib/google/cloud/lustre/v1/lustre/credentials.rb +47 -0
  9. data/lib/google/cloud/lustre/v1/lustre/operations.rb +813 -0
  10. data/lib/google/cloud/lustre/v1/lustre/paths.rb +103 -0
  11. data/lib/google/cloud/lustre/v1/lustre/rest/client.rb +1126 -0
  12. data/lib/google/cloud/lustre/v1/lustre/rest/operations.rb +913 -0
  13. data/lib/google/cloud/lustre/v1/lustre/rest/service_stub.rb +512 -0
  14. data/lib/google/cloud/lustre/v1/lustre/rest.rb +54 -0
  15. data/lib/google/cloud/lustre/v1/lustre.rb +56 -0
  16. data/lib/google/cloud/lustre/v1/lustre_pb.rb +49 -0
  17. data/lib/google/cloud/lustre/v1/lustre_services_pb.rb +57 -0
  18. data/lib/google/cloud/lustre/v1/rest.rb +38 -0
  19. data/lib/google/cloud/lustre/v1/transfer_pb.rb +61 -0
  20. data/lib/google/cloud/lustre/v1/version.rb +7 -2
  21. data/lib/google/cloud/lustre/v1.rb +45 -0
  22. data/lib/google-cloud-lustre-v1.rb +21 -0
  23. data/proto_docs/README.md +4 -0
  24. data/proto_docs/google/api/client.rb +473 -0
  25. data/proto_docs/google/api/field_behavior.rb +85 -0
  26. data/proto_docs/google/api/field_info.rb +88 -0
  27. data/proto_docs/google/api/launch_stage.rb +71 -0
  28. data/proto_docs/google/api/resource.rb +227 -0
  29. data/proto_docs/google/cloud/lustre/v1/instance.rb +287 -0
  30. data/proto_docs/google/cloud/lustre/v1/transfer.rb +296 -0
  31. data/proto_docs/google/longrunning/operations.rb +173 -0
  32. data/proto_docs/google/protobuf/any.rb +145 -0
  33. data/proto_docs/google/protobuf/duration.rb +98 -0
  34. data/proto_docs/google/protobuf/empty.rb +34 -0
  35. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  36. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  37. data/proto_docs/google/rpc/code.rb +185 -0
  38. data/proto_docs/google/rpc/status.rb +48 -0
  39. metadata +86 -10
@@ -0,0 +1,296 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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 Lustre
23
+ module V1
24
+ # Message for importing data to Lustre.
25
+ # @!attribute [rw] gcs_path
26
+ # @return [::Google::Cloud::Lustre::V1::GcsPath]
27
+ # The Cloud Storage source bucket and, optionally, path inside the bucket.
28
+ # If a path inside the bucket is specified, it must end with a forward
29
+ # slash (`/`).
30
+ # @!attribute [rw] lustre_path
31
+ # @return [::Google::Cloud::Lustre::V1::LustrePath]
32
+ # Lustre path destination.
33
+ # @!attribute [rw] name
34
+ # @return [::String]
35
+ # Required. The name of the Managed Lustre instance in the format
36
+ # `projects/{project}/locations/{location}/instances/{instance}`.
37
+ # @!attribute [rw] request_id
38
+ # @return [::String]
39
+ # Optional. UUID to identify requests.
40
+ # @!attribute [rw] service_account
41
+ # @return [::String]
42
+ # Optional. User-specified service account used to perform the transfer.
43
+ # If unspecified, the default Managed Lustre service agent will be used.
44
+ class ImportDataRequest
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Export data from Managed Lustre to a Cloud Storage bucket.
50
+ # @!attribute [rw] lustre_path
51
+ # @return [::Google::Cloud::Lustre::V1::LustrePath]
52
+ # The root directory path to the Managed Lustre file system. Must start
53
+ # with `/`. Default is `/`.
54
+ # @!attribute [rw] gcs_path
55
+ # @return [::Google::Cloud::Lustre::V1::GcsPath]
56
+ # The URI to a Cloud Storage bucket, or a path within a bucket, using
57
+ # the format `gs://<bucket_name>/<optional_path_inside_bucket>/`. If a
58
+ # path inside the bucket is specified, it must end with a forward slash
59
+ # (`/`).
60
+ # @!attribute [rw] name
61
+ # @return [::String]
62
+ # Required. The name of the Managed Lustre instance in the format
63
+ # `projects/{project}/locations/{location}/instances/{instance}`.
64
+ # @!attribute [rw] request_id
65
+ # @return [::String]
66
+ # Optional. UUID to identify requests.
67
+ # @!attribute [rw] service_account
68
+ # @return [::String]
69
+ # Optional. User-specified service account used to perform the transfer.
70
+ # If unspecified, the Managed Lustre service agent is used.
71
+ class ExportDataRequest
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # Response message for ExportData.
77
+ class ExportDataResponse
78
+ include ::Google::Protobuf::MessageExts
79
+ extend ::Google::Protobuf::MessageExts::ClassMethods
80
+ end
81
+
82
+ # Response message for ImportData.
83
+ class ImportDataResponse
84
+ include ::Google::Protobuf::MessageExts
85
+ extend ::Google::Protobuf::MessageExts::ClassMethods
86
+ end
87
+
88
+ # Metadata of the export data operation.
89
+ # @!attribute [rw] operation_metadata
90
+ # @return [::Google::Cloud::Lustre::V1::TransferOperationMetadata]
91
+ # Data transfer operation metadata.
92
+ # @!attribute [r] create_time
93
+ # @return [::Google::Protobuf::Timestamp]
94
+ # Output only. The time the operation was created.
95
+ # @!attribute [r] end_time
96
+ # @return [::Google::Protobuf::Timestamp]
97
+ # Output only. The time the operation finished running.
98
+ # @!attribute [r] target
99
+ # @return [::String]
100
+ # Output only. Server-defined resource path for the target of the operation.
101
+ # @!attribute [r] verb
102
+ # @return [::String]
103
+ # Output only. Name of the verb executed by the operation.
104
+ # @!attribute [r] status_message
105
+ # @return [::String]
106
+ # Output only. Human-readable status of the operation, if any.
107
+ # @!attribute [r] requested_cancellation
108
+ # @return [::Boolean]
109
+ # Output only. Identifies whether the user has requested cancellation
110
+ # of the operation. Operations that have successfully been cancelled
111
+ # have
112
+ # {::Google::Longrunning::Operation#error google.longrunning.Operation.error}
113
+ # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
114
+ # corresponding to `Code.CANCELLED`.
115
+ # @!attribute [r] api_version
116
+ # @return [::String]
117
+ # Output only. API version used to start the operation.
118
+ class ExportDataMetadata
119
+ include ::Google::Protobuf::MessageExts
120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
121
+ end
122
+
123
+ # Metadata of the import data operation.
124
+ # @!attribute [rw] operation_metadata
125
+ # @return [::Google::Cloud::Lustre::V1::TransferOperationMetadata]
126
+ # Data transfer operation metadata.
127
+ # @!attribute [r] create_time
128
+ # @return [::Google::Protobuf::Timestamp]
129
+ # Output only. The time the operation was created.
130
+ # @!attribute [r] end_time
131
+ # @return [::Google::Protobuf::Timestamp]
132
+ # Output only. The time the operation finished running.
133
+ # @!attribute [r] target
134
+ # @return [::String]
135
+ # Output only. Server-defined resource path for the target of the operation.
136
+ # @!attribute [r] status_message
137
+ # @return [::String]
138
+ # Output only. Name of the verb executed by the operation.
139
+ # @!attribute [r] requested_cancellation
140
+ # @return [::Boolean]
141
+ # Output only. Identifies whether the user has requested cancellation
142
+ # of the operation. Operations that have successfully been cancelled
143
+ # have
144
+ # {::Google::Longrunning::Operation#error google.longrunning.Operation.error}
145
+ # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
146
+ # corresponding to `Code.CANCELLED`.
147
+ # @!attribute [r] api_version
148
+ # @return [::String]
149
+ # Output only. API version used to start the operation.
150
+ class ImportDataMetadata
151
+ include ::Google::Protobuf::MessageExts
152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
153
+ end
154
+
155
+ # Specifies a Cloud Storage bucket and, optionally, a path inside the bucket.
156
+ # @!attribute [rw] uri
157
+ # @return [::String]
158
+ # Required. The URI to a Cloud Storage bucket, or a path within a bucket,
159
+ # using the format `gs://<bucket_name>/<optional_path_inside_bucket>/`. If a
160
+ # path inside the bucket is specified, it must end with a forward slash
161
+ # (`/`).
162
+ class GcsPath
163
+ include ::Google::Protobuf::MessageExts
164
+ extend ::Google::Protobuf::MessageExts::ClassMethods
165
+ end
166
+
167
+ # The root directory path to the Lustre file system.
168
+ # @!attribute [rw] path
169
+ # @return [::String]
170
+ # Optional. The root directory path to the Managed Lustre file system. Must
171
+ # start with
172
+ # `/`. Default is `/`. If you're importing data into Managed Lustre, any
173
+ # path other than the default must already exist on the file system.
174
+ class LustrePath
175
+ include ::Google::Protobuf::MessageExts
176
+ extend ::Google::Protobuf::MessageExts::ClassMethods
177
+ end
178
+
179
+ # A collection of counters that report the progress of a transfer operation.
180
+ # @!attribute [rw] found_objects_count
181
+ # @return [::Integer]
182
+ # Objects found in the data source that are scheduled to be transferred,
183
+ # excluding any that are filtered based on object conditions or skipped due
184
+ # to sync.
185
+ # @!attribute [rw] bytes_found_count
186
+ # @return [::Integer]
187
+ # Total number of bytes found in the data source that are scheduled to be
188
+ # transferred, excluding any that are filtered based on object conditions or
189
+ # skipped due to sync.
190
+ # @!attribute [rw] objects_skipped_count
191
+ # @return [::Integer]
192
+ # Objects in the data source that are not transferred because they already
193
+ # exist in the data destination.
194
+ # @!attribute [rw] bytes_skipped_count
195
+ # @return [::Integer]
196
+ # Bytes in the data source that are not transferred because they already
197
+ # exist in the data destination.
198
+ # @!attribute [rw] objects_copied_count
199
+ # @return [::Integer]
200
+ # Objects that are copied to the data destination.
201
+ # @!attribute [rw] bytes_copied_count
202
+ # @return [::Integer]
203
+ # Bytes that are copied to the data destination.
204
+ # @!attribute [r] objects_failed_count
205
+ # @return [::Integer]
206
+ # Output only. Objects that are failed to write to the data destination.
207
+ # @!attribute [r] bytes_failed_count
208
+ # @return [::Integer]
209
+ # Output only. Bytes that are failed to write to the data destination.
210
+ class TransferCounters
211
+ include ::Google::Protobuf::MessageExts
212
+ extend ::Google::Protobuf::MessageExts::ClassMethods
213
+ end
214
+
215
+ # An entry describing an error that has occurred.
216
+ # @!attribute [rw] uri
217
+ # @return [::String]
218
+ # Required. A URL that refers to the target (a data source, a data sink,
219
+ # or an object) with which the error is associated.
220
+ # @!attribute [rw] error_details
221
+ # @return [::Array<::String>]
222
+ # A list of messages that carry the error details.
223
+ class ErrorLogEntry
224
+ include ::Google::Protobuf::MessageExts
225
+ extend ::Google::Protobuf::MessageExts::ClassMethods
226
+ end
227
+
228
+ # A summary of errors by error code, plus a count and sample error log
229
+ # entries.
230
+ # @!attribute [rw] error_code
231
+ # @return [::Google::Rpc::Code]
232
+ # Required.
233
+ # @!attribute [rw] error_count
234
+ # @return [::Integer]
235
+ # Required. Count of this type of error.
236
+ # @!attribute [rw] error_log_entries
237
+ # @return [::Array<::Google::Cloud::Lustre::V1::ErrorLogEntry>]
238
+ # Error samples.
239
+ #
240
+ # At most 5 error log entries are recorded for a given
241
+ # error code for a single transfer operation.
242
+ class ErrorSummary
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
+ end
246
+
247
+ # Represents the metadata of the long-running transfer operation.
248
+ # @!attribute [r] source_lustre_path
249
+ # @return [::Google::Cloud::Lustre::V1::LustrePath]
250
+ # Output only. Lustre source.
251
+ #
252
+ # Note: The following fields are mutually exclusive: `source_lustre_path`, `source_gcs_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.
253
+ # @!attribute [r] source_gcs_path
254
+ # @return [::Google::Cloud::Lustre::V1::GcsPath]
255
+ # Output only. Cloud Storage source.
256
+ #
257
+ # Note: The following fields are mutually exclusive: `source_gcs_path`, `source_lustre_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.
258
+ # @!attribute [r] destination_gcs_path
259
+ # @return [::Google::Cloud::Lustre::V1::GcsPath]
260
+ # Output only. Cloud Storage destination.
261
+ #
262
+ # Note: The following fields are mutually exclusive: `destination_gcs_path`, `destination_lustre_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.
263
+ # @!attribute [r] destination_lustre_path
264
+ # @return [::Google::Cloud::Lustre::V1::LustrePath]
265
+ # Output only. Lustre destination.
266
+ #
267
+ # Note: The following fields are mutually exclusive: `destination_lustre_path`, `destination_gcs_path`. If a field in that set is populated, all other fields in the set will automatically be cleared.
268
+ # @!attribute [r] counters
269
+ # @return [::Google::Cloud::Lustre::V1::TransferCounters]
270
+ # Output only. The progress of the transfer operation.
271
+ # @!attribute [r] transfer_type
272
+ # @return [::Google::Cloud::Lustre::V1::TransferType]
273
+ # Output only. The type of transfer occurring.
274
+ # @!attribute [r] error_summaries
275
+ # @return [::Array<::Google::Cloud::Lustre::V1::ErrorSummary>]
276
+ # Output only. Error summary about the transfer operation
277
+ class TransferOperationMetadata
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+ end
281
+
282
+ # Type of transfer that occurred.
283
+ module TransferType
284
+ # Zero is an illegal value.
285
+ TRANSFER_TYPE_UNSPECIFIED = 0
286
+
287
+ # Imports to Lustre.
288
+ IMPORT = 1
289
+
290
+ # Exports from Lustre.
291
+ EXPORT = 2
292
+ end
293
+ end
294
+ end
295
+ end
296
+ end
@@ -0,0 +1,173 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+ #
44
+ # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
45
+ # @!attribute [rw] response
46
+ # @return [::Google::Protobuf::Any]
47
+ # The normal, successful response of the operation. If the original
48
+ # method returns no data on success, such as `Delete`, the response is
49
+ # `google.protobuf.Empty`. If the original method is standard
50
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
51
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
52
+ # is the original method name. For example, if the original method name
53
+ # is `TakeSnapshot()`, the inferred response type is
54
+ # `TakeSnapshotResponse`.
55
+ #
56
+ # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
57
+ class Operation
58
+ include ::Google::Protobuf::MessageExts
59
+ extend ::Google::Protobuf::MessageExts::ClassMethods
60
+ end
61
+
62
+ # The request message for
63
+ # Operations.GetOperation.
64
+ # @!attribute [rw] name
65
+ # @return [::String]
66
+ # The name of the operation resource.
67
+ class GetOperationRequest
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ # The request message for
73
+ # Operations.ListOperations.
74
+ # @!attribute [rw] name
75
+ # @return [::String]
76
+ # The name of the operation's parent resource.
77
+ # @!attribute [rw] filter
78
+ # @return [::String]
79
+ # The standard list filter.
80
+ # @!attribute [rw] page_size
81
+ # @return [::Integer]
82
+ # The standard list page size.
83
+ # @!attribute [rw] page_token
84
+ # @return [::String]
85
+ # The standard list page token.
86
+ class ListOperationsRequest
87
+ include ::Google::Protobuf::MessageExts
88
+ extend ::Google::Protobuf::MessageExts::ClassMethods
89
+ end
90
+
91
+ # The response message for
92
+ # Operations.ListOperations.
93
+ # @!attribute [rw] operations
94
+ # @return [::Array<::Google::Longrunning::Operation>]
95
+ # A list of operations that matches the specified filter in the request.
96
+ # @!attribute [rw] next_page_token
97
+ # @return [::String]
98
+ # The standard List next-page token.
99
+ class ListOperationsResponse
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+ end
103
+
104
+ # The request message for
105
+ # Operations.CancelOperation.
106
+ # @!attribute [rw] name
107
+ # @return [::String]
108
+ # The name of the operation resource to be cancelled.
109
+ class CancelOperationRequest
110
+ include ::Google::Protobuf::MessageExts
111
+ extend ::Google::Protobuf::MessageExts::ClassMethods
112
+ end
113
+
114
+ # The request message for
115
+ # Operations.DeleteOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to be deleted.
119
+ class DeleteOperationRequest
120
+ include ::Google::Protobuf::MessageExts
121
+ extend ::Google::Protobuf::MessageExts::ClassMethods
122
+ end
123
+
124
+ # The request message for
125
+ # Operations.WaitOperation.
126
+ # @!attribute [rw] name
127
+ # @return [::String]
128
+ # The name of the operation resource to wait on.
129
+ # @!attribute [rw] timeout
130
+ # @return [::Google::Protobuf::Duration]
131
+ # The maximum duration to wait before timing out. If left blank, the wait
132
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
133
+ # If RPC context deadline is also specified, the shorter one will be used.
134
+ class WaitOperationRequest
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+ end
138
+
139
+ # A message representing the message types used by a long-running operation.
140
+ #
141
+ # Example:
142
+ #
143
+ # rpc Export(ExportRequest) returns (google.longrunning.Operation) {
144
+ # option (google.longrunning.operation_info) = {
145
+ # response_type: "ExportResponse"
146
+ # metadata_type: "ExportMetadata"
147
+ # };
148
+ # }
149
+ # @!attribute [rw] response_type
150
+ # @return [::String]
151
+ # Required. The message name of the primary return type for this
152
+ # long-running operation.
153
+ # This type will be used to deserialize the LRO's response.
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
+ # @!attribute [rw] metadata_type
160
+ # @return [::String]
161
+ # Required. The message name of the metadata type for this long-running
162
+ # operation.
163
+ #
164
+ # If the response is in a different package from the rpc, a fully-qualified
165
+ # message name must be used (e.g. `google.protobuf.Struct`).
166
+ #
167
+ # Note: Altering this value constitutes a breaking change.
168
+ class OperationInfo
169
+ include ::Google::Protobuf::MessageExts
170
+ extend ::Google::Protobuf::MessageExts::ClassMethods
171
+ end
172
+ end
173
+ end
@@ -0,0 +1,145 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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