Class LocationPreference.Builder (0.1.0)

public static final class LocationPreference.Builder extends GeneratedMessage.Builder<LocationPreference.Builder> implements LocationPreferenceOrBuilder

Preferred location. This specifies where a Cloud SQL instance is located. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.

Protobuf type google.cloud.sql.v1.LocationPreference

Static Methods

getDescriptor()

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

Methods

build()

public LocationPreference build()
Returns
Type Description
LocationPreference

buildPartial()

public LocationPreference buildPartial()
Returns
Type Description
LocationPreference

clear()

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

clearFollowGaeApplication() (deprecated)

public LocationPreference.Builder clearFollowGaeApplication()

Deprecated. google.cloud.sql.v1.LocationPreference.follow_gae_application is deprecated. See google/cloud/sql/v1/cloud_sql_resources.proto;l=1026

The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.

string follow_gae_application = 1 [deprecated = true];

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

clearKind()

public LocationPreference.Builder clearKind()

This is always sql#locationPreference.

string kind = 3;

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

clearSecondaryZone()

public LocationPreference.Builder clearSecondaryZone()

The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.

string secondary_zone = 4;

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

clearZone()

public LocationPreference.Builder clearZone()

The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.

string zone = 2;

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

getDefaultInstanceForType()

public LocationPreference getDefaultInstanceForType()
Returns
Type Description
LocationPreference

getDescriptorForType()

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

getFollowGaeApplication() (deprecated)

public String getFollowGaeApplication()

Deprecated. google.cloud.sql.v1.LocationPreference.follow_gae_application is deprecated. See google/cloud/sql/v1/cloud_sql_resources.proto;l=1026

The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.

string follow_gae_application = 1 [deprecated = true];

Returns
Type Description
String

The followGaeApplication.

getFollowGaeApplicationBytes() (deprecated)

public ByteString getFollowGaeApplicationBytes()

Deprecated. google.cloud.sql.v1.LocationPreference.follow_gae_application is deprecated. See google/cloud/sql/v1/cloud_sql_resources.proto;l=1026

The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.

string follow_gae_application = 1 [deprecated = true];

Returns
Type Description
ByteString

The bytes for followGaeApplication.

getKind()

public String getKind()

This is always sql#locationPreference.

string kind = 3;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

This is always sql#locationPreference.

string kind = 3;

Returns
Type Description
ByteString

The bytes for kind.

getSecondaryZone()

public String getSecondaryZone()

The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.

string secondary_zone = 4;

Returns
Type Description
String

The secondaryZone.

getSecondaryZoneBytes()

public ByteString getSecondaryZoneBytes()

The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.

string secondary_zone = 4;

Returns
Type Description
ByteString

The bytes for secondaryZone.

getZone()

public String getZone()

The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.

string zone = 2;

Returns
Type Description
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.

string zone = 2;

Returns
Type Description
ByteString

The bytes for zone.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(LocationPreference other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setFollowGaeApplication(String value) (deprecated)

public LocationPreference.Builder setFollowGaeApplication(String value)

Deprecated. google.cloud.sql.v1.LocationPreference.follow_gae_application is deprecated. See google/cloud/sql/v1/cloud_sql_resources.proto;l=1026

The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.

string follow_gae_application = 1 [deprecated = true];

Parameter
Name Description
value String

The followGaeApplication to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setFollowGaeApplicationBytes(ByteString value) (deprecated)

public LocationPreference.Builder setFollowGaeApplicationBytes(ByteString value)

Deprecated. google.cloud.sql.v1.LocationPreference.follow_gae_application is deprecated. See google/cloud/sql/v1/cloud_sql_resources.proto;l=1026

The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.

string follow_gae_application = 1 [deprecated = true];

Parameter
Name Description
value ByteString

The bytes for followGaeApplication to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setKind(String value)

public LocationPreference.Builder setKind(String value)

This is always sql#locationPreference.

string kind = 3;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setKindBytes(ByteString value)

public LocationPreference.Builder setKindBytes(ByteString value)

This is always sql#locationPreference.

string kind = 3;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setSecondaryZone(String value)

public LocationPreference.Builder setSecondaryZone(String value)

The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.

string secondary_zone = 4;

Parameter
Name Description
value String

The secondaryZone to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setSecondaryZoneBytes(ByteString value)

public LocationPreference.Builder setSecondaryZoneBytes(ByteString value)

The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.

string secondary_zone = 4;

Parameter
Name Description
value ByteString

The bytes for secondaryZone to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setZone(String value)

public LocationPreference.Builder setZone(String value)

The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.

string zone = 2;

Parameter
Name Description
value String

The zone to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.

setZoneBytes(ByteString value)

public LocationPreference.Builder setZoneBytes(ByteString value)

The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.

string zone = 2;

Parameter
Name Description
value ByteString

The bytes for zone to set.

Returns
Type Description
LocationPreference.Builder

This builder for chaining.