
    -pj                          S r SSKrSSKrSSKrSSKrSSKJr  SSKJr  SSK	J
r
  SSKJr  SSKJr  SSKJr  SS	KJr  \R"                  " \5      r " S
 S\
5      rg)z.
This module provides a client class for EIP.
    N)utils)bce_v1_signer)BceBaseClient)bce_http_client)handler)http_methods)	EipStatusc                   x   \ rS rSrSrSrSrSrS$S jr     S%S jr	  S&S	 jr
  S'S
 jr  S(S jrS&S jr  S'S jrS&S jrS&S jrS&S jrS&S jr   S)S jrS*S jrS+S jrS&S jrS&S jrS&S jrS&S jrS&S jr S&S jrS&S jrS&S jrS&S jr     S,S jr\ S 5       r!\ S$S  j5       r"S! r#  S-S" jr$S#r%g).	EipClient%   z
eip sdk client
s   /v1s   /eipz	/transferNc                 0    [         R                  " X5        g)z>
:type config: baidubce.BceClientConfiguration
:param config:
N)r   __init__)selfconfigs     \/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/baidubce/services/eip/eip_client.pyr   EipClient.__init__-   s    
 	t,    c                    SU0nUb  X-S'   Ub  XMS'   Ub  X]S'   Ub  XmS'   Ub  X}S'   Ub  XS'   U	b  XS'   U
b  XS	'   Uc	  S
SS.US'   O4UR                   UR                  UR                  UR                  S.S.US'   U R	                  5       nUc  U R                  5       nSU0nU R                  [        R                  U[        R                  " U5      UUS9$ )a  
Create an eip with the specified options.

:type bandwidth_in_mbps: int
:param bandwidth_in_mbps: specify the bandwidth in Mbps

:type name: string
:param name: name of eip. The optional parameter

:type billing: Billing
:param billing: billing information. The optional parameter

:type route_type: string
:param route_type: route type (BGP or BGP_S)

:type ip_version: string
:param ip_version: IP version (ipv4 or ipv6), default ipv4

:type tags: list
:param tags: list of tag key-value pairs

:type resource_group_id: string
:param resource_group_id: resource group ID

:type auto_renew_time_unit: string
:param auto_renew_time_unit: auto renew time unit (month or year)

:type auto_renew_time: int
:param auto_renew_time: auto renew time length

:type delete_protect: bool
:param delete_protect: enable delete protection

:type client_token: string
:param client_token: idempotent token

:type config: baidubce.BceClientConfiguration
:param config:

:return: created eip address, for example,{"eip":"x.x.x.x"}
bandwidthInMbpsname	routeType	ipVersiontagsresourceGroupIdautoRenewTimeUnitautoRenewTimedeleteProtectPostpaidByBandwidth)paymentTimingbillingMethodbillingreservationLengthreservationTimeUnit)r    r!   reservation   clientTokenbodyparamsr   )payment_timingbilling_methodreservation_lengthreservation_time_unit	_get_path_generate_default_client_token_send_requestr   POSTjsondumps)r   bandwidth_in_mbpsr   r"   
route_type
ip_versionr   resource_group_idauto_renew_time_unitauto_renew_timedelete_protectclient_tokenr   r)   pathr*   s                   r   
create_eipEipClient.create_eip4   s3   ^ 0
 L! *! *L(&7"#+(<$%&$3!%$2!?!+!.DO ")!7!7!(!7!7)0)C)C+2+H+H DO ~~>>@LL
 !!,"3"3T'+zz$'7)/ " 1 	1r   c                     SU0n[         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  Xg[        R                  " U5      US9$ )a  
Resizing eip

:type eip: string
:param eip: eip address to be resized

