o
    #j                     @   s   d Z ddlZddlZddl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 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jZdd ZeZdS )z:
This module provides a client class for Et Channel IPv6.
    N)bce_base_client)compat)utils)bce_v1_signer)bce_http_client)handler)http_methods)required)ETStatusc                
   @   s  e Zd ZdZdZdZdZdZdZdZ	dZ
dCd
dZdCddZ				dDddZ		dDddZ				dEddZdFddZdCddZ						dGddZeeefddHddZeeefeefeefeefeefeefeefed				dIdd Zeeefeefd!dJd"d#Zeeefeefd!dKd$d%Zeeefeefeefeefd&		dHd'd(Zeeefeefd!dKd)d*Zeeefeefd!	+		dLd,d-Zeeefeefeefeeefd.				dJd/d0Z eeefeefeefd1		dKd2d3Z!eeefeefeefd4		dKd5d6Z"eeefeefeefd7dKd8d9Z#eeefeefeefd7dKd:d;Z$eeefeefeeed<		dKd=d>Z%eeefeefd!dKd?d@Z&eeefeefeeed<		dKdAdBZ'd	S )MEtClientz
    Et base sdk client
    s   /v1etinitchannelrouterulebfdNc                 C   s   t j| | dS )z?
        :type config: baidubce.BceClientConfiguration
        N)r   BceBaseClient__init__)selfconfig r   _/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/baidubce/services/et/et_client.pyr   -   s   zEtClient.__init__c                 C   s(   |du r| j S t| j }|| |S )zg
        :param config:
        :type config: baidubce.BceClientConfiguration
        :return:
        N)r   copyZmerge_non_none_values)r   r   Z
new_configr   r   r   _merge_config3   s
   
