google-cloud-oracle_database-v1 0.10.0 → 0.11.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/oracle_database/v1/oracle_database/client.rb +3752 -56
  3. data/lib/google/cloud/oracle_database/v1/oracle_database/paths.rb +175 -0
  4. data/lib/google/cloud/oracle_database/v1/oracle_database/rest/client.rb +3532 -67
  5. data/lib/google/cloud/oracle_database/v1/oracle_database/rest/service_stub.rb +2234 -204
  6. data/lib/google/cloud/oracle_database/v1/version.rb +1 -1
  7. data/lib/google/cloud/oracledatabase/v1/autonomous_database_pb.rb +5 -1
  8. data/lib/google/cloud/oracledatabase/v1/common_pb.rb +5 -1
  9. data/lib/google/cloud/oracledatabase/v1/database_character_set_pb.rb +48 -0
  10. data/lib/google/cloud/oracledatabase/v1/database_pb.rb +61 -0
  11. data/lib/google/cloud/oracledatabase/v1/db_node_pb.rb +3 -1
  12. data/lib/google/cloud/oracledatabase/v1/db_system_initial_storage_size_pb.rb +51 -0
  13. data/lib/google/cloud/oracledatabase/v1/db_system_pb.rb +66 -0
  14. data/lib/google/cloud/oracledatabase/v1/db_version_pb.rb +48 -0
  15. data/lib/google/cloud/oracledatabase/v1/exadata_infra_pb.rb +1 -1
  16. data/lib/google/cloud/oracledatabase/v1/exadb_vm_cluster_pb.rb +56 -0
  17. data/lib/google/cloud/oracledatabase/v1/exascale_db_storage_vault_pb.rb +59 -0
  18. data/lib/google/cloud/oracledatabase/v1/minor_version_pb.rb +47 -0
  19. data/lib/google/cloud/oracledatabase/v1/odb_network_pb.rb +54 -0
  20. data/lib/google/cloud/oracledatabase/v1/odb_subnet_pb.rb +55 -0
  21. data/lib/google/cloud/oracledatabase/v1/oracledatabase_pb.rb +25 -1
  22. data/lib/google/cloud/oracledatabase/v1/oracledatabase_services_pb.rb +74 -0
  23. data/lib/google/cloud/oracledatabase/v1/pluggable_database_pb.rb +60 -0
  24. data/lib/google/cloud/oracledatabase/v1/vm_cluster_pb.rb +3 -1
  25. data/proto_docs/google/cloud/oracledatabase/v1/autonomous_database.rb +104 -1
  26. data/proto_docs/google/cloud/oracledatabase/v1/common.rb +64 -0
  27. data/proto_docs/google/cloud/oracledatabase/v1/database.rb +326 -0
  28. data/proto_docs/google/cloud/oracledatabase/v1/database_character_set.rb +99 -0
  29. data/proto_docs/google/cloud/oracledatabase/v1/db_node.rb +3 -0
  30. data/proto_docs/google/cloud/oracledatabase/v1/db_system.rb +381 -0
  31. data/proto_docs/google/cloud/oracledatabase/v1/db_system_initial_storage_size.rb +126 -0
  32. data/proto_docs/google/cloud/oracledatabase/v1/db_version.rb +102 -0
  33. data/proto_docs/google/cloud/oracledatabase/v1/exadata_infra.rb +12 -1
  34. data/proto_docs/google/cloud/oracledatabase/v1/exadb_vm_cluster.rb +229 -0
  35. data/proto_docs/google/cloud/oracledatabase/v1/exascale_db_storage_vault.rb +271 -0
  36. data/proto_docs/google/cloud/oracledatabase/v1/minor_version.rb +81 -0
  37. data/proto_docs/google/cloud/oracledatabase/v1/odb_network.rb +184 -0
  38. data/proto_docs/google/cloud/oracledatabase/v1/odb_subnet.rb +189 -0
  39. data/proto_docs/google/cloud/oracledatabase/v1/oracledatabase.rb +219 -0
  40. data/proto_docs/google/cloud/oracledatabase/v1/pluggable_database.rb +366 -0
  41. data/proto_docs/google/cloud/oracledatabase/v1/vm_cluster.rb +32 -7
  42. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  43. metadata +24 -1
