Class Flag (0.1.0)

public final class Flag extends GeneratedMessage implements FlagOrBuilder

A flag resource.

Protobuf type google.cloud.sql.v1beta4.Flag

Implements

FlagOrBuilder

Static Fields

ALLOWED_INT_VALUES_FIELD_NUMBER

public static final int ALLOWED_INT_VALUES_FIELD_NUMBER
Field Value
Type Description
int

ALLOWED_STRING_VALUES_FIELD_NUMBER

public static final int ALLOWED_STRING_VALUES_FIELD_NUMBER
Field Value
Type Description
int

APPLIES_TO_FIELD_NUMBER

public static final int APPLIES_TO_FIELD_NUMBER
Field Value
Type Description
int

FLAG_SCOPE_FIELD_NUMBER

public static final int FLAG_SCOPE_FIELD_NUMBER
Field Value
Type Description
int

IN_BETA_FIELD_NUMBER

public static final int IN_BETA_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

MAX_VALUE_FIELD_NUMBER

public static final int MAX_VALUE_FIELD_NUMBER
Field Value
Type Description
int

MIN_VALUE_FIELD_NUMBER

public static final int MIN_VALUE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int
public static final int RECOMMENDED_INT_VALUE_FIELD_NUMBER
Field Value
Type Description
int
public static final int RECOMMENDED_STRING_VALUE_FIELD_NUMBER
Field Value
Type Description
int

REQUIRES_RESTART_FIELD_NUMBER

public static final int REQUIRES_RESTART_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Flag getDefaultInstance()
Returns
Type Description
Flag

getDescriptor()

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

newBuilder()

public static Flag.Builder newBuilder()
Returns
Type Description
Flag.Builder

newBuilder(Flag prototype)

public static Flag.Builder newBuilder(Flag prototype)
Parameter
Name Description
prototype Flag
Returns
Type Description
Flag.Builder

parseDelimitedFrom(InputStream input)

public static Flag parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Flag
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Flag parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Flag
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Flag parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Flag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Flag parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Flag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Flag parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Flag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Flag parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Flag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Flag parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Flag
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Flag parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Flag
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Flag parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Flag
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Flag parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Flag
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Flag parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Flag
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Flag parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Flag
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Flag> parser()
Returns
Type Description
Parser<Flag>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllowedIntValues(int index)

public long getAllowedIntValues(int index)

Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.

repeated int64 allowed_int_values = 10;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The allowedIntValues at the given index.

getAllowedIntValuesCount()

public int getAllowedIntValuesCount()

Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.

repeated int64 allowed_int_values = 10;

Returns
Type Description
int

The count of allowedIntValues.

getAllowedIntValuesList()

public List<Long> getAllowedIntValuesList()

Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.

repeated int64 allowed_int_values = 10;

Returns
Type Description
List<Long>

A list containing the allowedIntValues.

getAllowedStringValues(int index)

public String getAllowedStringValues(int index)

For STRING flags, a list of strings that the value can be set to.

repeated string allowed_string_values = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedStringValues at the given index.

getAllowedStringValuesBytes(int index)

public ByteString getAllowedStringValuesBytes(int index)

For STRING flags, a list of strings that the value can be set to.

repeated string allowed_string_values = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedStringValues at the given index.

getAllowedStringValuesCount()

public int getAllowedStringValuesCount()

For STRING flags, a list of strings that the value can be set to.

repeated string allowed_string_values = 4;

Returns
Type Description
int

The count of allowedStringValues.

getAllowedStringValuesList()

public ProtocolStringList getAllowedStringValuesList()

For STRING flags, a list of strings that the value can be set to.

repeated string allowed_string_values = 4;

Returns
Type Description
ProtocolStringList

A list containing the allowedStringValues.

getAppliesTo(int index)

public SqlDatabaseVersion getAppliesTo(int index)

The database version this flag applies to. Can be MySQL instances: MYSQL_8_0, MYSQL_8_0_18, MYSQL_8_0_26, MYSQL_5_7, or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6, POSTGRES_10, POSTGRES_11 or POSTGRES_12. SQL Server instances: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB, SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB. See the complete list.

repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
SqlDatabaseVersion

The appliesTo at the given index.

getAppliesToCount()

public int getAppliesToCount()

The database version this flag applies to. Can be MySQL instances: MYSQL_8_0, MYSQL_8_0_18, MYSQL_8_0_26, MYSQL_5_7, or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6, POSTGRES_10, POSTGRES_11 or POSTGRES_12. SQL Server instances: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB, SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB. See the complete list.

repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3;

Returns
Type Description
int

The count of appliesTo.

getAppliesToList()

public List<SqlDatabaseVersion> getAppliesToList()

The database version this flag applies to. Can be MySQL instances: MYSQL_8_0, MYSQL_8_0_18, MYSQL_8_0_26, MYSQL_5_7, or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6, POSTGRES_10, POSTGRES_11 or POSTGRES_12. SQL Server instances: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB, SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB. See the complete list.

repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3;

Returns
Type Description
List<SqlDatabaseVersion>

A list containing the appliesTo.

getAppliesToValue(int index)

public int getAppliesToValue(int index)

The database version this flag applies to. Can be MySQL instances: MYSQL_8_0, MYSQL_8_0_18, MYSQL_8_0_26, MYSQL_5_7, or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6, POSTGRES_10, POSTGRES_11 or POSTGRES_12. SQL Server instances: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB, SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB. See the complete list.

repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of appliesTo at the given index.

getAppliesToValueList()

public List<Integer> getAppliesToValueList()

The database version this flag applies to. Can be MySQL instances: MYSQL_8_0, MYSQL_8_0_18, MYSQL_8_0_26, MYSQL_5_7, or MYSQL_5_6. PostgreSQL instances: POSTGRES_9_6, POSTGRES_10, POSTGRES_11 or POSTGRES_12. SQL Server instances: SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB, SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB. See the complete list.

repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3;

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for appliesTo.

getDefaultInstanceForType()

public Flag getDefaultInstanceForType()
Returns
Type Description
Flag

getFlagScope()

public SqlFlagScope getFlagScope()

Scope of flag.

.google.cloud.sql.v1beta4.SqlFlagScope flag_scope = 15;

Returns
Type Description
SqlFlagScope

The flagScope.

getFlagScopeValue()

public int getFlagScopeValue()

Scope of flag.

.google.cloud.sql.v1beta4.SqlFlagScope flag_scope = 15;

Returns
Type Description
int

The enum numeric value on the wire for flagScope.

getInBeta()

public BoolValue getInBeta()

Whether or not the flag is considered in beta.

.google.protobuf.BoolValue in_beta = 9;

Returns
Type Description
BoolValue

The inBeta.

getInBetaOrBuilder()

public BoolValueOrBuilder getInBetaOrBuilder()

Whether or not the flag is considered in beta.

.google.protobuf.BoolValue in_beta = 9;

Returns
Type Description
BoolValueOrBuilder

getKind()

public String getKind()

This is always sql#flag.

string kind = 8;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

This is always sql#flag.

string kind = 8;

Returns
Type Description
ByteString

The bytes for kind.

getMaxValue()

public Int64Value getMaxValue()

For INTEGER flags, the maximum allowed value.

.google.protobuf.Int64Value max_value = 6;

Returns
Type Description
Int64Value

The maxValue.

getMaxValueOrBuilder()

public Int64ValueOrBuilder getMaxValueOrBuilder()

For INTEGER flags, the maximum allowed value.

.google.protobuf.Int64Value max_value = 6;

Returns
Type Description
Int64ValueOrBuilder

getMinValue()

public Int64Value getMinValue()

For INTEGER flags, the minimum allowed value.

.google.protobuf.Int64Value min_value = 5;

Returns
Type Description
Int64Value

The minValue.

getMinValueOrBuilder()

public Int64ValueOrBuilder getMinValueOrBuilder()

For INTEGER flags, the minimum allowed value.

