U
    ^g%iC9                     @   s   d Z ddlmZmZmZmZ ddlmZmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZ G dd	 d	eZG d
d de
ZG dd deZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Video
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictOptionalUnion)	serializevalues)InstanceContext)InstanceResource)ListResource)Versionc                	       s  e Zd ZdZeeeef d fddZe	ddddZ
ejejejejejfeeeef eeef eeef eeef eeef d d	d
dZejejejejejfeeeef eeef eeef eeef eeef d d	ddZd dddZd dddZedddZ  ZS )CompositionSettingsInstancea_  
    :ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CompositionSettings resource.
    :ivar friendly_name: The string that you assigned to describe the resource and that will be shown in the console
    :ivar aws_credentials_sid: The SID of the stored Credential resource.
    :ivar aws_s3_url: The URL of the AWS S3 bucket where the compositions are 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 [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
    :ivar aws_storage_enabled: Whether all compositions are written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
    :ivar encryption_key_sid: The SID of the Public Key resource used for encryption.
    :ivar encryption_enabled: Whether all compositions are stored in an encrypted form. The default is `false`.
    :ivar url: The absolute URL of the resource.
    )versionpayloadc                    sv   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
d | _d S )	Naccount_sidfriendly_nameaws_credentials_sid
aws_s3_urlaws_storage_enabledencryption_key_sidencryption_enabledurl)super__init__getr   r   r   r   r   r   r   r   _context)selfr   r   	__class__ h/var/www/html/api-medvista/venv/lib/python3.8/site-packages/twilio/rest/video/v1/composition_settings.pyr   #   s    z$CompositionSettingsInstance.__init__CompositionSettingsContextreturnc                 C   s   | j dkrt| j| _ | j S )a  
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: CompositionSettingsContext for this CompositionSettingsInstance
        N)r   r    _versionr   r   r   r   _proxy1   s
    
z"CompositionSettingsInstance._proxyr   r   r   r   r   r   r"   c                 C   s   | j j||||||dS )I  
        Create the CompositionSettingsInstance

        :param friendly_name: A descriptive string that you create to describe the resource and show to the user in the console
        :param aws_credentials_sid: The SID of the stored Credential resource.
        :param encryption_key_sid: The SID of the Public Key resource to use for encryption.
        :param 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 [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
        :param aws_storage_enabled: Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
        :param encryption_enabled: Whether all compositions should be stored in an encrypted form. The default is `false`.

        :returns: The created CompositionSettingsInstance
        r   r   r   r   r   )r%   creater   r   r   r   r   r   r   r   r   r   r)   ?   s    z"CompositionSettingsInstance.createc                    s   | j j||||||dI dH S )c  
        Asynchronous coroutine to create the CompositionSettingsInstance

        :param friendly_name: A descriptive string that you create to describe the resource and show to the user in the console
        :param aws_credentials_sid: The SID of the stored Credential resource.
        :param encryption_key_sid: The SID of the Public Key resource to use for encryption.
        :param 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 [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
        :param aws_storage_enabled: Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
        :param encryption_enabled: Whether all compositions should be stored in an encrypted form. The default is `false`.

        :returns: The created CompositionSettingsInstance
        r(   N)r%   create_asyncr*   r   r   r   r,   ]   s    z(CompositionSettingsInstance.create_asyncc                 C   s
   | j  S )s
        Fetch the CompositionSettingsInstance


        :returns: The fetched CompositionSettingsInstance
        )r%   fetchr$   r   r   r   r.   {   s    z!CompositionSettingsInstance.fetchc                    s   | j  I dH S )
        Asynchronous coroutine to fetch the CompositionSettingsInstance


        :returns: The fetched CompositionSettingsInstance
        N)r%   fetch_asyncr$   r   r   r   r0      s    z'CompositionSettingsInstance.fetch_asyncc                 C   s   dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z-<Twilio.Video.V1.CompositionSettingsInstance>r   r$   r   r   r   __repr__   s    z$CompositionSettingsInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   propertyr%   r   unsetr   objectboolr)   r,   r.   r0   r2   __classcell__r   r   r   r   r      sF   




!




		r   c                	       s   e Zd Zed fddZejejejejejfeeee	f eee	f eee	f ee
e	f ee
e	f edddZejejejejejfeeee	f eee	f eee	f ee
e	f ee
e	f edddZed	d
dZed	ddZed	ddZ  ZS )r    r   c                    s   t  | d| _dS )zw
        Initialize the CompositionSettingsContext

        :param version: Version that contains the resource
        z/CompositionSettings/DefaultN)r   r   _urir   r   r   r   r   r      s    z#CompositionSettingsContext.__init__r&   c           
   
   C   s`   t ||||t|t|d}t i }d|d< d|d< | jjd| j||d}	t| j|	S )r'   ZFriendlyNameZAwsCredentialsSidZEncryptionKeySidZAwsS3UrlZAwsStorageEnabledZEncryptionEnabled!application/x-www-form-urlencodedContent-Typeapplication/jsonAcceptPOSTmethoduridataheaders)r   ofr   boolean_to_stringr#   r)   r>   r   
r   r   r   r   r   r   r   rI   rJ   r   r   r   r   r)      s&    

   z!CompositionSettingsContext.createc           
   
      sf   t ||||t|t|d}t i }d|d< d|d< | jjd| j||dI dH }	t| j|	S )	r+   r@   rA   rB   rC   rD   rE   rF   N)r   rK   r   rL   r#   r,   r>   r   rM   r   r   r   r,      s&    

   z'CompositionSettingsContext.create_asyncr!   c                 C   s2   t i }d|d< | jjd| j|d}t| j|S )r-   rC   rD   GETrG   rH   rJ   )r   rK   r#   r.   r>   r   r   rJ   r   r   r   r   r.      s    
z CompositionSettingsContext.fetchc                    s8   t i }d|d< | jjd| j|dI dH }t| j|S )r/   rC   rD   rN   rO   N)r   rK   r#   r0   r>   r   rP   r   r   r   r0     s    
  z&CompositionSettingsContext.fetch_asyncc                 C   s   dS )r1   z,<Twilio.Video.V1.CompositionSettingsContext>r   r$   r   r   r   r2   #  s    z#CompositionSettingsContext.__repr__)r3   r4   r5   r   r   r   r9   r7   r   r:   r;   r   r)   r,   r.   r0   r2   r<   r   r   r   r   r       s@   




/




,r    c                       sL   e Zd Zed fddZedddZedddZedd	d
Z	  Z
S )CompositionSettingsListr=   c                    s   t  | dS )zu
        Initialize the CompositionSettingsList

        :param version: Version that contains the resource

        N)r   r   r?   r   r   r   r   /  s    z CompositionSettingsList.__init__r!   c                 C   s
   t | jS z:
        Constructs a CompositionSettingsContext

        r    r#   r$   r   r   r   r   8  s    zCompositionSettingsList.getc                 C   s
   t | jS rR   rS   r$   r   r   r   __call__?  s    z CompositionSettingsList.__call__c                 C   s   dS )r1   z)<Twilio.Video.V1.CompositionSettingsList>r   r$   r   r   r   r2   F  s    z CompositionSettingsList.__repr__)r3   r4   r5   r   r   r    r   rT   r7   r2   r<   r   r   r   r   rQ   -  s   	rQ   N)r6   typingr   r   r   r   Ztwilio.baser   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r    rQ   r   r   r   r   <module>   s     