Class: Twilio::REST::Video::V1::RoomContext::TranscriptionsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RoomContext::TranscriptionsInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/transcriptions.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Room resource.
-
#configuration ⇒ Hash
An JSON object that describes the video layout of the composition in terms of regions.
-
#context ⇒ TranscriptionsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#duration ⇒ String
The duration in seconds that the transcriptions were ‘connected`.
-
#end_time ⇒ Time
The time when the transcriptions disconnected from the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.
-
#fetch ⇒ TranscriptionsInstance
Fetch the TranscriptionsInstance.
-
#initialize(version, payload, room_sid: nil, ttid: nil) ⇒ TranscriptionsInstance
constructor
Initialize the TranscriptionsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#room_sid ⇒ String
The SID of the transcriptions’s room.
-
#start_time ⇒ Time
The time of transcriptions connected to the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#ttid ⇒ String
The unique string that we created to identify the transcriptions resource.
-
#update(status: :unset) ⇒ TranscriptionsInstance
Update the TranscriptionsInstance.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, room_sid: nil, ttid: nil) ⇒ TranscriptionsInstance
Initialize the TranscriptionsInstance
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 275 def initialize(version, payload , room_sid: nil, ttid: nil) super(version) # Marshaled Properties @properties = { 'ttid' => payload['ttid'], 'account_sid' => payload['account_sid'], 'room_sid' => payload['room_sid'], 'status' => payload['status'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']), 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']), 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'url' => payload['url'], 'configuration' => payload['configuration'], } # Context @instance_context = nil @params = { 'room_sid' => room_sid || @properties['room_sid'] ,'ttid' => ttid || @properties['ttid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Room resource.
317 318 319 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 317 def account_sid @properties['account_sid'] end |
#configuration ⇒ Hash
Returns An JSON object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
371 372 373 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 371 def configuration @properties['configuration'] end |
#context ⇒ TranscriptionsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
302 303 304 305 306 307 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 302 def context unless @instance_context @instance_context = TranscriptionsContext.new(@version , @params['room_sid'], @params['ttid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
335 336 337 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 335 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
341 342 343 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 341 def date_updated @properties['date_updated'] end |
#duration ⇒ String
Returns The duration in seconds that the transcriptions were ‘connected`. Populated only after the transcriptions is `stopped`.
359 360 361 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 359 def duration @properties['duration'] end |
#end_time ⇒ Time
Returns The time when the transcriptions disconnected from the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.
353 354 355 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 353 def end_time @properties['end_time'] end |
#fetch ⇒ TranscriptionsInstance
Fetch the TranscriptionsInstance
378 379 380 381 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 378 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
405 406 407 408 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 405 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.TranscriptionsInstance #{values}>" end |
#room_sid ⇒ String
Returns The SID of the transcriptions’s room.
323 324 325 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 323 def room_sid @properties['room_sid'] end |
#start_time ⇒ Time
Returns The time of transcriptions connected to the room in [ISO 8601](en.wikipedia.org/wiki/ISO_8601#UTC) format.
347 348 349 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 347 def start_time @properties['start_time'] end |
#status ⇒ Status
329 330 331 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 329 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
398 399 400 401 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 398 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.TranscriptionsInstance #{values}>" end |
#ttid ⇒ String
Returns The unique string that we created to identify the transcriptions resource.
311 312 313 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 311 def ttid @properties['ttid'] end |
#update(status: :unset) ⇒ TranscriptionsInstance
Update the TranscriptionsInstance
387 388 389 390 391 392 393 394 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 387 def update( status: :unset ) context.update( status: status, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
365 366 367 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 365 def url @properties['url'] end |