Class: Google::Apis::GameservicesV1beta::ScalingConfig

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

Overview

Autoscaling config for an Agones fleet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ScalingConfig

Returns a new instance of ScalingConfig.



1902
1903
1904
# File 'lib/google/apis/gameservices_v1beta/classes.rb', line 1902

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

Instance Attribute Details

#fleet_autoscaler_specString

Required. Agones fleet autoscaler spec. Example spec: https://agones.dev/site/ docs/reference/fleetautoscaler/ Corresponds to the JSON property fleetAutoscalerSpec

Returns:

  • (String)


1883
1884
1885
# File 'lib/google/apis/gameservices_v1beta/classes.rb', line 1883

def fleet_autoscaler_spec
  @fleet_autoscaler_spec
end

#nameString

Required. The name of the Scaling Config Corresponds to the JSON property name

Returns:

  • (String)


1888
1889
1890
# File 'lib/google/apis/gameservices_v1beta/classes.rb', line 1888

def name
  @name
end

#schedulesArray<Google::Apis::GameservicesV1beta::Schedule>

The schedules to which this Scaling Config applies. Corresponds to the JSON property schedules



1893
1894
1895
# File 'lib/google/apis/gameservices_v1beta/classes.rb', line 1893

def schedules
  @schedules
end

#selectorsArray<Google::Apis::GameservicesV1beta::LabelSelector>

Labels used to identify the game server clusters to which this Agones scaling config applies. A game server cluster is subject to this Agones scaling config if its labels match any of the selector entries. Corresponds to the JSON property selectors



1900
1901
1902
# File 'lib/google/apis/gameservices_v1beta/classes.rb', line 1900

def selectors
  @selectors
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1907
1908
1909
1910
1911
1912
# File 'lib/google/apis/gameservices_v1beta/classes.rb', line 1907

def update!(**args)
  @fleet_autoscaler_spec = args[:fleet_autoscaler_spec] if args.key?(:fleet_autoscaler_spec)
  @name = args[:name] if args.key?(:name)
  @schedules = args[:schedules] if args.key?(:schedules)
  @selectors = args[:selectors] if args.key?(:selectors)
end