o
    f>h                     @   s   d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZmZmZ ddl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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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                       s  e Zd ZG dd deZ	 	d&dedeeef de	e f fddZ
ed'ddZd	efddZd	efddZd(ddZd(ddZejejejejejejejejejf	dedeeef deeef deee ef deee ef deeef dedef deeef deeef deeef d	d fd d!Zejejejejejejejejejf	dedeeef deeef deee ef deee ef deeef dedef deeef deeef deeef d	d fd"d#Zd	efd$d%Z  ZS ))CompositionHookInstancec                   @   s   e Zd ZdZdZdS )CompositionHookInstance.Formatmp4webmN)__name__
__module____qualname__MP4WEBM r   r   X/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/video/v1/composition_hook.pyFormat   s    r   Nversionpayloadsidc                    s   t  | |d| _|d| _|d| _t|d| _t|d| _	|d| _
|d| _|d| _|d	| _|d
| _|d| _|d| _|d| _|d| _|d| _d|pk| j
i| _d | _d S )Naccount_sidfriendly_nameenableddate_createddate_updatedr    audio_sourcesaudio_sources_excludedvideo_layout
resolutiontrimformatstatus_callbackstatus_callback_methodurl)super__init__getr!   r"   r#   r
   iso8601_datetimer$   r%   r    r&   r'   r(   r)   r*   r+   r,   r-   r.   	_solution_context)selfr   r   r    	__class__r   r   r0   1   s6   

z CompositionHookInstance.__init__returnCompositionHookContextc                 C   s&   | j du rt| j| jd d| _ | j S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: CompositionHookContext for this CompositionHookInstance
        Nr    r    )r4   r9   _versionr3   r5   r   r   r   _proxyS   s   
zCompositionHookInstance._proxyc                 C   
   | j  S )r
        Deletes the CompositionHookInstance


        :returns: True if delete succeeds, False otherwise
        )r=   deleter<   r   r   r   r@   b      
zCompositionHookInstance.deletec                       | j  I dH S )
        Asynchronous coroutine that deletes the CompositionHookInstance


        :returns: True if delete succeeds, False otherwise
        N)r=   delete_asyncr<   r   r   r   rD   k      z$CompositionHookInstance.delete_asyncc                 C   r>   )k
        Fetch the CompositionHookInstance


        :returns: The fetched CompositionHookInstance
        )r=   fetchr<   r   r   r   rG   t   rA   zCompositionHookInstance.fetchc                    rB   )
        Asynchronous coroutine to fetch the CompositionHookInstance


        :returns: The fetched CompositionHookInstance
        N)r=   fetch_asyncr<   r   r   r   rI   }   rE   z#CompositionHookInstance.fetch_asyncr"   r#   r(   r&   r'   r*   r+   r   r)   r,   r-   c                 C   s    | j j|||||||||	|
d
S )3  
        Update the CompositionHookInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to  100 characters long and it must be unique within the account.
        :param enabled: Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers.
        :param video_layout: A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param audio_sources: An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
        :param audio_sources_excluded: An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
        :param trim: Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param format:
        :param resolution: A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.  The string's format is `{width}x{height}` where:   * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600  Typical values are:   * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240`  Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.

        :returns: The updated CompositionHookInstance
        
r"   r#   r(   r&   r'   r*   r+   r)   r,   r-   )r=   updater5   r"   r#   r(   r&   r'   r*   r+   r)   r,   r-   r   r   r   rL      s   zCompositionHookInstance.updatec                    s(   | j j|||||||||	|
d
I dH S )M  
        Asynchronous coroutine to update the CompositionHookInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to  100 characters long and it must be unique within the account.
        :param enabled: Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers.
        :param video_layout: A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param audio_sources: An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
        :param audio_sources_excluded: An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
        :param trim: Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param format:
        :param resolution: A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.  The string's format is `{width}x{height}` where:   * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600  Typical values are:   * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240`  Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.

        :returns: The updated CompositionHookInstance
        rK   N)r=   update_asyncrM   r   r   r   rO      s   z$CompositionHookInstance.update_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nr+   .0kvr   r   r   	<genexpr>       z3CompositionHookInstance.__repr__.<locals>.<genexpr>z,<Twilio.Video.V1.CompositionHookInstance {}>joinr3   itemsr+   r5   contextr   r   r   __repr__      
