Class: Cadenya::Types::Upload
- Inherits:
-
Object
- Object
- Cadenya::Types::Upload
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil, info: nil) ⇒ Upload
constructor
A new instance of Upload.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil, info: nil) ⇒ Upload
Returns a new instance of Upload.
7050 7051 7052 7053 7054 |
# File 'lib/cadenya/types.rb', line 7050 def initialize(metadata: nil, spec: nil, info: nil) @metadata = @spec = spec @info = info end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
7048 7049 7050 |
# File 'lib/cadenya/types.rb', line 7048 def info @info end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
7048 7049 7050 |
# File 'lib/cadenya/types.rb', line 7048 def @metadata end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
7048 7049 7050 |
# File 'lib/cadenya/types.rb', line 7048 def spec @spec end |
Class Method Details
.from_json(data) ⇒ Object
7056 7057 7058 7059 7060 7061 7062 |
# File 'lib/cadenya/types.rb', line 7056 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]), spec: data["spec"].nil? ? nil : Types::UploadSpec.from_json(data["spec"]), info: data["info"].nil? ? nil : Types::UploadInfo.from_json(data["info"]), ) end |