google-cloud-gke_backup-v1 0.3.0 → 0.5.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +70 -40
  4. data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +5 -3
  5. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +79 -40
  6. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +9 -7
  7. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +24 -24
  8. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb +1 -0
  9. data/lib/google/cloud/gke_backup/v1/bindings_override.rb +255 -0
  10. data/lib/google/cloud/gke_backup/v1/rest.rb +1 -0
  11. data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
  12. data/lib/google/cloud/gkebackup/v1/backup_pb.rb +26 -49
  13. data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +27 -35
  14. data/lib/google/cloud/gkebackup/v1/common_pb.rb +24 -14
  15. data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +32 -152
  16. data/lib/google/cloud/gkebackup/v1/restore_pb.rb +30 -70
  17. data/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb +27 -13
  18. data/lib/google/cloud/gkebackup/v1/volume_pb.rb +26 -55
  19. data/proto_docs/google/api/client.rb +67 -4
  20. data/proto_docs/google/cloud/gkebackup/v1/backup.rb +43 -31
  21. data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +54 -13
  22. data/proto_docs/google/cloud/gkebackup/v1/common.rb +1 -1
  23. data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +63 -61
  24. data/proto_docs/google/cloud/gkebackup/v1/restore.rb +194 -29
  25. data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +40 -13
  26. data/proto_docs/google/cloud/gkebackup/v1/volume.rb +23 -20
  27. data/proto_docs/google/protobuf/any.rb +7 -4
  28. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  29. data/proto_docs/google/type/expr.rb +75 -0
  30. metadata +46 -4
@@ -27,7 +27,7 @@ module Google
27
27
  # @!attribute [r] name
28
28
  # @return [::String]
29
29
  # Output only. The full name of the Restore resource.
30
- # Format: projects/*/locations/*/restorePlans/*/restores/*
30
+ # Format: `projects/*/locations/*/restorePlans/*/restores/*`
31
31
  # @!attribute [r] uid
32
32
  # @return [::String]
33
33
  # Output only. Server generated global unique identifier of
@@ -44,22 +44,26 @@ module Google
44
44
  # User specified descriptive string for this Restore.
45
45
  # @!attribute [rw] backup
46
46
  # @return [::String]
47
- # Required. Immutable. A reference to the {::Google::Cloud::GkeBackup::V1::Backup Backup} used as the source from which this Restore
48
- # will restore. Note that this Backup must be a sub-resource of the
49
- # RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#backup_plan backup_plan}.
50
- # Format: projects/*/locations/*/backupPlans/*/backups/*.
47
+ # Required. Immutable. A reference to the
48
+ # {::Google::Cloud::GkeBackup::V1::Backup Backup} used as the source from which
49
+ # this Restore will restore. Note that this Backup must be a sub-resource of
50
+ # the RestorePlan's
51
+ # {::Google::Cloud::GkeBackup::V1::RestorePlan#backup_plan backup_plan}. Format:
52
+ # `projects/*/locations/*/backupPlans/*/backups/*`.
51
53
  # @!attribute [r] cluster
52
54
  # @return [::String]
53
55
  # Output only. The target cluster into which this Restore will restore data.
54
56
  # Valid formats:
55
57
  #
56
- # - projects/*/locations/*/clusters/*
57
- # - projects/*/zones/*/clusters/*
58
+ # - `projects/*/locations/*/clusters/*`
59
+ # - `projects/*/zones/*/clusters/*`
58
60
  #
59
- # Inherited from parent RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#cluster cluster} value.
61
+ # Inherited from parent RestorePlan's
62
+ # {::Google::Cloud::GkeBackup::V1::RestorePlan#cluster cluster} value.
60
63
  # @!attribute [r] restore_config
61
64
  # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig]
62
- # Output only. Configuration of the Restore. Inherited from parent RestorePlan's
65
+ # Output only. Configuration of the Restore. Inherited from parent
66
+ # RestorePlan's
63
67
  # {::Google::Cloud::GkeBackup::V1::RestorePlan#restore_config restore_config}.
64
68
  # @!attribute [rw] labels