.google.protobuf.Int64Value min_value = 5;

Returns
Type Description
Int64ValueOrBuilder

getName()

public String getName()

This is the name of the flag. Flag names always use underscores, not hyphens, for example: max_allowed_packet

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

This is the name of the flag. Flag names always use underscores, not hyphens, for example: max_allowed_packet

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Flag> getParserForType()
Returns
Type Description
Parser<Flag>
Overrides

getRecommendedIntValue()

public Int64Value getRecommendedIntValue()

Recommended flag value in integer format for UI display.

.google.protobuf.Int64Value recommended_int_value = 17;

Returns
Type Description
Int64Value

The recommendedIntValue.

getRecommendedIntValueOrBuilder()

public Int64ValueOrBuilder getRecommendedIntValueOrBuilder()

Recommended flag value in integer format for UI display.

.google.protobuf.Int64Value recommended_int_value = 17;

Returns
Type Description
Int64ValueOrBuilder

getRecommendedStringValue()

public String getRecommendedStringValue()

Recommended flag value in string format for UI display.

string recommended_string_value = 16;

Returns
Type Description
String

The recommendedStringValue.

getRecommendedStringValueBytes()

public ByteString getRecommendedStringValueBytes()

Recommended flag value in string format for UI display.

string recommended_string_value = 16;

Returns
Type Description
ByteString

The bytes for recommendedStringValue.

getRecommendedValueCase()

public Flag.RecommendedValueCase getRecommendedValueCase()
Returns
Type Description
Flag.RecommendedValueCase

getRequiresRestart()

public BoolValue getRequiresRestart()

Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.

.google.protobuf.BoolValue requires_restart = 7;

Returns
Type Description
BoolValue

The requiresRestart.

getRequiresRestartOrBuilder()

public BoolValueOrBuilder getRequiresRestartOrBuilder()

Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.

.google.protobuf.BoolValue requires_restart = 7;

Returns
Type Description
BoolValueOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getType()

public SqlFlagType getType()

The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or NONE. NONE is used for flags which do not take a value, such as skip_grant_tables.

.google.cloud.sql.v1beta4.SqlFlagType type = 2;

Returns
Type Description
SqlFlagType

The type.

getTypeValue()

public int getTypeValue()

The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or NONE. NONE is used for flags which do not take a value, such as skip_grant_tables.

.google.cloud.sql.v1beta4.SqlFlagType type = 2;

Returns
Type Description
int

The enum numeric value on the wire for type.

hasInBeta()

public boolean hasInBeta()

Whether or not the flag is considered in beta.

.google.protobuf.BoolValue in_beta = 9;

Returns
Type Description
boolean

Whether the inBeta field is set.

hasMaxValue()

public boolean hasMaxValue()

For INTEGER flags, the maximum allowed value.

.google.protobuf.Int64Value max_value = 6;

Returns
Type Description
boolean

Whether the maxValue field is set.

hasMinValue()

public boolean hasMinValue()

For INTEGER flags, the minimum allowed value.

.google.protobuf.Int64Value min_value = 5;

Returns
Type Description
boolean

Whether the minValue field is set.

hasRecommendedIntValue()

public boolean hasRecommendedIntValue()

Recommended flag value in integer format for UI display.

.google.protobuf.Int64Value recommended_int_value = 17;

Returns
Type Description
boolean

Whether the recommendedIntValue field is set.

hasRecommendedStringValue()

public boolean hasRecommendedStringValue()

Recommended flag value in string format for UI display.

string recommended_string_value = 16;

Returns
Type Description
boolean

Whether the recommendedStringValue field is set.

hasRequiresRestart()

public boolean hasRequiresRestart()

Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.

.google.protobuf.BoolValue requires_restart = 7;

Returns
Type Description
boolean

Whether the requiresRestart field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Flag.Builder newBuilderForType()
Returns
Type Description
Flag.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Flag.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Flag.Builder
Overrides

toBuilder()

public Flag.Builder toBuilder()
Returns
Type Description
Flag.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException