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 SID of the Account that created the resource.
-
#codec ⇒ room_recording.Codec
The codec used for the recording.
-
#container_format ⇒ room_recording.Format
The file format for the recording.
-
#context ⇒ RoomRecordingContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#delete ⇒ Boolean
Delete the RoomRecordingInstance.
-
#duration ⇒ String
The duration of the recording in seconds.
-
#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 ⇒ String
The URLs of related resources.
-
#offset ⇒ String
The number of milliseconds between a point in time that is common to all rooms in a group and when the source room of the recording started.
-
#room_sid ⇒ String
The SID of the Room resource the recording is associated with.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#size ⇒ String
The size of the recorded track in bytes.
-
#source_sid ⇒ String
The SID of the recording source.
-
#status ⇒ room_recording.Status
The status of the recording.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#track_name ⇒ String
The name that was given to the source track of the recording.
-
#type ⇒ room_recording.Type
The recording’s media type.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, room_sid: nil, sid: nil) ⇒ RoomRecordingInstance
Initialize the RoomRecordingInstance
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 239 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
280 281 282 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 280 def account_sid @properties['account_sid'] end |
#codec ⇒ room_recording.Codec
340 341 342 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 340 def codec @properties['codec'] end |
#container_format ⇒ room_recording.Format
334 335 336 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 334 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
271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 271 def context unless @instance_context @instance_context = RoomRecordingContext.new(@version, @params['room_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
292 293 294 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 292 def date_created @properties['date_created'] end |
#delete ⇒ Boolean
Delete the RoomRecordingInstance
384 385 386 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 384 def delete context.delete end |
#duration ⇒ String
328 329 330 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 328 def duration @properties['duration'] end |
#fetch ⇒ RoomRecordingInstance
Fetch the RoomRecordingInstance
377 378 379 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 377 def fetch context.fetch end |
#grouping_sids ⇒ Hash
346 347 348 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 346 def grouping_sids @properties['grouping_sids'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
397 398 399 400 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 397 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#links ⇒ String
370 371 372 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 370 def links @properties['links'] end |
#offset ⇒ String
358 359 360 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 358 def offset @properties['offset'] end |
#room_sid ⇒ String
364 365 366 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 364 def room_sid @properties['room_sid'] end |
#sid ⇒ String
298 299 300 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 298 def sid @properties['sid'] end |
#size ⇒ String
310 311 312 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 310 def size @properties['size'] end |
#source_sid ⇒ String
304 305 306 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 304 def source_sid @properties['source_sid'] end |
#status ⇒ room_recording.Status
286 287 288 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 286 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
390 391 392 393 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 390 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Video.V1.RoomRecordingInstance #{values}>" end |
#track_name ⇒ String
352 353 354 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 352 def track_name @properties['track_name'] end |
#type ⇒ room_recording.Type
322 323 324 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 322 def type @properties['type'] end |
#url ⇒ String
316 317 318 |
# File 'lib/twilio-ruby/rest/video/v1/room/recording.rb', line 316 def url @properties['url'] end |