65
69
  # @return [::Google::Protobuf::Map{::String => ::String}]
@@ -69,7 +73,8 @@ module Google
69
73
  # Output only. The current state of the Restore.
70
74
  # @!attribute [r] state_reason
71
75
  # @return [::String]
72
- # Output only. Human-readable description of why the Restore is in its current state.
76
+ # Output only. Human-readable description of why the Restore is in its
77
+ # current state.
73
78
  # @!attribute [r] complete_time
74
79
  # @return [::Google::Protobuf::Timestamp]
75
80
  # Output only. Timestamp of when the restore operation completed.
@@ -81,15 +86,15 @@ module Google
81
86
  # Output only. Number of resources excluded during the restore execution.
82
87
  # @!attribute [r] resources_failed_count
83
88
  # @return [::Integer]
84
- # Output only. Number of resources that failed to be restored during the restore
85
- # execution.
89
+ # Output only. Number of resources that failed to be restored during the
90
+ # restore execution.
86
91
  # @!attribute [r] volumes_restored_count
87
92
  # @return [::Integer]
88
93
  # Output only. Number of volumes restored during the restore execution.
89
94
  # @!attribute [r] etag
90
95
  # @return [::String]
91
- # Output only. `etag` is used for optimistic concurrency control as a way to help
92
- # prevent simultaneous updates of a restore from overwriting each other.
96
+ # Output only. `etag` is used for optimistic concurrency control as a way to
97
+ # help prevent simultaneous updates of a restore from overwriting each other.
93
98
  # It is strongly suggested that systems make use of the `etag` in the
94
99
  # read-modify-write cycle to perform restore updates in order to avoid
95
100
  # race conditions: An `etag` is returned in the response to `GetRestore`,
@@ -135,7 +140,7 @@ module Google
135
140
  end
136
141
 
137
142
  # Configuration of a restore.
138
- # Next id: 9
143
+ # Next id: 12
139
144
  # @!attribute [rw] volume_data_restore_policy
140
145
  # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy]
141
146
  # Specifies the mechanism to be used to restore volume data.
@@ -146,7 +151,8 @@ module Google
146
151
  # Defines the behavior for handling the situation where cluster-scoped
147
152
  # resources being restored already exist in the target cluster. This MUST be
148
153
  # set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
149
- # {::Google::Cloud::GkeBackup::V1::RestoreConfig#cluster_resource_restore_scope cluster_resource_restore_scope} is not empty.
154
+ # {::Google::Cloud::GkeBackup::V1::RestoreConfig#cluster_resource_restore_scope cluster_resource_restore_scope}
155
+ # is not empty.
150
156
  # @!attribute [rw] namespaced_resource_restore_mode
151
157
  # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::NamespacedResourceRestoreMode]
152
158
  # Defines the behavior for handling the situation where sets of namespaced
@@ -169,6 +175,14 @@ module Google
169
175
  # A list of selected ProtectedApplications to restore. The listed
170
176
  # ProtectedApplications and all the resources to which they refer will be
171
177
  # restored.
178
+ # @!attribute [rw] no_namespaces
179
+ # @return [::Boolean]
180
+ # Do not restore any namespaced resources if set to "True".
181
+ # Specifying this field to "False" is not allowed.
182
+ # @!attribute [rw] excluded_namespaces
183
+ # @return [::Google::Cloud::GkeBackup::V1::Namespaces]
184
+ # A list of selected namespaces excluded from restoration. All
185
+ # namespaces except those in this list will be restored.
172
186
  # @!attribute [rw] substitution_rules
173
187
  # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::SubstitutionRule>]
174
188
  # A list of transformation rules to be applied against Kubernetes resources
@@ -176,6 +190,13 @@ module Google
176
190
  # order defined - this order matters, as changes made by a rule may impact
177
191
  # the filtering logic of subsequent rules. An empty list means no
178
192
  # substitution will occur.