:type new_bandwidth_in_mbps: int
:param new_bandwidth_in_mbps: specify new bandwidth in Mbps for eip

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
newBandwidthInMbpsr   )s   resizer'   r*   r)   r   	r   
append_urir/   r0   r1   r   PUTr3   r4   )r   eipnew_bandwidth_in_mbpsr<   r   r)   r=   r*   s           r   
resize_eipEipClient.resize_eip   s    * !"7
  0#6>>@L(
 !!,"2"2D'+zz$'7 " H 	Hr   c                 8   Uc
  SSSSS.00nOSSUR                   UR                  S.00n[        R                  " U R	                  5       U5      nUc  U R                  5       nSUS.nU R                  [        R                  Xg[        R                  " U5      US9$ )	a  
PurchaseReserved eip with fixed duration,only Prepaid eip can do this

:type eip: string
:param eip: eip address to be renewed

:type billing: Billing
:param billing: billing information. The optional parameter,
 default reservationLength is 1

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r"   r&      Monthr#   r   )s   purchaseReservedr'   rB   )r-   r.   r   rD   r/   r0   r1   r   rE   r3   r4   )r   rF   r"   r<   r   r)   r=   r*   s           r   purchase_reserved_eipEipClient.purchase_reserved_eip   s    * ?!-./6$D !-4-G-G/6/L/L$D  0#6>>@L!$(
 !!,"2"2D'+zz$'7 " H 	Hr   c                    Uc  SnUc  SnUUS.n[         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  Xx[        R                  " U5      US9$ )aC  
Enable auto renew for specified EIP.

:type eip: string
:param eip: eip address to be enable to auto-renew.

:type auto_renew_time_unit: string
:param auto_renew_time_unit: time unit of auto_renew_time, default 'Month'.

:type auto_renew_time: int
:param auto_renew_time: the unit of time for auto renew,
default auto_renew_time is 1

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
monthrK   )r   r   r   )s   startAutoRenewr'   rB   rC   )	r   rF   r9   r:   r<   r   r)   r=   r*   s	            r   start_auto_renew_eipEipClient.start_auto_renew_eip   s    0  '#* "O!5,
  0#6>>@L"(
 !!,"2"2D'+zz$'7 " H 	Hr   c                     [         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  XEUS9$ )ac  
Disable auto renew for specified EIP.

:type eip: string
:param eip: eip address to be disable to auto-renew.

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   )s   stopAutoRenewr'   r*   r   r   rD   r/   r0   r1   r   rE   r   rF   r<   r   r=   r*   s         r   stop_auto_renew_eipEipClient.stop_auto_renew_eip  s_    "  0#6>>@L!(
 !!,"2"2DPV!WWr   c                     UUS.nUb  XGS'   [         R                  " U R                  5       U5      nUc  U R                  5       nSUS.n	U R	                  [
        R                  X[        R                  " U5      US9$ )aj  
bind the eip to a specified instanceId and instanceType

:type eip: string
:param eip: eip address to be bound

:type instance_type: string
:param instance_type: type of instance to be bound(BCC BLB et.)

:type instance_id: string
:param instance_id: id of instance to be bound

:type instance_ip: string
:param instance_ip: specific IP address within the instance to bind

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
)instanceType
instanceId
instanceIpr   )s   bindr'   rB   rC   )
r   rF   instance_typeinstance_idinstance_ipr<   r   r)   r=   r*   s
             r   bind_eipEipClient.bind_eip)  s    6 *%
 "!, 0#6>>@L(
 !!,"2"2D'+zz$'7 " H 	Hr   c                     [         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  XEUS9$ )aW  
unbind the eip from a specified instance

:type eip: string
:param eip: eip address to be unbound

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   )s   unbindr'   rT   rU   rV   s         r   
unbind_eipEipClient.unbind_eipS  se       0#6>>@L(
 !!,"2"2D)/ " 1 	1r   c                     [         R                  " U R                  5       U5      nUc  U R                  5       nSU0nU R	                  [
        R                  XEUS9$ )a  
release the eip(delete operation)
Only the Postpaid instance or Prepaid which is expired can be released.
if the eip has been bound, must unbind before releasing.

:type eip: string
:param eip: eip address to be released

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r'   rT   r   rD   r/   r0   r1   r   DELETErV   s         r   release_eipEipClient.release_eipm  sd    $  0#6>>@LL
 !!,"5"5t)/ " 1 	1r   c                     [         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  XEUS9$ )ab  
