google-cloud-gke_backup-v1 0.1.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 (39) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +144 -0
  6. data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +2980 -0
  7. data/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb +47 -0
  8. data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +767 -0
  9. data/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb +216 -0
  10. data/lib/google/cloud/gke_backup/v1/backup_for_gke.rb +51 -0
  11. data/lib/google/cloud/gke_backup/v1/version.rb +28 -0
  12. data/lib/google/cloud/gke_backup/v1.rb +40 -0
  13. data/lib/google/cloud/gkebackup/v1/backup_pb.rb +74 -0
  14. data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +61 -0
  15. data/lib/google/cloud/gkebackup/v1/common_pb.rb +37 -0
  16. data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +213 -0
  17. data/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb +92 -0
  18. data/lib/google/cloud/gkebackup/v1/restore_pb.rb +101 -0
  19. data/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb +36 -0
  20. data/lib/google/cloud/gkebackup/v1/volume_pb.rb +83 -0
  21. data/lib/google-cloud-gke_backup-v1.rb +21 -0
  22. data/proto_docs/README.md +4 -0
  23. data/proto_docs/google/api/field_behavior.rb +71 -0
  24. data/proto_docs/google/api/resource.rb +222 -0
  25. data/proto_docs/google/cloud/gkebackup/v1/backup.rb +226 -0
  26. data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +196 -0
  27. data/proto_docs/google/cloud/gkebackup/v1/common.rb +67 -0
  28. data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +658 -0
  29. data/proto_docs/google/cloud/gkebackup/v1/restore.rb +325 -0
  30. data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +92 -0
  31. data/proto_docs/google/cloud/gkebackup/v1/volume.rb +214 -0
  32. data/proto_docs/google/longrunning/operations.rb +164 -0
  33. data/proto_docs/google/protobuf/any.rb +141 -0
  34. data/proto_docs/google/protobuf/duration.rb +98 -0
  35. data/proto_docs/google/protobuf/empty.rb +36 -0
  36. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  37. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  38. data/proto_docs/google/rpc/status.rb +46 -0
  39. metadata +229 -0
