Class: Cadenya::Types::ObjectiveToolCallResult_ImageBlock
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveToolCallResult_ImageBlock
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
-
#size_bytes ⇒ Object
readonly
Returns the value of attribute size_bytes.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url: nil, mime_type: nil, size_bytes: nil, expires_at: nil) ⇒ ObjectiveToolCallResult_ImageBlock
constructor
A new instance of ObjectiveToolCallResult_ImageBlock.
- #to_h ⇒ Object
Constructor Details
#initialize(url: nil, mime_type: nil, size_bytes: nil, expires_at: nil) ⇒ ObjectiveToolCallResult_ImageBlock
Returns a new instance of ObjectiveToolCallResult_ImageBlock.
4256 4257 4258 4259 4260 4261 |
# File 'lib/cadenya/types.rb', line 4256 def initialize(url: nil, mime_type: nil, size_bytes: nil, expires_at: nil) @url = url @mime_type = mime_type @size_bytes = size_bytes @expires_at = expires_at end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
4254 4255 4256 |
# File 'lib/cadenya/types.rb', line 4254 def expires_at @expires_at end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
4254 4255 4256 |
# File 'lib/cadenya/types.rb', line 4254 def mime_type @mime_type end |
#size_bytes ⇒ Object (readonly)
Returns the value of attribute size_bytes.
4254 4255 4256 |
# File 'lib/cadenya/types.rb', line 4254 def size_bytes @size_bytes end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4254 4255 4256 |
# File 'lib/cadenya/types.rb', line 4254 def url @url end |
Class Method Details
.from_json(data) ⇒ Object
4263 4264 4265 4266 4267 4268 4269 4270 |
# File 'lib/cadenya/types.rb', line 4263 def self.from_json(data) new( url: data["url"], mime_type: data["mimeType"], size_bytes: data["sizeBytes"], expires_at: data["expiresAt"].nil? ? nil : Time.iso8601(data["expiresAt"]), ) end |