
    9ib                      j   S r SSKJr  SSKJr   " S S\5      r " S S\5      r " S S	\5      r " S
 S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      rg")#z*
This module provides models for RDS-SDK.
    )JSONEncoder)BceResponsec                   (    \ rS rSrSrSS jrS rSrg)Billing   a  
This class define billing.
param: pay_method:
        The pay time of the payment,
param: reservationLength:
        The duration to buy in specified time unit,
param: reservationTimeUnit:
        The time unit to specify the duration ,only "Month" can be used now.
c                 $    Xl         UUS.U l        g )N)reservationLengthreservationTimeUnitpaymentTimingreservation)self
pay_methodr	   r
   s       _/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/baidubce/services/rds/rds_model.py__init__Billing.__init__#   s    '!2#6
    c                     U R                   $ )z2
get instance current pay_method:Prepaid/Postpaid
)r   r   s    r   get_pay_methodBilling.get_pay_method*   s    
 !!!r   r   N)Prepaid   Month)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s    
"r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )	SubnetMap2   z*
SubnetMap:contains zoneName and subnetId
c                 j   > [         [        U ]  5         [        U5      U l        [        U5      U l        g N)superr#   r   str	zone_name	subnet_id)r   r)   r*   	__class__s      r   r   SubnetMap.__init__8   s&    i')YYr   )r*   r)   r   r   r   r   r   r   r    __classcell__r+   s   @r   r#   r#   2   s    ( (r   r#   c                   2   ^  \ rS rSrSrU 4S jrS rSrU =r$ )Tag>   z
Tag model
c                 j   > [         [        U ]  5         [        U5      U l        [        U5      U l        g r&   )r'   r1   r   r(   tag_key	tag_value)r   keyvaluer+   s      r   r   Tag.__init__C   s&    c4!#3xUr   c                 D    [        U R                  U R                  45      $ r&   )reprr4   r5   r   s    r   __repr__Tag.__repr__H   s    T\\4>>233r   )r4   r5   )	r   r   r   r   r   r   r;   r    r.   r/   s   @r   r1   r1   >   s    $
4 4r   r1   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )InitialDataReferenceL   z
Initial Data Reference
c                 Z   > [         [        U ]  5         Xl        X l        X0l        X@l        g r&   )r'   r>   r   instance_idreference_typedatetimesnapshot_id)r   rA   rB   rC   rD   r+   s        r   r   InitialDataReference.__init__Q   s(    "D24&, &r   )rC   rA   rB   rD   )NNr-   r/   s   @r   r>   r>   L   s    ' 'r   r>   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )RecoveryToSourceInstanceModelY   z 
RecoveryToSourceInstance model
c                 Z   > [         [        U ]  5         Xl        X l        X0l        X@l        g r&   )r'   rG   r   restore_modedb_name
new_dbnametables)r   rJ   rK   rL   rM   r+   s        r   r   &RecoveryToSourceInstanceModel.__init__^   s&    +T;=($r   )rK   rL   rJ   rM   r&   r-   r/   s   @r   rG   rG   Y   s     r   rG   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )Tablesf   z
Tables
c                 B   > [         [        U ]  5         Xl        X l        g r&   )r'   rP   r   
table_namenew_tablename)r   rS   rT   r+   s      r   r   Tables.__init__k   s    fd$&$*r   )rT   rS   r-   r/   s   @r   rP   rP   f   s    + +r   rP   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )CreateInstanceResponseq   z
Create Instance Response
c                 n   > [         [        U ]  5         UR                  U l        UR                  U l        g r&   )r'   rW   r   instance_idsorder_idr   bce_responser+   s     r   r   CreateInstanceResponse.__init__v   s,    $d46(55$--r   )rZ   r[   r-   r/   s   @r   rW   rW   q   s    . .r   rW   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )GetInstanceResponse|   z
Get Instance Response
c                   > [         [        U ]  5         UR                  U l        UR                  U l        UR
                  U l        UR                  U l        UR                  U l        UR                  U l        UR                  U l	        UR                  U l
        UR                  U l        UR                  U l        UR                  U l        UR                  U l        UR                  U l        UR                   U l        UR"                  U l        UR$                  U l        UR&                  U l        UR(                  U l        UR*                  U l        UR,                  U l        UR.                  U l        UR0                  U l        UR2                  U l        UR4                  U l        UR6                  U l        UR8                  U l        UR:                  U l        g r&   )r'   r`   r   rA   instance_nameengineengine_versioncategoryinstance_status	cpu_countmemory_capacityvolume_capacitynode_amountused_storageinstance_create_timeinstance_expire_timeendpointpublic_access_status	sync_modebackup_policyregioninstance_typesource_instance_idsource_region
zone_namesvpc_idsubnetstopologypayment_timingcharacter_set_namer\   s     r   r   GetInstanceResponse.__init__   s   !413'33)77"))*99$--+;;%//+;;+;;'33(55$0$E$E!$0$E$E!$--$0$E$E!%//)77")))77"."A"A)77&11"))#++$--*99"."A"Ar   )rr   rf   r|   rh   ro   rd   re   rm   rn   rA   rc   rg   rt   ri   rk   r{   rp   rs   ru   rv   ry   rq   rz   rl   rj   rx   rw   r-   r/   s   @r   r`   r`   |   s    B Br   r`   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ListInstanceResponse   z
List Instance Response
c                    > [         [        U ]  5         UR                  U l        [	        UR
                  5      U l        [	        UR                  5      U l        UR                  U l        UR                  U l        g r&   )	r'   r   r   max_keysr(   markernext_markeris_truncated	instancesr\   s     r   r   ListInstanceResponse.__init__   s^    "D24$--,--.|778(55%//r   )r   r   r   r   r   r-   r/   s   @r   r   r      s    0 0r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ListZoneResponse   
List zone.
c                 L   > [         [        U ]  5         UR                  U l        g r&   )r'   r   r   zonesr\   s     r   r   ListZoneResponse.__init__   s    .0!''
r   )r   r-   r/   s   @r   r   r          ( (r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ListSubnetResponse   r   c                 L   > [         [        U ]  5         UR                  U l        g r&   )r'   r   r   ry   r\   s     r   r   ListSubnetResponse.__init__   s     $02#++r   )ry   r-   r/   s   @r   r   r      s    , ,r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )Instance   z
instance.
c                 ~   > [         [        U ]  5         Xl        X l        X0l        X@l        XPl        X`l        Xpl	        g r&   )
r'   r   r   rd   engineVersioncpuCountallocatedMemoryInGBallocatedStorageInGBrf   
diskIoType)	r   rd   re   rh   allocated_memory_in_g_ballocated_storage_in_g_brf   disk_io_typer+   s	           r   r   Instance.__init__   s6    h&(+!#: $<! &r   )r   r   rf   r   r   rd   r   r-   r/   s   @r   r   r      s    	' 	'r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )PriceResponse   z
price response.
c                 L   > [         [        U ]  5         UR                  U l        g r&   )r'   r   r   pricer\   s     r   r   PriceResponse.__init__   s    mT+-!''
r   )r   r-   r/   s   @r   r   r      r   r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )OrderStatusResponse   z
order status response.
c                 n   > [         [        U ]  5         UR                  U l        UR                  U l        g r&   )r'   r   r   orderIdstatusr\   s     r   r   OrderStatusResponse.__init__   s+    !413#++"))r   )r   r   r-   r/   s   @r   r   r      s    * *r   r   c                       \ rS rSrSrS rSrg)JsonWrapper   z
custom json encoder for class
c                    [        U[        5      (       a
  [        USS9$ [        U[        5      (       a  UR                  UR
                  S.$ [        U[        5      (       a  UR                  UR                  S.$ [        U[        5      (       a/  UR                  UR                  UR                  UR                  S.$ [        U[        5      (       a/  UR                  UR                   UR"                  UR$                  S.$ [        U[&        5      (       a  UR(                  UR*                  S.$ [,        R.                  " X5      $ )Nzutf-8)encoding)zoneNamesubnetId)tagKeytagValue)
instanceIdreferenceTyperC   
snapshotId)restoreModedbName	newDbnamerM   )	tableNamenewTablename)
isinstancebytesr(   r#   r)   r*   r1   r4   r5   r>   rA   rB   rC   rD   rG   rJ   rK   rL   rM   rP   rS   rT   r   default)r   objs     r   r   JsonWrapper.default   s   c5!!sW--c9%%MMMM  c3++MM  c/00!oo!$!3!3LL!oo	  c899"//++ ^^**	  c6"" ^^ # 1 1  ""4--r   r!   N)r   r   r   r   r   r   r    r!   r   r   r   r      s     .r   r   N)r   jsonr   baidubce.bce_responser   objectr   r#   r1   r>   rG   rP   rW   r`   r   r   r   r   r   r   r   r!   r   r   <module>r      s   $  -"f "4	( 	(4& 4
'6 
'
F 
+V +.[ .!B+ !BH0; 0({ (, ,'v '"(K (*+ *%.+ %.r   