Class: Twilio::REST::Video::V1::RoomContext::ParticipantContext::AnonymizeInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, room_sid: nil, sid: nil) ⇒ AnonymizeInstance

Initialize the AnonymizeInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this Anonymize resource.

  • sid (String) (defaults to: nil) —

    The SID of the Call resource to fetch.



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 213

def initialize(version, payload , room_sid: nil, sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'room_sid' => payload['room_sid'],
        'account_sid' => payload['account_sid'],
        'status' => payload['status'],
        'identity' => payload['identity'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
        'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
        'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'room_sid' => room_sid  || @properties['room_sid']  ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account that created the RoomParticipant resource.

Returns:

  • (String) —

    The SID of the Account that created the RoomParticipant resource.



262
263
264
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 262

def 
    @properties['account_sid']
end

#context ⇒ AnonymizeContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



241
242
243
244
245
246
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 241

def context
    unless @instance_context
        @instance_context = AnonymizeContext.new(@version , @params['room_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 format.

Returns:

  • (Time) —

    The date and time in GMT when the resource was created specified in ISO 8601 format.



280
281
282
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 280

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 format.

Returns:

  • (Time) —

    The date and time in GMT when the resource was last updated specified in ISO 8601 format.



286
287
288
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 286

def date_updated
    @properties['date_updated']
end

#duration ⇒ String

Returns The duration in seconds that the participant was connected. Populated only after the participant is disconnected.

Returns:

  • (String) —

    The duration in seconds that the participant was connected. Populated only after the participant is disconnected.



304
305
306
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 304

def duration
    @properties['duration']
end

#end_time ⇒ Time

Returns The time when the participant disconnected from the room in ISO 8601 format.

Returns:

  • (Time) —

    The time when the participant disconnected from the room in ISO 8601 format.



298
299
300
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 298

def end_time
    @properties['end_time']
end

#identity ⇒ String

Returns The SID of the participant.

Returns:

  • (String) —

    The SID of the participant.



274
275
276
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 274

def identity
    @properties['identity']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



331
332
333
334
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 331

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Video.V1.AnonymizeInstance #{values}>"
end

#room_sid ⇒ String

Returns The SID of the participant's room.

Returns:

  • (String) —

    The SID of the participant's room.



256
257
258
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 256

def room_sid
    @properties['room_sid']
end

#sid ⇒ String

Returns The unique string that we created to identify the RoomParticipant resource.

Returns:

  • (String) —

    The unique string that we created to identify the RoomParticipant resource.



250
251
252
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 250

def sid
    @properties['sid']
end

#start_time ⇒ Time

Returns The time of participant connected to the room in ISO 8601 format.

Returns:

  • (Time) —

    The time of participant connected to the room in ISO 8601 format.



292
293
294
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 292

def start_time
    @properties['start_time']
end

#status ⇒ Status

Returns:

  • (Status)


268
269
270
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 268

def status
    @properties['status']
end

#to_s ⇒ Object

Provide a user friendly representation



324
325
326
327
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 324

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Video.V1.AnonymizeInstance #{values}>"
end

#update ⇒ AnonymizeInstance

Update the AnonymizeInstance

Returns:



317
318
319
320
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 317

def update

    context.update
end

#url ⇒ String

Returns The absolute URL of the resource.

Returns:

  • (String) —

    The absolute URL of the resource.



310
311
312
# File 'lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb', line 310

def url
    @properties['url']
end