class Twilio::REST::Video::V1::CompositionSettingsContext

Public Class Methods

new(version) click to toggle source

Initialize the CompositionSettingsContext @param [Version] version Version that contains the resource @return [CompositionSettingsContext] CompositionSettingsContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
66 def initialize(version)
67   super(version)
68 
69   # Path Solution
70   @solution = {}
71   @uri = "/CompositionSettings/Default"
72 end

Public Instance Methods

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
101 def create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset)
102   data = Twilio::Values.of({
103       'FriendlyName' => friendly_name,
104       'AwsCredentialsSid' => aws_credentials_sid,
105       'EncryptionKeySid' => encryption_key_sid,
106       'AwsS3Url' => aws_s3_url,
107       'AwsStorageEnabled' => aws_storage_enabled,
108       'EncryptionEnabled' => encryption_enabled,
109   })
110 
111   payload = @version.create('POST', @uri, data: data)
112 
113   CompositionSettingsInstance.new(@version, payload, )
114 end
fetch() click to toggle source

Fetch the CompositionSettingsInstance @return [CompositionSettingsInstance] Fetched CompositionSettingsInstance

   # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
77 def fetch
78   payload = @version.fetch('GET', @uri)
79 
80   CompositionSettingsInstance.new(@version, payload, )
81 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
125 def inspect
126   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
127   "#<Twilio.Video.V1.CompositionSettingsContext #{context}>"
128 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/video/v1/composition_settings.rb
118 def to_s
119   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
120   "#<Twilio.Video.V1.CompositionSettingsContext #{context}>"
121 end