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