google-cloud-oracle_database-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) 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/oracle_database/v1/bindings_override.rb +102 -0
  6. data/lib/google/cloud/oracle_database/v1/oracle_database/credentials.rb +47 -0
  7. data/lib/google/cloud/oracle_database/v1/oracle_database/paths.rb +124 -0
  8. data/lib/google/cloud/oracle_database/v1/oracle_database/rest/client.rb +2647 -0
  9. data/lib/google/cloud/oracle_database/v1/oracle_database/rest/operations.rb +907 -0
  10. data/lib/google/cloud/oracle_database/v1/oracle_database/rest/service_stub.rb +1428 -0
  11. data/lib/google/cloud/oracle_database/v1/oracle_database/rest.rb +54 -0
  12. data/lib/google/cloud/oracle_database/v1/oracle_database.rb +48 -0
  13. data/lib/google/cloud/oracle_database/v1/rest.rb +38 -0
  14. data/lib/google/cloud/oracle_database/v1/version.rb +7 -2
  15. data/lib/google/cloud/oracle_database/v1.rb +40 -0
  16. data/lib/google/cloud/oracledatabase/v1/autonomous_database_character_set_pb.rb +46 -0
  17. data/lib/google/cloud/oracledatabase/v1/autonomous_database_pb.rb +83 -0
  18. data/lib/google/cloud/oracledatabase/v1/autonomous_db_backup_pb.rb +50 -0
  19. data/lib/google/cloud/oracledatabase/v1/autonomous_db_version_pb.rb +46 -0
  20. data/lib/google/cloud/oracledatabase/v1/common_pb.rb +44 -0
  21. data/lib/google/cloud/oracledatabase/v1/db_node_pb.rb +47 -0
  22. data/lib/google/cloud/oracledatabase/v1/db_server_pb.rb +47 -0
  23. data/lib/google/cloud/oracledatabase/v1/db_system_shape_pb.rb +45 -0
  24. data/lib/google/cloud/oracledatabase/v1/entitlement_pb.rb +47 -0
  25. data/lib/google/cloud/oracledatabase/v1/exadata_infra_pb.rb +56 -0
  26. data/lib/google/cloud/oracledatabase/v1/gi_version_pb.rb +45 -0
  27. data/lib/google/cloud/oracledatabase/v1/location_metadata_pb.rb +44 -0
  28. data/lib/google/cloud/oracledatabase/v1/oracledatabase_pb.rb +108 -0
  29. data/lib/google/cloud/oracledatabase/v1/oracledatabase_services_pb.rb +89 -0
  30. data/lib/google/cloud/oracledatabase/v1/vm_cluster_pb.rb +54 -0
  31. data/lib/google-cloud-oracle_database-v1.rb +21 -0
  32. data/proto_docs/README.md +4 -0
  33. data/proto_docs/google/api/client.rb +459 -0
  34. data/proto_docs/google/api/field_behavior.rb +85 -0
  35. data/proto_docs/google/api/field_info.rb +88 -0
  36. data/proto_docs/google/api/launch_stage.rb +71 -0
  37. data/proto_docs/google/api/resource.rb +227 -0
  38. data/proto_docs/google/cloud/oracledatabase/v1/autonomous_database.rb +844 -0
  39. data/proto_docs/google/cloud/oracledatabase/v1/autonomous_database_character_set.rb +57 -0
  40. data/proto_docs/google/cloud/oracledatabase/v1/autonomous_db_backup.rb +175 -0
  41. data/proto_docs/google/cloud/oracledatabase/v1/autonomous_db_version.rb +48 -0
  42. data/proto_docs/google/cloud/oracledatabase/v1/common.rb +37 -0
  43. data/proto_docs/google/cloud/oracledatabase/v1/db_node.rb +103 -0
  44. data/proto_docs/google/cloud/oracledatabase/v1/db_server.rb +100 -0
  45. data/proto_docs/google/cloud/oracledatabase/v1/db_system_shape.rb +70 -0
  46. data/proto_docs/google/cloud/oracledatabase/v1/entitlement.rb +78 -0
  47. data/proto_docs/google/cloud/oracledatabase/v1/exadata_infra.rb +266 -0
  48. data/proto_docs/google/cloud/oracledatabase/v1/gi_version.rb +41 -0
  49. data/proto_docs/google/cloud/oracledatabase/v1/location_metadata.rb +35 -0
  50. data/proto_docs/google/cloud/oracledatabase/v1/oracledatabase.rb +649 -0
  51. data/proto_docs/google/cloud/oracledatabase/v1/vm_cluster.rb +251 -0
  52. data/proto_docs/google/longrunning/operations.rb +169 -0
  53. data/proto_docs/google/protobuf/any.rb +145 -0
  54. data/proto_docs/google/protobuf/duration.rb +98 -0
  55. data/proto_docs/google/protobuf/empty.rb +34 -0
  56. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  57. data/proto_docs/google/rpc/status.rb +48 -0
  58. data/proto_docs/google/type/datetime.rb +99 -0
  59. data/proto_docs/google/type/dayofweek.rb +49 -0
  60. data/proto_docs/google/type/month.rb +64 -0
  61. data/proto_docs/google/type/timeofday.rb +45 -0
  62. metadata +124 -11
