#[non_exhaustive]pub struct Flag {
pub name: String,
pub type: SqlFlagType,
pub applies_to: Vec<SqlDatabaseVersion>,
pub allowed_string_values: Vec<String>,
pub min_value: Option<Int64Value>,
pub max_value: Option<Int64Value>,
pub requires_restart: Option<BoolValue>,
pub kind: String,
pub in_beta: Option<BoolValue>,
pub allowed_int_values: Vec<i64>,
/* private fields */
}Expand description
A flag resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThis is the name of the flag. Flag names always use underscores, not
hyphens, for example: max_allowed_packet
type: SqlFlagTypeThe type of the flag. Flags are typed to being BOOLEAN, STRING,
INTEGER or NONE. NONE is used for flags that do not take a
value, such as skip_grant_tables.
applies_to: Vec<SqlDatabaseVersion>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.
allowed_string_values: Vec<String>For STRING flags, a list of strings that the value can be set to.
min_value: Option<Int64Value>For INTEGER flags, the minimum allowed value.
max_value: Option<Int64Value>For INTEGER flags, the maximum allowed value.
requires_restart: Option<BoolValue>Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.
kind: StringThis is always sql#flag.
in_beta: Option<BoolValue>Whether or not the flag is considered in beta.
allowed_int_values: Vec<i64>Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.
Implementations§
Source§impl Flag
impl Flag
pub fn new() -> Self
Sourcepub fn set_type<T: Into<SqlFlagType>>(self, v: T) -> Self
pub fn set_type<T: Into<SqlFlagType>>(self, v: T) -> Self
Sets the value of r#type.
Sourcepub fn set_applies_to<T, V>(self, v: T) -> Self
pub fn set_applies_to<T, V>(self, v: T) -> Self
Sets the value of applies_to.
Sourcepub fn set_allowed_string_values<T, V>(self, v: T) -> Self
pub fn set_allowed_string_values<T, V>(self, v: T) -> Self
Sets the value of allowed_string_values.
Sourcepub fn set_min_value<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
pub fn set_min_value<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of min_value.
Sourcepub fn set_or_clear_min_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
pub fn set_or_clear_min_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of min_value.
Sourcepub fn set_max_value<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
pub fn set_max_value<T>(self, v: T) -> Selfwhere
T: Into<Int64Value>,
Sets the value of max_value.
Sourcepub fn set_or_clear_max_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
pub fn set_or_clear_max_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<Int64Value>,
Sets or clears the value of max_value.
Sourcepub fn set_requires_restart<T>(self, v: T) -> Self
pub fn set_requires_restart<T>(self, v: T) -> Self
Sets the value of requires_restart.
Sourcepub fn set_or_clear_requires_restart<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_requires_restart<T>(self, v: Option<T>) -> Self
Sets or clears the value of requires_restart.
Sourcepub fn set_in_beta<T>(self, v: T) -> Self
pub fn set_in_beta<T>(self, v: T) -> Self
Sets the value of in_beta.
Sourcepub fn set_or_clear_in_beta<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_in_beta<T>(self, v: Option<T>) -> Self
Sets or clears the value of in_beta.
Sourcepub fn set_allowed_int_values<T, V>(self, v: T) -> Self
pub fn set_allowed_int_values<T, V>(self, v: T) -> Self
Sets the value of allowed_int_values.