class Twilio::REST::Video::V1::CompositionSettingsInstance

Public Class Methods

new(version, payload) click to toggle source

Initialize the CompositionSettingsInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @return [CompositionSettingsInstance] CompositionSettingsInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
137 def initialize(version, payload)
138   super(version)
139 
140   # Marshaled Properties
141   @properties = {
142       'account_sid' => payload['account_sid'],
143       'friendly_name' => payload['friendly_name'],
144       'aws_credentials_sid' => payload['aws_credentials_sid'],
145       'aws_s3_url' => payload['aws_s3_url'],
146       'aws_storage_enabled' => payload['aws_storage_enabled'],
147       'encryption_key_sid' => payload['encryption_key_sid'],
148       'encryption_enabled' => payload['encryption_enabled'],
149       'url' => payload['url'],
150   }
151 
152   # Context
153   @instance_context = nil
154   @params = {}
155 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
170 def account_sid
171   @properties['account_sid']
172 end
aws_credentials_sid() click to toggle source

@return [String] The SID of the stored Credential resource

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
182 def aws_credentials_sid
183   @properties['aws_credentials_sid']
184 end
aws_s3_url() click to toggle source

@return [String] The URL of the AWS S3 bucket where the compositions are stored

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
188 def aws_s3_url
189   @properties['aws_s3_url']
190 end
aws_storage_enabled() click to toggle source

@return [Boolean] Whether all compositions are written to the aws_s3_url

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
194 def aws_storage_enabled
195   @properties['aws_storage_enabled']
196 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [CompositionSettingsContext] CompositionSettingsContext for this CompositionSettingsInstance

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
161 def context
162   unless @instance_context
163     @instance_context = CompositionSettingsContext.new(@version, )
164   end
165   @instance_context
166 end
create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) click to toggle source

Create the CompositionSettingsInstance @param [String] friendly_name A descriptive string that you create to describe

the resource and show to the user in the console

@param [String] aws_credentials_sid The SID of the stored Credential resource. @param [String] encryption_key_sid The SID of the Public Key resource to use for

encryption.

@param [String] aws_s3_url The URL of the AWS S3 bucket where the compositions

should be stored. We only support DNS-compliant URLs like
`https://documentation-example-twilio-bucket/compositions`, where `compositions`
is the path in which you want the compositions to be stored. This URL accepts
only URI-valid characters, as described in the <a
href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>.

@param [Boolean] aws_storage_enabled Whether all compositions should be written

to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.

@param [Boolean] encryption_enabled Whether all compositions should be stored in

an encrypted form. The default is `false`.

@return [CompositionSettingsInstance] Created CompositionSettingsInstance

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
241 def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
242   context.create(
243       friendly_name: friendly_name,
244       aws_credentials_sid: aws_credentials_sid,
245       encryption_key_sid: encryption_key_sid,
246       aws_s3_url: aws_s3_url,
247       aws_storage_enabled: aws_storage_enabled,
248       encryption_enabled: encryption_enabled,
249   )
250 end
encryption_enabled() click to toggle source

@return [Boolean] Whether all compositions are stored in an encrypted form

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
206 def encryption_enabled
207   @properties['encryption_enabled']
208 end
encryption_key_sid() click to toggle source

@return [String] The SID of the Public Key resource used for encryption

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
200 def encryption_key_sid
201   @properties['encryption_key_sid']
202 end
fetch() click to toggle source

Fetch the CompositionSettingsInstance @return [CompositionSettingsInstance] Fetched CompositionSettingsInstance

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
219 def fetch
220   context.fetch
221 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
176 def friendly_name
177   @properties['friendly_name']
178 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
261 def inspect
262   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
263   "<Twilio.Video.V1.CompositionSettingsInstance #{values}>"
264 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
254 def to_s
255   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
256   "<Twilio.Video.V1.CompositionSettingsInstance #{values}>"
257 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
212 def url
213   @properties['url']
214 end