turn on EIP pass through with the specific parameters.

:type eip: string
:param eip: the specific EIP.

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

:type config: baidubce.BceClientConfiguration
:param config: None

:return: BceResponse
r   )s   directr'   rT   rU   rV   s         r   
direct_eipEipClient.direct_eip  s_       0#6>>@L(
 !!,"2"2DPV!WWr   c                     [         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  XEUS9$ )ao  
Remove the direction of an EIP from a specific instance.

:type eip: string
:param eip: the EIP address to undirect.

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

:type config: baidubce.BceClientConfiguration
:param config: None

:return: BceResponse
r   )s   unDirectr'   rT   rU   rV   s         r   undirect_eipEipClient.undirect_eip  s_       0#6>>@L(
 !!,"2"2DPV!WWr   c                 "   U R                  5       n0 nUb  XS'   Ub  X,S'   Ub  XLS'   Ub  XS'   Ub$  [        U[        5      (       a  UR                  US'   Ub  XlS'   Ub  X|S'   Ub  X<S'   U	b  XS	'   U R	                  [
        R                  XU
S
9$ )a  
get a list of eip owned by the authenticated user and specified
conditions. we can Also get a single eip function  through this
interface by eip condition

:type eip: string
:param eip: eip address condition

:type instance_type: string
:param instance_type: bound instance type condition

:type instance_id: string
:param instance_id: bound instance id condition
if query by the instanceId or instanceType condition, must provides
 both of them at the same time

:type status: string
:param status of eip 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 name: string
:param name: eip name condition

:type eip_ids: string
:param eip_ids: comma-separated EIP IDs for batch query

:type config: baidubce.BceClientConfiguration
:param config:

:return: list of eip model, for example:
        {
            "eipList": [
                {
                    "name":"eip-xxxxxxx-1",
                    "eip": "x.x.x.x",
                    "status":"binded",
                    "instanceType": "BCC",
                    "instanceId": "i-xxxxxxx",
                    "bandwidthInMbps": 5,
                    "paymentTiming":"Prepaid",
                    "billingMethod":"ByBandwidth",
                    "createTime":"2016-03-08T08:13:09Z",
                    "expireTime":"2016-04-08T08:13:09Z"
                },
                {
                    "name":"eip-xxxxxxx-1",
                    "eip": "x.x.x.x",
                    "status":"binded",
                    "instanceType": "BCC",
                    "instanceId": "i-xxxxxxx",
                    "bandwidthInMbps": 1,
                    "paymentTiming":"Postpaid",
                    "billingMethod":"ByTraffic",
                    "createTime":"2016-03-08T08:13:09Z",
                    "expireTime":null
                },
            ],
            "marker":"eip-xxxxxxx-1",
            "isTruncated": true,
            "nextMarker": "eip-DCB50387",
            "maxKeys": 2
        }
   eips   instanceTypes
   instanceId   name   status   marker   maxKeyss	   ipVersions   eipIdsrT   )r/   
isinstancer	   valuer1   r   GET)r   rF   r]   r7   r^   statusmarkermax_keysr   eip_idsr   r=   r*   s                r   	list_eipsEipClient.list_eips  s    T ~~? 6N$&3?#"$/=!"7O*VY"?"? &F9 &9!):!#-<  '9!!,"2"2D)/ " 1 	1r   c                     [         R                  " U R                  5       S5      n0 nUb  XS'   Ub  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R
                  XgUS9$ )a  
list all EIP in the recycle bin with the specific parameters.

:type eip: string
:param eip: eip address condition

:type name: string
:param name: eip name condition

: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: None