@@ -0,0 +1,251 @@
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 OracleDatabase
23
+ module V1
24
+ # Details of the Cloud VM Cluster resource.
25
+ # https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudVmCluster/
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Identifier. The name of the VM Cluster resource with the format:
29
+ # projects/\\{project}/locations/\\{region}/cloudVmClusters/\\{cloud_vm_cluster}
30
+ # @!attribute [rw] exadata_infrastructure
31
+ # @return [::String]
32
+ # Required. The name of the Exadata Infrastructure resource on which VM
33
+ # cluster resource is created, in the following format:
34
+ # projects/\\{project}/locations/\\{region}/cloudExadataInfrastuctures/\\{cloud_extradata_infrastructure}
35
+ # @!attribute [rw] display_name
36
+ # @return [::String]
37
+ # Optional. User friendly name for this resource.
38
+ # @!attribute [r] gcp_oracle_zone
39
+ # @return [::String]
40
+ # Output only. Google Cloud Platform location where Oracle Exadata is hosted.
41
+ # It is same as Google Cloud Platform Oracle zone of Exadata infrastructure.
42
+ # @!attribute [rw] properties
43
+ # @return [::Google::Cloud::OracleDatabase::V1::CloudVmClusterProperties]
44
+ # Optional. Various properties of the VM Cluster.
45
+ # @!attribute [rw] labels
46
+ # @return [::Google::Protobuf::Map{::String => ::String}]
47
+ # Optional. Labels or tags associated with the VM Cluster.
48
+ # @!attribute [r] create_time
49
+ # @return [::Google::Protobuf::Timestamp]
50
+ # Output only. The date and time that the VM cluster was created.
51
+ # @!attribute [rw] cidr
52
+ # @return [::String]
53
+ # Required. Network settings. CIDR to use for cluster IP allocation.
54
+ # @!attribute [rw] backup_subnet_cidr
55
+ # @return [::String]
56
+ # Required. CIDR range of the backup subnet.
57
+ # @!attribute [rw] network
58
+ # @return [::String]
59
+ # Required. The name of the VPC network.
60
+ # Format: projects/\\{project}/global/networks/\\{network}
61
+ class CloudVmCluster
62
+ include ::Google::Protobuf::MessageExts
63
+ extend ::Google::Protobuf::MessageExts::ClassMethods
64
+
65
+ # @!attribute [rw] key
66
+ # @return [::String]
67
+ # @!attribute [rw] value
68
+ # @return [::String]
69
+ class LabelsEntry
70
+ include ::Google::Protobuf::MessageExts
71
+ extend ::Google::Protobuf::MessageExts::ClassMethods
72
+ end
73
+ end
74
+
75
+ # Various properties and settings associated with Exadata VM cluster.
76
+ # @!attribute [r] ocid
77
+ # @return [::String]
78
+ # Output only. Oracle Cloud Infrastructure ID of VM Cluster.
79
+ # @!attribute [rw] license_type
80
+ # @return [::Google::Cloud::OracleDatabase::V1::CloudVmClusterProperties::LicenseType]
81
+ # Required. License type of VM Cluster.
82
+ # @!attribute [rw] gi_version
83
+ # @return [::String]
84
+ # Optional. Grid Infrastructure Version.
85
+ # @!attribute [rw] time_zone
86
+ # @return [::Google::Type::TimeZone]
87
+ # Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified.
88
+ # @!attribute [rw] ssh_public_keys
89
+ # @return [::Array<::String>]
90
+ # Optional. SSH public keys to be stored with cluster.
91
+ # @!attribute [rw] node_count
92
+ # @return [::Integer]
93
+ # Optional. Number of database servers.
94
+ # @!attribute [r] shape
95
+ # @return [::String]
96
+ # Output only. Shape of VM Cluster.
97
+ # @!attribute [rw] ocpu_count
98
+ # @return [::Float]
99
+ # Optional. OCPU count per VM. Minimum is 0.1.
100
+ # @!attribute [rw] memory_size_gb
101
+ # @return [::Integer]
102
+ # Optional. Memory allocated in GBs.
103
+ # @!attribute [rw] db_node_storage_size_gb
104
+ # @return [::Integer]
105
+ # Optional. Local storage per VM.
106
+ # @!attribute [r] storage_size_gb
107
+ # @return [::Integer]
108
+ # Output only. The storage allocation for the disk group, in gigabytes (GB).
109
+ # @!attribute [rw] data_storage_size_tb
110
+ # @return [::Float]
111
+ # Optional. The data disk group size to be allocated in TBs.
112
+ # @!attribute [rw] disk_redundancy
113
+ # @return [::Google::Cloud::OracleDatabase::V1::CloudVmClusterProperties::DiskRedundancy]
114
+ # Optional. The type of redundancy.
115
+ # @!attribute [rw] sparse_diskgroup_enabled
116
+ # @return [::Boolean]
117
+ # Optional. Use exadata sparse snapshots.
118
+ # @!attribute [rw] local_backup_enabled
119
+ # @return [::Boolean]
120
+ # Optional. Use local backup.
121
+ # @!attribute [rw] hostname_prefix
122
+ # @return [::String]
123
+ # Optional. Prefix for VM cluster host names.
124
+ # @!attribute [rw] diagnostics_data_collection_options
125
+ # @return [::Google::Cloud::OracleDatabase::V1::DataCollectionOptions]
126
+ # Optional. Data collection options for diagnostics.
127
+ # @!attribute [r] state
128
+ # @return [::Google::Cloud::OracleDatabase::V1::CloudVmClusterProperties::State]
129
+ # Output only. State of the cluster.
130
+ # @!attribute [r] scan_listener_port_tcp
131
+ # @return [::Integer]
132
+ # Output only. SCAN listener port - TCP
133
+ # @!attribute [r] scan_listener_port_tcp_ssl
134
+ # @return [::Integer]
135
+ # Output only. SCAN listener port - TLS
136
+ # @!attribute [r] domain
137
+ # @return [::String]
138
+ # Output only. Parent DNS domain where SCAN DNS and hosts names are
139
+ # qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com
140
+ # @!attribute [r] scan_dns
141
+ # @return [::String]
142
+ # Output only. SCAN DNS name.
143
+ # ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com
144
+ # @!attribute [r] hostname
145
+ # @return [::String]
146
+ # Output only. host name without domain.
147
+ # format: "<hostname_prefix>-" with some suffix.
148
+ # ex: sp2-yi0xq where "sp2" is the hostname_prefix.
149
+ # @!attribute [rw] cpu_core_count
150
+ # @return [::Integer]
151
+ # Required. Number of enabled CPU cores.
152
+ # @!attribute [r] system_version
153
+ # @return [::String]
154
+ # Output only. Operating system version of the image.
155
+ # @!attribute [r] scan_ip_ids
156
+ # @return [::Array<::String>]
157
+ # Output only. OCIDs of scan IPs.
158
+ # @!attribute [r] scan_dns_record_id
159
+ # @return [::String]
160
+ # Output only. OCID of scan DNS record.
161
+ # @!attribute [r] oci_url
162
+ # @return [::String]
163
+ # Output only. Deep link to the OCI console to view this resource.
164
+ # @!attribute [rw] db_server_ocids
165
+ # @return [::Array<::String>]
166
+ # Optional. OCID of database servers.
167
+ # @!attribute [r] compartment_id
168
+ # @return [::String]
169
+ # Output only. Compartment ID of cluster.
170
+ # @!attribute [r] dns_listener_ip
171
+ # @return [::String]
172
+ # Output only. DNS listener IP.
173
+ # @!attribute [rw] cluster_name
174
+ # @return [::String]
175
+ # Optional. OCI Cluster name.
176
+ class CloudVmClusterProperties
177
+ include ::Google::Protobuf::MessageExts
178
+ extend ::Google::Protobuf::MessageExts::ClassMethods
179
+
180
+ # Different licenses supported.
181
+ module LicenseType
182
+ # Unspecified
183
+ LICENSE_TYPE_UNSPECIFIED = 0
184
+
185
+ # License included part of offer
186
+ LICENSE_INCLUDED = 1
187
+
188
+ # Bring your own license
189
+ BRING_YOUR_OWN_LICENSE = 2
190
+ end
191
+
192
+ # Types of disk redundancy provided by Oracle.
193
+ module DiskRedundancy
194
+ # Unspecified.
195
+ DISK_REDUNDANCY_UNSPECIFIED = 0
196
+
197
+ # High - 3 way mirror.
198
+ HIGH = 1
199
+
200
+ # Normal - 2 way mirror.
201
+ NORMAL = 2
202
+ end
203
+
204
+ # The various lifecycle states of the VM cluster.
205
+ module State
206
+ # Default unspecified value.
207
+ STATE_UNSPECIFIED = 0
208
+
209
+ # Indicates that the resource is in provisioning state.
210
+ PROVISIONING = 1
211
+
212
+ # Indicates that the resource is in available state.
213
+ AVAILABLE = 2
214
+
215
+ # Indicates that the resource is in updating state.
216
+ UPDATING = 3
217
+
218
+ # Indicates that the resource is in terminating state.
219
+ TERMINATING = 4
220
+
221
+ # Indicates that the resource is in terminated state.
222
+ TERMINATED = 5
223
+
224
+ # Indicates that the resource is in failed state.
225
+ FAILED = 6
226
+
227
+ # Indicates that the resource is in maintenance in progress state.
228
+ MAINTENANCE_IN_PROGRESS = 7
229
+ end
230
+ end
231
+
232
+ # Data collection options for diagnostics.
233
+ # @!attribute [rw] diagnostics_events_enabled
234
+ # @return [::Boolean]
235
+ # Optional. Indicates whether diagnostic collection is enabled for the VM
236
+ # cluster
237
+ # @!attribute [rw] health_monitoring_enabled
238
+ # @return [::Boolean]
239
+ # Optional. Indicates whether health monitoring is enabled for the VM cluster
240
+ # @!attribute [rw] incident_logs_enabled
241
+ # @return [::Boolean]
242
+ # Optional. Indicates whether incident logs and trace collection are enabled
243
+ # for the VM cluster
244
+ class DataCollectionOptions
245
+ include ::Google::Protobuf::MessageExts
246
+ extend ::Google::Protobuf::MessageExts::ClassMethods
247
+ end
248
+ end
249
+ end
250
+ end
251
+ end
@@ -0,0 +1,169 @@
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, successful response of the operation. 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
59
+ # Operations.GetOperation.
60
+ # @!attribute [rw] name
61
+ # @return [::String]
62
+ # The name of the operation resource.
63
+ class GetOperationRequest
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+ end
67
+
68
+ # The request message for
69
+ # Operations.ListOperations.
70
+ # @!attribute [rw] name
71
+ # @return [::String]
72
+ # The name of the operation's parent resource.
73
+ # @!attribute [rw] filter
74
+ # @return [::String]
75
+ # The standard list filter.
76
+ # @!attribute [rw] page_size
77
+ # @return [::Integer]
78
+ # The standard list page size.
79
+ # @!attribute [rw] page_token
80
+ # @return [::String]
81
+ # The standard list page token.
82
+ class ListOperationsRequest
83
+ include ::Google::Protobuf::MessageExts
84
+ extend ::Google::Protobuf::MessageExts::ClassMethods
85
+ end
86
+
87
+ # The response message for
88
+ # Operations.ListOperations.
89
+ # @!attribute [rw] operations
90
+ # @return [::Array<::Google::Longrunning::Operation>]
91
+ # A list of operations that matches the specified filter in the request.
92
+ # @!attribute [rw] next_page_token
93
+ # @return [::String]
94
+ # The standard List next-page token.
95
+ class ListOperationsResponse
96
+ include ::Google::Protobuf::MessageExts
97
+ extend ::Google::Protobuf::MessageExts::ClassMethods
98
+ end
99
+
100
+ # The request message for
101
+ # Operations.CancelOperation.
102
+ # @!attribute [rw] name
103
+ # @return [::String]
104
+ # The name of the operation resource to be cancelled.
105
+ class CancelOperationRequest
106
+ include ::Google::Protobuf::MessageExts
107
+ extend ::Google::Protobuf::MessageExts::ClassMethods
108
+ end
109
+
110
+ # The request message for
111
+ # Operations.DeleteOperation.
112
+ # @!attribute [rw] name
113
+ # @return [::String]
114
+ # The name of the operation resource to be deleted.
115
+ class DeleteOperationRequest
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
+ end
119
+
120
+ # The request message for
121
+ # Operations.WaitOperation.
122
+ # @!attribute [rw] name
123
+ # @return [::String]
124
+ # The name of the operation resource to wait on.
125
+ # @!attribute [rw] timeout
126
+ # @return [::Google::Protobuf::Duration]
127
+ # The maximum duration to wait before timing out. If left blank, the wait
128
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
129
+ # If RPC context deadline is also specified, the shorter one will be used.
130
+ class WaitOperationRequest
131
+ include ::Google::Protobuf::MessageExts
132
+ extend ::Google::Protobuf::MessageExts::ClassMethods
133
+ end
134
+
135
+ # A message representing the message types used by a long-running operation.
136
+ #
137
+ # Example:
138
+ #
139
+ # rpc Export(ExportRequest) returns (google.longrunning.Operation) {
140
+ # option (google.longrunning.operation_info) = {
141
+ # response_type: "ExportResponse"
142
+ # metadata_type: "ExportMetadata"
143
+ # };
144
+ # }
145
+ # @!attribute [rw] response_type
146
+ # @return [::String]
147
+ # Required. The message name of the primary return type for this
148
+ # long-running operation.
149
+ # This type will be used to deserialize the LRO's response.
150
+ #
151
+ # If the response is in a different package from the rpc, a fully-qualified
152
+ # message name must be used (e.g. `google.protobuf.Struct`).
153
+ #
154
+ # Note: Altering this value constitutes a breaking change.
155
+ # @!attribute [rw] metadata_type
156
+ # @return [::String]
157
+ # Required. The message name of the metadata type for this long-running
158
+ # operation.
159
+ #
160
+ # If the response is in a different package from the rpc, a fully-qualified
161
+ # message name must be used (e.g. `google.protobuf.Struct`).
162
+ #
163
+ # Note: Altering this value constitutes a breaking change.
164
+ class OperationInfo
165
+ include ::Google::Protobuf::MessageExts
166
+ extend ::Google::Protobuf::MessageExts::ClassMethods
167
+ end
168
+ end
169
+ 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
@@ -0,0 +1,98 @@
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
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,34 @@
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
+ # A generic empty message that you can re-use to avoid defining duplicated
23
+ # empty messages in your APIs. A typical example is to use it as the request
24
+ # or the response type of an API method. For instance:
25
+ #
26
+ # service Foo {
27
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
+ # }
29
+ class Empty
30
+ include ::Google::Protobuf::MessageExts
31
+ extend ::Google::Protobuf::MessageExts::ClassMethods
32
+ end
33
+ end
34
+ end