Class: Rafflesia::RuntimeProfile
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RuntimeProfile
- 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
-
#cpus ⇒ Object
Returns the value of attribute cpus.
-
#gpu ⇒ Object
Returns the value of attribute gpu.
-
#id ⇒ Object
Returns the value of attribute id.
-
#memory_mb ⇒ Object
Returns the value of attribute memory_mb.
-
#network_allowlist ⇒ Object
Returns the value of attribute network_allowlist.
-
#network_mode ⇒ Object
Returns the value of attribute network_mode.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#provider_template ⇒ Object
Returns the value of attribute provider_template.
-
#required_capabilities ⇒ Object
Returns the value of attribute required_capabilities.
-
#run_timeout_seconds ⇒ Object
Returns the value of attribute run_timeout_seconds.
-
#runtime_class ⇒ Object
Returns the value of attribute runtime_class.
-
#runtime_image ⇒ Object
Returns the value of attribute runtime_image.
-
#runtime_image_digest ⇒ Object
Returns the value of attribute runtime_image_digest.
-
#startup_timeout_seconds ⇒ Object
Returns the value of attribute startup_timeout_seconds.
-
#storage_mb ⇒ Object
Returns the value of attribute storage_mb.
Instance Method Summary collapse
-
#initialize(json) ⇒ RuntimeProfile
constructor
A new instance of RuntimeProfile.
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
#cpus ⇒ Object
Returns the value of attribute cpus.
26 27 28 |
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26 def cpus @cpus end |
#gpu ⇒ Object
Returns the value of attribute gpu.
26 27 28 |
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26 def gpu @gpu end |
#id ⇒ Object
Returns the value of attribute id.
26 27 28 |
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26 def id @id end |
#memory_mb ⇒ Object
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_allowlist ⇒ Object
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_mode ⇒ Object
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 |
#provider ⇒ Object
Returns the value of attribute provider.
26 27 28 |
# File 'lib/rafflesia/environment_releases/runtime_profile.rb', line 26 def provider @provider end |
#provider_template ⇒ Object
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_capabilities ⇒ Object
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_seconds ⇒ Object
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_class ⇒ Object
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_image ⇒ Object
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_digest ⇒ Object
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_seconds ⇒ Object
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_mb ⇒ Object
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 |