@@ -0,0 +1,325 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 GkeBackup
23
+ module V1
24
+ # Represents both a request to Restore some portion of a Backup into
25
+ # a target GKE cluster and a record of the restore operation itself.
26
+ # Next id: 18
27
+ # @!attribute [r] name
28
+ # @return [::String]
29
+ # Output only. The full name of the Restore resource.
30
+ # Format: projects/*/locations/*/restorePlans/*/restores/*
31
+ # @!attribute [r] uid
32
+ # @return [::String]
33
+ # Output only. Server generated global unique identifier of
34
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
35
+ # @!attribute [r] create_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # Output only. The timestamp when this Restore resource was created.
38
+ # @!attribute [r] update_time
39
+ # @return [::Google::Protobuf::Timestamp]
40
+ # Output only. The timestamp when this Restore resource was last
41
+ # updated.
42
+ # @!attribute [rw] description
43
+ # @return [::String]
44
+ # User specified descriptive string for this Restore.
45
+ # @!attribute [rw] backup
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/*.
51
+ # @!attribute [r] cluster
52
+ # @return [::String]
53
+ # Output only. The target cluster into which this Restore will restore data.
54
+ # Valid formats:
55
+ #
56
+ # - projects/*/locations/*/clusters/*
57
+ # - projects/*/zones/*/clusters/*
58
+ #
59
+ # Inherited from parent RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#cluster cluster} value.
60
+ # @!attribute [r] restore_config
61
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig]
62
+ # Output only. Configuration of the Restore. Inherited from parent RestorePlan's
63
+ # {::Google::Cloud::GkeBackup::V1::RestorePlan#restore_config restore_config}.
64
+ # @!attribute [rw] labels
65
+ # @return [::Google::Protobuf::Map{::String => ::String}]
66
+ # A set of custom labels supplied by user.
67
+ # @!attribute [r] state
68
+ # @return [::Google::Cloud::GkeBackup::V1::Restore::State]
69
+ # Output only. The current state of the Restore.
70
+ # @!attribute [r] state_reason
71
+ # @return [::String]
72
+ # Output only. Human-readable description of why the Restore is in its current state.
73
+ # @!attribute [r] complete_time
74
+ # @return [::Google::Protobuf::Timestamp]
75
+ # Output only. Timestamp of when the restore operation completed.
76
+ # @!attribute [r] resources_restored_count
77
+ # @return [::Integer]
78
+ # Output only. Number of resources restored during the restore execution.
79
+ # @!attribute [r] resources_excluded_count
80
+ # @return [::Integer]
81
+ # Output only. Number of resources excluded during the restore execution.
82
+ # @!attribute [r] resources_failed_count
83
+ # @return [::Integer]
84
+ # Output only. Number of resources that failed to be restored during the restore
85
+ # execution.
86
+ # @!attribute [r] volumes_restored_count
87
+ # @return [::Integer]
88
+ # Output only. Number of volumes restored during the restore execution.
89
+ # @!attribute [r] etag
90
+ # @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.
93
+ # It is strongly suggested that systems make use of the `etag` in the
94
+ # read-modify-write cycle to perform restore updates in order to avoid
95
+ # race conditions: An `etag` is returned in the response to `GetRestore`,
96
+ # and systems are expected to put that etag in the request to
97
+ # `UpdateRestore` or `DeleteRestore` to ensure that their change will be
98
+ # applied to the same version of the resource.
99
+ class Restore
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+
103
+ # @!attribute [rw] key
104
+ # @return [::String]
105
+ # @!attribute [rw] value
106
+ # @return [::String]
107
+ class LabelsEntry
108
+ include ::Google::Protobuf::MessageExts
109
+ extend ::Google::Protobuf::MessageExts::ClassMethods
110
+ end
111
+
112
+ # Possible values for state of the Restore.
113
+ module State
114
+ # The Restore resource is in the process of being created.
115
+ STATE_UNSPECIFIED = 0
116
+
117
+ # The Restore resource has been created and the associated RestoreJob
118
+ # Kubernetes resource has been injected into target cluster.
119
+ CREATING = 1
120
+
121
+ # The gkebackup agent in the cluster has begun executing the restore
122
+ # operation.
123
+ IN_PROGRESS = 2
124
+
125
+ # The restore operation has completed successfully. Restored workloads may
126
+ # not yet be operational.
127
+ SUCCEEDED = 3
128
+
129
+ # The restore operation has failed.
130
+ FAILED = 4
131
+
132
+ # This Restore resource is in the process of being deleted.
133
+ DELETING = 5
134
+ end
135
+ end
136
+
137
+ # Configuration of a restore.
138
+ # Next id: 9
139
+ # @!attribute [rw] volume_data_restore_policy
140
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy]
141
+ # Specifies the mechanism to be used to restore volume data.
142
+ # Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as
143
+ # NO_VOLUME_DATA_RESTORATION).
144
+ # @!attribute [rw] cluster_resource_conflict_policy
145
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceConflictPolicy]
146
+ # Defines the behavior for handling the situation where cluster-scoped
147
+ # resources being restored already exist in the target cluster. This MUST be
148
+ # 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.
150
+ # @!attribute [rw] namespaced_resource_restore_mode
151
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::NamespacedResourceRestoreMode]
152
+ # Defines the behavior for handling the situation where sets of namespaced
153
+ # resources being restored already exist in the target cluster. This MUST be
154
+ # set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
155
+ # @!attribute [rw] cluster_resource_restore_scope
156
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceRestoreScope]
157
+ # Identifies the cluster-scoped resources to restore from the Backup.
158
+ # Not specifying it means NO cluster resource will be restored.
159
+ # @!attribute [rw] all_namespaces
160
+ # @return [::Boolean]
161
+ # Restore all namespaced resources in the Backup if set to "True".
162
+ # Specifying this field to "False" is an error.
163
+ # @!attribute [rw] selected_namespaces
164
+ # @return [::Google::Cloud::GkeBackup::V1::Namespaces]
165
+ # A list of selected Namespaces to restore from the Backup. The listed
166
+ # Namespaces and all resources contained in them will be restored.
167
+ # @!attribute [rw] selected_applications
168
+ # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames]
169
+ # A list of selected ProtectedApplications to restore. The listed
170
+ # ProtectedApplications and all the resources to which they refer will be
171
+ # restored.
172
+ # @!attribute [rw] substitution_rules
173
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::SubstitutionRule>]
174
+ # A list of transformation rules to be applied against Kubernetes resources
175
+ # as they are selected for restoration from a Backup. Rules are executed in
176
+ # order defined - this order matters, as changes made by a rule may impact
177
+ # the filtering logic of subsequent rules. An empty list means no
178
+ # substitution will occur.
179
+ class RestoreConfig
180
+ include ::Google::Protobuf::MessageExts
181
+ extend ::Google::Protobuf::MessageExts::ClassMethods
182
+
183
+ # This is a direct map to the Kubernetes GroupKind type
184
+ # [GroupKind](https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind)
185
+ # and is used for identifying specific "types" of resources to restore.
186
+ # @!attribute [rw] resource_group
187
+ # @return [::String]
188
+ # API group string of a Kubernetes resource, e.g.
189
+ # "apiextensions.k8s.io", "storage.k8s.io", etc.
190
+ # Note: use empty string for core API group
191
+ # @!attribute [rw] resource_kind
192
+ # @return [::String]
193
+ # Kind of a Kubernetes resource, e.g.
194
+ # "CustomResourceDefinition", "StorageClass", etc.
195
+ class GroupKind
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
+ end
199
+
200
+ # Identifies the cluster-scoped resources to restore from the Backup.
201
+ # @!attribute [rw] selected_group_kinds
202
+ # @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.
207
+ class ClusterResourceRestoreScope
208
+ include ::Google::Protobuf::MessageExts
209
+ extend ::Google::Protobuf::MessageExts::ClassMethods
210
+ end
211
+
212
+ # A transformation rule to be applied against Kubernetes resources as they
213
+ # are selected for restoration from a Backup. A rule contains both filtering
214
+ # logic (which resources are subject to substitution) and substitution logic.
215
+ # @!attribute [rw] target_namespaces
216
+ # @return [::Array<::String>]
217
+ # (Filtering parameter) Any resource subject to substitution must be
218
+ # contained within one of the listed Kubernetes Namespace in the Backup.
219
+ # If this field is not provided, no namespace filtering will be performed
220
+ # (all resources in all Namespaces, including all cluster-scoped resources,
221
+ # will be candidates for substitution).
222
+ # To mix cluster-scoped and namespaced resources in the same rule, use an
223
+ # empty string ("") as one of the target namespaces.
224
+ # @!attribute [rw] target_group_kinds
225
+ # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>]
226
+ # (Filtering parameter) Any resource subject to substitution must belong to
227
+ # one of the listed "types".
228
+ # If this field is not provided, no type filtering will be performed (all
229
+ # resources of all types matching previous filtering parameters will be
230
+ # candidates for substitution).
231
+ # @!attribute [rw] target_json_path
232
+ # @return [::String]
233
+ # Required. This is a [JSONPath]
234
+ # (https://kubernetes.io/docs/reference/kubectl/jsonpath/)
235
+ # expression that matches specific fields of candidate
236
+ # resources and it operates as both a filtering parameter (resources that
237
+ # are not matched with this expression will not be candidates for
238
+ # substitution) as well as a field identifier (identifies exactly which
239
+ # fields out of the candidate resources will be modified).
240
+ # @!attribute [rw] original_value_pattern
241
+ # @return [::String]
242
+ # (Filtering parameter) This is a [regular expression]
243
+ # (https://en.wikipedia.org/wiki/Regular_expression)
244
+ # that is compared against the fields matched by the target_json_path
245
+ # expression (and must also have passed the previous filters).
246
+ # Substitution will not be performed against fields whose
247
+ # value does not match this expression. If this field is NOT specified,
248
+ # then ALL fields matched by the target_json_path expression will undergo
249
+ # substitution. Note that an empty (e.g., "", rather than unspecified)
250
+ # value for for this field will only match empty fields.
251
+ # @!attribute [rw] new_value
252
+ # @return [::String]
253
+ # This is the new value to set for any fields that pass the filtering and
254
+ # selection criteria. To remove a value from a Kubernetes resource, either
255
+ # leave this field unspecified, or set it to the empty string ("").
256
+ class SubstitutionRule
257
+ include ::Google::Protobuf::MessageExts
258
+ extend ::Google::Protobuf::MessageExts::ClassMethods
259
+ end
260
+
261
+ # Defines how volume data should be restored
262
+ module VolumeDataRestorePolicy
263
+ # Unspecified (illegal).
264
+ VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0
265
+
266
+ # For each PVC to be restored, will create a new underlying volume (and PV)
267
+ # from the corresponding VolumeBackup contained within the Backup.
268
+ RESTORE_VOLUME_DATA_FROM_BACKUP = 1
269
+
270
+ # 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
272
+ # is likely only usable when restoring a workload to its original cluster.
273
+ REUSE_VOLUME_HANDLE_FROM_BACKUP = 2
274
+
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
277
+ # logic would kick in, and this would likely result in either dynamically
278
+ # provisioning blank PVs or binding to statically provisioned PVs.
279
+ NO_VOLUME_DATA_RESTORATION = 3
280
+ end
281
+
282
+ # Defines the behavior for handling the situation where cluster-scoped
283
+ # resources being restored already exist in the target cluster.
284
+ module ClusterResourceConflictPolicy
285
+ # Unspecified. Only allowed if no cluster-scoped resources will be
286
+ # restored.
287
+ CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0
288
+
289
+ # Do not attempt to restore the conflicting resource.
290
+ USE_EXISTING_VERSION = 1
291
+
292
+ # 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
295
+ # cause Kubernetes to delete all CRs of that type.
296
+ USE_BACKUP_VERSION = 2
297
+ end
298
+
299
+ # Defines the behavior for handling the situation where sets of namespaced
300
+ # resources being restored already exist in the target cluster.
301
+ module NamespacedResourceRestoreMode
302
+ # Unspecified (invalid).
303
+ NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0
304
+
305
+ # When conflicting top-level resources (either Namespaces or
306
+ # ProtectedApplications, depending upon the scope) are encountered, this
307
+ # will first trigger a delete of the conflicting resource AND ALL OF ITS
308
+ # REFERENCED RESOURCES (e.g., all resources in the Namespace or all
309
+ # resources referenced by the ProtectedApplication) before restoring the
310
+ # resources from the Backup. This mode should only be used when you are
311
+ # intending to revert some portion of a cluster to an earlier state.
312
+ DELETE_AND_RESTORE = 1
313
+
314
+ # If conflicting top-level resources (either Namespaces or
315
+ # ProtectedApplications, depending upon the scope) are encountered at the
316
+ # beginning of a restore process, the Restore will fail. If a conflict
317
+ # occurs during the restore process itself (e.g., because an out of band
318
+ # process creates conflicting resources), a conflict will be reported.
319
+ FAIL_ON_CONFLICT = 2
320
+ end
321
+ end
322
+ end
323
+ end
324
+ end
325
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 GkeBackup
23
+ module V1
24
+ # The configuration of a potential series of Restore operations to be performed
25
+ # against Backups belong to a particular BackupPlan.
26
+ # Next id: 11
27
+ # @!attribute [r] name
28
+ # @return [::String]
29
+ # Output only. The full name of the RestorePlan resource.
30
+ # Format: projects/*/locations/*/restorePlans/*.
31
+ # @!attribute [r] uid
32
+ # @return [::String]
33
+ # Output only. Server generated global unique identifier of
34
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
35
+ # @!attribute [r] create_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # Output only. The timestamp when this RestorePlan resource was
38
+ # created.
39
+ # @!attribute [r] update_time
40
+ # @return [::Google::Protobuf::Timestamp]
41
+ # Output only. The timestamp when this RestorePlan resource was last
42
+ # updated.
43
+ # @!attribute [rw] description
44
+ # @return [::String]
45
+ # User specified descriptive string for this RestorePlan.
46
+ # @!attribute [rw] backup_plan
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/*.
51
+ # @!attribute [rw] cluster
52
+ # @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:
57
+ #
58
+ # - projects/*/locations/*/clusters/*
59
+ # - projects/*/zones/*/clusters/*
60
+ # @!attribute [rw] restore_config
61
+ # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig]
62
+ # Required. Configuration of Restores created via this RestorePlan.
63
+ # @!attribute [rw] labels
64
+ # @return [::Google::Protobuf::Map{::String => ::String}]
65
+ # A set of custom labels supplied by user.
66
+ # @!attribute [r] etag
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.
70
+ # It is strongly suggested that systems make use of the `etag` in the
71
+ # read-modify-write cycle to perform restore updates in order to avoid
72
+ # race conditions: An `etag` is returned in the response to `GetRestorePlan`,
73
+ # and systems are expected to put that etag in the request to
74
+ # `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change
75
+ # will be applied to the same version of the resource.
76
+ class RestorePlan
77
+ include ::Google::Protobuf::MessageExts
78
+ extend ::Google::Protobuf::MessageExts::ClassMethods
79
+
80
+ # @!attribute [rw] key
81
+ # @return [::String]
82
+ # @!attribute [rw] value
83
+ # @return [::String]
84
+ class LabelsEntry
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,214 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 GkeBackup
23
+ module V1
24
+ # Represents the backup of a specific persistent volume as a component of a
25
+ # Backup - both the record of the operation and a pointer to the underlying
26
+ # storage-specific artifacts.
27
+ # Next id: 14
28
+ # @!attribute [r] name
29
+ # @return [::String]
30
+ # Output only. The full name of the VolumeBackup resource.
31
+ # Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*.
32
+ # @!attribute [r] uid
33
+ # @return [::String]
34
+ # Output only. Server generated global unique identifier of
35
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
36
+ # @!attribute [r] create_time
37
+ # @return [::Google::Protobuf::Timestamp]
38
+ # Output only. The timestamp when this VolumeBackup resource was
39
+ # created.
40
+ # @!attribute [r] update_time
41
+ # @return [::Google::Protobuf::Timestamp]
42
+ # Output only. The timestamp when this VolumeBackup resource was last
43
+ # updated.
44
+ # @!attribute [r] source_pvc
45
+ # @return [::Google::Cloud::GkeBackup::V1::NamespacedName]
46
+ # Output only. A reference to the source Kubernetes PVC from which this VolumeBackup
47
+ # was created.
48
+ # @!attribute [r] volume_backup_handle
49
+ # @return [::String]
50
+ # Output only. A storage system-specific opaque handle to the underlying volume backup.
51
+ # @!attribute [r] format
52
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::VolumeBackupFormat]
53
+ # Output only. The format used for the volume backup.
54
+ # @!attribute [r] storage_bytes
55
+ # @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
58
+ # multiple backups of the same volume share the same backup storage
59
+ # location. In particular, this is likely to increase in size when
60
+ # the immediately preceding backup of the same volume is deleted.
61
+ # @!attribute [r] disk_size_bytes
62
+ # @return [::Integer]
63
+ # Output only. The minimum size of the disk to which this VolumeBackup can be restored.
64
+ # @!attribute [r] complete_time
65
+ # @return [::Google::Protobuf::Timestamp]
66
+ # Output only. The timestamp when the associated underlying volume backup
67
+ # operation completed.
68
+ # @!attribute [r] state
69
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::State]
70
+ # Output only. The current state of this VolumeBackup.
71
+ # @!attribute [r] state_message
72
+ # @return [::String]
73
+ # Output only. A human readable message explaining why the VolumeBackup is in its current
74
+ # state.
75
+ # @!attribute [r] etag
76
+ # @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
+ # other. It is strongly suggested that systems make use of the `etag` in the
80
+ # read-modify-write cycle to perform volume backup updates in order to avoid
81
+ # race conditions.
82
+ class VolumeBackup
83
+ include ::Google::Protobuf::MessageExts
84
+ extend ::Google::Protobuf::MessageExts::ClassMethods
85
+
86
+ # Identifies the format used for the volume backup.
87
+ module VolumeBackupFormat
88
+ # Default value, not specified.
89
+ VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0
90
+
91
+ # Compute Engine Persistent Disk snapshot based volume backup.
92
+ GCE_PERSISTENT_DISK = 1
93
+ end
94
+
95
+ # The current state of a VolumeBackup
96
+ module State
97
+ # This is an illegal state and should not be encountered.
98
+ STATE_UNSPECIFIED = 0
99
+
100
+ # A volume for the backup was identified and backup process is about to
101
+ # start.
102
+ CREATING = 1
103
+
104
+ # The volume backup operation has begun and is in the initial "snapshot"
105
+ # phase of the process. Any defined ProtectedApplication "pre" hooks will
106
+ # be executed before entering this state and "post" hooks will be executed
107
+ # upon leaving this state.
108
+ SNAPSHOTTING = 2
109
+
110
+ # The snapshot phase of the volume backup operation has completed and
111
+ # the snapshot is now being uploaded to backup storage.
112
+ UPLOADING = 3
113
+
114
+ # The volume backup operation has completed successfully.
115
+ SUCCEEDED = 4
116
+
117
+ # The volume backup operation has failed.
118
+ FAILED = 5
119
+
120
+ # This VolumeBackup resource (and its associated artifacts) is in the
121
+ # process of being deleted.
122
+ DELETING = 6
123
+ end
124
+ end
125
+
126
+ # Represents the operation of restoring a volume from a VolumeBackup.
127
+ # Next id: 13
128
+ # @!attribute [r] name
129
+ # @return [::String]
130
+ # Output only. Full name of the VolumeRestore resource.
131
+ # Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*.
132
+ # @!attribute [r] uid
133
+ # @return [::String]
134
+ # Output only. Server generated global unique identifier of
135
+ # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
136
+ # @!attribute [r] create_time
137
+ # @return [::Google::Protobuf::Timestamp]
138
+ # Output only. The timestamp when this VolumeRestore resource was
139
+ # created.
140
+ # @!attribute [r] update_time
141
+ # @return [::Google::Protobuf::Timestamp]
142
+ # Output only. The timestamp when this VolumeRestore resource was last
143
+ # updated.
144
+ # @!attribute [r] volume_backup
145
+ # @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
+ # @!attribute [r] target_pvc
149
+ # @return [::Google::Cloud::GkeBackup::V1::NamespacedName]
150
+ # Output only. The reference to the target Kubernetes PVC to be restored.
151
+ # @!attribute [r] volume_handle
152
+ # @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.
155
+ # @!attribute [r] volume_type
156
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::VolumeType]
157
+ # Output only. The type of volume provisioned
158
+ # @!attribute [r] complete_time
159
+ # @return [::Google::Protobuf::Timestamp]
160
+ # Output only. The timestamp when the associated underlying volume
161
+ # restoration completed.
162
+ # @!attribute [r] state
163
+ # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::State]
164
+ # Output only. The current state of this VolumeRestore.
165
+ # @!attribute [r] state_message
166
+ # @return [::String]
167
+ # Output only. A human readable message explaining why the VolumeRestore is in its
168
+ # current state.
169
+ # @!attribute [r] etag
170
+ # @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
173
+ # other. It is strongly suggested that systems make use of the `etag` in the
174
+ # read-modify-write cycle to perform volume restore updates in order to avoid
175
+ # race conditions.
176
+ class VolumeRestore
177
+ include ::Google::Protobuf::MessageExts
178
+ extend ::Google::Protobuf::MessageExts::ClassMethods
179
+
180
+ # Supported volume types.
181
+ module VolumeType
182
+ # Default
183
+ VOLUME_TYPE_UNSPECIFIED = 0
184
+
185
+ # Compute Engine Persistent Disk volume
186
+ GCE_PERSISTENT_DISK = 1
187
+ end
188
+
189
+ # The current state of a VolumeRestore
190
+ module State
191
+ # This is an illegal state and should not be encountered.
192
+ STATE_UNSPECIFIED = 0
193
+
194
+ # A volume for the restore was identified and restore process is about to
195
+ # start.
196
+ CREATING = 1
197
+
198
+ # The volume is currently being restored.
199
+ RESTORING = 2
200
+
201
+ # The volume has been successfully restored.
202
+ SUCCEEDED = 3
203
+
204
+ # The volume restoration process failed.
205
+ FAILED = 4
206
+
207
+ # This VolumeRestore resource is in the process of being deleted.
208
+ DELETING = 5
209
+ end
210
+ end
211
+ end
212
+ end
213
+ end
214
+ end