a
    !f                     @   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eeeef e	e d fddZ
eddd	d
ZedddZedddZd dddZd dddZejejejejejejejejejf	eeeef eeef eee ef eee ef eeef ed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ejejejejf	eeeef eeef eee ef eee ef eeef edef eeef eeef eeef d dddZedddZ  ZS )CompositionHookInstancec                   @   s   e Zd ZdZdZdS )CompositionHookInstance.FormatZmp4ZwebmN)__name__
__module____qualname__ZMP4ZWEBM r   r   f/var/www/html/python-backend/venv/lib/python3.9/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|p| 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   r,   1   s6    
z CompositionHookInstance.__init__CompositionHookContextreturnc                 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   )r0   r4   _versionr/   r1   r   r   r   _proxyS   s    
zCompositionHookInstance._proxyc                 C   s
   | j  S )r
        Deletes the CompositionHookInstance


        :returns: True if delete succeeds, False otherwise
        )r:   deleter9   r   r   r   r<   b   s    zCompositionHookInstance.deletec                    s   | j  I dH S )
        Asynchronous coroutine that deletes the CompositionHookInstance


        :returns: True if delete succeeds, False otherwise
        N)r:   delete_asyncr9   r   r   r   r>   k   s    z$CompositionHookInstance.delete_asyncc                 C   s
   | j  S )k
        Fetch the CompositionHookInstance


        :returns: The fetched CompositionHookInstance
        )r:   fetchr9   r   r   r   r@   t   s    zCompositionHookInstance.fetchc                    s   | j  I dH S )
        Asynchronous coroutine to fetch the CompositionHookInstance


        :returns: The fetched CompositionHookInstance
        N)r:   fetch_asyncr9   r   r   r   rB   }   s    z#CompositionHookInstance.fetch_asyncr   r   r   r$   r"   r#   r&   r'   r%   r(   r)   r6   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r1   r   r   r$   r"   r#   r&   r'   r%   r(   r)   r   r   r   rF      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
        rE   N)r:   update_asyncrG   r   r   r   rI      s    z$CompositionHookInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nr'   .0kvr   r   r   	<genexpr>       z3CompositionHookInstance.__repr__.<locals>.<genexpr>z,<Twilio.Video.V1.CompositionHookInstance {}>joinr/   itemsr'   r1   contextr   r   r   __repr__   s    z CompositionHookInstance.__repr__)N)r   r   r   objectr   r   r   strr   r   r,   propertyr:   boolr<   r>   r@   rB   r   unsetr   r   rF   rI   rY   __classcell__r   r   r2   r   r      sp    "			






-






*r   c                       s  e Zd Zeed fddZedddZedddZe	dd	d
Z
e	dddZejejejejejejejejejf	eeeef eeef eee ef eee ef eeef ed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ejejejejf	eeeef eeef eee ef eee ef eeef edef eeef eeef eeef e	dddZedddZ  ZS )r4   )r   r   c                    s.   t  | d|i| _djf 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}N)r+   r,   r/   r'   _uri)r1   r   r   r2   r   r   r,      s    zCompositionHookContext.__init__r5   c                 C   s   | j jd| jdS )r;   DELETEmethoduri)r8   r<   r`   r9   r   r   r   r<      s    zCompositionHookContext.deletec                    s   | j jd| jdI dH S )r=   ra   rb   N)r8   r>   r`   r9   r   r   r   r>      s    z#CompositionHookContext.delete_asyncc                 C   s(   | j jd| jd}t| j || jd dS )r?   GETrb   r   r7   )r8   r@   r`   r   r/   r1   r   r   r   r   r@     s    zCompositionHookContext.fetchc                    s.   | j jd| jdI dH }t| j || jd dS )rA   re   rb   Nr   r7   )r8   rB   r`   r   r/   rf   r   r   r   rB     s    z"CompositionHookContext.fetch_asyncr   rC   c                 C   sh   t ||t|t|dd t|dd ||||	|
d
}| jjd| j|d}t| j|| j	d dS )	rD   c                 S   s   | S Nr   er   r   r   <lambda>T  rS   z/CompositionHookContext.update.<locals>.<lambda>c                 S   s   | S rg   r   rh   r   r   r   rj   V  rS   
FriendlyNameEnabledVideoLayoutAudioSourcesAudioSourcesExcludedTrimr   
ResolutionStatusCallbackStatusCallbackMethodPOSTrc   rd   datar   r7   )
r   ofr   rZ   mapr8   rF   r`   r   r/   r1   r   r   r$   r"   r#   r&   r'   r%   r(   r)   rw   r   r   r   r   rF   2  s.    zCompositionHookContext.updatec                    sn   t ||t|t|dd t|dd ||||	|
d
}| jjd| j|dI dH }t| j|| j	d d	S )
rH   c                 S   s   | S rg   r   rh   r   r   r   rj     rS   z5CompositionHookContext.update_async.<locals>.<lambda>c                 S   s   | S rg   r   rh   r   r   r   rj     rS   rk   ru   rv   Nr   r7   )
r   rx   r   rZ   ry   r8   rI   r`   r   r/   rz   r   r   r   rI   j  s.    z#CompositionHookContext.update_asyncc                 C   s$   d dd | j D }d|S )rJ   rK   c                 s   s   | ]\}}d  ||V  qdS rL   rM   rN   r   r   r   rR     rS   z2CompositionHookContext.__repr__.<locals>.<genexpr>z+<Twilio.Video.V1.CompositionHookContext {}>rT   rW   r   r   r   rY     s    zCompositionHookContext.__repr__)r   r   r   r   r[   r,   r]   r<   r>   r   r@   rB   r   r^   r   rZ   r   rF   rI   rY   r_   r   r   r2   r   r4      sd   






