Class: Google::Apis::SqladminV1beta4::Flag

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/sqladmin_v1beta4/classes.rb,
lib/google/apis/sqladmin_v1beta4/representations.rb,
lib/google/apis/sqladmin_v1beta4/representations.rb

Overview

A flag resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Flag

Returns a new instance of Flag.



1325
1326
1327
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1325

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#allowed_int_valuesArray<Fixnum>

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

Returns:

  • (Array<Fixnum>)


1272
1273
1274
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1272

def allowed_int_values
  @allowed_int_values
end

#allowed_string_valuesArray<String>

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

Returns:

  • (Array<String>)


1277
1278
1279
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1277

def allowed_string_values
  @allowed_string_values
end

#applies_toArray<String>

The database version this flag applies to. Can be MYSQL_8_0, MYSQL_5_6, or MYSQL_5_7. Corresponds to the JSON property appliesTo

Returns:

  • (Array<String>)


1283
1284
1285
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1283

def applies_to
  @applies_to
end

#in_betaBoolean Also known as: in_beta?

Whether or not the flag is considered in beta. Corresponds to the JSON property inBeta

Returns:

  • (Boolean)


1288
1289
1290
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1288

def in_beta
  @in_beta
end

#kindString

This is always sql#flag. Corresponds to the JSON property kind

Returns:

  • (String)


1294
1295
1296
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1294

def kind
  @kind
end

#max_valueFixnum

For INTEGER flags, the maximum allowed value. Corresponds to the JSON property maxValue

Returns:

  • (Fixnum)


1299
1300
1301
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1299

def max_value
  @max_value
end

#min_valueFixnum

For INTEGER flags, the minimum allowed value. Corresponds to the JSON property minValue

Returns:

  • (Fixnum)


1304
1305
1306
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1304

def min_value
  @min_value
end

#nameString

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

Returns:

  • (String)


1310
1311
1312
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1310

def name
  @name
end

#requires_restartBoolean Also known as: requires_restart?

Indicates whether changing this flag will trigger a database restart. Corresponds to the JSON property requiresRestart

Returns:

  • (Boolean)


1315
1316
1317
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1315

def requires_restart
  @requires_restart
end

#typeString

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*. Corresponds to the JSON property type

Returns:

  • (String)


1323
1324
1325
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1323

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1330

def update!(**args)
  @allowed_int_values = args[:allowed_int_values] if args.key?(:allowed_int_values)
  @allowed_string_values = args[:allowed_string_values] if args.key?(:allowed_string_values)
  @applies_to = args[:applies_to] if args.key?(:applies_to)
  @in_beta = args[:in_beta] if args.key?(:in_beta)
  @kind = args[:kind] if args.key?(:kind)
  @max_value = args[:max_value] if args.key?(:max_value)
  @min_value = args[:min_value] if args.key?(:min_value)
  @name = args[:name] if args.key?(:name)
  @requires_restart = args[:requires_restart] if args.key?(:requires_restart)
  @type = args[:type] if args.key?(:type)
end