Struct google_api_proto::google::cloud::gkebackup::v1::Backup

source ·
pub struct Backup {
Show 26 fields pub name: String, pub uid: String, pub create_time: Option<Timestamp>, pub update_time: Option<Timestamp>, pub manual: bool, pub labels: BTreeMap<String, String>, pub delete_lock_days: i32, pub delete_lock_expire_time: Option<Timestamp>, pub retain_days: i32, pub retain_expire_time: Option<Timestamp>, pub encryption_key: Option<EncryptionKey>, pub contains_volume_data: bool, pub contains_secrets: bool, pub cluster_metadata: Option<ClusterMetadata>, pub state: i32, pub state_reason: String, pub complete_time: Option<Timestamp>, pub resource_count: i32, pub volume_count: i32, pub size_bytes: i64, pub etag: String, pub description: String, pub pod_count: i32, pub config_backup_size_bytes: i64, pub permissive_mode: bool, pub backup_scope: Option<BackupScope>,
}
Expand description

Represents a request to perform a single point-in-time capture of some portion of the state of a GKE cluster, the record of the backup operation itself, and an anchor for the underlying artifacts that comprise the Backup (the config backup and VolumeBackups).

Fields§

§name: String

Output only. The fully qualified name of the Backup. projects/*/locations/*/backupPlans/*/backups/*

§uid: String

Output only. Server generated global unique identifier of UUID4

§create_time: Option<Timestamp>

Output only. The timestamp when this Backup resource was created.

§update_time: Option<Timestamp>

Output only. The timestamp when this Backup resource was last updated.

§manual: bool

Output only. This flag indicates whether this Backup resource was created manually by a user or via a schedule in the BackupPlan. A value of True means that the Backup was created manually.

§labels: BTreeMap<String, String>

Optional. A set of custom labels supplied by user.

§delete_lock_days: i32

Optional. Minimum age for this Backup (in days). If this field is set to a non-zero value, the Backup will be “locked” against deletion (either manual or automatic deletion) for the number of days provided (measured from the creation time of the Backup). MUST be an integer value between 0-90 (inclusive).

Defaults to parent BackupPlan’s [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days] setting and may only be increased (either at creation time or in a subsequent update).

§delete_lock_expire_time: Option<Timestamp>

Output only. The time at which an existing delete lock will expire for this backup (calculated from create_time + [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]).

§retain_days: i32

Optional. The age (in days) after which this Backup will be automatically deleted. Must be an integer value >= 0:

  • If 0, no automatic deletion will occur for this Backup.
  • If not 0, this must be >= [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and <= 365.

Once a Backup is created, this value may only be increased.

Defaults to the parent BackupPlan’s [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] value.

§retain_expire_time: Option<Timestamp>

Output only. The time at which this Backup will be automatically deleted (calculated from create_time + [retain_days][google.cloud.gkebackup.v1.Backup.retain_days]).

§encryption_key: Option<EncryptionKey>

Output only. The customer managed encryption key that was used to encrypt the Backup’s artifacts. Inherited from the parent BackupPlan’s [encryption_key][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.encryption_key] value.

§contains_volume_data: bool

Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan’s [include_volume_data][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_volume_data] value.

§contains_secrets: bool

Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the parent BackupPlan’s [include_secrets][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.include_secrets] value.

§cluster_metadata: Option<ClusterMetadata>

Output only. Information about the GKE cluster from which this Backup was created.

§state: i32

Output only. Current state of the Backup

§state_reason: String

Output only. Human-readable description of why the backup is in the current state.

§complete_time: Option<Timestamp>

Output only. Completion time of the Backup

§resource_count: i32

Output only. The total number of Kubernetes resources included in the Backup.

§volume_count: i32

Output only. The total number of volume backups contained in the Backup.

§size_bytes: i64

Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes)

§etag: String

Output only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform backup updates in order to avoid race conditions: An etag is returned in the response to GetBackup, and systems are expected to put that etag in the request to UpdateBackup or DeleteBackup to ensure that their change will be applied to the same version of the resource.

§description: String

Optional. User specified descriptive string for this Backup.

§pod_count: i32

Output only. The total number of Kubernetes Pods contained in the Backup.

§config_backup_size_bytes: i64

Output only. The size of the config backup in bytes.

§permissive_mode: bool

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.

§backup_scope: Option<BackupScope>

Defines the “scope” of the Backup - which namespaced resources in the cluster were included in the Backup. Inherited from the parent BackupPlan’s [backup_scope][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.backup_scope] value.

Implementations§

source§

impl Backup

source

pub fn state(&self) -> State

Returns the enum value of state, or the default if the field is set to an invalid enum value.

source

pub fn set_state(&mut self, value: State)

Sets state to the provided enum value.

Trait Implementations§

source§

impl Clone for Backup

source§

fn clone(&self) -> Backup

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Backup

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Backup

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Backup

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Backup

source§

fn eq(&self, other: &Backup) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Backup

Auto Trait Implementations§

§

impl Freeze for Backup

§

impl RefUnwindSafe for Backup

§

impl Send for Backup

§

impl Sync for Backup

§

impl Unpin for Backup

§

impl UnwindSafe for Backup

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more