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) ⇒ 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
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 498 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.
542 543 544 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 542 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.
602 603 604 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 602 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
527 528 529 530 531 532 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 527 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.
566 567 568 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 566 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.
572 573 574 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 572 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.
590 591 592 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 590 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.
584 585 586 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 584 def end_time @properties['end_time'] end |
#fetch ⇒ TranscriptionsInstance
Fetch the TranscriptionsInstance
609 610 611 612 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 609 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
636 637 638 639 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 636 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.
548 549 550 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 548 def room_sid @properties['room_sid'] end |
#source_sid ⇒ String
Returns The SID of the transcriptions’s associated call.
554 555 556 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 554 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.
578 579 580 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 578 def start_time @properties['start_time'] end |
#status ⇒ Status
560 561 562 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 560 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
629 630 631 632 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 629 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.
536 537 538 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 536 def ttid @properties['ttid'] end |
#update(status: :unset) ⇒ TranscriptionsInstance
Update the TranscriptionsInstance
618 619 620 621 622 623 624 625 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 618 def update( status: :unset ) context.update( status: status, ) end |
#url ⇒ String
Returns The absolute URL of the resource.
596 597 598 |
# File 'lib/twilio-ruby/rest/video/v1/room/transcriptions.rb', line 596 def url @properties['url'] end |