
    -pjO                        S r SSKJrJrJrJ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rS r " S	 S
\5      r " S S\R&                  " \5      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# " S) S*\5      r$g)+zf
cloudflow model module.

This module defines data structures and enumerations for CloudFlow OpenAPI.
    )absolute_importdivisionprint_functionunicode_literalsN)RSA)
PKCS1_v1_5)compats  -----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChKcFfV3FEDaOv2gTOOlRYm+Yk
fcKUtI81/B/klSidVRBtaL/d8s0nerJFv39gi42U5DFewKEMTJlWboAdvQfLshsH
D++x62x4XCFeFz7Uc4H30AXNVHLhB6S1oFlYWldjK+EQ/jpOFh+ct86cLf4pnMrp
tqG35j6d4hDDOtqY9wIDAQAB
-----END PUBLIC KEY-----c                 ,   [         R                  " U 5      n [         R                  " U5      n[        R                  " U 5      n[        R
                  " U5      nUR                  U5      n[        R                  " U5      n[         R                  " U5      $ )z
:param public_key_pem: PEM format public key (str or bytes)
:param text: Original AK/SK (str or unicode)
:return: Base64 encoded encrypted string (str)
)
r	   convert_to_bytesr   	importKeyr   newencryptbase64	b64encodeconvert_to_string)public_key_pemtext
text_bytesrsa_keycipher	encryptedresults          g/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/baidubce/services/cloudflow/cloudflow_model.py_encrypt_ak_skr      so     ,,^<N((.JmmN+G^^G$Fz*Ii(F##F++    c                       \ rS rSrSrS rSrg)	_EnumMeta&   z6
Metaclass, used to define the enumeration base class
c                 :    XR                   R                  5       ;   $ N)__dict__values)clsitems     r   __contains___EnumMeta.__contains__*   s    ||**,,,r    N)__name__
__module____qualname____firstlineno____doc__r%   __static_attributes__r'   r   r   r   r   &   s    -r   r   c                       \ rS rSrSrSrg)BaseEnum.   z4
Enumeration base class, supporting member checking
r'   N)r(   r)   r*   r+   r,   r-   r'   r   r   r/   r/   .   s     	r   r/   c                   <    \ rS rSrSrSrSrSrSrSr	Sr
SrS	rSrS
rg)MigrationInterface4   z
Migration Enumeration
s	   migrations   migrationFromLists   migrationLists   migrationResults   pauseMigrations   resumeMigrations   retryMigrationr'   N)r(   r)   r*   r+   r,   POSTMIGRATIONPOSTMIGRATIONFROMLISTGETMIGRATIONLISTMIGRATIONGETMIGRATIONRESULTPAUSEMIGRATIONRESUMEMIGRATIONRETRYMIGRATIONDELETEMIGRATIONr-   r'   r   r   r2   r2   4   s8     )M0(L,M.-N.O-N(Or   r2   c                   <    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrg)RunningStatusB   z
Task Status Enumeration
WAITINGREADY_FOR_MIGRATION	MIGRATINGPAUSEDFINISHEDPARTIALLY_FAILED_FINISHEDFAILEDINCREMENTAL_MIGRATINGRETRYINGr'   N)r(   r)   r*   r+   r,   r@   rA   rB   rC   rD   rE   rF   rG   rH   r-   r'   r   r   r>   r>   B   s9     !*G 5 +I (F *H ; (F 7 *Hr   r>   c                        \ rS rSrSrSrSrSrg)MigrationTypeValueQ   z
Migration Type Enumeration
STOCKINCREMENTALr'   N)r(   r)   r*   r+   r,   rL   rM   r-   r'   r   r   rJ   rJ   Q   s     EKr   rJ   c                        \ rS rSrSrSrSrSrg)MigrationModeY   z
Migration Mode Enumeration
FULLY_MANAGEDSEMI_MANAGEDr'   N)r(   r)   r*   r+   r,   rQ   rR   r-   r'   r   r   rO   rO   Y   s     $M"Lr   rO   c                        \ rS rSrSrSrSrSrg)Strategya   z<
Enumeration of file processing policies with the same name
FORCE_OVERWRITEKEEP_DESTINATIONr'   N)r(   r)   r*   r+   r,   rV   rW   r-   r'   r   r   rT   rT   a   s     )O)r   rT   c                   4    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rg)StorageClassi   z
Storage Type Enumeration
STANDARDSTANDARD_IACOLDARCHIVEMAZ_STANDARDMAZ_STANDARD_IASAME_AS_SOURCEr'   N)r(   r)   r*   r+   r,   r[   r\   r]   r^   r_   r`   ra   r-   r'   r   r   rY   rY   i   s,     !H#KDG$L'O&Nr   rY   c                        \ rS rSrSrSrSrSrg)Aclv   z
Access enumeration
KEEP_BUCKETra   r'   N)r(   r)   r*   r+   r,   re   ra   r-   r'   r   r   rc   rc   v   s     #K%Nr   rc   c                   8    \ rS rSrSrSrS
S jrS rS rS r	S	r
g)DailySchedule~   z
Daily execution time interval
startendNc                     Xl         X l        g r    ri   )selfrj   rk   s      r   __init__DailySchedule.__init__   s    
r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eN_z,'DailySchedule' object has no attribute '%s'
startswith	__class___fieldsr!   AttributeErrorrm   namevalues      r   __setattr__DailySchedule.__setattr__   >    ??34>>+A+A#A"'MM$ !ORV!VWWr   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      erq   rs   rm   ry   s     r   __delattr__DailySchedule.__delattr__   >    ??34>>+A+A#Ad# !ORV!VWWr   c                     U R                   R                   Vs0 s H  n[        X5      c  M  U[        X5      _M     sn$ s  snf )
convert self to dict
ru   rv   getattr)rm   ks     r   to_dictDailySchedule.to_dict   s<     .2^^-C-Cd-CwtGW#74##-Cddds
   A A )rk   rj   NNr(   r)   r*   r+   r,   rv   rn   r{   r   r   r-   r'   r   r   rg   rg   ~   s%     GXXer   rg   c                   >    \ rS rSrSrSr   S
S jrS rS rS r	S	r
g)SourceConfig   z
Source side configuration
)providerendpointbucketakskprefixesobject_begin_timeobject_end_timelist_file_urlobject_list_locationregionNc                     Xl         X l        X0l        [        [        U5      U l        [        [        U5      U l        U=(       d    / U l        Xpl        Xl	        Xl
        Xl        Xl        Ub!  [        U[        5      (       d  [        S5      eg g )Nzprefixes must be a list)r   r   r   r   r   r   r   r   r   r   r   r   r   
isinstancelist
ValueError)rm   r   r   r   r   r   r   r   r   r   r   r   s               r   rn   SourceConfig.__init__   s~     %-$,$*$2>2$F$2>2$F$,N$5$3$1$8!$*
8T(B(B677 )Cr   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z+'SourceConfig' object has no attribute '%s'rs   rx   s      r   r{   SourceConfig.__setattr__   s>    ??34>>+A+A#A"'MM$ !NQU!UVVr   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er   rs   r   s     r   r   SourceConfig.__delattr__   s>    ??34>>+A+A#Ad# !NQU!UVVr   c                     0 nU R                   R                   H=  n[        X5      nUc  M  US:X  a  SnOUS:X  a  SnOUS:X  a  SnOUS:X  a  SnOUnX1U'   M?     U$ )	r   r   objectBeginTimer   objectEndTimer   listFileURLr   objectListLocationr   rm   dr   vkeys        r   r   SourceConfig.to_dict   sv     ''A A}+++C++)C/)'C00.CC# ( r   )r   r   r   r   r   r   r   r   r   r   r   )Nr   NNNr   r'   r   r   r   r      s2    BG EIIM378$WWr   r   c                   :    \ rS rSrSrSr S
S jrS rS rS r	S	r
g)DestinationConfig   z
Destination configuration
)	r   r   r   r   r   prefixr   storage_classaclNc
                    Xl         X l        X0l        [        [        U5      U l        [        [        U5      U l        Xl        X`l        Xpl	        Xl
        U[        ;  a/  [        S[        R                  R                  5       < SU< 35      eU[        ;  a/  [        S[        R                  R                  5       < SU< 35      eg )Nzstorage_class must be one of , got zacl must be one of )r   r   r   r   r   r   r   r   r   r   r   rY   r   r!   keysrc   )
rm   r   r   r   r   r   r   r   r   r   s
             r   rn   DestinationConfig.__init__   s    %%#+NB?+NB?##* ,+4499;]L M Mc>"||002C9 : : r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z0'DestinationConfig' object has no attribute '%s'rs   rx   s      r   r{   DestinationConfig.__setattr__   s>    ??34>>+A+A#A"'MM$ !SVZ!Z[[r   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er   rs   r   s     r   r   DestinationConfig.__delattr__   s>    ??34>>+A+A#Ad# !SVZ!Z[[r   c                     0 nU R                   R                   H"  n[        X5      nUc  M  US:X  a  SnOUnX1U'   M$     U$ )r   r   storageClassr   r   s        r   r   DestinationConfig.to_dict   sL     ''A A}'(CC# ( r   )	r   r   r   r   r   r   r   r   r   r    r   r'   r   r   r   r      s)    ;G -1:&\\r   r   c                   8    \ rS rSrSrSrS
S jrS rS rS r	S	r
g)MigrationTypei  z
Migration Type Configuration
typeincrease_scan_interval_in_hoursincrease_timesNc                     Xl         X l        X0l        U[        ;  a/  [	        S[        R
                  R                  5       < SU< 35      eg )Nztype must be one of r   )r   r   r   rJ   r   r!   r   )rm   r   r   r   s       r   rn   MigrationType.__init__  sJ    /3	/N,/=))1::??A4I J J *r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z,'MigrationType' object has no attribute '%s'rs   rx   s      r   r{   MigrationType.__setattr__  r}   r   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er   rs   r   s     r   r   MigrationType.__delattr__#  r   r   c                     SU R                   0nU R                  b  U R                  US'   U R                  b  U R                  US'   U$ )
convert object to dict
r   increaseScanIntervalInHoursincreaseTimesr   rm   r   s     r   r   MigrationType.to_dict)  sP     TYY//;/3/S/SA+,*!%!4!4Aor   )r   r   r   r   r   r'   r   r   r   r     s&     LGJXX	r   r   c                   8    \ rS rSrSrSrS
S jrS rS rS r	S	r
g)PerformanceSettingi5  z'
Time phased performance configuration

start_timeend_timeband_width_in_mbNc                 (    Xl         X l        X0l        g r    r   )rm   r   r   r   s       r   rn   PerformanceSetting.__init__;  s     * ( 0r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z1'PerformanceSetting' object has no attribute '%s'rs   rx   s      r   r{   PerformanceSetting.__setattr__@  >    ??34>>+A+A#A"'MM$ !TW[![\\r   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er   rs   r   s     r   r   PerformanceSetting.__delattr__F  >    ??34>>+A+A#Ad# !TW[![\\r   c                     0 nU R                   b  U R                   US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U$ )r   	startTimeendTimebandWidthInMBr   r   s     r   r   PerformanceSetting.to_dictL  sX     ??&!__AkN==$==AiL  ,!%!6!6Aor   )r   r   r   NNNr   r'   r   r   r   r   5  s$     =G1
]]r   r   c                   8    \ rS rSrSrSrS	S jrS rS rS r	Sr
g)
ValidationMethodConfigiZ  z
Verification configuration
enable_crc64_ecma_validationenable_md5_validationNc                     Xl         X l        g r    r   )rm   r   r   s      r   rn   ValidationMethodConfig.__init__`  s    ,H),A"r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z5'ValidationMethodConfig' object has no attribute '%s'rs   rx   s      r   r{   "ValidationMethodConfig.__setattr__d  s>    ??34>>+A+A#A"'MM$ !X[_!_``r   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er   rs   r   s     r   r   "ValidationMethodConfig.__delattr__j  s>    ??34>>+A+A#Ad# !X[_!_``r   c                 z    0 nU R                   b  U R                   US'   U R                  b  U R                  US'   U$ )r   enableCRC64ECMAValidationenableMD5Validationr   r   s     r   r   ValidationMethodConfig.to_dictp  sH     ,,8-1-N-NA)*%%1'+'A'AA#$r   r   r   r'   r   r   r   r   Z  s&     HGBaa	r   r   c                   D    \ rS rSrSrSr   SS jrS rS rS r	S	 r
S
rg)CreateTaskInfoi|  z#
Create task parameter information
)	task_nameschedule_start_timedaily_schedulesource_configdestination_configstrategymigration_typemigration_modeqpsperformance_settingnot_include_contentvalidation_method_configNc                    Xl         X l        Xl        X0l        X@l        XPl        X`l        Xpl        Xl        Xl	        Xl
        Xl        U R                  R                  b  [        S5      eU R                  R                  b  [        S5      eg )NzKsource_config.region is the parameter of create_task_list, it must be emptyzPsource_config.listFileUrl is the parameter of create_task_list, it must be empty)r   r   r   r   r   r   r  r  r  r  r  r  r   r   r   )rm   r   r   r   r   r   r  r  r   r  r  r  r  s                r   rn   CreateTaskInfo.__init__  s    
 +4*= *8*7*<*2*8*8*-*= *= *B%$$0jkk++7opp 8r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z-'CreateTaskInfo' object has no attribute '%s'rs   rx   s      r   r{   CreateTaskInfo.__setattr__  s>    ??34>>+A+A#A"'MM$ !PSW!WXXr   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er
  rs   r   s     r   r   CreateTaskInfo.__delattr__  s>    ??34>>+A+A#Ad# !PSW!WXXr   c                    U R                   U R                  U R                  R                  5       U R                  R                  5       U R
                  U R                  R                  5       U R                  S.nU R                  b  U R                  R                  5       US'   U R                  b  U R                  US'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U R                  b  U R                  US'   U R                  b  U R                  R                  5       US'   U$ s  snf )r   ry   scheduleStartTimesourceConfigdestinationConfigr   migrationTypemigrationModedailyScheduler  performanceSettingnotIncludeContentvalidationMethodConfig)r   r   r   r   r   r   r  r  r   r  r  r  r  )rm   r   perfs      r   _to_dictCreateTaskInfo._to_dict  s   
 NN!%!9!9 ..668!%!8!8!@!@!B!0088:!00
 *!%!4!4!<!<!>Ao88xxAeH##/BFBZBZ&[BZ$||~BZ&[A"###/%)%=%=A!"((4*.*G*G*O*O*QA&' '\s   Ec                 J    [         R                  " U R                  5       5      $ z
Convert object to json string
jsondumpsr  rm   s    r   to_json_stringCreateTaskInfo.to_json_string       zz$--/**r   )r   r   r  r  r  r  r  r   r   r   r   r  )NNNNNr(   r)   r*   r+   r,   rv   rn   r{   r   r  r"  r-   r'   r   r   r   r   |  s6    BG ;??C*.	q.YY4+r   r   c                   B    \ rS rSrSrSr  SS jrS rS rS r	S	 r
S
rg)CreateTaskListInfoi  z-
Create task parameter information from list
)
r   r   r   r   r   r   r  r  r  r  Nc                 \   Xl         X l        Xl        X0l        X@l        XPl        X`l        Xpl        Xl        Xl	        U R                  R                  (       a  [        S5      eU R                  R                  S:w  a  [        S5      eU R                  R                  S:w  a  [        S5      eg )NzHsource_config.prefixes is the parameter of create_task, it must be emptyr   zQsource_config.object_begin_time is the parameter of create_task, it must be emptyzOsource_config.object_end_time is the parameter of create_task, it must be empty)r   r   r   r   r   r   r  r  r  r  r   r   r   r   )rm   r   r   r   r   r   r  r  r   r  r  s              r   rn   CreateTaskListInfo.__init__  s     +4*= *8*7*<*2*8*8*-*B%&&ghh//25pqq--3noo 4r   c                     UR                  S5      (       d  XR                  R                  ;   a  X R                  U'   g [	        SU-  5      eNrr   z1'CreateTaskListInfo' object has no attribute '%s'rs   rx   s      r   r{   CreateTaskListInfo.__setattr__  r   r   c                     UR                  S5      (       d  XR                  R                  ;   a  U R                  U	 g [	        SU-  5      er+  rs   r   s     r   r   CreateTaskListInfo.__delattr__  r   r   c                    U R                   U R                  U R                  R                  5       U R                  R                  5       U R
                  U R                  R                  5       U R                  S.nU R                  b  U R                  R                  5       US'   U R                  b  U R                  US'   U R                  b  U R                  R                  5       US'   U$ )r   r  r  r  r  )r   r   r   r   r   r   r  r  r   r  r  r   s     r   r  CreateTaskListInfo._to_dict  s    
 NN!%!9!9 ..668!%!8!8!@!@!B!0088:!00
 *!%!4!4!<!<!>Ao88xxAeH((4*.*G*G*O*O*QA&'r   c                 J    [         R                  " U R                  5       5      $ r  r  r!  s    r   r"  !CreateTaskListInfo.to_json_string  r$  r   )
r   r   r  r  r  r   r   r   r   r  r   r%  r'   r   r   r'  r'    s3    VG ;?*.p,]]*+r   r'  )%r,   
__future__r   r   r   r   r  sixr   Crypto.PublicKeyr   Crypto.Cipherr   baidubcer	   r   r   r   r   with_metaclassr/   r2   r>   rJ   rO   rT   rY   rc   objectrg   r   r   r   r   r   r   r'  r'   r   r   <module>r:     s  
 S R  
    $ , - -	s!!), 	) )+H +   #H #*x *
'8 
'&( &eF e::6 :z3 3l$F $N" "JV DK+V K+ZC+ C+r   