diff --git a/GkeBackup/metadata/V1/Backup.php b/GkeBackup/metadata/V1/Backup.php
index 29dacb16793..269a6965371 100644
Binary files a/GkeBackup/metadata/V1/Backup.php and b/GkeBackup/metadata/V1/Backup.php differ
diff --git a/GkeBackup/metadata/V1/BackupPlan.php b/GkeBackup/metadata/V1/BackupPlan.php
index cc97d952827..60c79d48dfc 100644
Binary files a/GkeBackup/metadata/V1/BackupPlan.php and b/GkeBackup/metadata/V1/BackupPlan.php differ
diff --git a/GkeBackup/metadata/V1/Common.php b/GkeBackup/metadata/V1/Common.php
index ff4432dc491..033eea30b1d 100644
Binary files a/GkeBackup/metadata/V1/Common.php and b/GkeBackup/metadata/V1/Common.php differ
diff --git a/GkeBackup/metadata/V1/Restore.php b/GkeBackup/metadata/V1/Restore.php
index 331187846cb..4db46a950b0 100644
Binary files a/GkeBackup/metadata/V1/Restore.php and b/GkeBackup/metadata/V1/Restore.php differ
diff --git a/GkeBackup/src/V1/Backup.php b/GkeBackup/src/V1/Backup.php
index 14f35f1f0cd..2f34b6feac7 100644
--- a/GkeBackup/src/V1/Backup.php
+++ b/GkeBackup/src/V1/Backup.php
@@ -207,6 +207,17 @@ class Backup extends \Google\Protobuf\Internal\Message
* Generated from protobuf field int64 config_backup_size_bytes = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $config_backup_size_bytes = 0;
+ /**
+ * Output only. If false, Backup will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Inherited from the parent BackupPlan's
+ * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode]
+ * value.
+ *
+ * Generated from protobuf field bool permissive_mode = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $permissive_mode = false;
protected $backup_scope;
/**
@@ -316,6 +327,13 @@ class Backup extends \Google\Protobuf\Internal\Message
* Output only. The total number of Kubernetes Pods contained in the Backup.
* @type int|string $config_backup_size_bytes
* Output only. The size of the config backup in bytes.
+ * @type bool $permissive_mode
+ * Output only. If false, Backup will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Inherited from the parent BackupPlan's
+ * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode]
+ * value.
* }
*/
public function __construct($data = NULL) {
@@ -1204,6 +1222,42 @@ public function setConfigBackupSizeBytes($var)
return $this;
}
+ /**
+ * Output only. If false, Backup will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Inherited from the parent BackupPlan's
+ * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode]
+ * value.
+ *
+ * Generated from protobuf field bool permissive_mode = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getPermissiveMode()
+ {
+ return $this->permissive_mode;
+ }
+
+ /**
+ * Output only. If false, Backup will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Inherited from the parent BackupPlan's
+ * [permissive_mode][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.permissive_mode]
+ * value.
+ *
+ * Generated from protobuf field bool permissive_mode = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setPermissiveMode($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->permissive_mode = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/GkeBackup/src/V1/BackupPlan/BackupConfig.php b/GkeBackup/src/V1/BackupPlan/BackupConfig.php
index 78ecbf783f3..d71282e86a2 100644
--- a/GkeBackup/src/V1/BackupPlan/BackupConfig.php
+++ b/GkeBackup/src/V1/BackupPlan/BackupConfig.php
@@ -41,6 +41,15 @@ class BackupConfig extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
private $encryption_key = null;
+ /**
+ * Optional. If false, Backups will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Default: False
+ *
+ * Generated from protobuf field bool permissive_mode = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $permissive_mode = false;
protected $backup_scope;
/**
@@ -69,6 +78,11 @@ class BackupConfig extends \Google\Protobuf\Internal\Message
* used to encrypt the "config" portion (the Kubernetes resources) of
* Backups created via this plan.
* Default (empty): Config backup artifacts will not be encrypted.
+ * @type bool $permissive_mode
+ * Optional. If false, Backups will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Default: False
* }
*/
public function __construct($data = NULL) {
@@ -273,6 +287,38 @@ public function setEncryptionKey($var)
return $this;
}
+ /**
+ * Optional. If false, Backups will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Default: False
+ *
+ * Generated from protobuf field bool permissive_mode = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool
+ */
+ public function getPermissiveMode()
+ {
+ return $this->permissive_mode;
+ }
+
+ /**
+ * Optional. If false, Backups will fail when Backup for GKE detects
+ * Kubernetes configuration that is non-standard or
+ * requires additional setup to restore.
+ * Default: False
+ *
+ * Generated from protobuf field bool permissive_mode = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool $var
+ * @return $this
+ */
+ public function setPermissiveMode($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->permissive_mode = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/GkeBackup/src/V1/ExclusionWindow.php b/GkeBackup/src/V1/ExclusionWindow.php
index 536795ca6c1..0a1f94d742d 100644
--- a/GkeBackup/src/V1/ExclusionWindow.php
+++ b/GkeBackup/src/V1/ExclusionWindow.php
@@ -24,8 +24,10 @@ class ExclusionWindow extends \Google\Protobuf\Internal\Message
*/
private $start_time = null;
/**
- * Required. Specifies duration of the window. Restrictions for duration based
- * on the recurrence type to allow some time for backup to happen:
+ * Required. Specifies duration of the window.
+ * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
+ * Additional restrictions based on the recurrence type to allow some time for
+ * backup to happen:
* - single_occurrence_date: no restriction, but UI may warn about this when
* duration >= target RPO
* - daily window: duration < 24 hours
@@ -48,8 +50,10 @@ class ExclusionWindow extends \Google\Protobuf\Internal\Message
* Required. Specifies the start time of the window using time of the day in
* UTC.
* @type \Google\Protobuf\Duration $duration
- * Required. Specifies duration of the window. Restrictions for duration based
- * on the recurrence type to allow some time for backup to happen:
+ * Required. Specifies duration of the window.
+ * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
+ * Additional restrictions based on the recurrence type to allow some time for
+ * backup to happen:
* - single_occurrence_date: no restriction, but UI may warn about this when
* duration >= target RPO
* - daily window: duration < 24 hours
@@ -110,8 +114,10 @@ public function setStartTime($var)
}
/**
- * Required. Specifies duration of the window. Restrictions for duration based
- * on the recurrence type to allow some time for backup to happen:
+ * Required. Specifies duration of the window.
+ * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
+ * Additional restrictions based on the recurrence type to allow some time for
+ * backup to happen:
* - single_occurrence_date: no restriction, but UI may warn about this when
* duration >= target RPO
* - daily window: duration < 24 hours
@@ -138,8 +144,10 @@ public function clearDuration()
}
/**
- * Required. Specifies duration of the window. Restrictions for duration based
- * on the recurrence type to allow some time for backup to happen:
+ * Required. Specifies duration of the window.
+ * Duration must be >= 5 minutes and < (target RPO - 20 minutes).
+ * Additional restrictions based on the recurrence type to allow some time for
+ * backup to happen:
* - single_occurrence_date: no restriction, but UI may warn about this when
* duration >= target RPO
* - daily window: duration < 24 hours
diff --git a/GkeBackup/src/V1/ResourceSelector.php b/GkeBackup/src/V1/ResourceSelector.php
new file mode 100644
index 00000000000..d31e84973d5
--- /dev/null
+++ b/GkeBackup/src/V1/ResourceSelector.php
@@ -0,0 +1,232 @@
+google.cloud.gkebackup.v1.ResourceSelector
+ */
+class ResourceSelector extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Selects resources using their Kubernetes GroupKinds. If
+ * specified, only resources of provided GroupKind will be selected.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $group_kind = null;
+ /**
+ * Optional. Selects resources using their resource names. If specified,
+ * only resources with the provided name will be selected.
+ *
+ * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $name = '';
+ /**
+ * Optional. Selects resources using their namespaces. This only applies to
+ * namespace scoped resources and cannot be used for selecting
+ * cluster scoped resources. If specified, only resources in the provided
+ * namespace will be selected. If not specified, the filter will apply to
+ * both cluster scoped and namespace scoped resources (e.g. name or label).
+ * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
+ * itself will be restored if and only if any resources within the namespace
+ * are restored.
+ *
+ * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $namespace = '';
+ /**
+ * Optional. Selects resources using Kubernetes
+ * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
+ * If specified, a resource will be selected if and only if the resource
+ * has all of the provided labels and all the label values match.
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $labels;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $group_kind
+ * Optional. Selects resources using their Kubernetes GroupKinds. If
+ * specified, only resources of provided GroupKind will be selected.
+ * @type string $name
+ * Optional. Selects resources using their resource names. If specified,
+ * only resources with the provided name will be selected.
+ * @type string $namespace
+ * Optional. Selects resources using their namespaces. This only applies to
+ * namespace scoped resources and cannot be used for selecting
+ * cluster scoped resources. If specified, only resources in the provided
+ * namespace will be selected. If not specified, the filter will apply to
+ * both cluster scoped and namespace scoped resources (e.g. name or label).
+ * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
+ * itself will be restored if and only if any resources within the namespace
+ * are restored.
+ * @type array|\Google\Protobuf\Internal\MapField $labels
+ * Optional. Selects resources using Kubernetes
+ * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
+ * If specified, a resource will be selected if and only if the resource
+ * has all of the provided labels and all the label values match.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Selects resources using their Kubernetes GroupKinds. If
+ * specified, only resources of provided GroupKind will be selected.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind|null
+ */
+ public function getGroupKind()
+ {
+ return $this->group_kind;
+ }
+
+ public function hasGroupKind()
+ {
+ return isset($this->group_kind);
+ }
+
+ public function clearGroupKind()
+ {
+ unset($this->group_kind);
+ }
+
+ /**
+ * Optional. Selects resources using their Kubernetes GroupKinds. If
+ * specified, only resources of provided GroupKind will be selected.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $var
+ * @return $this
+ */
+ public function setGroupKind($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class);
+ $this->group_kind = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Selects resources using their resource names. If specified,
+ * only resources with the provided name will be selected.
+ *
+ * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Optional. Selects resources using their resource names. If specified,
+ * only resources with the provided name will be selected.
+ *
+ * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Selects resources using their namespaces. This only applies to
+ * namespace scoped resources and cannot be used for selecting
+ * cluster scoped resources. If specified, only resources in the provided
+ * namespace will be selected. If not specified, the filter will apply to
+ * both cluster scoped and namespace scoped resources (e.g. name or label).
+ * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
+ * itself will be restored if and only if any resources within the namespace
+ * are restored.
+ *
+ * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getNamespace()
+ {
+ return $this->namespace;
+ }
+
+ /**
+ * Optional. Selects resources using their namespaces. This only applies to
+ * namespace scoped resources and cannot be used for selecting
+ * cluster scoped resources. If specified, only resources in the provided
+ * namespace will be selected. If not specified, the filter will apply to
+ * both cluster scoped and namespace scoped resources (e.g. name or label).
+ * The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource
+ * itself will be restored if and only if any resources within the namespace
+ * are restored.
+ *
+ * Generated from protobuf field string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setNamespace($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->namespace = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Selects resources using Kubernetes
+ * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
+ * If specified, a resource will be selected if and only if the resource
+ * has all of the provided labels and all the label values match.
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\MapField
+ */
+ public function getLabels()
+ {
+ return $this->labels;
+ }
+
+ /**
+ * Optional. Selects resources using Kubernetes
+ * [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
+ * If specified, a resource will be selected if and only if the resource
+ * has all of the provided labels and all the label values match.
+ *
+ * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array|\Google\Protobuf\Internal\MapField $var
+ * @return $this
+ */
+ public function setLabels($var)
+ {
+ $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
+ $this->labels = $arr;
+
+ return $this;
+ }
+
+}
+
diff --git a/GkeBackup/src/V1/Restore.php b/GkeBackup/src/V1/Restore.php
index 507ac802f4b..2d71281ee42 100644
--- a/GkeBackup/src/V1/Restore.php
+++ b/GkeBackup/src/V1/Restore.php
@@ -142,6 +142,26 @@ class Restore extends \Google\Protobuf\Internal\Message
* Generated from protobuf field string etag = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $etag = '';
+ /**
+ * Optional. Immutable. Filters resources for `Restore`. If not specified, the
+ * scope of the restore will remain the same as defined in the `RestorePlan`.
+ * If this is specified, and no resources are matched by the
+ * `inclusion_filters` or everyting is excluded by the `exclusion_filters`,
+ * nothing will be restored. This filter can only be specified if the value of
+ * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode]
+ * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or
+ * `MERGE_REPLACE_ON_CONFLICT`.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.Filter filter = 18 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
+ */
+ private $filter = null;
+ /**
+ * Optional. Immutable. Overrides the volume data restore policies selected in
+ * the Restore Config for override-scoped resources.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride volume_data_restore_policy_overrides = 19 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
+ */
+ private $volume_data_restore_policy_overrides;
/**
* Constructor.
@@ -207,6 +227,18 @@ class Restore extends \Google\Protobuf\Internal\Message
* and systems are expected to put that etag in the request to
* `UpdateRestore` or `DeleteRestore` to ensure that their change will be
* applied to the same version of the resource.
+ * @type \Google\Cloud\GkeBackup\V1\Restore\Filter $filter
+ * Optional. Immutable. Filters resources for `Restore`. If not specified, the
+ * scope of the restore will remain the same as defined in the `RestorePlan`.
+ * If this is specified, and no resources are matched by the
+ * `inclusion_filters` or everyting is excluded by the `exclusion_filters`,
+ * nothing will be restored. This filter can only be specified if the value of
+ * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode]
+ * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or
+ * `MERGE_REPLACE_ON_CONFLICT`.
+ * @type array<\Google\Cloud\GkeBackup\V1\VolumeDataRestorePolicyOverride>|\Google\Protobuf\Internal\RepeatedField $volume_data_restore_policy_overrides
+ * Optional. Immutable. Overrides the volume data restore policies selected in
+ * the Restore Config for override-scoped resources.
* }
*/
public function __construct($data = NULL) {
@@ -744,5 +776,83 @@ public function setEtag($var)
return $this;
}
+ /**
+ * Optional. Immutable. Filters resources for `Restore`. If not specified, the
+ * scope of the restore will remain the same as defined in the `RestorePlan`.
+ * If this is specified, and no resources are matched by the
+ * `inclusion_filters` or everyting is excluded by the `exclusion_filters`,
+ * nothing will be restored. This filter can only be specified if the value of
+ * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode]
+ * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or
+ * `MERGE_REPLACE_ON_CONFLICT`.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.Filter filter = 18 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\GkeBackup\V1\Restore\Filter|null
+ */
+ public function getFilter()
+ {
+ return $this->filter;
+ }
+
+ public function hasFilter()
+ {
+ return isset($this->filter);
+ }
+
+ public function clearFilter()
+ {
+ unset($this->filter);
+ }
+
+ /**
+ * Optional. Immutable. Filters resources for `Restore`. If not specified, the
+ * scope of the restore will remain the same as defined in the `RestorePlan`.
+ * If this is specified, and no resources are matched by the
+ * `inclusion_filters` or everyting is excluded by the `exclusion_filters`,
+ * nothing will be restored. This filter can only be specified if the value of
+ * [namespaced_resource_restore_mode][google.cloud.gkebackup.v1.RestoreConfig.namespaced_resource_restore_mode]
+ * is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or
+ * `MERGE_REPLACE_ON_CONFLICT`.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.Restore.Filter filter = 18 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\GkeBackup\V1\Restore\Filter $var
+ * @return $this
+ */
+ public function setFilter($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore\Filter::class);
+ $this->filter = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Immutable. Overrides the volume data restore policies selected in
+ * the Restore Config for override-scoped resources.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride volume_data_restore_policy_overrides = 19 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getVolumeDataRestorePolicyOverrides()
+ {
+ return $this->volume_data_restore_policy_overrides;
+ }
+
+ /**
+ * Optional. Immutable. Overrides the volume data restore policies selected in
+ * the Restore Config for override-scoped resources.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride volume_data_restore_policy_overrides = 19 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\GkeBackup\V1\VolumeDataRestorePolicyOverride>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setVolumeDataRestorePolicyOverrides($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\VolumeDataRestorePolicyOverride::class);
+ $this->volume_data_restore_policy_overrides = $arr;
+
+ return $this;
+ }
+
}
diff --git a/GkeBackup/src/V1/Restore/Filter.php b/GkeBackup/src/V1/Restore/Filter.php
new file mode 100644
index 00000000000..ea224f4519b
--- /dev/null
+++ b/GkeBackup/src/V1/Restore/Filter.php
@@ -0,0 +1,126 @@
+google.cloud.gkebackup.v1.Restore.Filter
+ */
+class Filter extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Selects resources for restoration. If specified, only resources
+ * which match `inclusion_filters` will be selected for restoration. A
+ * resource will be selected if it matches any `ResourceSelector` of the
+ * `inclusion_filters`.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector inclusion_filters = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $inclusion_filters;
+ /**
+ * Optional. Excludes resources from restoration. If specified,
+ * a resource will not be restored if it matches
+ * any `ResourceSelector` of the `exclusion_filters`.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector exclusion_filters = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $exclusion_filters;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $inclusion_filters
+ * Optional. Selects resources for restoration. If specified, only resources
+ * which match `inclusion_filters` will be selected for restoration. A
+ * resource will be selected if it matches any `ResourceSelector` of the
+ * `inclusion_filters`.
+ * @type array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $exclusion_filters
+ * Optional. Excludes resources from restoration. If specified,
+ * a resource will not be restored if it matches
+ * any `ResourceSelector` of the `exclusion_filters`.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Selects resources for restoration. If specified, only resources
+ * which match `inclusion_filters` will be selected for restoration. A
+ * resource will be selected if it matches any `ResourceSelector` of the
+ * `inclusion_filters`.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector inclusion_filters = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getInclusionFilters()
+ {
+ return $this->inclusion_filters;
+ }
+
+ /**
+ * Optional. Selects resources for restoration. If specified, only resources
+ * which match `inclusion_filters` will be selected for restoration. A
+ * resource will be selected if it matches any `ResourceSelector` of the
+ * `inclusion_filters`.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector inclusion_filters = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setInclusionFilters($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\ResourceSelector::class);
+ $this->inclusion_filters = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Excludes resources from restoration. If specified,
+ * a resource will not be restored if it matches
+ * any `ResourceSelector` of the `exclusion_filters`.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector exclusion_filters = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getExclusionFilters()
+ {
+ return $this->exclusion_filters;
+ }
+
+ /**
+ * Optional. Excludes resources from restoration. If specified,
+ * a resource will not be restored if it matches
+ * any `ResourceSelector` of the `exclusion_filters`.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ResourceSelector exclusion_filters = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\GkeBackup\V1\ResourceSelector>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setExclusionFilters($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\ResourceSelector::class);
+ $this->exclusion_filters = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/GkeBackup/src/V1/RestoreConfig.php b/GkeBackup/src/V1/RestoreConfig.php
index 8ed78f7c6f7..ae1e02288f0 100644
--- a/GkeBackup/src/V1/RestoreConfig.php
+++ b/GkeBackup/src/V1/RestoreConfig.php
@@ -70,6 +70,20 @@ class RestoreConfig extends \Google\Protobuf\Internal\Message
* Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL];
*/
private $transformation_rules;
+ /**
+ * Optional. A table that binds volumes by their scope to a restore policy.
+ * Bindings must have a unique scope. Any volumes not scoped in the bindings
+ * are subject to the policy defined in volume_data_restore_policy.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $volume_data_restore_policy_bindings;
+ /**
+ * Optional. RestoreOrder contains custom ordering to use on a Restore.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $restore_order = null;
protected $namespaced_resource_restore_scope;
/**
@@ -125,6 +139,12 @@ class RestoreConfig extends \Google\Protobuf\Internal\Message
* executed in order defined - this order matters, as changes made by a rule
* may impact the filtering logic of subsequent rules. An empty list means no
* transformation will occur.
+ * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicyBinding>|\Google\Protobuf\Internal\RepeatedField $volume_data_restore_policy_bindings
+ * Optional. A table that binds volumes by their scope to a restore policy.
+ * Bindings must have a unique scope. Any volumes not scoped in the bindings
+ * are subject to the policy defined in volume_data_restore_policy.
+ * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder $restore_order
+ * Optional. RestoreOrder contains custom ordering to use on a Restore.
* }
*/
public function __construct($data = NULL) {
@@ -503,6 +523,72 @@ public function setTransformationRules($var)
return $this;
}
+ /**
+ * Optional. A table that binds volumes by their scope to a restore policy.
+ * Bindings must have a unique scope. Any volumes not scoped in the bindings
+ * are subject to the policy defined in volume_data_restore_policy.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getVolumeDataRestorePolicyBindings()
+ {
+ return $this->volume_data_restore_policy_bindings;
+ }
+
+ /**
+ * Optional. A table that binds volumes by their scope to a restore policy.
+ * Bindings must have a unique scope. Any volumes not scoped in the bindings
+ * are subject to the policy defined in volume_data_restore_policy.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding volume_data_restore_policy_bindings = 12 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicyBinding>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setVolumeDataRestorePolicyBindings($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicyBinding::class);
+ $this->volume_data_restore_policy_bindings = $arr;
+
+ return $this;
+ }
+
+ /**
+ * Optional. RestoreOrder contains custom ordering to use on a Restore.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder|null
+ */
+ public function getRestoreOrder()
+ {
+ return $this->restore_order;
+ }
+
+ public function hasRestoreOrder()
+ {
+ return isset($this->restore_order);
+ }
+
+ public function clearRestoreOrder()
+ {
+ unset($this->restore_order);
+ }
+
+ /**
+ * Optional. RestoreOrder contains custom ordering to use on a Restore.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder restore_order = 13 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder $var
+ * @return $this
+ */
+ public function setRestoreOrder($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder::class);
+ $this->restore_order = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/GkeBackup/src/V1/RestoreConfig/NamespacedResourceRestoreMode.php b/GkeBackup/src/V1/RestoreConfig/NamespacedResourceRestoreMode.php
index 6cf09d2dff1..54bc9a892d8 100644
--- a/GkeBackup/src/V1/RestoreConfig/NamespacedResourceRestoreMode.php
+++ b/GkeBackup/src/V1/RestoreConfig/NamespacedResourceRestoreMode.php
@@ -42,11 +42,56 @@ class NamespacedResourceRestoreMode
* Generated from protobuf enum FAIL_ON_CONFLICT = 2;
*/
const FAIL_ON_CONFLICT = 2;
+ /**
+ * This mode merges the backup and the target cluster and skips the
+ * conflicting resources. If a single resource to restore exists in the
+ * cluster before restoration, the resource will be skipped, otherwise it
+ * will be restored.
+ *
+ * Generated from protobuf enum MERGE_SKIP_ON_CONFLICT = 3;
+ */
+ const MERGE_SKIP_ON_CONFLICT = 3;
+ /**
+ * This mode merges the backup and the target cluster and skips the
+ * conflicting resources except volume data. If a PVC to restore already
+ * exists, this mode will restore/reconnect the volume without overwriting
+ * the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will
+ * apply the volume data policy for the conflicting PVCs:
+ * - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the
+ * reclaim policy of the original PV;
+ * - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim
+ * policy of the original PV;
+ * - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim
+ * policy of the original PV.
+ * Note that this mode could cause data loss as the original PV can be
+ * retained or deleted depending on its reclaim policy.
+ *
+ * Generated from protobuf enum MERGE_REPLACE_VOLUME_ON_CONFLICT = 4;
+ */
+ const MERGE_REPLACE_VOLUME_ON_CONFLICT = 4;
+ /**
+ * This mode merges the backup and the target cluster and replaces the
+ * conflicting resources with the ones in the backup. If a single resource
+ * to restore exists in the cluster before restoration, the resource will be
+ * replaced with the one from the backup. To replace an existing resource,
+ * the first attempt is to update the resource to match the one from the
+ * backup; if the update fails, the second attempt is to delete the resource
+ * and restore it from the backup.
+ * Note that this mode could cause data loss as it replaces the existing
+ * resources in the target cluster, and the original PV can be retained or
+ * deleted depending on its reclaim policy.
+ *
+ * Generated from protobuf enum MERGE_REPLACE_ON_CONFLICT = 5;
+ */
+ const MERGE_REPLACE_ON_CONFLICT = 5;
private static $valueToName = [
self::NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED => 'NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED',
self::DELETE_AND_RESTORE => 'DELETE_AND_RESTORE',
self::FAIL_ON_CONFLICT => 'FAIL_ON_CONFLICT',
+ self::MERGE_SKIP_ON_CONFLICT => 'MERGE_SKIP_ON_CONFLICT',
+ self::MERGE_REPLACE_VOLUME_ON_CONFLICT => 'MERGE_REPLACE_VOLUME_ON_CONFLICT',
+ self::MERGE_REPLACE_ON_CONFLICT => 'MERGE_REPLACE_ON_CONFLICT',
];
public static function name($value)
diff --git a/GkeBackup/src/V1/RestoreConfig/RestoreOrder.php b/GkeBackup/src/V1/RestoreConfig/RestoreOrder.php
new file mode 100644
index 00000000000..5d143f1454a
--- /dev/null
+++ b/GkeBackup/src/V1/RestoreConfig/RestoreOrder.php
@@ -0,0 +1,77 @@
+google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder
+ */
+class RestoreOrder extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. Contains a list of group kind dependency pairs provided
+ * by the customer, that is used by Backup for GKE to
+ * generate a group kind restore order.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $group_kind_dependencies;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder\GroupKindDependency>|\Google\Protobuf\Internal\RepeatedField $group_kind_dependencies
+ * Optional. Contains a list of group kind dependency pairs provided
+ * by the customer, that is used by Backup for GKE to
+ * generate a group kind restore order.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. Contains a list of group kind dependency pairs provided
+ * by the customer, that is used by Backup for GKE to
+ * generate a group kind restore order.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Internal\RepeatedField
+ */
+ public function getGroupKindDependencies()
+ {
+ return $this->group_kind_dependencies;
+ }
+
+ /**
+ * Optional. Contains a list of group kind dependency pairs provided
+ * by the customer, that is used by Backup for GKE to
+ * generate a group kind restore order.
+ *
+ * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency group_kind_dependencies = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder\GroupKindDependency>|\Google\Protobuf\Internal\RepeatedField $var
+ * @return $this
+ */
+ public function setGroupKindDependencies($var)
+ {
+ $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\RestoreConfig\RestoreOrder\GroupKindDependency::class);
+ $this->group_kind_dependencies = $arr;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/GkeBackup/src/V1/RestoreConfig/RestoreOrder/GroupKindDependency.php b/GkeBackup/src/V1/RestoreConfig/RestoreOrder/GroupKindDependency.php
new file mode 100644
index 00000000000..ba8033e276d
--- /dev/null
+++ b/GkeBackup/src/V1/RestoreConfig/RestoreOrder/GroupKindDependency.php
@@ -0,0 +1,130 @@
+google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency
+ */
+class GroupKindDependency extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The satisfying group kind must be restored first
+ * in order to satisfy the dependency.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $satisfying = null;
+ /**
+ * Required. The requiring group kind requires that the other
+ * group kind be restored first.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $requiring = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $satisfying
+ * Required. The satisfying group kind must be restored first
+ * in order to satisfy the dependency.
+ * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $requiring
+ * Required. The requiring group kind requires that the other
+ * group kind be restored first.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The satisfying group kind must be restored first
+ * in order to satisfy the dependency.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind|null
+ */
+ public function getSatisfying()
+ {
+ return $this->satisfying;
+ }
+
+ public function hasSatisfying()
+ {
+ return isset($this->satisfying);
+ }
+
+ public function clearSatisfying()
+ {
+ unset($this->satisfying);
+ }
+
+ /**
+ * Required. The satisfying group kind must be restored first
+ * in order to satisfy the dependency.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind satisfying = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $var
+ * @return $this
+ */
+ public function setSatisfying($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class);
+ $this->satisfying = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The requiring group kind requires that the other
+ * group kind be restored first.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind|null
+ */
+ public function getRequiring()
+ {
+ return $this->requiring;
+ }
+
+ public function hasRequiring()
+ {
+ return isset($this->requiring);
+ }
+
+ public function clearRequiring()
+ {
+ unset($this->requiring);
+ }
+
+ /**
+ * Required. The requiring group kind requires that the other
+ * group kind be restored first.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.GroupKind requiring = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind $var
+ * @return $this
+ */
+ public function setRequiring($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind::class);
+ $this->requiring = $var;
+
+ return $this;
+ }
+
+}
+
+
diff --git a/GkeBackup/src/V1/RestoreConfig/VolumeDataRestorePolicyBinding.php b/GkeBackup/src/V1/RestoreConfig/VolumeDataRestorePolicyBinding.php
new file mode 100644
index 00000000000..8518f2c8ea0
--- /dev/null
+++ b/GkeBackup/src/V1/RestoreConfig/VolumeDataRestorePolicyBinding.php
@@ -0,0 +1,117 @@
+google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding
+ */
+class VolumeDataRestorePolicyBinding extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $policy = 0;
+ protected $scope;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $policy
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ * @type int $volume_type
+ * The volume type, as determined by the PVC's bound PV,
+ * to apply the policy to.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getPolicy()
+ {
+ return $this->policy;
+ }
+
+ /**
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setPolicy($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class);
+ $this->policy = $var;
+
+ return $this;
+ }
+
+ /**
+ * The volume type, as determined by the PVC's bound PV,
+ * to apply the policy to.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
+ * @return int
+ */
+ public function getVolumeType()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasVolumeType()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * The volume type, as determined by the PVC's bound PV,
+ * to apply the policy to.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType volume_type = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setVolumeType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\VolumeTypeEnum\VolumeType::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getScope()
+ {
+ return $this->whichOneof("scope");
+ }
+
+}
+
+
diff --git a/GkeBackup/src/V1/VolumeDataRestorePolicyOverride.php b/GkeBackup/src/V1/VolumeDataRestorePolicyOverride.php
new file mode 100644
index 00000000000..bca55959e4e
--- /dev/null
+++ b/GkeBackup/src/V1/VolumeDataRestorePolicyOverride.php
@@ -0,0 +1,113 @@
+google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride
+ */
+class VolumeDataRestorePolicyOverride extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $policy = 0;
+ protected $scope;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $policy
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ * @type \Google\Cloud\GkeBackup\V1\NamespacedNames $selected_pvcs
+ * A list of PVCs to apply the policy override to.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Restore::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return int
+ */
+ public function getPolicy()
+ {
+ return $this->policy;
+ }
+
+ /**
+ * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
+ * scope.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param int $var
+ * @return $this
+ */
+ public function setPolicy($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\GkeBackup\V1\RestoreConfig\VolumeDataRestorePolicy::class);
+ $this->policy = $var;
+
+ return $this;
+ }
+
+ /**
+ * A list of PVCs to apply the policy override to.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2;
+ * @return \Google\Cloud\GkeBackup\V1\NamespacedNames|null
+ */
+ public function getSelectedPvcs()
+ {
+ return $this->readOneof(2);
+ }
+
+ public function hasSelectedPvcs()
+ {
+ return $this->hasOneof(2);
+ }
+
+ /**
+ * A list of PVCs to apply the policy override to.
+ *
+ * Generated from protobuf field .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2;
+ * @param \Google\Cloud\GkeBackup\V1\NamespacedNames $var
+ * @return $this
+ */
+ public function setSelectedPvcs($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\NamespacedNames::class);
+ $this->writeOneof(2, $var);
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getScope()
+ {
+ return $this->whichOneof("scope");
+ }
+
+}
+
diff --git a/GkeBackup/src/V1/VolumeTypeEnum.php b/GkeBackup/src/V1/VolumeTypeEnum.php
new file mode 100644
index 00000000000..2ca64f837a7
--- /dev/null
+++ b/GkeBackup/src/V1/VolumeTypeEnum.php
@@ -0,0 +1,33 @@
+google.cloud.gkebackup.v1.VolumeTypeEnum
+ */
+class VolumeTypeEnum extends \Google\Protobuf\Internal\Message
+{
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Gkebackup\V1\Common::initOnce();
+ parent::__construct($data);
+ }
+
+}
+
diff --git a/GkeBackup/src/V1/VolumeTypeEnum/VolumeType.php b/GkeBackup/src/V1/VolumeTypeEnum/VolumeType.php
new file mode 100644
index 00000000000..1c14119fedd
--- /dev/null
+++ b/GkeBackup/src/V1/VolumeTypeEnum/VolumeType.php
@@ -0,0 +1,55 @@
+google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType
+ */
+class VolumeType
+{
+ /**
+ * Default
+ *
+ * Generated from protobuf enum VOLUME_TYPE_UNSPECIFIED = 0;
+ */
+ const VOLUME_TYPE_UNSPECIFIED = 0;
+ /**
+ * Compute Engine Persistent Disk volume
+ *
+ * Generated from protobuf enum GCE_PERSISTENT_DISK = 1;
+ */
+ const GCE_PERSISTENT_DISK = 1;
+
+ private static $valueToName = [
+ self::VOLUME_TYPE_UNSPECIFIED => 'VOLUME_TYPE_UNSPECIFIED',
+ self::GCE_PERSISTENT_DISK => 'GCE_PERSISTENT_DISK',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php b/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php
index 38ececbf157..877edf288ec 100644
--- a/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php
+++ b/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php
@@ -118,6 +118,7 @@ public function createBackupTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -135,6 +136,7 @@ public function createBackupTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
@@ -1174,6 +1176,7 @@ public function getBackupTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name2);
$expectedResponse->setUid($uid);
@@ -1191,6 +1194,7 @@ public function getBackupTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]');
@@ -2116,6 +2120,7 @@ public function updateBackupTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -2133,6 +2138,7 @@ public function updateBackupTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
diff --git a/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php b/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php
index 765151839ca..eb8bda8b99a 100644
--- a/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php
+++ b/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php
@@ -148,6 +148,7 @@ public function createBackupTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -165,6 +166,7 @@ public function createBackupTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
@@ -1248,6 +1250,7 @@ public function getBackupTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name2);
$expectedResponse->setUid($uid);
@@ -1265,6 +1268,7 @@ public function getBackupTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]');
@@ -2242,6 +2246,7 @@ public function updateBackupTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -2259,6 +2264,7 @@ public function updateBackupTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
@@ -3164,6 +3170,7 @@ public function createBackupAsyncTest()
$description = 'description-1724546052';
$podCount = 977657493;
$configBackupSizeBytes = 606785139;
+ $permissiveMode = false;
$expectedResponse = new Backup();
$expectedResponse->setName($name);
$expectedResponse->setUid($uid);
@@ -3181,6 +3188,7 @@ public function createBackupAsyncTest()
$expectedResponse->setDescription($description);
$expectedResponse->setPodCount($podCount);
$expectedResponse->setConfigBackupSizeBytes($configBackupSizeBytes);
+ $expectedResponse->setPermissiveMode($permissiveMode);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();