193
+ # @!attribute [rw] transformation_rules
194
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRule>]
195
+ # A list of transformation rules to be applied against Kubernetes resources
196
+ # as they are selected for restoration from a Backup. Rules are executed in
197
+ # order defined - this order matters, as changes made by a rule may impact
198
+ # the filtering logic of subsequent rules. An empty list means no
199
+ # transformation will occur.
179
200
  class RestoreConfig
180
201
  include ::Google::Protobuf::MessageExts
181
202
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -197,13 +218,44 @@ module Google
197
218
  extend ::Google::Protobuf::MessageExts::ClassMethods
198
219
  end
199
220
 
200
- # Identifies the cluster-scoped resources to restore from the Backup.
221
+ # Defines the scope of cluster-scoped resources to restore.
222
+ #
223
+ # Some group kinds are not reasonable choices for a restore, and will cause
224
+ # an error if selected here. Any scope selection that would restore
225
+ # "all valid" resources automatically excludes these group kinds.
226
+ # - gkebackup.gke.io/BackupJob
227
+ # - gkebackup.gke.io/RestoreJob
228
+ # - metrics.k8s.io/NodeMetrics
229
+ # - migration.k8s.io/StorageState
230
+ # - migration.k8s.io/StorageVersionMigration
231
+ # - Node
232
+ # - snapshot.storage.k8s.io/VolumeSnapshotContent
233
+ # - storage.k8s.io/CSINode
234
+ #
235
+ # Some group kinds are driven by restore configuration elsewhere,
236
+ # and will cause an error if selected here.
237
+ # - Namespace
238
+ # - PersistentVolume
201
239
  # @!attribute [rw] selected_group_kinds
202
240
  # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>]
203
- # A list of "types" of cluster-scoped resources to be restored from the
204
- # Backup. An empty list means that NO cluster-scoped resources will be
205
- # restored. Note that Namespaces and PersistentVolume restoration is
206
- # handled separately and is not governed by this field.
241
+ # A list of cluster-scoped resource group kinds to restore from the
242
+ # backup. If specified, only the selected resources will be restored.
243
+ # Mutually exclusive to any other field in the message.
244
+ # @!attribute [rw] excluded_group_kinds
245
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>]
246
+ # A list of cluster-scoped resource group kinds to NOT restore from the
247
+ # backup. If specified, all valid cluster-scoped resources will be
248
+ # restored except for those specified in the list.
249
+ # Mutually exclusive to any other field in the message.
250
+ # @!attribute [rw] all_group_kinds
251
+ # @return [::Boolean]
252
+ # If True, all valid cluster-scoped resources will be restored.
253
+ # Mutually exclusive to any other field in the message.
254
+ # @!attribute [rw] no_group_kinds
255
+ # @return [::Boolean]
256
+ # If True, no cluster-scoped resources will be restored.
257
+ # This has the same restore scope as if the message is not defined.
258
+ # Mutually exclusive to any other field in the message.
207
259
  class ClusterResourceRestoreScope
208
260
  include ::Google::Protobuf::MessageExts
209
261
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -247,7 +299,7 @@ module Google
247
299
  # value does not match this expression. If this field is NOT specified,
248
300
  # then ALL fields matched by the target_json_path expression will undergo
249
301
  # substitution. Note that an empty (e.g., "", rather than unspecified)
250
- # value for for this field will only match empty fields.
302
+ # value for this field will only match empty fields.
251
303
  # @!attribute [rw] new_value
252
304
  # @return [::String]
253
305
  # This is the new value to set for any fields that pass the filtering and
@@ -258,22 +310,135 @@ module Google
258
310
  extend ::Google::Protobuf::MessageExts::ClassMethods
259
311
  end
260
312
 