:return: list of eip model, for example:
        {
            "eipList": [
                {
                    "name":"eip-xxxxxxx-1",
                    "eip": "x.x.x.x",
                    "eip_id":"ip-xxxxxxxx",
                    "status": "paused",
                    "route_type": "BGP",
                    "bandwidth_in_mbps": 5,
                    "payment_timing":"Prepaid",
                    "billing_method":"ByBandwidth",
                    "recycle_time":"2016-03-08T08:13:09Z",
                    "scheduled_delete_time":"2016-04-08T08:13:09Z"
                },
                {
                    "name":"eip-xxxxxxx-2",
                    "eip": "x.x.x.x",
                    "eip_id":"ip-xxxxxxxx",
                    "status": "paused",
                    "route_type": "BGP",
                    "bandwidth_in_mbps": 10,
                    "payment_timing":"Postpaid",
                    "billing_method":"ByBandwidth",
                    "recycle_time":"2016-03-08T08:13:09Z",
                    "scheduled_delete_time":"2016-04-08T08:13:09Z"
                },
            ],
            "marker":"ip-xxxxxxxx",
            "is_truncated": true,
            "max_keys": 1000
        }
recyclerq   rr   rt   ru   rT   )r   rD   r/   r1   r   rx   )r   rF   r   rz   r{   r   r=   r*   s           r   list_eip_recycleEipClient.list_eip_recycle  sw    l  0)<? 6N"7O &9!):!!,"2"2DPV!WWr   c                     [         R                  " U R                  5       U5      nUc  U R                  5       nUUS.nU R	                  [
        R                  XVUS9$ )a  
delete an EIP with additional options.

:type eip: string
:param eip: the EIP address to delete.

:type release_to_recycle: bool
:param release_to_recycle: flag to release EIP to recycle bin.

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
)r'   s   releaseToRecyclerT   rf   )r   rF   release_to_recycler<   r   r=   r*   s          r   optional_delete_eipEipClient.optional_delete_eip^  s_    (  0#6>>@L(!3
 !!,"5"5tSY!ZZr   c                     [         R                  " U R                  5       SU5      nUc  U R                  5       nSUS.nU R	                  [
        R                  XEUS9$ )af  
restore an EIP from the recycle bin.

:type eip: string
:param eip: eip address to be restored from recycle bin.

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   r   )s   restorer'   rT   rU   rV   s         r   restore_recycle_eipEipClient.restore_recycle_eip|  sa    "  0)SA>>@L(
 !!,"2"2DPV!WWr   c                     [         R                  " U R                  5       SU5      nUc  U R                  5       nSU0nU R	                  [
        R                  XEUS9$ )ac  
delete an EIP from the recycle bin.

:type eip: string
:param eip: eip address to be delete from recycle bin.

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   r'   rT   rf   rV   s         r   delete_recycle_eipEipClient.delete_recycle_eip  s`    "  0)SA>>@LL
 !!,"5"5tSY!ZZr   c                     UUS.n[         R                  " U R                  5       U5      nUc  U R                  5       nSUS.nU R	                  [
        R                  Xx[        R                  " U5      US9$ )a  
Change EIP billing method from postpaid to prepaid.

:type eip: string
:param eip: eip address to change billing method

:type purchase_length: int
:param purchase_length: purchase duration in months (1-9, 12, 24, 36)

:type bandwidth: int
:param bandwidth: bandwidth for prepaid EIP

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
)purchaseLength	bandWidths	   TO_PREPAY)s   actionr'   rB   rC   )	r   rF   purchase_length	bandwidthr<   r   r)   r=   r*   s	            r   change_eip_to_prepayEipClient.change_eip_to_prepay  s    . ."

  0#6>>@L#(
 !!,"2"2D'+zz$'7 " H 	Hr   c                     [         R                  " U R                  5       SU5      nUc  U R                  5       nSU0nU R	                  [
        R                  XEUS9$ )a@  
Refund a prepaid EIP.

