U
    g                     @  sv   d dl mZ ddlmZmZ d dlmZ d dlZd dlZdddd	d
Z	dddddZ
edeG dd dZdS )    )annotations   )event_classT_JSON_DICT)	dataclassNintz0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])portreturnc                 c  s"   t  }| |d< d|d}|V }dS )zN
    Request browser port binding.

    :param port: Port number to bind.
    r   zTethering.bindmethodparamsNdictr   r   Zcmd_dictjson r   U/tmp/pip-unpacked-wheel-3ysq0mf8/selenium/webdriver/common/devtools/v131/tethering.pybind   s    r   c                 c  s"   t  }| |d< d|d}|V }dS )zR
    Request browser port unbinding.

    :param port: Port number to unbind.
    r   zTethering.unbindr
   Nr   r   r   r   r   unbind   s    r   zTethering.acceptedc                   @  s6   e Zd ZU dZded< ded< edd ddd	Zd
S )AcceptedzU
    Informs that port was successfully bound and got a specified connection id.
    r   r   strconnection_idr   )r   r	   c                 C  s   | t |d t|d dS )Nr   ZconnectionId)r   r   )r   r   )clsr   r   r   r   	from_json:   s    

zAccepted.from_jsonN)__name__
__module____qualname____doc____annotations__classmethodr   r   r   r   r   r   /   s
   
r   )
__future__r   utilr   r   Zdataclassesr   enumtypingr   r   r   r   r   r   r   <module>   s   