Class: Twilio::REST::Video::V1::RoomContext::ParticipantContext::PublishedTrackInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Video::V1::RoomContext::ParticipantContext::PublishedTrackInstance
- Defined in:
- lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb
Instance Method Summary collapse
-
#context ⇒ PublishedTrackContext
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.
-
#enabled ⇒ Boolean
Whether the track is enabled.
-
#fetch ⇒ PublishedTrackInstance
Fetch the PublishedTrackInstance.
-
#initialize(version, payload, room_sid: nil, participant_sid: nil, sid: nil) ⇒ PublishedTrackInstance
constructor
Initialize the PublishedTrackInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #kind ⇒ Kind
-
#name ⇒ String
The track name.
-
#participant_sid ⇒ String
The SID of the Participant resource with the published track.
-
#room_sid ⇒ String
The SID of the Room resource where the track is published.
-
#sid ⇒ String
The unique string that we created to identify the RoomParticipantPublishedTrack resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, room_sid: nil, participant_sid: nil, sid: nil) ⇒ PublishedTrackInstance
Initialize the PublishedTrackInstance
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 384 def initialize(version, payload , room_sid: nil, participant_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'participant_sid' => payload['participant_sid'], 'room_sid' => payload['room_sid'], 'name' => payload['name'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'enabled' => payload['enabled'], 'kind' => payload['kind'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'room_sid' => room_sid || @properties['room_sid'] ,'participant_sid' => participant_sid || @properties['participant_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#context ⇒ PublishedTrackContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
410 411 412 413 414 415 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 410 def context unless @instance_context @instance_context = PublishedTrackContext.new(@version , @params['room_sid'], @params['participant_sid'], @params['sid']) 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.
443 444 445 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 443 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.
449 450 451 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 449 def date_updated @properties['date_updated'] end |
#enabled ⇒ Boolean
Returns Whether the track is enabled.
455 456 457 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 455 def enabled @properties['enabled'] end |
#fetch ⇒ PublishedTrackInstance
Fetch the PublishedTrackInstance
474 475 476 477 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 474 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
488 489 490 491 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 488 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.PublishedTrackInstance #{values}>" end |
#kind ⇒ Kind
461 462 463 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 461 def kind @properties['kind'] end |
#name ⇒ String
Returns The track name. Must be no more than 128 characters, and be unique among the participant’s published tracks.
437 438 439 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 437 def name @properties['name'] end |
#participant_sid ⇒ String
Returns The SID of the Participant resource with the published track.
425 426 427 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 425 def participant_sid @properties['participant_sid'] end |
#room_sid ⇒ String
Returns The SID of the Room resource where the track is published.
431 432 433 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 431 def room_sid @properties['room_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the RoomParticipantPublishedTrack resource.
419 420 421 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 419 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
481 482 483 484 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 481 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.PublishedTrackInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
467 468 469 |
# File 'lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb', line 467 def url @properties['url'] end |