:type eip: string
:param eip: eip address to refund

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
refundr'   rT   rU   rV   s         r   refund_prepay_eipEipClient.refund_prepay_eip  s`       0(C@>>@LL
 !!,"2"2DPV!WWr   c                     SU0n[         R                  " U R                  5       US5      nUc  U R                  5       nSU0nU R	                  [
        R                  Xg[        R                  " U5      US9$ )a  
Update EIP delete protection setting.

:type eip: string
:param eip: eip address to update

:type delete_protect: bool
:param delete_protect: enable or disable delete protection

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

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   r'   rB   rC   )r   rF   r;   r<   r   r)   r=   r*   s           r   update_eip_delete_protect#EipClient.update_eip_delete_protect  s    ( ^
  0#G>>@LL
 !!,"2"2D'+zz$'7 " H 	Hr   c                    UUUS.n[         R                  " U R                  [        R                  5      5      nUc  U R                  5       nSU0nU R                  [        R                  U[        R                  " U5      UUS9$ )a7  
Create an EIP resource transfer task to transfer resources from one account to another.

:type transfer_type: string
:param transfer_type: Transfer resource type, should be 'eip'

:type transfer_resource_list: list
:param transfer_resource_list: List of resource short IDs to transfer, max 30 items

:type to_user_id: string
:param to_user_id: Target account ID

:type client_token: string
:param client_token: Idempotent token. If not specified, a random string will be generated.

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
)transferTypetransferResourceListtoUserIdr'   r(   )r   rD   r/   r   transfer_prefixr0   r1   r   r2   r3   r4   )	r   transfer_typetransfer_resource_list
to_user_idr<   r   r)   r=   r*   s	            r   create_eip_transferEipClient.create_eip_transfer  s    . *$:"
 y/H/H IJ>>@LL
 !!,"3"3T'+zz$'7)/)/ " 1 	1r   c                 
   SU0n[         R                  " U R                  [        R                  5      5      nUc  U R                  5       nSUS.nU R                  [        R                  U[        R                  " U5      UUS9$ )aZ  
Cancel EIP resource transfer tasks.

:type transfer_id_list: list
:param transfer_id_list: List of transfer task IDs to cancel, max 30 items

:type client_token: string
:param client_token: Idempotent token. If not specified, a random string will be generated.

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
transferIdListr   )s   cancelr'   r(   r   rD   r/   r   r   r0   r1   r   rE   r3   r4   r   transfer_id_listr<   r   r)   r=   r*   s          r   cancel_eip_transferEipClient.cancel_eip_transfer7        .
 y/H/H IJ>>@L(

 !!,"2"2D'+zz$'7)/)/ " 1 	1r   c                 
   SU0n[         R                  " U R                  [        R                  5      5      nUc  U R                  5       nSUS.nU R                  [        R                  U[        R                  " U5      UUS9$ )aZ  
Reject EIP resource transfer tasks.

:type transfer_id_list: list
:param transfer_id_list: List of transfer task IDs to reject, max 30 items

:type client_token: string
:param client_token: Idempotent token. If not specified, a random string will be generated.

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   r   )s   rejectr'   r(   r   r   s          r   reject_eip_transferEipClient.reject_eip_transferX  r   r   c                 
   SU0n[         R                  " U R                  [        R                  5      5      nUc  U R                  5       nSUS.nU R                  [        R                  U[        R                  " U5      UUS9$ )aZ  
Accept EIP resource transfer tasks.

:type transfer_id_list: list
:param transfer_id_list: List of transfer task IDs to accept, max 30 items

:type client_token: string
:param client_token: Idempotent token. If not specified, a random string will be generated.

:type config: baidubce.BceClientConfiguration
:param config:

:return: BceResponse
r   r   )s   acceptr'   r(   r   r   s          r   accept_eip_transferEipClient.accept_eip_transfery  r   r   c                 *   [         R                  " U R                  [        R                  5      5      n0 nUb  XS'   Ub  X,S'   Ub  X<S'   Ub  XLS'   Ub  X\S'   Ub  XlS'   Ub  X|S'   Ub  XS'   U	b  XS	'   U R                  [        R                  UUU
S
9$ )a  
List EIP resource transfer tasks.

:type max_keys: int
:param max_keys: Maximum number of items per page, default 10

:type marker: string
:param marker: Pagination marker

:type direction: string
:param direction: 'sent' for initiated by me, 'received' for received by me

