Class: Cadenya::Types::MemoryEntryCreateSpec_UploadId

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: nil, upload_id: nil, key: nil, description: nil) ⇒ MemoryEntryCreateSpec_UploadId

Returns a new instance of MemoryEntryCreateSpec_UploadId.



9062
9063
9064
9065
9066
9067
# File 'lib/cadenya/types.rb', line 9062

def initialize(type: nil, upload_id: nil, key: nil, description: nil)
  @type = type
  @upload_id = upload_id
  @key = key
  @description = description
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



9060
9061
9062
# File 'lib/cadenya/types.rb', line 9060

def description
  @description
end

#keyObject (readonly)

Returns the value of attribute key.



9060
9061
9062
# File 'lib/cadenya/types.rb', line 9060

def key
  @key
end

#typeObject (readonly)

Returns the value of attribute type.



9060
9061
9062
# File 'lib/cadenya/types.rb', line 9060

def type
  @type
end

#upload_idObject (readonly)

Returns the value of attribute upload_id.



9060
9061
9062
# File 'lib/cadenya/types.rb', line 9060

def upload_id
  @upload_id
end

Class Method Details

.from_json(data) ⇒ Object



9069
9070
9071
9072
9073
9074
9075
9076
# File 'lib/cadenya/types.rb', line 9069

def self.from_json(data)
  new(
    type: data["type"],
    upload_id: data["uploadId"],
    key: data["key"],
    description: data["description"],
  )
end

Instance Method Details

#to_hObject



9078
9079
9080
9081
9082
9083
9084
9085
# File 'lib/cadenya/types.rb', line 9078

def to_h
  {
    type: Util.plain(@type),
    upload_id: Util.plain(@upload_id),
    key: Util.plain(@key),
    description: Util.plain(@description),
  }.reject { |_k, v| v.nil? }
end