
    d{i                     H    d Z ddlmZmZmZ  ed      Z G d dee         Zy)z<
ApiResponse class for wrapping API responses with metadata
    )DictGenericTypeVarTc                   F    e Zd ZdZdededeeef   fdZdefdZ	defdZ
y	)
ApiResponsea  
    Wrapper for API responses that includes HTTP metadata.

    This class is returned by *_with_http_info methods and provides access to:
    - The response data (resource instance, list, or boolean)
    - HTTP status code
    - Response headers

    Attributes:
        data: The response data (instance, list, or boolean for delete operations)
        status_code: HTTP status code from the response
        headers: Dictionary of response headers

    Example:
        >>> response = client.accounts.create_with_http_info(friendly_name="Test")
        >>> print(response.status_code)  # 201
        >>> print(response.headers['Content-Type'])  # application/json
        >>> account = response.data
        >>> print(account.sid)
    datastatus_codeheadersc                 .    || _         || _        || _        y)z
        Initialize an ApiResponse

        Args:
            data: The response payload (instance, list, or boolean)
            status_code: HTTP status code (e.g., 200, 201, 204)
            headers: Dictionary of response headers
        N)r	   r
   r   )selfr	   r
   r   s       V/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/base/api_response.py__init__zApiResponse.__init__    s     	&    returnc                 b    d| j                    dt        | j                        j                   dS )z(String representation of the ApiResponsezApiResponse(status_code=z, data=)r
   typer	   __name__r   s    r   __repr__zApiResponse.__repr__-   s.    )$*:*:);74		?C[C[B\\]^^r   c                 b    d| j                    dt        | j                        j                   dS )z$Human-readable string representationz<ApiResponse [z] with >r   r   s    r   __str__zApiResponse.__str__1   s.     0 01dii9Q9Q8RRSTTr   N)r   
__module____qualname____doc__r   intr   strr   r   r    r   r   r   r   
   sE    *Q S 4S> _# _U Ur   r   N)r   typingr   r   r   r   r   r!   r   r   <module>r#      s-    * )CL)U'!* )Ur   