261
- # Defines how volume data should be restored
313
+ # TransformationRuleAction defines a TransformationRule action based on the
314
+ # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902)
315
+ # @!attribute [rw] op
316
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op]
317
+ # Required. op specifies the operation to perform.
318
+ # @!attribute [rw] from_path
319
+ # @return [::String]
320
+ # A string containing a JSON Pointer value that references the location in
321
+ # the target document to move the value from.
322
+ # @!attribute [rw] path
323
+ # @return [::String]
324
+ # A string containing a JSON-Pointer value that references a location
325
+ # within the target document where the operation is performed.
326
+ # @!attribute [rw] value
327
+ # @return [::String]
328
+ # A string that specifies the desired value in string format to
329
+ # use for transformation.
330
+ class TransformationRuleAction
331
+ include ::Google::Protobuf::MessageExts
332
+ extend ::Google::Protobuf::MessageExts::ClassMethods
333
+
334
+ # Possible values for operations of a transformation rule action.
335
+ module Op
336
+ # Unspecified operation
337
+ OP_UNSPECIFIED = 0
338
+
339
+ # The "remove" operation removes the value at the target location.
340
+ REMOVE = 1
341
+
342
+ # The "move" operation removes the value at a specified location and
343
+ # adds it to the target location.
344
+ MOVE = 2
345
+
346
+ # The "copy" operation copies the value at a specified location to the
347
+ # target location.
348
+ COPY = 3
349
+
350
+ # The "add" operation performs one of the following functions,
351
+ # depending upon what the target location references:
352
+ # 1. If the target location specifies an array index, a new value is
353
+ # inserted into the array at the specified index.
354
+ # 2. If the target location specifies an object member that does not
355
+ # already exist, a new member is added to the object.
356
+ # 3. If the target location specifies an object member that does exist,
357
+ # that member's value is replaced.
358
+ ADD = 4
359
+
360
+ # The "test" operation tests that a value at the target location is
361
+ # equal to a specified value.
362
+ TEST = 5
363
+
364
+ # The "replace" operation replaces the value at the target location
365
+ # with a new value. The operation object MUST contain a "value" member
366
+ # whose content specifies the replacement value.
367
+ REPLACE = 6
368
+ end
369
+ end
370
+
371
+ # ResourceFilter specifies matching criteria to limit the scope of a
372
+ # change to a specific set of kubernetes resources that are selected for
373
+ # restoration from a backup.
374
+ # @!attribute [rw] namespaces
375
+ # @return [::Array<::String>]
376
+ # (Filtering parameter) Any resource subject to transformation must be
377
+ # contained within one of the listed Kubernetes Namespace in the Backup.
378
+ # If this field is not provided, no namespace filtering will be performed
379
+ # (all resources in all Namespaces, including all cluster-scoped resources,
380
+ # will be candidates for transformation).
381
+ # To mix cluster-scoped and namespaced resources in the same rule, use an
382
+ # empty string ("") as one of the target namespaces.
383
+ # @!attribute [rw] group_kinds
384
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>]
385
+ # (Filtering parameter) Any resource subject to transformation must belong
386
+ # to one of the listed "types". If this field is not provided, no type
387
+ # filtering will be performed (all resources of all types matching previous
388
+ # filtering parameters will be candidates for transformation).
389
+ # @!attribute [rw] json_path
390
+ # @return [::String]
391
+ # This is a [JSONPath]
392
+ # (https://github.com/json-path/JsonPath/blob/master/README.md)
393
+ # expression that matches specific fields of candidate
394
+ # resources and it operates as a filtering parameter (resources that
395
+ # are not matched with this expression will not be candidates for
396
+ # transformation).
397
+ class ResourceFilter
398
+ include ::Google::Protobuf::MessageExts
399
+ extend ::Google::Protobuf::MessageExts::ClassMethods
400
+ end
401
+
402
+ # A transformation rule to be applied against Kubernetes resources as they
403
+ # are selected for restoration from a Backup. A rule contains both filtering
404
+ # logic (which resources are subject to transform) and transformation logic.
405
+ # @!attribute [rw] field_actions
406
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>]
407
+ # Required. A list of transformation rule actions to take against candidate
408
+ # resources. Actions are executed in order defined - this order matters, as
409
+ # they could potentially interfere with each other and the first operation
410
+ # could affect the outcome of the second operation.
411
+ # @!attribute [rw] resource_filter
412
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter]
413
+ # This field is used to specify a set of fields that should be used to
414
+ # determine which resources in backup should be acted upon by the supplied
415
+ # transformation rule actions, and this will ensure that only specific
416
+ # resources are affected by transformation rule actions.
417
+ # @!attribute [rw] description
418
+ # @return [::String]
419
+ # The description is a user specified string description of the
420
+ # transformation rule.
421
+ class TransformationRule
422
+ include ::Google::Protobuf::MessageExts
423
+ extend ::Google::Protobuf::MessageExts::ClassMethods
424
+ end
425
+
426
+ # Defines how volume data should be restored.
262
427
  module VolumeDataRestorePolicy
