#[non_exhaustive]pub struct PointInTimeRestoreContext {
pub datasource: Option<String>,
pub point_in_time: Option<Timestamp>,
pub target_instance: Option<String>,
pub private_network: Option<String>,
pub allocated_ip_range: Option<String>,
pub preferred_zone: Option<String>,
pub preferred_secondary_zone: Option<String>,
/* private fields */
}Expand description
The context to perform a point-in-time recovery of an instance managed by Backup and Disaster Recovery (DR) Service.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.datasource: Option<String>The Backup and Disaster Recovery (DR) Service Datasource URI. Format: projects/{project}/locations/{region}/backupVaults/{backupvault}/dataSources/{datasource}.
point_in_time: Option<Timestamp>Required. The date and time to which you want to restore the instance.
target_instance: Option<String>Target instance name.
private_network: Option<String>Optional. The resource link for the VPC network from which the Cloud SQL
instance is accessible for private IP. For example,
/projects/myProject/global/networks/default.
allocated_ip_range: Option<String>Optional. The name of the allocated IP range for the internal IP Cloud SQL instance. For example: “google-managed-services-default”. If you set this, then Cloud SQL creates the IP address for the cloned instance in the allocated range. This range must comply with RFC 1035 standards. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. Reserved for future use.
preferred_zone: Option<String>Optional. Point-in-time recovery of an instance to the specified zone. If no zone is specified, then clone to the same primary zone as the source instance.
preferred_secondary_zone: Option<String>Optional. Point-in-time recovery of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field.
Implementations§
Source§impl PointInTimeRestoreContext
impl PointInTimeRestoreContext
pub fn new() -> Self
Sourcepub fn set_datasource<T>(self, v: T) -> Self
pub fn set_datasource<T>(self, v: T) -> Self
Sets the value of datasource.
§Example
let x = PointInTimeRestoreContext::new().set_datasource("example");Sourcepub fn set_or_clear_datasource<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_datasource<T>(self, v: Option<T>) -> Self
Sets or clears the value of datasource.
§Example
let x = PointInTimeRestoreContext::new().set_or_clear_datasource(Some("example"));
let x = PointInTimeRestoreContext::new().set_or_clear_datasource(None::<String>);Sourcepub fn set_point_in_time<T>(self, v: T) -> Self
pub fn set_point_in_time<T>(self, v: T) -> Self
Sets the value of point_in_time.
§Example
use wkt::Timestamp;
let x = PointInTimeRestoreContext::new().set_point_in_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_point_in_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_point_in_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of point_in_time.
§Example
use wkt::Timestamp;
let x = PointInTimeRestoreContext::new().set_or_clear_point_in_time(Some(Timestamp::default()/* use setters */));
let x = PointInTimeRestoreContext::new().set_or_clear_point_in_time(None::<Timestamp>);Sourcepub fn set_target_instance<T>(self, v: T) -> Self
pub fn set_target_instance<T>(self, v: T) -> Self
Sets the value of target_instance.
§Example
let x = PointInTimeRestoreContext::new().set_target_instance("example");Sourcepub fn set_or_clear_target_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_target_instance<T>(self, v: Option<T>) -> Self
Sets or clears the value of target_instance.
§Example
let x = PointInTimeRestoreContext::new().set_or_clear_target_instance(Some("example"));
let x = PointInTimeRestoreContext::new().set_or_clear_target_instance(None::<String>);Sourcepub fn set_private_network<T>(self, v: T) -> Self
pub fn set_private_network<T>(self, v: T) -> Self
Sets the value of private_network.
§Example
let x = PointInTimeRestoreContext::new().set_private_network("example");Sourcepub fn set_or_clear_private_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_private_network<T>(self, v: Option<T>) -> Self
Sets or clears the value of private_network.
§Example
let x = PointInTimeRestoreContext::new().set_or_clear_private_network(Some("example"));
let x = PointInTimeRestoreContext::new().set_or_clear_private_network(None::<String>);Sourcepub fn set_allocated_ip_range<T>(self, v: T) -> Self
pub fn set_allocated_ip_range<T>(self, v: T) -> Self
Sets the value of allocated_ip_range.
§Example
let x = PointInTimeRestoreContext::new().set_allocated_ip_range("example");Sourcepub fn set_or_clear_allocated_ip_range<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_allocated_ip_range<T>(self, v: Option<T>) -> Self
Sets or clears the value of allocated_ip_range.
§Example
let x = PointInTimeRestoreContext::new().set_or_clear_allocated_ip_range(Some("example"));
let x = PointInTimeRestoreContext::new().set_or_clear_allocated_ip_range(None::<String>);Sourcepub fn set_preferred_zone<T>(self, v: T) -> Self
pub fn set_preferred_zone<T>(self, v: T) -> Self
Sets the value of preferred_zone.
§Example
let x = PointInTimeRestoreContext::new().set_preferred_zone("example");Sourcepub fn set_or_clear_preferred_zone<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_preferred_zone<T>(self, v: Option<T>) -> Self
Sets or clears the value of preferred_zone.
§Example
let x = PointInTimeRestoreContext::new().set_or_clear_preferred_zone(Some("example"));
let x = PointInTimeRestoreContext::new().set_or_clear_preferred_zone(None::<String>);Sourcepub fn set_preferred_secondary_zone<T>(self, v: T) -> Self
pub fn set_preferred_secondary_zone<T>(self, v: T) -> Self
Sets the value of preferred_secondary_zone.
§Example
let x = PointInTimeRestoreContext::new().set_preferred_secondary_zone("example");Sourcepub fn set_or_clear_preferred_secondary_zone<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_preferred_secondary_zone<T>(self, v: Option<T>) -> Self
Sets or clears the value of preferred_secondary_zone.
§Example
let x = PointInTimeRestoreContext::new().set_or_clear_preferred_secondary_zone(Some("example"));
let x = PointInTimeRestoreContext::new().set_or_clear_preferred_secondary_zone(None::<String>);Trait Implementations§
Source§impl Clone for PointInTimeRestoreContext
impl Clone for PointInTimeRestoreContext
Source§fn clone(&self) -> PointInTimeRestoreContext
fn clone(&self) -> PointInTimeRestoreContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more