Class: Cadenya::Types::ObjectiveToolCallResult_AudioBlock
- Inherits:
-
Object
- Object
- Cadenya::Types::ObjectiveToolCallResult_AudioBlock
- 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_AudioBlock
constructor
A new instance of ObjectiveToolCallResult_AudioBlock.
- #to_h ⇒ Object
Constructor Details
#initialize(url: nil, mime_type: nil, size_bytes: nil, expires_at: nil) ⇒ ObjectiveToolCallResult_AudioBlock
Returns a new instance of ObjectiveToolCallResult_AudioBlock.
4213 4214 4215 4216 4217 4218 |
# File 'lib/cadenya/types.rb', line 4213 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.
4211 4212 4213 |
# File 'lib/cadenya/types.rb', line 4211 def expires_at @expires_at end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
4211 4212 4213 |
# File 'lib/cadenya/types.rb', line 4211 def mime_type @mime_type end |
#size_bytes ⇒ Object (readonly)
Returns the value of attribute size_bytes.
4211 4212 4213 |
# File 'lib/cadenya/types.rb', line 4211 def size_bytes @size_bytes end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4211 4212 4213 |
# File 'lib/cadenya/types.rb', line 4211 def url @url end |
Class Method Details
.from_json(data) ⇒ Object
4220 4221 4222 4223 4224 4225 4226 4227 |
# File 'lib/cadenya/types.rb', line 4220 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 |