z CompositionHookInstance.__repr__N)r8   r9   )r8   r   )r   r   r   objectr   r   r   strr   r   r0   propertyr=   boolr@   rD   rG   rI   r   unsetr   r   rL   rO   ra   __classcell__r   r   r6   r   r      s    
"	
	
	




	



-




	



*r   c                       s  e Zd Zdedef fddZdefddZdefdd	Zde	fd
dZ
de	fddZejejejejejejejejejf	dedeeef deeef deee ef deee ef deeef dedef deeef deeef deeef de	fddZejejejejejejejejejf	dedeeef deeef deee ef deee ef deeef dedef deeef deeef deeef de	fddZdefddZ  ZS )r9   r   r    c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the CompositionHookContext

        :param version: Version that contains the resource
        :param sid: The SID of the CompositionHook resource to update.
        r    z/CompositionHooks/{sid}Nr   )r/   r0   r3   r+   _uri)r5   r   r    r6   r   r   r0      s   zCompositionHookContext.__init__r8   c                 C   s   t i }| jjd| j|dS )r?   DELETEmethoduriheaders)r   ofr;   r@   rj   r5   ro   r   r   r   r@      s   
zCompositionHookContext.deletec                    s&   t i }| jjd| j|dI dH S )rC   rk   rl   N)r   rp   r;   rD   rj   rq   r   r   r   rD     s
   
z#CompositionHookContext.delete_asyncc                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )rF   application/jsonAcceptGETrl   r    r:   )r   rp   r;   rG   rj   r   r3   r5   ro   r   r   r   r   rG     s   
zCompositionHookContext.fetchc                    sD   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )rH   rr   rs   rt   rl   Nr    r:   )r   rp   r;   rI   rj   r   r3   ru   r   r   r   rI   #  s   
z"CompositionHookContext.fetch_asyncr"   r#   r(   r&   r'   r*   r+   r   r)   r,   r-   c                 C   s   t |t|t|t|dd t|dd t||||	|
d
}t i }d|d< d|d< | jjd	| j||d
}t	| j|| j
d dS )rJ   c                 S      | S rc   r   er   r   r   <lambda>\      z/CompositionHookContext.update.<locals>.<lambda>c                 S   rv   rc   r   rw   r   r   r   ry   ^  rz   
FriendlyNameEnabledVideoLayoutAudioSourcesAudioSourcesExcludedTrimr   
ResolutionStatusCallbackStatusCallbackMethod!application/x-www-form-urlencodedContent-Typerr   rs   POSTrm   rn   dataro   r    r:   )r   rp   r   boolean_to_stringrd   mapr;   rL   rj   r   r3   r5   r"   r#   r(   r&   r'   r*   r+   r)   r,   r-   r   ro   r   r   r   r   rL   9  s0   

zCompositionHookContext.updatec                    s   t |t|t|t|dd t|dd t||||	|
d
}t i }d|d< d|d< | jjd	| j||d
I dH }t	| j|| j
d dS )rN   c                 S   rv   rc   r   rw   r   r   r   ry     rz   z5CompositionHookContext.update_async.<locals>.<lambda>c                 S   rv   rc   r   rw   r   r   r   ry     rz   r{   r   r   rr   rs   r   r   Nr    r:   )r   rp   r   r   rd   r   r;   rO   rj   r   r3   r   r   r   r   rO   u  s2   

z#CompositionHookContext.update_asyncc                 C   rP   )rQ   rR   c                 s   rS   rT   rU   rV   r   r   r   rZ     r[   z2CompositionHookContext.__repr__.<locals>.<genexpr>z+<Twilio.Video.V1.CompositionHookContext {}>r\   r_   r   r   r   ra     rb   zCompositionHookContext.__repr__)r   r   r   r   re   r0   rg   r@   rD   r   rG   rI   r   rh   r   rd   r   rL   rO   ra   ri   r   r   r6   r   r9      s    




	



?




	