@@ -0,0 +1,366 @@
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 OracleDatabase
23
+ module V1
24
+ # The PluggableDatabase resource.
25
+ # https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/PluggableDatabase/
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Identifier. The name of the PluggableDatabase resource in the following
29
+ # format:
30
+ # projects/\\{project}/locations/\\{region}/pluggableDatabases/\\{pluggable_database}
31
+ # @!attribute [rw] properties
32
+ # @return [::Google::Cloud::OracleDatabase::V1::PluggableDatabaseProperties]
33
+ # Optional. The properties of the PluggableDatabase.
34
+ # @!attribute [r] oci_url
35
+ # @return [::String]
36
+ # Output only. HTTPS link to OCI resources exposed to Customer via UI
37
+ # Interface.
38
+ # @!attribute [r] create_time
39
+ # @return [::Google::Protobuf::Timestamp]
40
+ # Output only. The date and time that the PluggableDatabase was created.
41
+ class PluggableDatabase
42
+ include ::Google::Protobuf::MessageExts
43
+ extend ::Google::Protobuf::MessageExts::ClassMethods
44
+ end
45
+
46
+ # The properties of a PluggableDatabase.
47
+ # @!attribute [rw] compartment_id
48
+ # @return [::String]
49
+ # Required. The OCID of the compartment.
50
+ # @!attribute [rw] connection_strings
51
+ # @return [::Google::Cloud::OracleDatabase::V1::PluggableDatabaseConnectionStrings]
52
+ # Optional. The Connection strings used to connect to the Oracle Database.
53
+ # @!attribute [rw] container_database_ocid
54
+ # @return [::String]
55
+ # Required. The OCID of the CDB.
56
+ # @!attribute [rw] defined_tags
57
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::OracleDatabase::V1::PluggableDatabaseProperties::DefinedTagValue}]
58
+ # Optional. Defined tags for this resource. Each key is predefined and scoped
59
+ # to a namespace.
60
+ # @!attribute [rw] freeform_tags
61
+ # @return [::Google::Protobuf::Map{::String => ::String}]
62
+ # Optional. Free-form tags for this resource. Each tag is a simple key-value
63
+ # pair with no predefined name, type, or namespace.
64
+ # @!attribute [r] ocid
65
+ # @return [::String]
66
+ # Output only. The OCID of the pluggable database.
67
+ # @!attribute [rw] is_restricted
68
+ # @return [::Boolean]
69
+ # Optional. The restricted mode of the pluggable database. If a pluggable
70
+ # database is opened in restricted mode, the user needs both create a session
71
+ # and have restricted session privileges to connect to it.
72
+ # @!attribute [r] lifecycle_details
73
+ # @return [::String]
74
+ # Output only. Additional information about the current lifecycle state.
75
+ # @!attribute [r] lifecycle_state
76
+ # @return [::Google::Cloud::OracleDatabase::V1::PluggableDatabaseProperties::PluggableDatabaseLifecycleState]
77
+ # Output only. The current state of the pluggable database.
78
+ # @!attribute [rw] pdb_name
79
+ # @return [::String]
80
+ # Required. The database name.
81
+ # @!attribute [rw] pdb_node_level_details
82
+ # @return [::Array<::Google::Cloud::OracleDatabase::V1::PluggableDatabaseNodeLevelDetails>]
83
+ # Optional. Pluggable Database Node Level Details
84
+ # @!attribute [r] database_management_config
85
+ # @return [::Google::Cloud::OracleDatabase::V1::DatabaseManagementConfig]
86
+ # Output only. The configuration of the Database Management service.
87
+ # @!attribute [r] operations_insights_state
88
+ # @return [::Google::Cloud::OracleDatabase::V1::PluggableDatabaseProperties::OperationsInsightsState]
89
+ # Output only. The status of Operations Insights for this Database.
90
+ class PluggableDatabaseProperties
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+
94
+ # Wrapper message for the value of a defined tag.
95
+ # @!attribute [rw] tags
96
+ # @return [::Google::Protobuf::Map{::String => ::String}]
97
+ # The tags within the namespace.
98
+ class DefinedTagValue
99
+ include ::Google::Protobuf::MessageExts
100
+ extend ::Google::Protobuf::MessageExts::ClassMethods
101
+
102
+ # @!attribute [rw] key
103
+ # @return [::String]
104
+ # @!attribute [rw] value
105
+ # @return [::String]
106
+ class TagsEntry
107
+ include ::Google::Protobuf::MessageExts
108
+ extend ::Google::Protobuf::MessageExts::ClassMethods
109
+ end
110
+ end
111
+
112
+ # @!attribute [rw] key
113
+ # @return [::String]
114
+ # @!attribute [rw] value
115
+ # @return [::Google::Cloud::OracleDatabase::V1::PluggableDatabaseProperties::DefinedTagValue]
116
+ class DefinedTagsEntry
117
+ include ::Google::Protobuf::MessageExts
118
+ extend ::Google::Protobuf::MessageExts::ClassMethods
119
+ end
120
+
121
+ # @!attribute [rw] key
122
+ # @return [::String]
123
+ # @!attribute [rw] value
124
+ # @return [::String]
125
+ class FreeformTagsEntry
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+ end
129
+
130
+ # The various lifecycle states of the PluggableDatabase.
131
+ module PluggableDatabaseLifecycleState
132
+ # The lifecycle state is unspecified.
133
+ PLUGGABLE_DATABASE_LIFECYCLE_STATE_UNSPECIFIED = 0
134
+
135
+ # The pluggable database is provisioning.
136
+ PROVISIONING = 1
137
+
138
+ # The pluggable database is available.
139
+ AVAILABLE = 2
140
+
141
+ # The pluggable database is terminating.
142
+ TERMINATING = 3
143
+
144
+ # The pluggable database is terminated.
145
+ TERMINATED = 4
146
+
147
+ # The pluggable database is updating.
148
+ UPDATING = 5
149
+
150
+ # The pluggable database is in a failed state.
151
+ FAILED = 6
152
+
153
+ # The pluggable database is relocating.
154
+ RELOCATING = 7
155
+
156
+ # The pluggable database is relocated.
157
+ RELOCATED = 8
158
+
159
+ # The pluggable database is refreshing.
160
+ REFRESHING = 9
161
+
162
+ # The pluggable database is restoring.
163
+ RESTORE_IN_PROGRESS = 10
164
+
165
+ # The pluggable database restore failed.
166
+ RESTORE_FAILED = 11
167
+
168
+ # The pluggable database is backing up.
169
+ BACKUP_IN_PROGRESS = 12
170
+
171
+ # The pluggable database is disabled.
172
+ DISABLED = 13
173
+ end
174
+
175
+ # The status of Operations Insights for this Database.
176
+ module OperationsInsightsState
177
+ # The status is not specified.
178
+ OPERATIONS_INSIGHTS_STATE_UNSPECIFIED = 0
179
+
180
+ # Operations Insights is enabling.
181
+ ENABLING = 1
182
+
183
+ # Operations Insights is enabled.
184
+ ENABLED = 2
185
+
186
+ # Operations Insights is disabling.
187
+ DISABLING = 3
188
+
189
+ # Operations Insights is not enabled.
190
+ NOT_ENABLED = 4
191
+
192
+ # Operations Insights failed to enable.
193
+ FAILED_ENABLING = 5
194
+
195
+ # Operations Insights failed to disable.
196
+ FAILED_DISABLING = 6
197
+ end
198
+ end
199
+
200
+ # The connection strings used to connect to the Oracle Database.
201
+ # @!attribute [rw] all_connection_strings
202
+ # @return [::Google::Protobuf::Map{::String => ::String}]
203
+ # Optional. All connection strings to use to connect to the pluggable
204
+ # database.
205
+ # @!attribute [rw] pdb_default
206
+ # @return [::String]
207
+ # Optional. The default connection string to use to connect to the pluggable
208
+ # database.
209
+ # @!attribute [rw] pdb_ip_default
210
+ # @return [::String]
211
+ # Optional. The default connection string to use to connect to the pluggable
212
+ # database using IP.
213
+ class PluggableDatabaseConnectionStrings
214
+ include ::Google::Protobuf::MessageExts
215
+ extend ::Google::Protobuf::MessageExts::ClassMethods
216
+
217
+ # @!attribute [rw] key
218
+ # @return [::String]
219
+ # @!attribute [rw] value
220
+ # @return [::String]
221
+ class AllConnectionStringsEntry
222
+ include ::Google::Protobuf::MessageExts
223
+ extend ::Google::Protobuf::MessageExts::ClassMethods
224
+ end
225
+ end
226
+
227
+ # The Pluggable Database Node Level Details.
228
+ # @!attribute [rw] node_name
229
+ # @return [::String]
230
+ # Required. The Node name of the Database home.
231
+ # @!attribute [rw] open_mode
232
+ # @return [::Google::Cloud::OracleDatabase::V1::PluggableDatabaseNodeLevelDetails::PluggableDatabaseOpenMode]
233
+ # Required. The mode that the pluggable database is in to open it.
234
+ # @!attribute [rw] pluggable_database_id
235
+ # @return [::String]
236
+ # Required. The OCID of the Pluggable Database.
237
+ class PluggableDatabaseNodeLevelDetails
238
+ include ::Google::Protobuf::MessageExts
239
+ extend ::Google::Protobuf::MessageExts::ClassMethods
240
+
241
+ # The mode that the pluggable database is in to open it.
242
+ module PluggableDatabaseOpenMode
243
+ # The open mode is unspecified.
244
+ PLUGGABLE_DATABASE_OPEN_MODE_UNSPECIFIED = 0
245
+
246
+ # The pluggable database is opened in read-only mode.
247
+ READ_ONLY = 1
248
+
249
+ # The pluggable database is opened in read-write mode.
250
+ READ_WRITE = 2
251
+
252
+ # The pluggable database is mounted.
253
+ MOUNTED = 3
254
+
255
+ # The pluggable database is migrated.
256
+ MIGRATE = 4
257
+ end
258
+ end
259
+
260
+ # The configuration of the Database Management service.
261
+ # @!attribute [r] management_state
262
+ # @return [::Google::Cloud::OracleDatabase::V1::DatabaseManagementConfig::ManagementState]
263
+ # Output only. The status of the Database Management service.
264
+ # @!attribute [r] management_type
265
+ # @return [::Google::Cloud::OracleDatabase::V1::DatabaseManagementConfig::ManagementType]
266
+ # Output only. The Database Management type.
267
+ class DatabaseManagementConfig
268
+ include ::Google::Protobuf::MessageExts
269
+ extend ::Google::Protobuf::MessageExts::ClassMethods
270
+
271
+ # The status of the Database Management service.
272
+ module ManagementState
273
+ # The status is not specified.
274
+ MANAGEMENT_STATE_UNSPECIFIED = 0
275
+
276
+ # The Database Management service is enabling.
277
+ ENABLING = 1
278
+
279
+ # The Database Management service is enabled.
280
+ ENABLED = 2
281
+
282
+ # The Database Management service is disabling.
283
+ DISABLING = 3
284
+
285
+ # The Database Management service is disabled.
286
+ DISABLED = 4
287
+
288
+ # The Database Management service is updating.
289
+ UPDATING = 5
290
+
291
+ # The Database Management service failed to enable.
292
+ FAILED_ENABLING = 6
293
+
294
+ # The Database Management service failed to disable.
295
+ FAILED_DISABLING = 7
296
+
297
+ # The Database Management service failed to update.
298
+ FAILED_UPDATING = 8
299
+ end
300
+
301
+ # The Database Management type.
302
+ module ManagementType
303
+ # The type is not specified.
304
+ MANAGEMENT_TYPE_UNSPECIFIED = 0
305
+
306
+ # Basic Database Management.
307
+ BASIC = 1
308
+
309
+ # Advanced Database Management.
310
+ ADVANCED = 2
311
+ end
312
+ end
313
+
314
+ # The request for `PluggableDatabase.Get`.
315
+ # @!attribute [rw] name
316
+ # @return [::String]
317
+ # Required. The name of the PluggableDatabase resource in the following
318
+ # format:
319
+ # projects/\\{project}/locations/\\{region}/pluggableDatabases/\\{pluggable_database}
320
+ class GetPluggableDatabaseRequest
321
+ include ::Google::Protobuf::MessageExts
322
+ extend ::Google::Protobuf::MessageExts::ClassMethods
323
+ end
324
+
325
+ # The request for `PluggableDatabase.List`.
326
+ # @!attribute [rw] parent
327
+ # @return [::String]
328
+ # Required. The parent, which owns this collection of PluggableDatabases.
329
+ # Format: projects/\\{project}/locations/\\{location}
330
+ # @!attribute [rw] page_size
331
+ # @return [::Integer]
332
+ # Optional. The maximum number of PluggableDatabases to return. The service
333
+ # may return fewer than this value.
334
+ # @!attribute [rw] page_token
335
+ # @return [::String]
336
+ # Optional. A page token, received from a previous `ListPluggableDatabases`
337
+ # call. Provide this to retrieve the subsequent page.
338
+ #
339
+ # When paginating, all other parameters provided to `ListPluggableDatabases`
340
+ # must match the call that provided the page token.
341
+ # @!attribute [rw] filter
342
+ # @return [::String]
343
+ # Optional. An expression for filtering the results of the request. List for
344
+ # pluggable databases is supported only with a valid container database (full
345
+ # resource name) filter in this format:
346
+ # `database="projects/{project}/locations/{location}/databases/{database}"`
347
+ class ListPluggableDatabasesRequest
348
+ include ::Google::Protobuf::MessageExts
349
+ extend ::Google::Protobuf::MessageExts::ClassMethods
350
+ end
351
+
352
+ # The response for `PluggableDatabase.List`.
353
+ # @!attribute [rw] pluggable_databases
354
+ # @return [::Array<::Google::Cloud::OracleDatabase::V1::PluggableDatabase>]
355
+ # The list of PluggableDatabases.
356
+ # @!attribute [rw] next_page_token
357
+ # @return [::String]
358
+ # A token identifying a page of results the server should return.
359
+ class ListPluggableDatabasesResponse
360
+ include ::Google::Protobuf::MessageExts
361
+ extend ::Google::Protobuf::MessageExts::ClassMethods
362
+ end
363
+ end
364
+ end
365
+ end
366
+ end
@@ -35,10 +35,6 @@ module Google
35
35
  # @!attribute [rw] display_name
