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/room_participant/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 that this resource was created.
-
#date_updated ⇒ Time
The date that this resource was last updated.
-
#enabled ⇒ Boolean
Specifies whether the Track is enabled or not.
-
#fetch ⇒ PublishedTrackInstance
Fetch a 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 ⇒ published_track.Kind
Specifies whether Track represents ‘audio`, `video` or `data`.
-
#name ⇒ String
Track name.
-
#participant_sid ⇒ String
Unique Participant identifier that publishes this Track.
-
#room_sid ⇒ String
Unique Room identifier where this Track is published.
-
#sid ⇒ String
A 34 character string that uniquely identifies this resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL for this resource.
Constructor Details
#initialize(version, payload, room_sid: nil, participant_sid: nil, sid: nil) ⇒ PublishedTrackInstance
Initialize the PublishedTrackInstance
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 219 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, 'participant_sid' => 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
248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 248 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 that this resource was created.
286 287 288 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 286 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was last updated.
292 293 294 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 292 def date_updated @properties['date_updated'] end |
#enabled ⇒ Boolean
Returns Specifies whether the Track is enabled or not.
298 299 300 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 298 def enabled @properties['enabled'] end |
#fetch ⇒ PublishedTrackInstance
Fetch a PublishedTrackInstance
317 318 319 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 317 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
330 331 332 333 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 330 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.PublishedTrackInstance #{values}>" end |
#kind ⇒ published_track.Kind
Returns Specifies whether Track represents ‘audio`, `video` or `data`.
304 305 306 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 304 def kind @properties['kind'] end |
#name ⇒ String
Returns Track name. Limited to 128 characters.
280 281 282 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 280 def name @properties['name'] end |
#participant_sid ⇒ String
Returns Unique Participant identifier that publishes this Track.
268 269 270 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 268 def participant_sid @properties['participant_sid'] end |
#room_sid ⇒ String
Returns Unique Room identifier where this Track is published.
274 275 276 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 274 def room_sid @properties['room_sid'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
262 263 264 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 262 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
323 324 325 326 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 323 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.PublishedTrackInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL for this resource.
310 311 312 |
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb', line 310 def url @properties['url'] end |