<r9   c                   @   s4   e Zd Zdeeef defddZdefddZdS )CompositionHookPager   r8   c                 C   s   t | j|S )zu
        Build an instance of CompositionHookInstance

        :param payload: Payload response from the API
        )r   r;   )r5   r   r   r   r   get_instance  s   z CompositionHookPage.get_instancec                 C      dS )rQ   z%<Twilio.Video.V1.CompositionHookPage>r   r<   r   r   r   ra        zCompositionHookPage.__repr__N)	r   r   r   r   re   r   r   r   ra   r   r   r   r   r     s    r   c                       sp  e Zd Zdef fddZejejejejejejejejejf	dedee	e
f dee
e
f deee e
f deee e
f d	eee
f d
ede
f deee
f deee
f dee	e
f defddZejejejejejejejejejf	dedee	e
f dee
e
f deee e
f deee e
f d	eee
f d
ede
f deee
f deee
f dee	e
f defddZejejejejddfdee	e
f deee
f deee
f deee
f dee dee dee fddZejejejejddfdee	e
f deee
f deee
f deee
f dee dee dee fddZejejejejddfdee	e
f deee
f deee
f deee
f dee dee dee fddZejejejejddfdee	e
f deee
f deee
f deee
f dee dee dee fdd Zejejejejejejejfdee	e
f deee
f deee
f deee
f d!eee
f d"eee
f deee
f defd#d$Zejejejejejejejfdee	e
f deee
f deee
f deee
f d!eee
f d"eee
f deee
f defd%d&Zd'edefd(d)Zd'edefd*d+Zd,edefd-d.Zd,edefd/d0Zdefd1d2Z   Z!S )3CompositionHookListr   c                    s   t  | d| _dS )zq
        Initialize the CompositionHookList

        :param version: Version that contains the resource

        z/CompositionHooksN)r/   r0   rj   )r5   r   r6   r   r   r0     s   
zCompositionHookList.__init__r"   r#   r(   r&   r'   r)   r+   r   r,   r-   r*   r8   c                 C   s   t |t|t|t|dd t|dd ||||	t|
d
}t ddi}d|d< d|d< | jjd	| j||d
}t	| j|S )a8  
        Create the CompositionHookInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to  100 characters long and it must be unique within the account.
        :param enabled: Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered.
        :param video_layout: An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param audio_sources: An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
        :param audio_sources_excluded: An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
        :param resolution: A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.  The string's format is `{width}x{height}` where:   * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600  Typical values are:   * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240`  Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param format:
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
        :param trim: Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.

        :returns: The created CompositionHookInstance
        c                 S   rv   rc   r   rw   r   r   r   ry     rz   z,CompositionHookList.create.<locals>.<lambda>c                 S   rv   rc   r   rw   r   r   r   ry      rz   
r|   r}   r~   r   r   r   r   r   r   r   r   r   rr   rs   r   r   )
r   rp   r   r   rd   r   r;   createrj   r   r5   r"   r#   r(   r&   r'   r)   r+   r,   r-   r*   r   ro   r   r   r   r   r     s,   
zCompositionHookList.createc                    s   t |t|t|t|dd t|dd ||||	t|
d
}t ddi}d|d< d|d< | jjd	| j||d
I dH }t	| j|S )aG  
        Asynchronously create the CompositionHookInstance

        :param friendly_name: A descriptive string that you create to describe the resource. It can be up to  100 characters long and it must be unique within the account.
        :param enabled: Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered.
        :param video_layout: An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param audio_sources: An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
        :param audio_sources_excluded: An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
        :param resolution: A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.  The string's format is `{width}x{height}` where:   * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600  Typical values are:   * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240`  Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
        :param format:
        :param status_callback: The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
        :param status_callback_method: The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
        :param trim: Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.

        :returns: The created CompositionHookInstance
        c                 S   rv   rc   r   rw   r   r   r   ry   8  rz   z2CompositionHookList.create_async.<locals>.<lambda>c                 S   rv   rc   r   rw   r   r   r   ry   :  rz   r   r   r   rr   rs   r   r   N)
r   rp   r   r   rd   r   r;   create_asyncrj   r   r   r   r   r   r     s.   
z CompositionHookList.create_asyncNdate_created_afterdate_created_beforelimit	page_sizec           	      C   s8   | j ||}| j|||||d d}| j ||d S )a  
        Streams CompositionHookInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param bool enabled: Read only CompositionHook resources with an `enabled` value that matches this parameter.
        :param datetime date_created_after: Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param datetime date_created_before: Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param str friendly_name: Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r#   r   r   r"   r   r   )r;   read_limitspagestream	r5   r#   r   r   r"   r   r   limitsr   r   r   r   r   O  s   zCompositionHookList.streamc           	         s@   | j ||}| j|||||d dI dH }| j ||d S )a  
        Asynchronously streams CompositionHookInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param bool enabled: Read only CompositionHook resources with an `enabled` value that matches this parameter.
        :param datetime date_created_after: Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param datetime date_created_before: Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param str friendly_name: Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   Nr   )r;   r   
