Class: OpenSandbox::PoolCapacitySpec

Inherits:
Data
  • Object
show all
Defined in:
lib/open_sandbox/models.rb

Overview

Value object for pool capacity

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#buffer_maxObject (readonly)

Returns the value of attribute buffer_max

Returns:

  • (Object)

    the current value of buffer_max



84
85
86
# File 'lib/open_sandbox/models.rb', line 84

def buffer_max
  @buffer_max
end

#buffer_minObject (readonly)

Returns the value of attribute buffer_min

Returns:

  • (Object)

    the current value of buffer_min



84
85
86
# File 'lib/open_sandbox/models.rb', line 84

def buffer_min
  @buffer_min
end

#pool_maxObject (readonly)

Returns the value of attribute pool_max

Returns:

  • (Object)

    the current value of pool_max



84
85
86
# File 'lib/open_sandbox/models.rb', line 84

def pool_max
  @pool_max
end

#pool_minObject (readonly)

Returns the value of attribute pool_min

Returns:

  • (Object)

    the current value of pool_min



84
85
86
# File 'lib/open_sandbox/models.rb', line 84

def pool_min
  @pool_min
end

Class Method Details

.from_hash(h) ⇒ Object



85
86
87
88
89
90
91
92
# File 'lib/open_sandbox/models.rb', line 85

def self.from_hash(h)
  new(
    buffer_max: h["bufferMax"],
    buffer_min: h["bufferMin"],
    pool_max:   h["poolMax"],
    pool_min:   h["poolMin"]
  )
end

Instance Method Details

#to_api_hashObject



94
95
96
# File 'lib/open_sandbox/models.rb', line 94

def to_api_hash
  { "bufferMax" => buffer_max, "bufferMin" => buffer_min, "poolMax" => pool_max, "poolMin" => pool_min }
end