Class: Rafflesia::RuntimeProfile

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/environment_releases/runtime_profile.rb

Constant Summary collapse

HASH_ATTRS =
{
  cpus: :cpus,
  gpu: :gpu,
  id: :id,
  memory_mb: :memory_mb,
  network_allowlist: :network_allowlist,
  network_mode: :network_mode,
  provider: :provider,
  provider_template: :provider_template,
  required_capabilities: :required_capabilities,
  run_timeout_seconds: :run_timeout_seconds,
  runtime_class: :runtime_class,
  runtime_image: :runtime_image,
  runtime_image_digest: :runtime_image_digest,
  startup_timeout_seconds: :startup_timeout_seconds,
  storage_mb: :storage_mb
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ RuntimeProfile

Returns a new instance of RuntimeProfile.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 43

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cpus = hash[:cpus]
  @gpu = hash[:gpu]
  @id = hash[:id]
  @memory_mb = hash[:memory_mb]
  @network_allowlist = (hash[:network_allowlist] || [])
  @network_mode = hash[:network_mode]
  @provider = hash[:provider]
  @provider_template = hash[:provider_template]
  @required_capabilities = (hash[:required_capabilities] || [])
  @run_timeout_seconds = hash[:run_timeout_seconds]
  @runtime_class = hash[:runtime_class]
  @runtime_image = hash[:runtime_image]
  @runtime_image_digest = hash[:runtime_image_digest]
  @startup_timeout_seconds = hash[:startup_timeout_seconds]
  @storage_mb = hash[:storage_mb]
end

Instance Attribute Details

#cpusObject

Returns the value of attribute cpus.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def cpus
  @cpus
end

#gpuObject

Returns the value of attribute gpu.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def gpu
  @gpu
end

#idObject

Returns the value of attribute id.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def id
  @id
end

#memory_mbObject

Returns the value of attribute memory_mb.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def memory_mb
  @memory_mb
end

#network_allowlistObject

Returns the value of attribute network_allowlist.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def network_allowlist
  @network_allowlist
end

#network_modeObject

Returns the value of attribute network_mode.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def network_mode
  @network_mode
end

#providerObject

Returns the value of attribute provider.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def provider
  @provider
end

#provider_templateObject

Returns the value of attribute provider_template.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def provider_template
  @provider_template
end

#required_capabilitiesObject

Returns the value of attribute required_capabilities.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def required_capabilities
  @required_capabilities
end

#run_timeout_secondsObject

Returns the value of attribute run_timeout_seconds.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def run_timeout_seconds
  @run_timeout_seconds
end

#runtime_classObject

Returns the value of attribute runtime_class.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def runtime_class
  @runtime_class
end

#runtime_imageObject

Returns the value of attribute runtime_image.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def runtime_image
  @runtime_image
end

#runtime_image_digestObject

Returns the value of attribute runtime_image_digest.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def runtime_image_digest
  @runtime_image_digest
end

#startup_timeout_secondsObject

Returns the value of attribute startup_timeout_seconds.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def startup_timeout_seconds
  @startup_timeout_seconds
end

#storage_mbObject

Returns the value of attribute storage_mb.



26
27
28
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26

def storage_mb
  @storage_mb
end