
    qi                     V    d Z ddlmZmZmZmZ ddlmZ deeee	ef   ef      defdZ
y)z&Utility functions for Google services.    )AnyDictOptionalUnion)versionhttp_optionsreturnc                 .   ddt                i}| d|i} | S t        | t              r1| j                         } d| v r| d   j	                  |       | S || d<   | S t        | d      r0| j                  	|| _        | S | j                  j	                  |       | S )a  Updates http_options with the x-goog-api-client header.

    Args:
        http_options: The existing http_options, which can be None, a dictionary,
                      or an object with a 'headers' attribute.

    Returns:
        The updated http_options.
    zx-goog-api-clientzpipecat/headers)pipecat_version
isinstancedictcopyupdatehasattrr   )r   client_headers     O/opt/pipecat/venv/lib/python3.12/site-packages/pipecat/services/google/utils.py!update_google_client_http_optionsr      s     )H_5F4G*HIM!=1   
L$	'#((*$#**=9  '4L#  
y	) '#0L     ''6    N)__doc__typingr   r   r   r   pipecatr   r   strr    r   r   <module>r      s?    - - - .HU4S>SVCV=W4X ]` r   