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.
-
#source_sid ⇒ String
The SID of the transcriptions’s associated call.
-
#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, configuration: :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
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 512 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'], 'source_sid' => payload['source_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.
556 557 558 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 556 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.
616 617 618 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 616 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
541 542 543 544 545 546 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 541 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.
580 581 582 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 580 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.
586 587 588 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 586 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`.
604 605 606 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 604 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.
598 599 600 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 598 def end_time @properties['end_time'] end |
#fetch ⇒ TranscriptionsInstance
Fetch the TranscriptionsInstance
623 624 625 626 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 623 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
653 654 655 656 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 653 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.
562 563 564 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 562 def room_sid @properties['room_sid'] end |
#source_sid ⇒ String
Returns The SID of the transcriptions’s associated call.
568 569 570 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 568 def source_sid @properties['source_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.
592 593 594 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 592 def start_time @properties['start_time'] end |
#status ⇒ Status
574 575 576 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 574 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
646 647 648 649 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 646 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.
550 551 552 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 550 def ttid @properties['ttid'] end |
#update(status: :unset, configuration: :unset) ⇒ TranscriptionsInstance
Update the TranscriptionsInstance
633 634 635 636 637 638 639 640 641 642 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 633 def update( status: :unset, configuration: :unset ) context.update( status: status, configuration: configuration, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
610 611 612 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 610 def url @properties['url'] end |