36
36
  # @return [::String]
37
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
38
  # @!attribute [rw] properties
43
39
  # @return [::Google::Cloud::OracleDatabase::V1::CloudVmClusterProperties]
44
40
  # Optional. Various properties of the VM Cluster.
@@ -50,14 +46,40 @@ module Google
50
46
  # Output only. The date and time that the VM cluster was created.
51
47
  # @!attribute [rw] cidr
52
48
  # @return [::String]
53
- # Required. Network settings. CIDR to use for cluster IP allocation.
49
+ # Optional. Network settings. CIDR to use for cluster IP allocation.
54
50
  # @!attribute [rw] backup_subnet_cidr
55
51
  # @return [::String]
56
- # Required. CIDR range of the backup subnet.
52
+ # Optional. CIDR range of the backup subnet.
57
53
  # @!attribute [rw] network
58
54
  # @return [::String]
59
- # Required. The name of the VPC network.
55
+ # Optional. The name of the VPC network.
60
56
  # Format: projects/\\{project}/global/networks/\\{network}
57
+ # @!attribute [r] gcp_oracle_zone
58
+ # @return [::String]
59
+ # Output only. The GCP Oracle zone where Oracle CloudVmCluster is hosted.
60
+ # This will be the same as the gcp_oracle_zone of the
61
+ # CloudExadataInfrastructure. Example: us-east4-b-r2.
62
+ # @!attribute [rw] odb_network
63
+ # @return [::String]
64
+ # Optional. The name of the OdbNetwork associated with the VM Cluster.
65
+ # Format:
66
+ # projects/\\{project}/locations/\\{location}/odbNetworks/\\{odb_network}
67
+ # It is optional but if specified, this should match the parent ODBNetwork of
68
+ # the odb_subnet and backup_odb_subnet.
69
+ # @!attribute [rw] odb_subnet
70
+ # @return [::String]
71
+ # Optional. The name of the OdbSubnet associated with the VM Cluster for
72
+ # IP allocation. Format:
73
+ # projects/\\{project}/locations/\\{location}/odbNetworks/\\{odb_network}/odbSubnets/\\{odb_subnet}
74
+ # @!attribute [rw] backup_odb_subnet
75
+ # @return [::String]
76
+ # Optional. The name of the backup OdbSubnet associated with the VM Cluster.
77
+ # Format:
78
+ # projects/\\{project}/locations/\\{location}/odbNetworks/\\{odb_network}/odbSubnets/\\{odb_subnet}
79
+ # @!attribute [r] identity_connector
80
+ # @return [::Google::Cloud::OracleDatabase::V1::IdentityConnector]
81
+ # Output only. The identity connector details which will allow OCI to
82
+ # securely access the resources in the customer project.
61
83
  class CloudVmCluster
