#[non_exhaustive]pub struct DemoteMasterContext {
pub kind: String,
pub verify_gtid_consistency: Option<BoolValue>,
pub master_instance_name: String,
pub replica_configuration: Option<DemoteMasterConfiguration>,
pub skip_replication_setup: bool,
/* private fields */
}
Expand description
Database instance demote primary instance context.
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.kind: String
This is always sql#demoteMasterContext
.
verify_gtid_consistency: Option<BoolValue>
Verify the GTID consistency for demote operation. Default value:
True
. Setting this flag to false
enables you to bypass the GTID
consistency check between on-premises primary instance and Cloud SQL
instance during the demotion operation but also exposes you to the risk of
future replication failures. Change the value only if you know the reason
for the GTID divergence and are confident that doing so will not cause any
replication issues.
master_instance_name: String
The name of the instance which will act as on-premises primary instance in the replication setup.
replica_configuration: Option<DemoteMasterConfiguration>
Configuration specific to read-replicas replicating from the on-premises primary instance.
skip_replication_setup: bool
Flag to skip replication setup on the instance.
Implementations§
Source§impl DemoteMasterContext
impl DemoteMasterContext
pub fn new() -> Self
Sourcepub fn set_verify_gtid_consistency<T>(self, v: T) -> Self
pub fn set_verify_gtid_consistency<T>(self, v: T) -> Self
Sets the value of verify_gtid_consistency.
Sourcepub fn set_or_clear_verify_gtid_consistency<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_verify_gtid_consistency<T>(self, v: Option<T>) -> Self
Sets or clears the value of verify_gtid_consistency.
Sourcepub fn set_master_instance_name<T: Into<String>>(self, v: T) -> Self
pub fn set_master_instance_name<T: Into<String>>(self, v: T) -> Self
Sets the value of master_instance_name.
Sourcepub fn set_replica_configuration<T>(self, v: T) -> Selfwhere
T: Into<DemoteMasterConfiguration>,
pub fn set_replica_configuration<T>(self, v: T) -> Selfwhere
T: Into<DemoteMasterConfiguration>,
Sets the value of replica_configuration.
Sourcepub fn set_or_clear_replica_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<DemoteMasterConfiguration>,
pub fn set_or_clear_replica_configuration<T>(self, v: Option<T>) -> Selfwhere
T: Into<DemoteMasterConfiguration>,
Sets or clears the value of replica_configuration.
Sourcepub fn set_skip_replication_setup<T: Into<bool>>(self, v: T) -> Self
pub fn set_skip_replication_setup<T: Into<bool>>(self, v: T) -> Self
Sets the value of skip_replication_setup.
Trait Implementations§
Source§impl Clone for DemoteMasterContext
impl Clone for DemoteMasterContext
Source§fn clone(&self) -> DemoteMasterContext
fn clone(&self) -> DemoteMasterContext
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more