zEtClient._merge_configc              
   C   sJ   |  |}|du rtj}|du rddd}t|tjtj|g|||||S )z
        :param http_method:
        :param path:
        :param body:
        :param headers:
        :param params:
        :param config:
        :param body_parser:
        :return:
        Ns   */*s   application/json;charset=utf-8)s   Accepts   Content-Type)r   r   Z
parse_jsonr   send_requestr   signZparse_error)r   Zhttp_methodpathbodyheadersparamsr   Zbody_parserr   r   r   _send_request@   s   

zEtClient._send_requestc              
   C   s   t | j| j| j}i }|
du rt |d< n|
|d< |||||||||	d	}|dur.||d< |dur6||d< |dur>||d< | jtj|t	
|||dS )a   
        Create new ET

        :param name: the name of ET
        :type name: string

        :param description: description of ET
        :type description: string

        :param isp: the type of isp
        :type isp: string

        :param intf_type: the type of interface
        :type intf_type: string

        :param ap_type: the type of ap
        :type ap_type: string

        :param ap_addr: the type of ap Address
        :type ap_addr: string

        :param user_name: the name of user
        :type user_name: string

        :param user_phone: phone number of user
        :type user_phone: string

        :param user_email: email of user
        :type user_email: string

        :param user_idc: Idc of user
        :type user_idc: string

        :param billing: billing information, currently only supports prepaid
        :type billing: dict

        :param tags: list of tag key-value pairs to be created
        :type tags: list<dict>

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :type config: baidubce.BceClientConfiguration
        :param config:

        :return: created ET ID
        N   clientToken)	nameispZintfTypeZapTypeZapAddrZuserNameZ	userPhoneZ	userEmailZuserIdcdescriptionbillingtagsr   r   r   )r   
append_uriprefixr   r   generate_client_tokenr    r   POSTjsondumps)r   r"   r#   Z	intf_typeZap_typeZap_addr	user_name
user_phone
user_emailZuser_idcclient_tokenr$   r%   r&   r   r   r   r   r   r   r   create_et_dcphyX   s,   3zEtClient.create_et_dcphyc	                 C   s   t | j| j|}	i }
|dur||
d< |dur||
d< |dur#||
d< |dur+||
d< |dur3||
d< |du r=t |
d< n||
d< | jtj|	|
|dS )	a  
        Update existed Et

        :param et_id: ET ID
        :type et_id: string

        :param user_name: the name of user
        :type user_name: string

        :param user_phone: phone number of user
        :type user_phone: string

        :param user_email: email of user
        :type user_email: string

        :param user_idc: Idc of user
        :type user_idc: string

        :param description: description of ET
        :type description: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration
        Ns   names   descriptions   userNames	   userPhones	   userEmailr!   r   r   )r   r(   r)   r   r*   r    r   PUT)r   et_idr"   r$   r.   r/   r0   r1   r   r   r   r   r   r   update_et_dcphy   s    zEtClient.update_et_dcphy  c                 C   sd   t | j| j}i }|durt|tr|j|d< |dur ||d< |dur(||d< | jtj	|||dS )uH  
        get a list of ETs owned by the authenticated user and specified
        conditions.

        :type status: string
        :param status: status of ET condition, if query by the status condition, must provides

        :type marker: string
        :param marker: The optional parameter marker specified in the original
         request to specify where in the results to begin listing.

        :type max_keys: int
        :param max_keys: The optional parameter to specifies the max number
         of list result to return. The default value is 1000.

        :type config: baidubce.BceClientConfiguration
        :param config:

        :return: list of ET model, for example:
                {
                    "nextMarker": "dcphy-gq65bz9ip712",
                    "marker": "dcphy-gq65bz9ie712",
                    "maxKeys": 1,
                    "isTruncated": true,
                    "ets": [{
                        "id": "dcphy-jy1sbnx32ez0",
                        "name": "et_6",
                        "description": "描述",
                        "status": "established",
                        "expireTime": "2019-01-30T08:50:00Z",
                        "isp": "ISP_CTC",
                        "intfType": "10G",
                        "apType": "BAIDU",
                        "apAddr": "BB",
                        "userName": "张三",
                        "userPhone": "133*****333",
                        "userEmail": "1***@123.com",
                        "userIdc": "北京|市辖区|东城区|2321"
                    }]
                }
        Ns   status   marker   maxKeysr3   )
r   r(   r)   r   
isinstancer
   valuer    r   GET)r   statusmarkerZmax_keysr   r   r   r   r   r   list_et_dcphy   s   *
zEtClient.list_et_dcphyc                 C   s$   t | j| j|}| jtj||dS )uR  
        List specific ET detail

        :param et_id: ET ID
        :type et_id: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return: list of ET model, for example:
                {
                    "id": "dcphy-gq65bz9ip712",
                    "name": "ZX051501-testET",
                    "description": "",
                    "status": "established",
                    "expireTime": 1,
                    "isp": "ISP_CUCC",
                    "intfType": "10G",
                    "apType": "SINGLE",
                    "apAddr": "WHGG",
                    "userName": "张三",
                    "userPhone": "133*****333",
                    "userEmail": "1***@123.com",
                    "userIdc": "北京|市辖区|东城区|百度科技园K2"
                }
        )r   )r   r(   r)   r   r    r   r<   )r   r5   r   r   r   r   r   list_et_dcphy_detail  s   zEtClient.list_et_dcphy_detailc                 C   s  t | j| j|| j}i }|du rt |d< n||d< ||||||d}|	dur,|	|d< |dur4||d< |dur?t||d< |durG||d< |durRt||d< |dur]t||d	< |dure||d
< |
durpt|
|d< |dur{t||d< | jt	j
|t|||dS )a  
        Create new et channel

        :param et_id: et id
        :type et_id: string

        :param local_ip: baidu IPv4 address of et channel
        :type local_ip: string

        :param name: et channel name
        :type name: string

        :param networks: et channel IPv4 routes
        :type networks: list<string>

        :param remote_ip: customer IPv4 address of et channel
        :type remote_ip: string

        :param description: description of channel
        :type description: string

        :param route_type: et channel route type
        :value "bgp" or "static"
        :type route_type: string

        :param vlan_id: et channel vlan id
        :value 0, 2-4009
        :type vlan_id: integer

        :param authorized_users: et channel authorized users
        :type authorized_users: list<string>

        :param enable_ipv6: et channel enable ipv6
        :value 0 or 1
        :type enable_ipv6: integer

        :param local_ipv6: baidu IPv6 address of et channel
        :type local_ipv6: string

        :param remote_ipv6: customer IPv6 address of et channel
        :type remote_ipv6: string

        :param ipv6_networks: et channel IPv6 routes
        :type ipv6_networks: list<string>

        :param bgp_asn: BGP ASN
        :type bgp_asn: string

        :param bgp_key: BGP KEY
        :type bgp_key: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   )ZetIdbaiduAddressr"   customerAddress	routeTypevlanIdnetworksauthorizedUsersr$   
enableIpv6baiduIpv6AddresscustomerIpv6Addressipv6NetworksZbgpAsnZbgpKeyr'   )r   r(   r)   r   r   r*   r   convert_to_stringr    r   r+   r,   r-   )r   r5   local_ipr"   	remote_ip
route_typevlan_idauthorized_usersr$   rE   Zbgp_asnZbgp_keyenable_ipv6
local_ipv6remote_ipv6ipv6_networksr1   r   r   r   r   r   r   r   create_et_channel0  s>   B	zEtClient.create_et_channel)r5   c                 C   sZ   t | j| j|| j}i }|du rt |d< n||d< |dur#||d< | jtj|||dS )a&  
        Get et channel.

        :param et_id:
            et id
        :type et_id: string

        :param et_channel_id:
            et channel id (optional)
        :type et_channel_id: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   s   etChannelIdr3   )	r   r(   r)   r   r   r*   r    r   r<   r   r5   et_channel_idr1   r   r   r   r   r   r   get_et_channel  s   zEtClient.get_et_channel)r5   rW   rL   r"   rE   rM   rN   rO   c                 C   s   t | j| j|| j|}ddi}|du rt |d< n||d< ||||||d}|	dur/|	|d< |
dur:t|
|d< |durB||d< |durMt||d< |durXt||d	< |dur`||d
< | jt	j
||t||dS )a'  
        Recommit et channel.

        :param et_id:
            et id
        :type et_id: string

        :param et_channel_id:
            et channel id
        :type et_channel_id: string

        :param local_ip:
            baidu IPv4 address of et channel
        :type local_ip: string

        :param name:
            et channel name
        :type name: string

        :param networks:
            et channel IPv4 routes
        :type networks: list<string>

        :param remote_ip:
            customer IPv4 address of et channel
        :type remote_ip: string

        :param route_type:
            et channel route type
        :value "bgp" or "static"
        :type route_type: string

        :param vlan_id:
            et channel vlan id
        :value 0, 2-4009
        :type vlan_id: integer

        :param authorized_users:
            et channel authorized users
        :type authorized_users: list<string>

        :param description:
            et channel description
        :type description: string

        :param enable_ipv6:
            et channel enable ipv6
        :value 0 or 1
        :type enable_ipv6: integer

        :param local_ipv6:
            baidu IPv6 address of et channel
        :type local_ipv6: string

        :param remote_ipv6:
            customer IPv6 address of et channel
        :type remote_ipv6: string

        :param ipv6_networks:
            et channel IPv6 routes
        :type ipv6_networks: list<string>

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        s   reCreateNr!   )rA   r"   rE   rB   rC   rD   rF   r$   rG   rH   rI   rJ   r   r   r   r   r(   r)   r   r   r*   r   rK   r    r   r4   r,   r-   )r   r5   rW   rL   r"   rE   rM   rN   rO   rP   r$   rQ   rR   rS   rT   r1   r   r   r   r   r   r   r   recommit_et_channel  s6   N	zEtClient.recommit_et_channel)r5   rW   c           
      C   s   t | j| j|| j|}ddi}|du rt |d< n||d< i }	|dur+t||	d< |dur6t||	d< | jt	j
||t|	|dS )a  
        update et channel.

        :param et_id:
            et id
        :type et_id: string

        :param et_channel_id:
            et channel id
        :type et_channel_id: string

        :param name:
            et channel name
        :type name: string

        :param description:
            et channel description
        :type description: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        s   modifyAttributeNr!   r"   r$   rY   rZ   )
r   r5   rW   r"   r$   r1   r   r   r   r   r   r   r   update_et_channel6  s    zEtClient.update_et_channelc                 C   sL   t | j| j|| j|}i }|du rt |d< n||d< | jtj|||dS )a  
        Delete et channel.

        :param et_id:
            et id
        :type et_id: string

        :param et_channel_id:
            et channel id
        :type et_channel_id: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   r3   )	r   r(   r)   r   r   r*   r    r   DELETErV   r   r   r   delete_et_channelh  s   zEtClient.delete_et_channel)r5   rW   rR   rS   c                 C   s~   t | j| j|| j|}ddi}	|du rt |	d< n||	d< t|t|d}
|dur1||
d< | jt	j
||	t|
|dS )ax  
        Enable IPv6 of the specific et channel.

        :param et_id:
            et id
        :type et_id: string

        :param et_channel_id:
            et channel id
        :type et_channel_id: string

        :param local_ipv6:
            baidu IPv6 address of et channel
        :type local_ipv6: string

        :param remote_ipv6:
            customer IPv6 address of et channel
        :type remote_ipv6: string

        :param ipv6_networks:
            et channel IPv6 routes
        :type ipv6_networks: list<string>

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        s
   enableIpv6Nr!   )rH   rI   rJ   rY   rZ   )r   r5   rW   rR   rS   rT   r1   r   r   r   r   r   r   r   enable_et_channel_ipv6  s   &zEtClient.enable_et_channel_ipv6c                 C   sP   t | j| j|| j|}ddi}|du rt |d< n||d< | jtj|||dS )aD  
        Disable IPv6 of the specific et channel.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        s   disableIpv6Nr!   r3   )	r   r(   r)   r   r   r*   r    r   r4   rV   r   r   r   disable_et_channel_ipv6  s   z EtClient.disable_et_channel_ipv6   c
              	   C   s   t | j| j|| j|| j| j}
i }|du rt |d< n||d< |t	|t	|t	|d}|dur;t	||d< | j
tj|
t|||	dS )a  
        Create a et channel route rule with the specified options.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param dest_address:
            Destination address of the route rule.
        :type dest_address: string

        :param nexthop_type
            The type of nexthop.
            Value can be "etGateway" or "etChannel", respectively dedicated gateway, dedicated channel type.
        :type nexthop_type: string

        :param nexthop_id:
            The id of nexthop instance.
        :type nexthop_id: string

        :param description:
            The description of the route rule.
        :type description: string

        :param ip_version:
            The ip version of the route rule.
            Value can be 4 or 6, default 4.
        :type ip_version: int

        :param client_token:
            An ASCII string whose length is less than 64.
            The request will be idempotent if clientToken is provided.
            If the clientToken is not specified by the user,
            a random String generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   )Z	ipVersionZdestAddressZnexthopTypeZ	nexthopIdr$   r'   )r   r(   r)   r   r   r   r   r*   r   rK   r    r   r+   r,   r-   )r   r5   rW   dest_addressZnexthop_typeZ
nexthop_idr$   Z
ip_versionr1   r   r   r   r   r   r   r   create_et_channel_route_rule  s"   2
z%EtClient.create_et_channel_route_rule)r5   rW   r>   max_Keysrb   c           	   	   C   sh   t | j| j|| j|| j| j}i }|dur||d< |dur"||d< |dur*||d< | jtj	|||dS )a-  
        Return a list of route rules specifying the et channel

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param marker:
            The optional parameter marker specified in the original request to specify
            where in the results to begin listing.
            Together with the marker, specifies the list result which listing should begin.
            If the marker is not specified, the list result will listing from the first one.
        :type marker: string

        :param max_keys:
            The optional parameter to specifies the max number of list result to return.
            The default value is 1000.
        :type max_keys: int

        :param dest_address:
            Destination address of the route rule.
        :type dest_address: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr8   r9   s   destAddressr3   )
r   r(   r)   r   r   r   r   r    r   r<   )	r   r5   rW   r>   rd   rb   r   r   r   r   r   r   list_et_channel_route_rules+  s   %
z$EtClient.list_et_channel_route_rules)r5   Z
et_channelet_channel_route_rule_idc           
   
   C   sl   t | j| j|| j|| j| j|}i }dt|i}	|du r$t	 |d< n||d< | j
tj|t|	||dS )a  
        Modify the special et channel route rule to new value.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param et_channel_route_rule_id:
            The id of et channel route rule.
        :type et_channel_route_rule_id: string

        :param description:
            The description of the route rule.
        :type description: string

        :param client_token:
            An ASCII string whose length is less than 64.
            The request will be idempotent if clientToken is provided.
            If the clientToken is not specified by the user,
            a random String generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        r$   Nr!   r3   )r   r(   r)   r   r   r   r   r   rK   r*   r    r   r4   r,   r-   )
r   r5   rW   rf   r$   r1   r   r   r   r   r   r   r   update_et_channel_route_rule]  s   #

z%EtClient.update_et_channel_route_rule)r5   rW   rf   c              
   C   sV   t | j| j|| j|| j| j|}i }|du rt |d< n||d< | jt	j
|||dS )aY  
        Delete the special et channel route rule to new value.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param et_channel_route_rule_id:
            The id of et channel route rule.
        :type et_channel_route_rule_id: string

        :param client_token:
            An ASCII string whose length is less than 64.
            The request will be idempotent if clientToken is provided.
            If the clientToken is not specified by the user, a random String generated by default algorithm will
            be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   r3   )r   r(   r)   r   r   r   r   r*   r    r   r]   )r   r5   rW   rf   r1   r   r   r   r   r   r   delete_et_channel_route_rule  s   
z%EtClient.delete_et_channel_route_rule)r5   rW   extra_channel_idc           	      C   f   t | j| j|| j|}ddi}|du rt |d< n||d< dt|i}| jt	j
||t||dS )a  
        Associate et channel.

        :param et_id:
            et id
        :type et_id: string

        : param et_channel_id:
            et channel id
        :type et_channel_id: string

        :param extra_channel_id:
            extra channel id
        :type extra_channel_id: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse

        s	   associateNr!   extraChannelIdrY   rZ   	r   r5   rW   ri   r1   r   r   r   r   r   r   r   associate_et_channel     
zEtClient.associate_et_channelc           	      C   rj   )a  
        Disassociate et channel.

        :param et_id:
            et id
        :type et_id: string

        :param et_channel_id:
            et channel id
        :type et_channel_id: string

        :param extra_channel_id:
            extra channel id
        :type extra_channel_id: string

        :param client_token:
            If the clientToken is not specified by the user, a random String
            generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse

        s   disassociateNr!   rk   rY   rZ   rl   r   r   r   disassociate_et_channel  rn   z EtClient.disassociate_et_channel)r5   rW   detect_multipliersend_intervalreceive_intervalc                 C   d   t | j| j|| j|| j}i }	|du rt |	d< n||	d< |||d}
| jtj	|t
|
|	|dS )a  
        Create BFD configuration for et channel.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param detect_multiplier:
            Detection time multiplier, an integer between 3-10, recommended value is 4.
        :type detect_multiplier: int

        :param send_interval:
            Message send interval, an integer between 200-1000 in milliseconds, recommended value is 300.
        :type send_interval: int

        :param receive_interval:
            Message receive interval, an integer between 200-1000 in milliseconds, recommended value is 300.
        :type receive_interval: int

        :param client_token:
            An ASCII string whose length is less than 64.
            The request will be idempotent if clientToken is provided.
            If the clientToken is not specified by the user,
            a random String generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   ZdetectMultiplierZsendIntervalZreceivIntervalr'   )r   r(   r)   r   r   r   r*   r    r   r+   r,   r-   r   r5   rW   rp   rq   rr   r1   r   r   r   r   r   r   r   create_et_channel_bfd     (zEtClient.create_et_channel_bfdc                 C   sP   t | j| j|| j|| j}i }|du rt |d< n||d< | jtj	|||dS )a  
        Delete BFD configuration for et channel.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param client_token:
            An ASCII string whose length is less than 64.
            The request will be idempotent if clientToken is provided.
            If the clientToken is not specified by the user,
            a random String generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   r3   )
r   r(   r)   r   r   r   r*   r    r   r]   rV   r   r   r   delete_et_channel_bfdE  s   zEtClient.delete_et_channel_bfdc                 C   rs   )a  
        Update BFD configuration for et channel.

        :param et_id:
            The id of et.
        :type et_id: string

        :param et_channel_id:
            The id of et channel.
        :type et_channel_id: string

        :param detect_multiplier:
            Detection time multiplier, an integer between 3-10, recommended value is 4.
        :type detect_multiplier: int

        :param send_interval:
            Message send interval, an integer between 200-1000 in milliseconds, recommended value is 300.
        :type send_interval: int

        :param receive_interval:
            Message receive interval, an integer between 200-1000 in milliseconds, recommended value is 300.
        :type receive_interval: int

        :param client_token:
            An ASCII string whose length is less than 64.
            The request will be idempotent if clientToken is provided.
            If the clientToken is not specified by the user,
            a random String generated by default algorithm will be used.
        :type client_token: string

        :param config:
        :type config: baidubce.BceClientConfiguration

        :return:
        :rtype baidubce.bce_response.BceResponse
        Nr!   rt   r'   )r   r(   r)   r   r   r   r*   r    r   r4   r,   r-   ru   r   r   r   update_et_channel_bfdi  rw   zEtClient.update_et_channel_bfd)N)NNNNN)NNNNNNN)NNr7   N)NNNNNNNNNNN)NNN)NNNNNNNN)NNNN)NN)Nra   NN)(__name__
__module____qualname____doc__r)   r   r   r   r   r   r   r   r   r    r2   r6   r?   r@   rU   r	   bytesstrrX   listtupleintr[   r\   r^   r_   r`   rc   re   rg   rh   rm   ro   rv   rx   ry   r   r   r   r   r   !   s    



Q

3
5 
o#q1!6!F01(**5#r   c                   C   s   t t S )z
    The default method to generate the random string for client_token
    if the optional parameter client_token is not specified by the user.

    :return:
    :rtype string
    )r   uuiduuid4r   r   r   r   generate_client_token_by_uuid  s   r   )r}   r   r,   r   Zbaidubcer   r   r   Zbaidubce.authr   Zbaidubce.httpr   r   r   Zbaidubce.utilsr	   Zbaidubce.services.et.modelr
   r   r   r   r*   r   r   r   r   <module>   s2            