:type transfer_type: string
:param transfer_type: Transfer resource type

:type transfer_id: string
:param transfer_id: Transfer ID for exact query, multiple IDs separated by '_'

:type status: string
:param status: Status filter, default 'all'

:type fuzzy_transfer_id: string
:param fuzzy_transfer_id: Transfer ID fuzzy query

:type fuzzy_instance_id: string
:param fuzzy_instance_id: Instance ID fuzzy query

:type fuzzy_instance_name: string
:param fuzzy_instance_name: Instance name fuzzy query

:type fuzzy_instance_ip: string
:param fuzzy_instance_ip: Instance IP fuzzy query

:type config: baidubce.BceClientConfiguration
:param config:

:return: list of transfer tasks, for example:
        {
            "transferList": [...],
            "marker": "tf-1l4m5etb",
            "isTruncated": false,
            "nextMarker": "...",
            "maxKeys": 10
        }
ru   rt   s	   directions
   transferIdrs   s   fuzzyTransferIds   fuzzyInstanceIds   fuzzyInstanceNames   fuzzyInstanceIprT   )r   rD   r/   r   r   r1   r   rx   )r   r{   rz   	directiontransfer_idry   fuzzy_transfer_idfuzzy_instance_idfuzzy_instance_namefuzzy_instance_ipr   r=   r*   s                r   list_eip_transferEipClient.list_eip_transfer  s    d y/H/H IJ!): &9 #,< "$/=! &9():%&():%&*+>'(():%&!!,"2"2D)/)/ " 1 	1r   c                  ,    [         R                  " 5       $ )z
default client token by uuid1
)uuiduuid1 r   r   r0   (EipClient._generate_default_client_token  s    
 zz|r   c                 r    U c  [         R                  n [        R                  " [         R                  U 5      $ )z1
:type prefix: string
:param prefix: path prefix
)r   prefixr   rD   version)r   s    r   r/   EipClient._get_path  s-     >%%F	 1 16::r   c                     Uc  U R                   $ [        R                  " U R                   5      nUR                  U5        U$ )zH

:type config: baidubce.BceClientConfiguration
:param config:
:return:
)r   copymerge_non_none_values)r   r   
new_configs      r   _merge_configEipClient._merge_config  s9     >;;4;;/J,,V4r   c           
          U R                  U5      nUc  [        R                  nUc  SSS.n[        R                  " U[
        R                  [        R                  U/XX4U5      $ )z

:param http_method:
:param path:
:param body:
:param headers:
:param params:

:type config: baidubce.BceClientConfiguration
:param config:

:param body_parser:

:return: baidubce.BceResponse
s   */*s   application/json;charset=utf-8)s   Accepts   Content-Type)r   r   
parse_jsonr   send_requestr   signparse_error)r   http_methodr=   r)   headersr*   r   body_parsers           r   r1   EipClient._send_request  sm    " ##F+!,,K?"((IKG ++FM4F4F-4-@-@+,N,7t,24 	4r   r   )N)NNNNNNNNNNN)NN)NNN)NNNN)
NNNNNN  NNN)NNNr   N)FNN)
NNNNNNNNNN)NNNNN)&__name__
__module____qualname____firstlineno____doc__r   r   r   r   r>   rH   rM   rQ   rW   r`   rc   rh   rk   rn   r}   r   r   r   r   r   r   r   r   r   r   r   r   staticmethodr0   r/   r   r1   __static_attributes__r   r   r   r   r   %   sL    GF!O- @D6:<@48)-	Y1v CGHB EI%)/Hb TX7;(HTX< X\(HT1416X2X4 TX5926_1B@XD[<X6[4#HJX0HB 7;'1R1B1B1B GK48EIGK"&	J1X   ; ; CG<@4r   r   )r   r   r3   loggingr   baidubcer   baidubce.authr   baidubce.bce_base_clientr   baidubce.httpr   r   r   baidubce.services.eip.modelr	   	getLoggerr   _loggerr   r   r   r   <module>r      sK   "      ' 2 ) ! & 1


H
%|4 |4r   