Class: Twilio::REST::Video::V1::RoomContext::RoomRecordingInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RoomContext::RoomRecordingInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/room_recording.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the RoomRecording resource.
- #codec ⇒ Codec
- #container_format ⇒ Format
-
#context ⇒ RoomRecordingContext
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.
-
#delete ⇒ Boolean
Delete the RoomRecordingInstance.
-
#duration ⇒ String
The duration of the recording rounded to the nearest second.
-
#fetch ⇒ RoomRecordingInstance
Fetch the RoomRecordingInstance.
-
#grouping_sids ⇒ Hash
A list of SIDs related to the Recording.
-
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
constructor
Initialize the RoomRecordingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
The URLs of related resources.
-
#media_external_location ⇒ String
The URL of the media file associated with the recording when stored externally.
-
#offset ⇒ String
The time in milliseconds elapsed between an arbitrary point in time, common to all group rooms, and the moment when the source room of this track started.
-
#room_sid ⇒ String
The SID of the Room resource the recording is associated with.
-
#sid ⇒ String
The unique string that we created to identify the RoomRecording resource.
-
#size ⇒ String
The size of the recorded track in bytes.
-
#source_sid ⇒ String
The SID of the recording source.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#track_name ⇒ String
The name that was given to the source track of the recording.
- #type ⇒ Type
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
Initialize the RoomRecordingInstance
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 444 def initialize(version, payload , room_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'status' => payload['status'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'sid' => payload['sid'], 'source_sid' => payload['source_sid'], 'size' => payload['size'], 'url' => payload['url'], 'type' => payload['type'], 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i, 'container_format' => payload['container_format'], 'codec' => payload['codec'], 'grouping_sids' => payload['grouping_sids'], 'track_name' => payload['track_name'], 'offset' => payload['offset'], 'media_external_location' => payload['media_external_location'], 'room_sid' => payload['room_sid'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'room_sid' => room_sid || @properties['room_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
487 488 489 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 487 def account_sid @properties['account_sid'] end |
#codec ⇒ Codec
547 548 549 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 547 def codec @properties['codec'] end |
#container_format ⇒ Format
541 542 543 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 541 def container_format @properties['container_format'] end |
#context ⇒ RoomRecordingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
478 479 480 481 482 483 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 478 def context unless @instance_context @instance_context = RoomRecordingContext.new(@version , @params['room_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
499 500 501 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 499 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the RoomRecordingInstance
590 591 592 593 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 590 def delete context.delete end |
#duration ⇒ String
535 536 537 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 535 def duration @properties['duration'] end |
#fetch ⇒ RoomRecordingInstance
Fetch the RoomRecordingInstance
598 599 600 601 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 598 def fetch context.fetch end |
#grouping_sids ⇒ Hash
553 554 555 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 553 def grouping_sids @properties['grouping_sids'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
612 613 614 615 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 612 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#links ⇒ Hash
583 584 585 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 583 def links @properties['links'] end |
#media_external_location ⇒ String
571 572 573 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 571 def media_external_location @properties['media_external_location'] end |
#offset ⇒ String
565 566 567 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 565 def offset @properties['offset'] end |
#room_sid ⇒ String
577 578 579 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 577 def room_sid @properties['room_sid'] end |
#sid ⇒ String
505 506 507 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 505 def sid @properties['sid'] end |
#size ⇒ String
517 518 519 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 517 def size @properties['size'] end |
#source_sid ⇒ String
511 512 513 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 511 def source_sid @properties['source_sid'] end |
#status ⇒ Status
493 494 495 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 493 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
605 606 607 608 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 605 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#track_name ⇒ String
559 560 561 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 559 def track_name @properties['track_name'] end |
#type ⇒ Type
529 530 531 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 529 def type @properties['type'] end |
#url ⇒ String
523 524 525 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_recording.rb', line 523 def url @properties['url'] end |