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/recording.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#codec ⇒ room_recording.Codec
The codec.
-
#container_format ⇒ room_recording.Format
The container_format.
-
#context ⇒ RoomRecordingContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date_created.
-
#delete ⇒ Boolean
Deletes the RoomRecordingInstance.
-
#duration ⇒ String
The duration.
-
#fetch ⇒ RoomRecordingInstance
Fetch a RoomRecordingInstance.
-
#grouping_sids ⇒ Hash
The grouping_sids.
-
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
constructor
Initialize the RoomRecordingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#offset ⇒ String
The offset.
-
#room_sid ⇒ String
The room_sid.
-
#sid ⇒ String
The sid.
-
#size ⇒ String
The size.
-
#source_sid ⇒ String
The source_sid.
-
#status ⇒ room_recording.Status
The status.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#track_name ⇒ String
The track_name.
-
#type ⇒ room_recording.Type
The type.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
Initialize the RoomRecordingInstance
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 235 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'].to_i, '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'].to_i, 'room_sid' => payload['room_sid'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'room_sid' => room_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
276 277 278 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 276 def account_sid @properties['account_sid'] end |
#codec ⇒ room_recording.Codec
Returns The codec.
336 337 338 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 336 def codec @properties['codec'] end |
#container_format ⇒ room_recording.Format
Returns The container_format.
330 331 332 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 330 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
267 268 269 270 271 272 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 267 def context unless @instance_context @instance_context = RoomRecordingContext.new(@version, @params['room_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date_created.
288 289 290 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 288 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Deletes the RoomRecordingInstance
380 381 382 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 380 def delete context.delete end |
#duration ⇒ String
Returns The duration.
324 325 326 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 324 def duration @properties['duration'] end |
#fetch ⇒ RoomRecordingInstance
Fetch a RoomRecordingInstance
373 374 375 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 373 def fetch context.fetch end |
#grouping_sids ⇒ Hash
Returns The grouping_sids.
342 343 344 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 342 def grouping_sids @properties['grouping_sids'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
393 394 395 396 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 393 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#links ⇒ String
Returns The links.
366 367 368 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 366 def links @properties['links'] end |
#offset ⇒ String
Returns The offset.
354 355 356 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 354 def offset @properties['offset'] end |
#room_sid ⇒ String
Returns The room_sid.
360 361 362 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 360 def room_sid @properties['room_sid'] end |
#sid ⇒ String
Returns The sid.
294 295 296 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 294 def sid @properties['sid'] end |
#size ⇒ String
Returns The size.
306 307 308 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 306 def size @properties['size'] end |
#source_sid ⇒ String
Returns The source_sid.
300 301 302 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 300 def source_sid @properties['source_sid'] end |
#status ⇒ room_recording.Status
Returns The status.
282 283 284 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 282 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
386 387 388 389 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 386 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#track_name ⇒ String
Returns The track_name.
348 349 350 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 348 def track_name @properties['track_name'] end |
#type ⇒ room_recording.Type
Returns The type.
318 319 320 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 318 def type @properties['type'] end |
#url ⇒ String
Returns The url.
312 313 314 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 312 def url @properties['url'] end |