page_asyncstream_asyncr   r   r   r   r   v  s   z CompositionHookList.stream_asyncc              	   C   s   t | j||||||dS )a  
        Lists CompositionHookInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param bool enabled: Read only CompositionHook resources with an `enabled` value that matches this parameter.
        :param datetime date_created_after: Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param datetime date_created_before: Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param str friendly_name: Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        r#   r   r   r"   r   r   )listr   r5   r#   r   r   r"   r   r   r   r   r   r     s   zCompositionHookList.listc              	      s.   dd | j ||||||dI dH 2 I dH S )a  
        Asynchronously lists CompositionHookInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param bool enabled: Read only CompositionHook resources with an `enabled` value that matches this parameter.
        :param datetime date_created_after: Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param datetime date_created_before: Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param str friendly_name: Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        c                    s   g | z3 d H W }|q6 S rc   r   )rW   recordr   r   r   
<listcomp>  s
    z2CompositionHookList.list_async.<locals>.<listcomp>r   N)r   r   r   r   r   
list_async  s   
zCompositionHookList.list_async
page_tokenpage_numberc              
   C   sd   t t|t|t|||||d}t ddi}	d|	d< | jjd| j||	d}
t| j|
S )a  
        Retrieve a single page of CompositionHookInstance records from the API.
        Request is executed immediately

        :param enabled: Read only CompositionHook resources with an `enabled` value that matches this parameter.
        :param date_created_after: Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param date_created_before: Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param friendly_name: Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of CompositionHookInstance
        r}   DateCreatedAfterDateCreatedBeforer|   	PageTokenr   PageSizer   r   rr   rs   rt   rm   rn   paramsro   )	r   rp   r   r   r2   r;   r   rj   r   r5   r#   r   r   r"   r   r   r   r   ro   responser   r   r   r     s    
zCompositionHookList.pagec              
      sl   t t|t|t|||||d}t ddi}	d|	d< | jjd| j||	dI dH }
t| j|
S )	a   
        Asynchronously retrieve a single page of CompositionHookInstance records from the API.
        Request is executed immediately

        :param enabled: Read only CompositionHook resources with an `enabled` value that matches this parameter.
        :param date_created_after: Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param date_created_before: Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
        :param friendly_name: Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of CompositionHookInstance
        r   r   r   rr   rs   rt   r   N)	r   rp   r   r   r2   r;   r   rj   r   r   r   r   r   r     s"   
zCompositionHookList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )a  
        Retrieve a specific page of CompositionHookInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of CompositionHookInstance
        rt   )r;   domaintwiliorequestr   r5   r   r   r   r   r   get_pageD  s   	zCompositionHookList.get_pagec                    s&   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of CompositionHookInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of CompositionHookInstance
        rt   N)r;   r   r   request_asyncr   r   r   r   r   get_page_asyncP  s   	z"CompositionHookList.get_page_asyncr    c                 C      t | j|dS z}
        Constructs a CompositionHookContext

        :param sid: The SID of the CompositionHook resource to update.
        r:   r9   r;   r5   r    r   r   r   r1   \     zCompositionHookList.getc                 C   r   r   r   r   r   r   r   __call__d  r   zCompositionHookList.__call__c                 C   r   )rQ   z%<Twilio.Video.V1.CompositionHookList>r   r<   r   r   r   ra   l  r   zCompositionHookList.__repr__)"r   r   r   r   r0   r   rh   re   r   rg   rd   r   r   r   r   r   r   intr   r   r	   r   r   r   r   r   r   r   r   r9   r1   r   ra   ri   r   r   r6   r   r     s   




	



=




	



<




)




)




(




)






	
/






	
-r   N)__doc__r   typingr   r   r   r   r   r   r	   twilio.baser
   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r9   r   r   r   r   r   r   <module>   s    $ L X