public static final class ReplicationCluster.Builder extends GeneratedMessage.Builder<ReplicationCluster.Builder> implements ReplicationClusterOrBuilderA primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance has regional failure. Applicable to MySQL and PostgreSQL.
Protobuf type google.cloud.sql.v1beta4.ReplicationCluster
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ReplicationCluster.BuilderImplements
ReplicationClusterOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public ReplicationCluster build()| Returns | |
|---|---|
| Type | Description |
ReplicationCluster |
|
buildPartial()
public ReplicationCluster buildPartial()| Returns | |
|---|---|
| Type | Description |
ReplicationCluster |
|
clear()
public ReplicationCluster.Builder clear()| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
|
clearDrReplica()
public ReplicationCluster.Builder clearDrReplica()Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.
optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
clearFailoverDrReplicaName()
public ReplicationCluster.Builder clearFailoverDrReplicaName()Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
clearPsaWriteEndpoint()
public ReplicationCluster.Builder clearPsaWriteEndpoint()Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
optional string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public ReplicationCluster getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ReplicationCluster |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDrReplica()
public boolean getDrReplica()Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.
optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
The drReplica. |
getFailoverDrReplicaName()
public String getFailoverDrReplicaName()Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The failoverDrReplicaName. |
getFailoverDrReplicaNameBytes()
public ByteString getFailoverDrReplicaNameBytes()Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for failoverDrReplicaName. |
getPsaWriteEndpoint()
public String getPsaWriteEndpoint()Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
optional string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The psaWriteEndpoint. |
getPsaWriteEndpointBytes()
public ByteString getPsaWriteEndpointBytes()Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
optional string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for psaWriteEndpoint. |
hasDrReplica()
public boolean hasDrReplica()Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.
optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the drReplica field is set. |
hasFailoverDrReplicaName()
public boolean hasFailoverDrReplicaName()Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the failoverDrReplicaName field is set. |
hasPsaWriteEndpoint()
public boolean hasPsaWriteEndpoint()Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
optional string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the psaWriteEndpoint field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ReplicationCluster other)
public ReplicationCluster.Builder mergeFrom(ReplicationCluster other)| Parameter | |
|---|---|
| Name | Description |
other |
ReplicationCluster |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ReplicationCluster.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ReplicationCluster.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
|
setDrReplica(boolean value)
public ReplicationCluster.Builder setDrReplica(boolean value)Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.
optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe drReplica to set. |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
setFailoverDrReplicaName(String value)
public ReplicationCluster.Builder setFailoverDrReplicaName(String value)Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe failoverDrReplicaName to set. |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
setFailoverDrReplicaNameBytes(ByteString value)
public ReplicationCluster.Builder setFailoverDrReplicaNameBytes(ByteString value)Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.
optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for failoverDrReplicaName to set. |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
setPsaWriteEndpoint(String value)
public ReplicationCluster.Builder setPsaWriteEndpoint(String value)Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
optional string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe psaWriteEndpoint to set. |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |
setPsaWriteEndpointBytes(ByteString value)
public ReplicationCluster.Builder setPsaWriteEndpointBytes(ByteString value)Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.
optional string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for psaWriteEndpoint to set. |
| Returns | |
|---|---|
| Type | Description |
ReplicationCluster.Builder |
This builder for chaining. |