#[non_exhaustive]pub struct WorkloadCapture {
pub workload_id: String,
pub source_instance: String,
pub workload_capture_state: State,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub replay_instance: Option<String>,
pub retention_days: Option<i32>,
pub backup_id: Option<String>,
/* private fields */
}Expand description
Captured workload for an instance.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.workload_id: StringOutput only. The ID of the captured workload.
source_instance: StringOutput only. The name of the source instance.
workload_capture_state: StateOutput only. The state of the workload capture.
start_time: Option<Timestamp>Output only. The start time of the workload capture.
end_time: Option<Timestamp>Output only. The end time of the workload capture.
replay_instance: Option<String>Output only. The name of the replay instance, if live replay was enabled.
retention_days: Option<i32>Output only. The retention period in days for the captured workload.
backup_id: Option<String>Output only. The base backup ID associated with the workload capture.
Implementations§
Source§impl WorkloadCapture
impl WorkloadCapture
Sourcepub fn set_workload_id<T: Into<String>>(self, v: T) -> Self
pub fn set_workload_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source_instance<T: Into<String>>(self, v: T) -> Self
pub fn set_source_instance<T: Into<String>>(self, v: T) -> Self
Sets the value of source_instance.
§Example
ⓘ
let x = WorkloadCapture::new().set_source_instance("example");Sourcepub fn set_workload_capture_state<T: Into<State>>(self, v: T) -> Self
pub fn set_workload_capture_state<T: Into<State>>(self, v: T) -> Self
Sets the value of workload_capture_state.
§Example
ⓘ
use google_cloud_sql_v1::model::workload_capture::State;
let x0 = WorkloadCapture::new().set_workload_capture_state(State::Running);
let x1 = WorkloadCapture::new().set_workload_capture_state(State::Completed);
let x2 = WorkloadCapture::new().set_workload_capture_state(State::Failed);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
ⓘ
use wkt::Timestamp;
let x = WorkloadCapture::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
ⓘ
use wkt::Timestamp;
let x = WorkloadCapture::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = WorkloadCapture::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_replay_instance<T>(self, v: T) -> Self
pub fn set_replay_instance<T>(self, v: T) -> Self
Sets the value of replay_instance.
§Example
ⓘ
let x = WorkloadCapture::new().set_replay_instance("example");Sourcepub fn set_or_clear_replay_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_replay_instance<T>(self, v: Option<T>) -> Self
Sets or clears the value of replay_instance.
§Example
ⓘ
let x = WorkloadCapture::new().set_or_clear_replay_instance(Some("example"));
let x = WorkloadCapture::new().set_or_clear_replay_instance(None::<String>);Sourcepub fn set_retention_days<T>(self, v: T) -> Self
pub fn set_retention_days<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_retention_days<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_retention_days<T>(self, v: Option<T>) -> Self
Sets or clears the value of retention_days.
§Example
ⓘ
let x = WorkloadCapture::new().set_or_clear_retention_days(Some(42));
let x = WorkloadCapture::new().set_or_clear_retention_days(None::<i32>);Sourcepub fn set_backup_id<T>(self, v: T) -> Self
pub fn set_backup_id<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for WorkloadCapture
impl Clone for WorkloadCapture
Source§impl Debug for WorkloadCapture
impl Debug for WorkloadCapture
Source§impl Default for WorkloadCapture
impl Default for WorkloadCapture
Source§impl Message for WorkloadCapture
impl Message for WorkloadCapture
Source§impl PartialEq for WorkloadCapture
impl PartialEq for WorkloadCapture
impl StructuralPartialEq for WorkloadCapture
Auto Trait Implementations§
impl Freeze for WorkloadCapture
impl RefUnwindSafe for WorkloadCapture
impl Send for WorkloadCapture
impl Sync for WorkloadCapture
impl Unpin for WorkloadCapture
impl UnsafeUnpin for WorkloadCapture
impl UnwindSafe for WorkloadCapture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more