Class: Apcera::RestartConfig
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::RestartConfig
- Defined in:
- lib/apcera/models/restart_config.rb
Instance Attribute Summary collapse
-
#maximum_attempts ⇒ Object
Returns the value of attribute maximum_attempts.
-
#restart_mode ⇒ Object
Returns the value of attribute restart_mode.
Class Method Summary collapse
-
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ RestartConfig
constructor
A new instance of RestartConfig.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ RestartConfig
Returns a new instance of RestartConfig.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/apcera/models/restart_config.rb', line 27 def initialize(attributes = {}) return if !attributes.is_a?(Hash) || attributes.empty? # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'maximum_attempts'] self.maximum_attempts = attributes[:'maximum_attempts'] end if attributes[:'restart_mode'] self.restart_mode = attributes[:'restart_mode'] end end |
Instance Attribute Details
#maximum_attempts ⇒ Object
Returns the value of attribute maximum_attempts.
4 5 6 |
# File 'lib/apcera/models/restart_config.rb', line 4 def maximum_attempts @maximum_attempts end |
#restart_mode ⇒ Object
Returns the value of attribute restart_mode.
4 5 6 |
# File 'lib/apcera/models/restart_config.rb', line 4 def restart_mode @restart_mode end |
Class Method Details
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/apcera/models/restart_config.rb', line 6 def self.attribute_map { # The maximum number of restart attempts per instance, applies to `always` and `failure` restart modes. If set to 0 restarts are not limited. :'maximum_attempts' => :'maximum_attempts', # The restart mode to use. Valid values are `always` (always restart), `no` (never restart), and `failure` (only restart on application failure). :'restart_mode' => :'restart_mode' } end |
.swagger_types ⇒ Object
attribute type
19 20 21 22 23 24 25 |
# File 'lib/apcera/models/restart_config.rb', line 19 def self.swagger_types { :'maximum_attempts' => :'Integer', :'restart_mode' => :'String' } end |