Class: Twilio::REST::Assistants::V1::Knowledge::ChunkInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Assistants::V1::Knowledge::ChunkInstance
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
-
#content ⇒ String
The chunk content.
-
#date_created ⇒ Time
The date and time in GMT when the Chunk was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the Chunk was updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#initialize(version, payload, id: nil) ⇒ ChunkInstance
constructor
Initialize the ChunkInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#metadata ⇒ Hash
The metadata of the chunk.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, id: nil) ⇒ ChunkInstance
Initialize the ChunkInstance
169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 169 def initialize(version, payload , id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'content' => payload['content'], 'metadata' => payload['metadata'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
185 186 187 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 185 def account_sid @properties['account_sid'] end |
#content ⇒ String
Returns The chunk content.
191 192 193 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 191 def content @properties['content'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the Chunk was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
203 204 205 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 203 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the Chunk was updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
209 210 211 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 209 def date_updated @properties['date_updated'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
221 222 223 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 221 def inspect "<Twilio.Assistants.V1.ChunkInstance>" end |
#metadata ⇒ Hash
Returns The metadata of the chunk.
197 198 199 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 197 def @properties['metadata'] end |
#to_s ⇒ Object
Provide a user friendly representation
215 216 217 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 215 def to_s "<Twilio.Assistants.V1.ChunkInstance>" end |