Class: Rafflesia::FoundryModelDescriptor
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::FoundryModelDescriptor
- Defined in:
- lib/rafflesia/foundry/foundry_model_descriptor.rb
Constant Summary collapse
- HASH_ATTRS =
{ build: :build, deployment: :deployment, description: :description, endpoint: :endpoint, id: :id, input_types: :input_types, is_release_pinned: :is_release_pinned, license: :license, model_release: :model_release, name: :name, object: :object, offer: :offer, output_types: :output_types, price: :price, publisher: :publisher, release: :release, repository: :repository, scope: :scope, source_url: :source_url, workload: :workload }.freeze
Instance Attribute Summary collapse
-
#build ⇒ Object
Returns the value of attribute build.
-
#deployment ⇒ Object
Returns the value of attribute deployment.
-
#description ⇒ Object
Returns the value of attribute description.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#id ⇒ Object
Returns the value of attribute id.
-
#input_types ⇒ Object
Returns the value of attribute input_types.
-
#is_release_pinned ⇒ Object
Returns the value of attribute is_release_pinned.
-
#license ⇒ Object
Returns the value of attribute license.
-
#model_release ⇒ Object
Returns the value of attribute model_release.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#offer ⇒ Object
Returns the value of attribute offer.
-
#output_types ⇒ Object
Returns the value of attribute output_types.
-
#price ⇒ Object
Returns the value of attribute price.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#release ⇒ Object
Returns the value of attribute release.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#workload ⇒ Object
Returns the value of attribute workload.
Instance Method Summary collapse
-
#initialize(json) ⇒ FoundryModelDescriptor
constructor
A new instance of FoundryModelDescriptor.
Constructor Details
#initialize(json) ⇒ FoundryModelDescriptor
Returns a new instance of FoundryModelDescriptor.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 53 def initialize(json) super() hash = self.class.normalize(json) @build = hash[:build] ? Rafflesia::BuildRef.new(hash[:build]) : nil @deployment = hash[:deployment] ? Rafflesia::DeploymentRef.new(hash[:deployment]) : nil @description = hash[:description] @endpoint = hash[:endpoint] ? Rafflesia::FoundryModelEndpoint.new(hash[:endpoint]) : nil @id = hash[:id] @input_types = (hash[:input_types] || []) @is_release_pinned = hash[:is_release_pinned] @license = hash[:license] @model_release = hash[:model_release] @name = hash[:name] @object = hash[:object] @offer = hash[:offer] ? Rafflesia::DeploymentOffer.new(hash[:offer]) : nil @output_types = (hash[:output_types] || []) @price = hash[:price] ? Rafflesia::FoundryModelPrice.new(hash[:price]) : nil @publisher = hash[:publisher] @release = hash[:release] ? Rafflesia::ReleaseRef.new(hash[:release]) : nil @repository = hash[:repository] ? Rafflesia::RepositoryRef.new(hash[:repository]) : nil @scope = hash[:scope] ? Rafflesia::RegistryScope.new(hash[:scope]) : nil @source_url = hash[:source_url] @workload = hash[:workload] end |
Instance Attribute Details
#build ⇒ Object
Returns the value of attribute build.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def build @build end |
#deployment ⇒ Object
Returns the value of attribute deployment.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def deployment @deployment end |
#description ⇒ Object
Returns the value of attribute description.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def description @description end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def endpoint @endpoint end |
#id ⇒ Object
Returns the value of attribute id.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def id @id end |
#input_types ⇒ Object
Returns the value of attribute input_types.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def input_types @input_types end |
#is_release_pinned ⇒ Object
Returns the value of attribute is_release_pinned.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def is_release_pinned @is_release_pinned end |
#license ⇒ Object
Returns the value of attribute license.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def license @license end |
#model_release ⇒ Object
Returns the value of attribute model_release.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def model_release @model_release end |
#name ⇒ Object
Returns the value of attribute name.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def object @object end |
#offer ⇒ Object
Returns the value of attribute offer.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def offer @offer end |
#output_types ⇒ Object
Returns the value of attribute output_types.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def output_types @output_types end |
#price ⇒ Object
Returns the value of attribute price.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def price @price end |
#publisher ⇒ Object
Returns the value of attribute publisher.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def publisher @publisher end |
#release ⇒ Object
Returns the value of attribute release.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def release @release end |
#repository ⇒ Object
Returns the value of attribute repository.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def repository @repository end |
#scope ⇒ Object
Returns the value of attribute scope.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def scope @scope end |
#source_url ⇒ Object
Returns the value of attribute source_url.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def source_url @source_url end |
#workload ⇒ Object
Returns the value of attribute workload.
31 32 33 |
# File 'lib/rafflesia/foundry/foundry_model_descriptor.rb', line 31 def workload @workload end |