Reference documentation and code samples for the Google Cloud Sql Admin V1 Client class Flag.
A flag resource.
Generated from protobuf messagegoogle.cloud.sql.v1.Flag
Namespace
Google \ Cloud \ Sql \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
This is the name of the flag. Flag names always use underscores, not hyphens, for example:max_allowed_packet
↳ type
int
The type of the flag. Flags are typed to beingBOOLEAN,STRING,INTEGERorNONE.NONEis used for flags that do not take a value, such asskip_grant_tables.
↳ applies_to
array
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, orMYSQL_5_6. PostgreSQL instances:POSTGRES_9_6,POSTGRES_10,POSTGRES_11orPOSTGRES_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, orSQLSERVER_2019_WEB. Seethe complete list.
↳ allowed_string_values
array
ForSTRINGflags, a list of strings that the value can be set to.
Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.
getName
This is the name of the flag. Flag names always use underscores, not
hyphens, for example:max_allowed_packet
Returns
Type
Description
string
setName
This is the name of the flag. Flag names always use underscores, not
hyphens, for example:max_allowed_packet
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getType
The type of the flag. Flags are typed to beingBOOLEAN,STRING,INTEGERorNONE.NONEis used for flags that do not take a
value, such asskip_grant_tables.
Returns
Type
Description
int
setType
The type of the flag. Flags are typed to beingBOOLEAN,STRING,INTEGERorNONE.NONEis used for flags that do not take a
value, such asskip_grant_tables.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getAppliesTo
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,
orMYSQL_5_6. PostgreSQL instances:POSTGRES_9_6,POSTGRES_10,POSTGRES_11orPOSTGRES_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, orSQLSERVER_2019_WEB.
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,
orMYSQL_5_6. PostgreSQL instances:POSTGRES_9_6,POSTGRES_10,POSTGRES_11orPOSTGRES_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, orSQLSERVER_2019_WEB.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Sql Admin V1 Client - Class Flag (1.2.6)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.6 (latest)](/php/docs/reference/cloud-sql-admin/latest/V1.Flag)\n- [1.2.5](/php/docs/reference/cloud-sql-admin/1.2.5/V1.Flag)\n- [1.1.0](/php/docs/reference/cloud-sql-admin/1.1.0/V1.Flag)\n- [1.0.0](/php/docs/reference/cloud-sql-admin/1.0.0/V1.Flag)\n- [0.19.0](/php/docs/reference/cloud-sql-admin/0.19.0/V1.Flag)\n- [0.18.0](/php/docs/reference/cloud-sql-admin/0.18.0/V1.Flag)\n- [0.17.1](/php/docs/reference/cloud-sql-admin/0.17.1/V1.Flag)\n- [0.16.1](/php/docs/reference/cloud-sql-admin/0.16.1/V1.Flag)\n- [0.12.0](/php/docs/reference/cloud-sql-admin/0.12.0/V1.Flag)\n- [0.11.0](/php/docs/reference/cloud-sql-admin/0.11.0/V1.Flag)\n- [0.10.0](/php/docs/reference/cloud-sql-admin/0.10.0/V1.Flag)\n- [0.9.0](/php/docs/reference/cloud-sql-admin/0.9.0/V1.Flag)\n- [0.8.0](/php/docs/reference/cloud-sql-admin/0.8.0/V1.Flag)\n- [0.7.0](/php/docs/reference/cloud-sql-admin/0.7.0/V1.Flag)\n- [0.6.0](/php/docs/reference/cloud-sql-admin/0.6.0/V1.Flag)\n- [0.5.0](/php/docs/reference/cloud-sql-admin/0.5.0/V1.Flag)\n- [0.4.1](/php/docs/reference/cloud-sql-admin/0.4.1/V1.Flag)\n- [0.3.1](/php/docs/reference/cloud-sql-admin/0.3.1/V1.Flag)\n- [0.2.12](/php/docs/reference/cloud-sql-admin/0.2.12/V1.Flag) \nReference documentation and code samples for the Google Cloud Sql Admin V1 Client class Flag.\n\nA flag resource.\n\nGenerated from protobuf message `google.cloud.sql.v1.Flag`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Sql \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThis is the name of the flag. Flag names always use underscores, not\nhyphens, for example: `max_allowed_packet`\n\n### setName\n\nThis is the name of the flag. Flag names always use underscores, not\nhyphens, for example: `max_allowed_packet`\n\n### getType\n\nThe type of the flag. Flags are typed to being `BOOLEAN`, `STRING`,\n`INTEGER` or `NONE`. `NONE` is used for flags that do not take a\nvalue, such as `skip_grant_tables`.\n\n### setType\n\nThe type of the flag. Flags are typed to being `BOOLEAN`, `STRING`,\n`INTEGER` or `NONE`. `NONE` is used for flags that do not take a\nvalue, such as `skip_grant_tables`.\n\n### getAppliesTo\n\nThe database version this flag applies to. Can be\nMySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`,\nor `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,\n`POSTGRES_11` or `POSTGRES_12`. SQL Server instances:\n`SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`,\n`SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,\n`SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or\n`SQLSERVER_2019_WEB`.\n\nSee [the complete\nlist](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).\n\n### setAppliesTo\n\nThe database version this flag applies to. Can be\nMySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`,\nor `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,\n`POSTGRES_11` or `POSTGRES_12`. SQL Server instances:\n`SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`,\n`SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,\n`SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or\n`SQLSERVER_2019_WEB`.\n\nSee [the complete\nlist](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).\n\n### getAllowedStringValues\n\nFor `STRING` flags, a list of strings that the value can be set to.\n\n### setAllowedStringValues\n\nFor `STRING` flags, a list of strings that the value can be set to.\n\n### getMinValue\n\nFor `INTEGER` flags, the minimum allowed value.\n\n### hasMinValue\n\n### clearMinValue\n\n### getMinValueUnwrapped\n\nReturns the unboxed value from `getMinValue()`\n\nFor `INTEGER` flags, the minimum allowed value.\n\n### setMinValue\n\nFor `INTEGER` flags, the minimum allowed value.\n\n### setMinValueUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\Int64Value object.\n\nFor `INTEGER` flags, the minimum allowed value.\n\n### getMaxValue\n\nFor `INTEGER` flags, the maximum allowed value.\n\n### hasMaxValue\n\n### clearMaxValue\n\n### getMaxValueUnwrapped\n\nReturns the unboxed value from `getMaxValue()`\n\nFor `INTEGER` flags, the maximum allowed value.\n\n### setMaxValue\n\nFor `INTEGER` flags, the maximum allowed value.\n\n### setMaxValueUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\Int64Value object.\n\nFor `INTEGER` flags, the maximum allowed value.\n\n### getRequiresRestart\n\nIndicates whether changing this flag will trigger a database restart. Only\napplicable to Second Generation instances.\n\n### hasRequiresRestart\n\n### clearRequiresRestart\n\n### getRequiresRestartUnwrapped\n\nReturns the unboxed value from `getRequiresRestart()`\n\nIndicates whether changing this flag will trigger a database restart. Only\napplicable to Second Generation instances.\n\n### setRequiresRestart\n\nIndicates whether changing this flag will trigger a database restart. Only\napplicable to Second Generation instances.\n\n### setRequiresRestartUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\BoolValue object.\n\nIndicates whether changing this flag will trigger a database restart. Only\napplicable to Second Generation instances.\n\n### getKind\n\nThis is always `sql#flag`.\n\n### setKind\n\nThis is always `sql#flag`.\n\n### getInBeta\n\nWhether or not the flag is considered in beta.\n\n### hasInBeta\n\n### clearInBeta\n\n### getInBetaUnwrapped\n\nReturns the unboxed value from `getInBeta()`\n\nWhether or not the flag is considered in beta.\n\n### setInBeta\n\nWhether or not the flag is considered in beta.\n\n### setInBetaUnwrapped\n\nSets the field by wrapping a primitive type in a Google\\\\Protobuf\\\\BoolValue object.\n\nWhether or not the flag is considered in beta.\n\n### getAllowedIntValues\n\nUse this field if only certain integers are accepted. Can be combined\nwith min_value and max_value to add additional values.\n\n### setAllowedIntValues\n\nUse this field if only certain integers are accepted. Can be combined\nwith min_value and max_value to add additional values."]]