263
428
  # Unspecified (illegal).
264
429
  VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0
265
430
 
266
- # For each PVC to be restored, will create a new underlying volume (and PV)
431
+ # For each PVC to be restored, create a new underlying volume and PV
267
432
  # from the corresponding VolumeBackup contained within the Backup.
268
433
  RESTORE_VOLUME_DATA_FROM_BACKUP = 1
269
434
 
270
435
  # For each PVC to be restored, attempt to reuse the original PV contained
271
- # in the Backup (with its original underlying volume). Note that option
436
+ # in the Backup (with its original underlying volume). This option
272
437
  # is likely only usable when restoring a workload to its original cluster.
273
438
  REUSE_VOLUME_HANDLE_FROM_BACKUP = 2
274
439
 
275
- # For each PVC to be restored, PVCs will be created without any particular
276
- # action to restore data. In this case, the normal Kubernetes provisioning
440
+ # For each PVC to be restored, create PVC without any particular
441
+ # action to restore data. In this case, the normal Kubernetes provisioning
277
442
  # logic would kick in, and this would likely result in either dynamically
278
443
  # provisioning blank PVs or binding to statically provisioned PVs.
279
444
  NO_VOLUME_DATA_RESTORATION = 3
@@ -290,8 +455,8 @@ module Google
290
455
  USE_EXISTING_VERSION = 1
291
456
 
292
457
  # Delete the existing version before re-creating it from the Backup.
293
- # Note that this is a dangerous option which could cause unintentional
294
- # data loss if used inappropriately - for example, deleting a CRD will
458
+ # This is a dangerous option which could cause unintentional
459
+ # data loss if used inappropriately. For example, deleting a CRD will
295
460
  # cause Kubernetes to delete all CRs of that type.
296
461
  USE_BACKUP_VERSION = 2
297
462
  end
@@ -23,11 +23,11 @@ module Google
23
23
  module V1
24
24
  # The configuration of a potential series of Restore operations to be performed
25
25
  # against Backups belong to a particular BackupPlan.
26
- # Next id: 11
26
+ # Next id: 13
27
27
  # @!attribute [r] name
28
28
  # @return [::String]
29
29
  # Output only. The full name of the RestorePlan resource.
30
- # Format: projects/*/locations/*/restorePlans/*.
30
+ # Format: `projects/*/locations/*/restorePlans/*`.
31
31
  # @!attribute [r] uid
32
32
  # @return [::String]
33
33
  # Output only. Server generated global unique identifier of
@@ -45,18 +45,18 @@ module Google
45
45
  # User specified descriptive string for this RestorePlan.
46
46
  # @!attribute [rw] backup_plan
47
47
  # @return [::String]
48
- # Required. Immutable. A reference to the {::Google::Cloud::GkeBackup::V1::BackupPlan BackupPlan} from which Backups may be used as the
49
- # source for Restores created via this RestorePlan.
50
- # Format: projects/*/locations/*/backupPlans/*.
48
+ # Required. Immutable. A reference to the
49
+ # {::Google::Cloud::GkeBackup::V1::BackupPlan BackupPlan} from which Backups may
50
+ # be used as the source for Restores created via this RestorePlan. Format:
51
+ # `projects/*/locations/*/backupPlans/*`.
51
52
  # @!attribute [rw] cluster
52
53
  # @return [::String]
53
- # Required. Immutable. The target cluster into which Restores created via this RestorePlan
54
- # will restore data. NOTE: the cluster's region must be the same as the
55
- # RestorePlan.
56
- # Valid formats:
54
+ # Required. Immutable. The target cluster into which Restores created via
55
+ # this RestorePlan will restore data. NOTE: the cluster's region must be the
56
+ # same as the RestorePlan. Valid formats:
57
57
  #
58
- # - projects/*/locations/*/clusters/*
59
- # - projects/*/zones/*/clusters/*
58
+ # - `projects/*/locations/*/clusters/*`
59
+ # - `projects/*/zones/*/clusters/*`
60
60
  # @!attribute [rw] restore_config
61
61
  # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig]
62
62
  # Required. Configuration of Restores created via this RestorePlan.
@@ -65,14 +65,23 @@ module Google
65
65
  # A set of custom labels supplied by user.
66
66
  # @!attribute [r] etag
67
67
  # @return [::String]
68
- # Output only. `etag` is used for optimistic concurrency control as a way to help
69
- # prevent simultaneous updates of a restore from overwriting each other.
68
+ # Output only. `etag` is used for optimistic concurrency control as a way to
69
+ # help prevent simultaneous updates of a restore from overwriting each other.
70
70
  # It is strongly suggested that systems make use of the `etag` in the
71
71
  # read-modify-write cycle to perform restore updates in order to avoid
72
72
  # race conditions: An `etag` is returned in the response to `GetRestorePlan`,
73
73
  # and systems are expected to put that etag in the request to
74
74
  # `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change
75
75
  # will be applied to the same version of the resource.
76
+ # @!attribute [r] state
77
+ # @return [::Google::Cloud::GkeBackup::V1::RestorePlan::State]
78
+ # Output only. State of the RestorePlan. This State field reflects the
79
+ # various stages a RestorePlan can be in
80
+ # during the Create operation.
81
+ # @!attribute [r] state_reason
82
+ # @return [::String]
83
+ # Output only. Human-readable description of why RestorePlan is in the
84
+ # current `state`
76
85
  class RestorePlan
77
86
  include ::Google::Protobuf::MessageExts
78
87
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -85,6 +94,24 @@ module Google
85
94
  include ::Google::Protobuf::MessageExts
86
95
  extend ::Google::Protobuf::MessageExts::ClassMethods
87
96
  end
97
+
98
+ # State
99
+ module State
100
+ # Default first value for Enums.
101
+ STATE_UNSPECIFIED = 0
102
+
103
+ # Waiting for cluster state to be RUNNING.
104
+ CLUSTER_PENDING = 1
105
+
106
+ # The RestorePlan has successfully been created and is ready for Restores.
107
+ READY = 2
108
+
109
+ # RestorePlan creation has failed.
110
+ FAILED = 3
111
+
112
+ # The RestorePlan is in the process of being deleted.
113
+ DELETING = 4
114
+ end
88
115
  end
89
116
  end
90
117
  end
@@ -28,7 +28,7 @@ module Google
28
28
  # @!attribute [r] name
29
29
  # @return [::String]
30
30
  # Output only. The full name of the VolumeBackup resource.
31
- # Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*.
31
+ # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
32
32
  # @!attribute [r] uid
33
33
  # @return [::String]
34
34
  # Output only. Server generated global unique identifier of
@@ -43,24 +43,26 @@ module Google
43
43
  # updated.
44
44
  # @!attribute [r] source_pvc
45
45
  # @return [::Google::Cloud::GkeBackup::V1::NamespacedName]
46
- # Output only. A reference to the source Kubernetes PVC from which this VolumeBackup
47
- # was created.
46
+ # Output only. A reference to the source Kubernetes PVC from which this
47
+ # VolumeBackup was created.
48
48
  # @!attribute [r] volume_backup_handle
49
49
  # @return [::String]
50
- # Output only. A storage system-specific opaque handle to the underlying volume backup.
50
+ # Output only. A storage system-specific opaque handle to the underlying
51
+ # volume backup.
51
52
  # @!attribute [r] format
52
53
  # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::VolumeBackupFormat]
53
54
  # Output only. The format used for the volume backup.
54
55
  # @!attribute [r] storage_bytes
55
56
  # @return [::Integer]
56
- # Output only. The aggregate size of the underlying artifacts associated with this
57
- # VolumeBackup in the backup storage. This may change over time when
57
+ # Output only. The aggregate size of the underlying artifacts associated with
58
+ # this VolumeBackup in the backup storage. This may change over time when
58
59
  # multiple backups of the same volume share the same backup storage
59
60
  # location. In particular, this is likely to increase in size when
60
61
  # the immediately preceding backup of the same volume is deleted.
61
62
  # @!attribute [r] disk_size_bytes
62
63
  # @return [::Integer]
63
- # Output only. The minimum size of the disk to which this VolumeBackup can be restored.
64
+ # Output only. The minimum size of the disk to which this VolumeBackup can be
65
+ # restored.
64
66
  # @!attribute [r] complete_time
65
67
  # @return [::Google::Protobuf::Timestamp]
66
68
  # Output only. The timestamp when the associated underlying volume backup
@@ -70,12 +72,12 @@ module Google
70
72
  # Output only. The current state of this VolumeBackup.
71
73
  # @!attribute [r] state_message
72
74
  # @return [::String]
73
- # Output only. A human readable message explaining why the VolumeBackup is in its current
74
- # state.
75
+ # Output only. A human readable message explaining why the VolumeBackup is in
76
+ # its current state.
75
77
  # @!attribute [r] etag
76
78
  # @return [::String]
77
- # Output only. `etag` is used for optimistic concurrency control as a way to help
78
- # prevent simultaneous updates of a volume backup from overwriting each
79
+ # Output only. `etag` is used for optimistic concurrency control as a way to
80
+ # help prevent simultaneous updates of a volume backup from overwriting each
79
81
  # other. It is strongly suggested that systems make use of the `etag` in the
80
82
  # read-modify-write cycle to perform volume backup updates in order to avoid
81
83
  # race conditions.
@@ -128,7 +130,7 @@ module Google
128
130
  # @!attribute [r] name
129
131
  # @return [::String]
130
132
  # Output only. Full name of the VolumeRestore resource.
131
- # Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*.
133
+ # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
132
134
  # @!attribute [r] uid
133
135
  # @return [::String]
134
136
  # Output only. Server generated global unique identifier of
@@ -143,15 +145,16 @@ module Google
143
145
  # updated.
144
146
  # @!attribute [r] volume_backup
145
147
  # @return [::String]
146
- # Output only. The full name of the VolumeBackup from which the volume will be restored.
147
- # Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*.
148
+ # Output only. The full name of the VolumeBackup from which the volume will
149
+ # be restored. Format:
150
+ # `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
148
151
  # @!attribute [r] target_pvc
149
152
  # @return [::Google::Cloud::GkeBackup::V1::NamespacedName]
150
153
  # Output only. The reference to the target Kubernetes PVC to be restored.
151
154
  # @!attribute [r] volume_handle
152
155
  # @return [::String]
153
- # Output only. A storage system-specific opaque handler to the underlying volume created
154
- # for the target PVC from the volume backup.
156
+ # Output only. A storage system-specific opaque handler to the underlying
157
+ # volume created for the target PVC from the volume backup.
155
158
  # @!attribute [r] volume_type
156
159
  # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::VolumeType]
157
160
  # Output only. The type of volume provisioned
@@ -164,12 +167,12 @@ module Google
164
167
  # Output only. The current state of this VolumeRestore.
165
168
  # @!attribute [r] state_message
166
169
  # @return [::String]
167
- # Output only. A human readable message explaining why the VolumeRestore is in its
168
- # current state.
170
+ # Output only. A human readable message explaining why the VolumeRestore is
171
+ # in its current state.
169
172
  # @!attribute [r] etag
170
173
  # @return [::String]
171
- # Output only. `etag` is used for optimistic concurrency control as a way to help
172
- # prevent simultaneous updates of a volume restore from overwriting each
174
+ # Output only. `etag` is used for optimistic concurrency control as a way to
175
+ # help prevent simultaneous updates of a volume restore from overwriting each
173
176
  # other. It is strongly suggested that systems make use of the `etag` in the
174
177
  # read-modify-write cycle to perform volume restore updates in order to avoid
175
178
  # race conditions.
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example:
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]