Class: Twilio::REST::Video::V1::RecordingSettingsInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/video/v1/recording_settings.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ RecordingSettingsInstance

Initialize the RecordingSettingsInstance



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 169

def initialize(version, payload )
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'friendly_name' => payload['friendly_name'],
        'aws_credentials_sid' => payload['aws_credentials_sid'],
        'aws_s3_url' => payload['aws_s3_url'],
        'aws_storage_enabled' => payload['aws_storage_enabled'],
        'encryption_key_sid' => payload['encryption_key_sid'],
        'encryption_enabled' => payload['encryption_enabled'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = {  }
end

Instance Method Details

#account_sidString



202
203
204
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 202

def 
    @properties['account_sid']
end

#aws_credentials_sidString



214
215
216
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 214

def aws_credentials_sid
    @properties['aws_credentials_sid']
end

#aws_s3_urlString



220
221
222
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 220

def aws_s3_url
    @properties['aws_s3_url']
end

#aws_storage_enabledBoolean



226
227
228
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 226

def aws_storage_enabled
    @properties['aws_storage_enabled']
end

#contextRecordingSettingsContext

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



193
194
195
196
197
198
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 193

def context
    unless @instance_context
        @instance_context = RecordingSettingsContext.new(@version )
    end
    @instance_context
end

#create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance

Create the RecordingSettingsInstance



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 257

def create(
    friendly_name: nil, 
    aws_credentials_sid: :unset, 
    encryption_key_sid: :unset, 
    aws_s3_url: :unset, 
    aws_storage_enabled: :unset, 
    encryption_enabled: :unset
)

    context.create(
        friendly_name: friendly_name, 
        aws_credentials_sid: aws_credentials_sid, 
        encryption_key_sid: encryption_key_sid, 
        aws_s3_url: aws_s3_url, 
        aws_storage_enabled: aws_storage_enabled, 
        encryption_enabled: encryption_enabled, 
    )
end

#encryption_enabledBoolean



238
239
240
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 238

def encryption_enabled
    @properties['encryption_enabled']
end

#encryption_key_sidString



232
233
234
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 232

def encryption_key_sid
    @properties['encryption_key_sid']
end

#fetchRecordingSettingsInstance

Fetch the RecordingSettingsInstance



279
280
281
282
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 279

def fetch

    context.fetch
end

#friendly_nameString



208
209
210
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 208

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



293
294
295
296
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 293

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

#to_sObject

Provide a user friendly representation



286
287
288
289
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 286

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

#urlString



244
245
246
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 244

def url
    @properties['url']
end