Class DemoteMasterContext.Builder (0.1.0)

public static final class DemoteMasterContext.Builder extends GeneratedMessage.Builder<DemoteMasterContext.Builder> implements DemoteMasterContextOrBuilder

Database instance demote primary instance context.

Protobuf type google.cloud.sql.v1.DemoteMasterContext

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public DemoteMasterContext build()
Returns
Type Description
DemoteMasterContext

buildPartial()

public DemoteMasterContext buildPartial()
Returns
Type Description
DemoteMasterContext

clear()

public DemoteMasterContext.Builder clear()
Returns
Type Description
DemoteMasterContext.Builder
Overrides

clearKind()

public DemoteMasterContext.Builder clearKind()

This is always sql#demoteMasterContext.

string kind = 1;

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

clearMasterInstanceName()

public DemoteMasterContext.Builder clearMasterInstanceName()

The name of the instance which will act as on-premises primary instance in the replication setup.

string master_instance_name = 3;

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

clearReplicaConfiguration()

public DemoteMasterContext.Builder clearReplicaConfiguration()

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Returns
Type Description
DemoteMasterContext.Builder

clearSkipReplicationSetup()

public DemoteMasterContext.Builder clearSkipReplicationSetup()

Flag to skip replication setup on the instance.

bool skip_replication_setup = 5;

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

clearVerifyGtidConsistency()

public DemoteMasterContext.Builder clearVerifyGtidConsistency()

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Returns
Type Description
DemoteMasterContext.Builder

getDefaultInstanceForType()

public DemoteMasterContext getDefaultInstanceForType()
Returns
Type Description
DemoteMasterContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKind()

public String getKind()

This is always sql#demoteMasterContext.

string kind = 1;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

This is always sql#demoteMasterContext.

string kind = 1;

Returns
Type Description
ByteString

The bytes for kind.

getMasterInstanceName()

public String getMasterInstanceName()

The name of the instance which will act as on-premises primary instance in the replication setup.

string master_instance_name = 3;

Returns
Type Description
String

The masterInstanceName.

getMasterInstanceNameBytes()

public ByteString getMasterInstanceNameBytes()

The name of the instance which will act as on-premises primary instance in the replication setup.

string master_instance_name = 3;

Returns
Type Description
ByteString

The bytes for masterInstanceName.

getReplicaConfiguration()

public DemoteMasterConfiguration getReplicaConfiguration()

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Returns
Type Description
DemoteMasterConfiguration

The replicaConfiguration.

getReplicaConfigurationBuilder()

public DemoteMasterConfiguration.Builder getReplicaConfigurationBuilder()

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Returns
Type Description
DemoteMasterConfiguration.Builder

getReplicaConfigurationOrBuilder()

public DemoteMasterConfigurationOrBuilder getReplicaConfigurationOrBuilder()

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Returns
Type Description
DemoteMasterConfigurationOrBuilder

getSkipReplicationSetup()

public boolean getSkipReplicationSetup()

Flag to skip replication setup on the instance.

bool skip_replication_setup = 5;

Returns
Type Description
boolean

The skipReplicationSetup.

getVerifyGtidConsistency()

public BoolValue getVerifyGtidConsistency()

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Returns
Type Description
BoolValue

The verifyGtidConsistency.

getVerifyGtidConsistencyBuilder()

public BoolValue.Builder getVerifyGtidConsistencyBuilder()

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Returns
Type Description
Builder

getVerifyGtidConsistencyOrBuilder()

public BoolValueOrBuilder getVerifyGtidConsistencyOrBuilder()

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Returns
Type Description
BoolValueOrBuilder

hasReplicaConfiguration()

public boolean hasReplicaConfiguration()

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Returns
Type Description
boolean

Whether the replicaConfiguration field is set.

hasVerifyGtidConsistency()

public boolean hasVerifyGtidConsistency()

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Returns
Type Description
boolean

Whether the verifyGtidConsistency field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(DemoteMasterContext other)

public DemoteMasterContext.Builder mergeFrom(DemoteMasterContext other)
Parameter
Name Description
other DemoteMasterContext
Returns
Type Description
DemoteMasterContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DemoteMasterContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DemoteMasterContext.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public DemoteMasterContext.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DemoteMasterContext.Builder
Overrides

mergeReplicaConfiguration(DemoteMasterConfiguration value)

public DemoteMasterContext.Builder mergeReplicaConfiguration(DemoteMasterConfiguration value)

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Parameter
Name Description
value DemoteMasterConfiguration
Returns
Type Description
DemoteMasterContext.Builder

mergeVerifyGtidConsistency(BoolValue value)

public DemoteMasterContext.Builder mergeVerifyGtidConsistency(BoolValue value)

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Parameter
Name Description
value BoolValue
Returns
Type Description
DemoteMasterContext.Builder

setKind(String value)

public DemoteMasterContext.Builder setKind(String value)

This is always sql#demoteMasterContext.

string kind = 1;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

setKindBytes(ByteString value)

public DemoteMasterContext.Builder setKindBytes(ByteString value)

This is always sql#demoteMasterContext.

string kind = 1;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

setMasterInstanceName(String value)

public DemoteMasterContext.Builder setMasterInstanceName(String value)

The name of the instance which will act as on-premises primary instance in the replication setup.

string master_instance_name = 3;

Parameter
Name Description
value String

The masterInstanceName to set.

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

setMasterInstanceNameBytes(ByteString value)

public DemoteMasterContext.Builder setMasterInstanceNameBytes(ByteString value)

The name of the instance which will act as on-premises primary instance in the replication setup.

string master_instance_name = 3;

Parameter
Name Description
value ByteString

The bytes for masterInstanceName to set.

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

setReplicaConfiguration(DemoteMasterConfiguration value)

public DemoteMasterContext.Builder setReplicaConfiguration(DemoteMasterConfiguration value)

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Parameter
Name Description
value DemoteMasterConfiguration
Returns
Type Description
DemoteMasterContext.Builder

setReplicaConfiguration(DemoteMasterConfiguration.Builder builderForValue)

public DemoteMasterContext.Builder setReplicaConfiguration(DemoteMasterConfiguration.Builder builderForValue)

Configuration specific to read-replicas replicating from the on-premises primary instance.

.google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4;

Parameter
Name Description
builderForValue DemoteMasterConfiguration.Builder
Returns
Type Description
DemoteMasterContext.Builder

setSkipReplicationSetup(boolean value)

public DemoteMasterContext.Builder setSkipReplicationSetup(boolean value)

Flag to skip replication setup on the instance.

bool skip_replication_setup = 5;

Parameter
Name Description
value boolean

The skipReplicationSetup to set.

Returns
Type Description
DemoteMasterContext.Builder

This builder for chaining.

setVerifyGtidConsistency(BoolValue value)

public DemoteMasterContext.Builder setVerifyGtidConsistency(BoolValue value)

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Parameter
Name Description
value BoolValue
Returns
Type Description
DemoteMasterContext.Builder

setVerifyGtidConsistency(BoolValue.Builder builderForValue)

public DemoteMasterContext.Builder setVerifyGtidConsistency(BoolValue.Builder builderForValue)

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.

.google.protobuf.BoolValue verify_gtid_consistency = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DemoteMasterContext.Builder