;






8r4   c                   @   s2   e Zd Zeeef edddZedddZdS )CompositionHookPage)r   r6   c                 C   s   t | j|S )zu
        Build an instance of CompositionHookInstance

        :param payload: Payload response from the API
        )r   r8   rf   r   r   r   get_instance  s    z CompositionHookPage.get_instancer5   c                 C   s   dS )rJ   z%<Twilio.Video.V1.CompositionHookPage>r   r9   r   r   r   rY     s    zCompositionHookPage.__repr__N)	r   r   r   r   r[   r   r   r|   rY   r   r   r   r   r{     s   r{   c                       s  e Zd Zed fddZejejejejejejejejejf	eee	e
f ee
e
f eee e
f eee e
f eee
f ed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ejejejejf	eee	e
f ee
e
f eee e
f eee e
f eee
f ed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d
d
fee	e
f eee
f eee
f eee
f ee ee ee dddZejejejejd
d
fee	e
f eee
f eee
f eee
f ee ee ee dddZejejejejd
d
fee	e
f eee
f eee
f eee
f ee ee ee dddZejejejejd
d
fee	e
f eee
f eee
f eee
f ee ee ee dddZejejejejejejejfee	e
f eee
f 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ejejfee	e
f eee
f 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edddZeedddZeeddd Zeedd!d"Zed#d$d%Z   Z!S )&CompositionHookList)r   c                    s   t  | d| _dS )zq
        Initialize the CompositionHookList

        :param version: Version that contains the resource

        z/CompositionHooksN)r+   r,   r`   )r1   r   r2   r   r   r,     s    zCompositionHookList.__init__r   )r   r   r$   r"   r#   r%   r'   r(   r)   r&   r6   c                 C   s^   t ||t|t|dd t|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   s   | S rg   r   rh   r   r   r   rj     rS   z,CompositionHookList.create.<locals>.<lambda>c                 S   s   | S rg   r   rh   r   r   r   rj     rS   
rl   rm   rn   ro   rp   rr   r   rs   rt   rq   ru   rv   )	r   rx   r   rZ   ry   r8   creater`   r   r1   r   r   r$   r"   r#   r%   r'   r(   r)   r&   rw   r   r   r   r   r     s*    zCompositionHookList.createc                    sd   t ||t|t|dd t|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   s   | S rg   r   rh   r   r   r   rj   "  rS   z2CompositionHookList.create_async.<locals>.<lambda>c                 S   s   | S rg   r   rh   r   r   r   rj   $  rS   r~   ru   rv   N)	r   rx   r   rZ   ry   r8   create_asyncr`   r   r   r   r   r   r      s*    z CompositionHookList.create_asyncN)r   date_created_afterdate_created_beforer   limit	page_sizer6   c           	      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   )r8   read_limitspagestream	r1   r   r   r   r   r   r   Zlimitsr   r   r   r   r   6  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   )r8   r   
page_asyncstream_asyncr   r   r   r   r   ]  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   r1   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 rg   r   )rO   recordr   r   r   
<listcomp>  s   z2CompositionHookList.list_async.<locals>.<listcomp>r   N)r   r   r   r   r   
list_async  s    
zCompositionHookList.list_async)r   r   r   r   
page_tokenpage_numberr   r6   c           
   
   C   sF   t |t|t|||||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
        rm   ZDateCreatedAfterZDateCreatedBeforerl   Z	PageTokenr   ZPageSizere   rc   rd   params)r   rx   r   r.   r8   r   r`   r{   
r1   r   r   r   r   r   r   r   rw   responser   r   r   r     s    zCompositionHookList.pagec           
   
      sL   t |t|t|||||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   re   r   N)r   rx   r   r.   r8   r   r`   r{   r   r   r   r   r     s    zCompositionHookList.page_async)
target_urlr6   c                 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
        re   )r8   domaintwiliorequestr{   r1   r   r   r   r   r   get_page!  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
        re   N)r8   r   r   Zrequest_asyncr{   r   r   r   r   get_page_async-  s    	z"CompositionHookList.get_page_async)r   r6   c                 C   s   t | j|dS z}
        Constructs a CompositionHookContext

        :param sid: The SID of the CompositionHook resource to update.
        r7   r4   r8   r1   r   r   r   r   r-   9  s    zCompositionHookList.getc                 C   s   t | j|dS r   r   r   r   r   r   __call__A  s    zCompositionHookList.__call__r5   c                 C   s   dS )rJ   z%<Twilio.Video.V1.CompositionHookList>r   r9   r   r   r   rY   I  s    zCompositionHookList.__repr__)"r   r   r   r   r,   r   r^   r[   r   r]   rZ   r   r   r   r   r   r   intr   r   r	   r   r   r   r{   r   r   r   r   r4   r-   r   rY   r_   r   r   r2   r   r}     s   






9






8



)



)



(



)






)






)r}   N)__doc__r   typingr   r   r   r   r   r   r	   Ztwilio.baser
   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   r4   r{   r}   r   r   r   r   <module>   s   $ K I