Class: Twilio::REST::Assistants::V1::Knowledge::ChunkInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb

Instance Method Summary collapse

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_sidString



185
186
187
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 185

def 
    @properties['account_sid']
end

#contentString



191
192
193
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 191

def content
    @properties['content']
end

#date_createdTime



203
204
205
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 203

def date_created
    @properties['date_created']
end

#date_updatedTime



209
210
211
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 209

def date_updated
    @properties['date_updated']
end

#inspectObject

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

#metadataHash



197
198
199
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb', line 197

def 
    @properties['metadata']
end

#to_sObject

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