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

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/video/v1/room/room_participant/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

  • room_sid (String) (defaults to: nil)

    The SID of the participant’s room.

  • sid (String) (defaults to: nil)

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



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 114

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, 'sid' => sid, }
end

Instance Method Details

#account_sidString

Returns The SID of the Account that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource



162
163
164
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 162

def 
  @properties['account_sid']
end

#contextAnonymizeContext

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

Returns:



141
142
143
144
145
146
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 141

def context
  unless @instance_context
    @instance_context = AnonymizeContext.new(@version, @params['room_sid'], @params['sid'], )
  end
  @instance_context
end

#date_createdTime

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

Returns:

  • (Time)

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



180
181
182
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 180

def date_created
  @properties['date_created']
end

#date_updatedTime

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

Returns:

  • (Time)

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



186
187
188
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 186

def date_updated
  @properties['date_updated']
end

#durationString

Returns Duration of time in seconds the participant was connected.

Returns:

  • (String)

    Duration of time in seconds the participant was connected



204
205
206
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 204

def duration
  @properties['duration']
end

#end_timeTime

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



198
199
200
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 198

def end_time
  @properties['end_time']
end

#identityString

Returns The SID of the participant.

Returns:

  • (String)

    The SID of the participant



174
175
176
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 174

def identity
  @properties['identity']
end

#inspectObject

Provide a detailed, user friendly representation



230
231
232
233
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 230

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

#room_sidString

Returns The SID of the participant’s room.

Returns:

  • (String)

    The SID of the participant’s room



156
157
158
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 156

def room_sid
  @properties['room_sid']
end

#sidString

Returns The unique string that identifies the resource.

Returns:

  • (String)

    The unique string that identifies the resource



150
151
152
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 150

def sid
  @properties['sid']
end

#start_timeTime

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



192
193
194
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 192

def start_time
  @properties['start_time']
end

#statusanonymize.Status

Returns The status of the Participant.

Returns:

  • (anonymize.Status)

    The status of the Participant



168
169
170
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 168

def status
  @properties['status']
end

#to_sObject

Provide a user friendly representation



223
224
225
226
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 223

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

#updateAnonymizeInstance

Update the AnonymizeInstance

Returns:



217
218
219
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 217

def update
  context.update
end

#urlString

Returns The absolute URL of the resource.

Returns:

  • (String)

    The absolute URL of the resource



210
211
212
# File 'lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb', line 210

def url
  @properties['url']
end