62
84
  include ::Google::Protobuf::MessageExts
63
85
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -173,6 +195,9 @@ module Google
173
195
  # @!attribute [rw] cluster_name
174
196
  # @return [::String]
175
197
  # Optional. OCI Cluster name.
198
+ # @!attribute [r] compute_model
199
+ # @return [::Google::Cloud::OracleDatabase::V1::ComputeModel]
200
+ # Output only. The compute model of the VM Cluster.
176
201
  class CloudVmClusterProperties
177
202
  include ::Google::Protobuf::MessageExts
178
203
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,229 @@
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
+ # `FieldMask` represents a set of symbolic field paths, for example:
23
+ #
24
+ # paths: "f.a"
25
+ # paths: "f.b.d"
26
+ #
27
+ # Here `f` represents a field in some root message, `a` and `b`
28
+ # fields in the message found in `f`, and `d` a field found in the
29
+ # message in `f.b`.
30
+ #
31
+ # Field masks are used to specify a subset of fields that should be
32
+ # returned by a get operation or modified by an update operation.
33
+ # Field masks also have a custom JSON encoding (see below).
34
+ #
35
+ # # Field Masks in Projections
36
+ #
37
+ # When used in the context of a projection, a response message or
38
+ # sub-message is filtered by the API to only contain those fields as
39
+ # specified in the mask. For example, if the mask in the previous
40
+ # example is applied to a response message as follows:
41
+ #
42
+ # f {
43
+ # a : 22
44
+ # b {
45
+ # d : 1
46
+ # x : 2
47
+ # }
48
+ # y : 13
49
+ # }
50
+ # z: 8
51
+ #
52
+ # The result will not contain specific values for fields x,y and z
53
+ # (their value will be set to the default, and omitted in proto text
54
+ # output):
55
+ #
56
+ #
57
+ # f {
58
+ # a : 22
59
+ # b {
60
+ # d : 1
61
+ # }
62
+ # }
63
+ #
64
+ # A repeated field is not allowed except at the last position of a
65
+ # paths string.
66
+ #
67
+ # If a FieldMask object is not present in a get operation, the
68
+ # operation applies to all fields (as if a FieldMask of all fields
69
+ # had been specified).
70
+ #
71
+ # Note that a field mask does not necessarily apply to the
72
+ # top-level response message. In case of a REST get operation, the
73
+ # field mask applies directly to the response, but in case of a REST
74
+ # list operation, the mask instead applies to each individual message
75
+ # in the returned resource list. In case of a REST custom method,
76
+ # other definitions may be used. Where the mask applies will be
77
+ # clearly documented together with its declaration in the API. In
78
+ # any case, the effect on the returned resource/resources is required
79
+ # behavior for APIs.
80
+ #
81
+ # # Field Masks in Update Operations
82
+ #
83
+ # A field mask in update operations specifies which fields of the
84
+ # targeted resource are going to be updated. The API is required
85
+ # to only change the values of the fields as specified in the mask
86
+ # and leave the others untouched. If a resource is passed in to
87
+ # describe the updated values, the API ignores the values of all
88
+ # fields not covered by the mask.
89
+ #
90
+ # If a repeated field is specified for an update operation, new values will
91
+ # be appended to the existing repeated field in the target resource. Note that
92
+ # a repeated field is only allowed in the last position of a `paths` string.
93
+ #
94
+ # If a sub-message is specified in the last position of the field mask for an
95
+ # update operation, then new value will be merged into the existing sub-message
96
+ # in the target resource.
97
+ #
98
+ # For example, given the target message:
99
+ #
100
+ # f {
101
+ # b {
102
+ # d: 1
103
+ # x: 2
104
+ # }
105
+ # c: [1]
106
+ # }
107
+ #
108
+ # And an update message:
109
+ #
110
+ # f {
111
+ # b {
112
+ # d: 10
113
+ # }
114
+ # c: [2]
115
+ # }
116
+ #
117
+ # then if the field mask is:
118
+ #
119
+ # paths: ["f.b", "f.c"]
120
+ #
121
+ # then the result will be:
122
+ #
123
+ # f {
124
+ # b {
125
+ # d: 10
126
+ # x: 2
127
+ # }
128
+ # c: [1, 2]
129
+ # }
130
+ #
131
+ # An implementation may provide options to override this default behavior for
132
+ # repeated and message fields.
133
+ #
134
+ # In order to reset a field's value to the default, the field must
135
+ # be in the mask and set to the default value in the provided resource.
136
+ # Hence, in order to reset all fields of a resource, provide a default
137
+ # instance of the resource and set all fields in the mask, or do
138
+ # not provide a mask as described below.
139
+ #
140
+ # If a field mask is not present on update, the operation applies to
141
+ # all fields (as if a field mask of all fields has been specified).
142
+ # Note that in the presence of schema evolution, this may mean that
143
+ # fields the client does not know and has therefore not filled into
144
+ # the request will be reset to their default. If this is unwanted
145
+ # behavior, a specific service may require a client to always specify
146
+ # a field mask, producing an error if not.
147
+ #
148
+ # As with get operations, the location of the resource which
149
+ # describes the updated values in the request message depends on the
150
+ # operation kind. In any case, the effect of the field mask is
151
+ # required to be honored by the API.
152
+ #
153
+ # ## Considerations for HTTP REST
154
+ #
155
+ # The HTTP kind of an update operation which uses a field mask must
156
+ # be set to PATCH instead of PUT in order to satisfy HTTP semantics
157
+ # (PUT must only be used for full updates).
158
+ #
159
+ # # JSON Encoding of Field Masks
160
+ #
161
+ # In JSON, a field mask is encoded as a single string where paths are
162
+ # separated by a comma. Fields name in each path are converted
163
+ # to/from lower-camel naming conventions.
164
+ #
165
+ # As an example, consider the following message declarations:
166
+ #
167
+ # message Profile {
168
+ # User user = 1;
169
+ # Photo photo = 2;
170
+ # }
171
+ # message User {
172
+ # string display_name = 1;
173
+ # string address = 2;
174
+ # }
175
+ #
176
+ # In proto a field mask for `Profile` may look as such:
177
+ #
178
+ # mask {
179
+ # paths: "user.display_name"
180
+ # paths: "photo"
181
+ # }
182
+ #
183
+ # In JSON, the same mask is represented as below:
184
+ #
185
+ # {
186
+ # mask: "user.displayName,photo"
187
+ # }
188
+ #
189
+ # # Field Masks and Oneof Fields
190
+ #
191
+ # Field masks treat fields in oneofs just as regular fields. Consider the
192
+ # following message:
193
+ #
194
+ # message SampleMessage {
195
+ # oneof test_oneof {
196
+ # string name = 4;
197
+ # SubMessage sub_message = 9;
198
+ # }
199
+ # }
200
+ #
201
+ # The field mask can be:
202
+ #
203
+ # mask {
204
+ # paths: "name"
205
+ # }
206
+ #
207
+ # Or:
208
+ #
209
+ # mask {
210
+ # paths: "sub_message"
211
+ # }
212
+ #
213
+ # Note that oneof type names ("test_oneof" in this case) cannot be used in
214
+ # paths.
215
+ #
216
+ # ## Field Mask Verification
217
+ #
218
+ # The implementation of any API method which has a FieldMask type field in the
219
+ # request should verify the included field paths, and return an
220
+ # `INVALID_ARGUMENT` error if any path is unmappable.
221
+ # @!attribute [rw] paths
222
+ # @return [::Array<::String>]
223
+ # The set of field mask paths.
224
+ class FieldMask
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
228
+ end
229
+ end