
    t                    	   S 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  SS
KJr  SSKJr  SSKJr  SSKJr  \R.                  " SS5      rSrSrSrSR9                  \\S9r " S S\R<                  5      r " S S\R<                  5      r  " S S\R<                  5      r! " S S\"5      r# " S S5      r$SS jr%SS  jr&S! r'S" r(S# r)S$ r*SS% jr+S& r,SS' jr-S( r.SS) jr/SS* jr0SS+ jr1 SS, jr2SS- jr3SS. jr4SS/ jr5SS0 jr6SS1 jr7S2 r8SS3 jr9SS4 jr:S5 r;S6 r<S7 r=S8 r>S9 r?SS: jr@SS; jrASS< jrBSS= jrC    SS> jrDSS? jrESS@ jrFSA rGSSB jrHSSC jrI SSD jrJSE rKGS SF jrLSSG jrMSSH jrNSSI jrOSSJ jrPSSK jrQSSL jrRSSM jrSSN rTSSO jrUSSP jrVSSQ jrWSSR jrXSSS jrYSST jrZ SSU jr[SSV jr\ SSW jr] SSX jr^SSY jr_SSZ jr`SS[ jraSS\ jrb SS]\R                  S^\dS_S4S` jjreSa rfSb rgSc rhSd riSSe jrjSSf jrkGSSg jrlSSh jrmSSi jrnSSj jroSk rpSSl jrqSSm jrrSSn jrsSSo jrtGSSp jruGSSq jrvSr rwSs rxGSSt jrySu rzSv r{Sw r|Sx r}Sy r~Sz rS{ rS| rS} rS~ rS rS rS rS rSrSrSS jrSrSrSS jrS rS rS rGS S jrS rS rS rS rGS S jrS rS rS rS rS rS rS rS rS r GSS jrS rS rSS jrSS jrSS jr GSS jrSS jr SS jrSS jrS rS r GS S jr GS S jrS rS rSS jrSS jrS r SS jrSr/ SQr/ SQr/ SQrS r/ SQrS rS rS rSrSrSrSrSrSrSrS rSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jr  GSS jr SS jrSS jrS rSS jrSS jrSS jrSS jrSS jrS rSS jrSS jrGSS jrS rSS jrSS jrS rSS jrS rSS jrSS jrS rSS jr SS jrS rSS jrS rSS jrS rS rS rS rS rS rS rSS jrS rS rSS jrSS jrS rGS S jrGS S jrSS jrGS S jrGS S jrSS jrS r SS]\R                  S\dS_S4S jjrS rS Gr g(  a  Common flags for some of the SQL commands.

Flags are specified with functions that take in a single argument, the parser,
and add the newly constructed flag to that parser.

Example:

def AddFlagName(parser):
  parser.add_argument(
    '--flag-name',
    ... // Other flag details.
  )
    N)utils)storage_util)apis)actions)arg_parsers)base)parser_extensions)resource_args)	constants)
completers)
propertiessqlv1beta4	MYSQL_8_0z"(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})z([0-9]|[1-2][0-9]|3[0-2])z2{addr_part}(\.{addr_part}){{3}}(\/{prefix_part})?$)	addr_partprefix_partc                   (   ^  \ rS rSrU 4S jrSrU =r$ )DatabaseCompleter6   c                 :   > [         [        U ]
  " SSSSS/S.UD6  g )Nzsql.databasesr   zsql databases list --uriinstance
collectionapi_versionlist_commandflags )superr   __init__selfkwargs	__class__s     +lib/googlecloudsdk/command_lib/sql/flags.pyr   DatabaseCompleter.__init__8   s0    	
T+ "/l	
     r   __name__
__module____qualname____firstlineno__r   __static_attributes____classcell__r#   s   @r$   r   r   6        r&   r   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )InstanceCompleterB   c                 4   > [         [        U ]
  " SSSS.UD6  g )Nzsql.instanceszsql instances list --uri)r   r   r   )r   r1   r   r    s     r$   r   InstanceCompleter.__init__D   s(    	
T+ "/ r&   r   r'   r.   s   @r$   r1   r1   B   s     r&   r1   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )UserCompleterL   c                 :   > [         [        U ]
  " SS SSS/S.UD6  g )Nr   z0sql users list --flatten=name[] --format=disabler   r   r   )r   r6   r   r    s     r$   r   UserCompleter.__init__N   s/    	-' Gl	
 r&   r   r'   r.   s   @r$   r6   r6   L   r/   r&   r6   c                       \ rS rSrS rSrg)_MajorVersionMatchListX   c                 .   ^ [        U4S jU  5       5      $ )zBCheck if <database_version> begins with a major_version in <self>.c              3   F   >#    U  H  nTR                  U5      v   M     g 7fN)
startswith).0major_versiondatabase_versions     r$   	<genexpr>6_MajorVersionMatchList.__contains__.<locals>.<genexpr>\   s#      HL}##M22s   !)any)r!   rC   s    `r$   __contains__#_MajorVersionMatchList.__contains__Z   s     HL  r&   r   N)r(   r)   r*   r+   rG   r,   r   r&   r$   r;   r;   X   s    r&   r;   c                       \ rS rSrSS jrSrg)ServerCertForPrintb   Nc                 (    Xl         X l        X0l        g r?   )ssl_certstatusca_cert)r!   rM   rN   rO   s       r$   r   ServerCertForPrint.__init__d   s    MKLr&   )rO   rM   rN   r?   )r(   r)   r*   r+   r   r,   r   r&   r$   rJ   rJ   b   s    r&   rJ   c                 D    U R                  SSS[        U(       d  SOSS9  g )N
--instance-iTCloud SQL instance ID./Cloud SQL instance ID or "-" for all instances.required	completerhelpadd_argumentr1   parsersupport_wildcard_instancess     r$   AddInstancer_   j   s,    
!' $<  r&   c                 D    U R                  SSS[        U(       d  SOSS9  g )NrR   rS   FrT   rU   rV   rZ   r\   s     r$   AddOptionalInstancera   v   s,    
!' $<  r&   c                 .    U R                  S[        SS9  g)z*Add the 'instance' argument to the parser.r   rT   rX   rY   NrZ   r]   s    r$   AddInstanceArgumentre      s    -4L  r&   c           	      j    U R                  S[        R                  " S[        R                  SS9SS9  g )Nz--storage-auto-increase-limit
   T	unlimitedzAllows you to set a maximum storage capacity, in GB. Automatic increases to your capacity will stop once this limit has been reached. Default capacity is *unlimited*.typerY   )r[   r   
BoundedIntsysmaxsizerd   s    r$   AddInstanceResizeLimitro      s3    %!!"ckkTB7	  r&   c                 .    U R                  S[        SS9  g )NusernamezCloud SQL username.rc   )r[   r6   rd   s    r$   AddUsernamerr      s    M0E  r&   c                 $    U R                  SSS9  g)z$Add the '--host' flag to the parser.z--hosta  Cloud SQL user's hostname expressed as a specific IP address or address range. `%` denotes an unrestricted hostname. Applicable flag for MySQL instances; ignored for all other engines. Note, if you connect to your instance using IP addresses, you must add your client IP address as an authorized address, even if your hostname is unrestricted. For more information, see [Configure IP](https://cloud.google.com/sql/docs/mysql/configure-ip).rY   Nr[   rd   s    r$   AddHostrv      s    H  r&   c                 \    [         R                  " SSSSS.SUS9nUR                  U 5        g)	z1Add the '--availability-type' flag to the parser.z--availability-typeFzProvides high availability and is recommended for production instances; instance automatically fails over to another zone within your selected region.z5Provides no failover capability. This is the default.)regionalzonalz Specifies level of availability.)rW   choiceshelp_strhiddenNr   ChoiceArgumentAddToParser)r]   r|   availabilty_type_flags      r$   AddAvailabilityTyper      sA    --= K 2 ##F+r&   c                 $    U R                  SSS9  g )Nz
--passwordzCloud SQL user's password.rt   ru   rd   s    r$   AddPasswordr      s    l)EFr&   c                 (    U R                  SSSUS9  g)z*Add the root password field to the parser.z--root-passwordFzRoot Cloud SQL user's password.rW   rY   r|   Nru   r]   r|   s     r$   AddRootPasswordr      s!    ,	  r&   c                 &    U R                  SSSS9  g )Nz--prompt-for-password
store_truezPrompt for the Cloud SQL user's password with character echo disabled. The password is all typed characters up to but not including the RETURN or ENTER key.actionrY   ru   rd   s    r$   AddPromptForPasswordr      s     /	  r&   c                 &    U R                  SUSS9  g )Nz--typezCloud SQL user's type. It determines the method to authenticate the user during login. See the list of user types at https://cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/SqlUserTyperW   rY   ru   r]   rW   s     r$   AddTyper      s     %	  
r&   c           	      X    [         R                  " SSSS/S USS9R                  U 5        g )Nz--activation-policyFalwaysneveraA  Activation policy for this instance. This specifies when the instance should be activated and is applicable only when the instance state is `RUNNABLE`. The default is `always`. More information on activation policies can be found here: https://cloud.google.com/sql/docs/mysql/start-stop-restart-instance#activation_policy)rW   rz   defaultr|   r{   r}   r   s     r$   AddActivationPolicyr      s6    !b Kr&   c                 D    U R                  SSU[        R                  S9  g )Nz--assign-ipzAssign a public IP address to the instance. This is a public, externally available IPv4 address that you can use to connect to your instance when properly authorized.)rY   r|   r   r[   r   StoreTrueFalseActionr   s     r$   AddAssignIpr      s+    5 --  	r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFa  Enable a private path for Google Cloud services. This flag specifies whether the instance is accessible to internal Google Cloud services such as BigQuery. This is only applicable to MySQL and PostgreSQL instances that don't use public IP. Currently, SQL Server isn't supported.r   )z--enable-google-private-path_GetKwargsForBoolFlagr[   r]   show_negated_in_helpr|   r"   s       r$   AddEnableGooglePrivatePathr     s=     !!56&$H  	r&   c                 j    SnU(       a  US-  nU R                  S[        R                  " SS9SSUS9  g )	NzFirst Generation instances only. List of project IDs for App Engine applications running in the Standard environment that can access this instance.A

The value given for this argument *replaces* the existing list.z--authorized-gae-apps   
min_lengthAPPFrk   metavarrW   rY   r[   r   ArgListr]   updatehelp_s      r$   AddAuthorizedGAEAppsr     sM    " 
 	ME 	!,  r&   c           
          [         R                  " [        S5      nSnU(       a  US-  nU R                  S[         R                  " SUS9SS/ UUS	9  g
)z&Adds the `--authorized-networks` flag.z[Must be specified in CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).zThe list of external networks that are allowed to connect to the instance. Specified in CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).r   z--authorized-networksr   )r   element_typeNETWORKF)rk   r   rW   r   rY   r|   N)r   RegexpValidator_CIDR_REGEXr[   r   )r]   r   r|   cidr_validatorr   s        r$   AddAuthorizedNetworksr   .  sm    ..6.2 
 	ME 	!.I  r&   c                 (    U R                  SSSUS9  g )Nz--backup-start-timeFzPStart time of daily backups, specified in the HH:MM format, in the UTC timezone.r   ru   r   s     r$   AddBackupStartTimer   K  s%       r&   c                 D    SnU(       a  US-  nU R                  SSUUS9  g )NzChoose where to store your backups. Backups are stored in the closest multi-region location to you by default. Only customize if needed.z+ Specify empty string to revert to default.z--backup-locationFr   ru   )r]   allow_emptyr|   	help_texts       r$   AddBackupLocationr   W  s<    K  >>I	  r&   c           	      ,    U R                  SSSSUSS9  g )Nz--backupFr   TzEnables daily backup.rW   r   r   r|   rY   ru   r   s     r$   	AddBackupr   f  s'    "  r&   c                 *    U R                  SSSS SS9  g )Nz--enable-final-backupFr   FEnables the final backup to be taken at the time of instance deletion.)rW   r   r   rY   ru   rd   s    r$   AddEnableFinalBackupr   q  s&      	r&   c                 F    U R                  SS[        R                  USS9  g )Nz--final-backupFr   )rW   r   r|   rY   r   r   s     r$   AddFinalBackupr   ~  s,    --  	r&   c           	      V    SnU R                  S[        R                  " SSSS9SUUS9  g )NzSpecifies number of days to retain final backup. The valid range is between 1 and 365. For instances managed by BackupDR, the valid range is between 1 day and 99 years. Default value is 30 days.z--final-backup-retention-daysr   i'  Frh   )rk   rW   r|   rY   r[   r   rl   r]   r|   r   s      r$   AddFinalbackupRetentionDaysr     s@    B 
 	%!!!X?  r&   c           
      R    U R                  SS[        R                  " SSSS9SSS9  g)	ztAdd the flag to specify the retention days of the backup.

Args:
  parser: The current parser to add this argument.
z
--ttl-daysFr   m  rh   Nz Specifies the number of days to retain the final backup. The valid range is between 1 and 365. The Default value is 30 days. Provide either ttl-days or expiry-time.rW   rk   r   rY   r   rd   s    r$   AddBackupTtlDaysr     s7     	!!!SE:5  
r&   c                 &    U R                  SSSS9  g )Nz--final-backup-descriptionFz<Provides description for the final backup going to be taken.r   ru   rd   s    r$   AddFinalbackupDescriptionr     s    "I  r&   c                 &    U R                  SSSS9  g )Nz--backup-descriptionFz6Provides description for the backup going to be taken.r   ru   rd   s    r$   AddBackupDescriptionr     s    C  r&   c                 X    U R                  S[        R                  R                  SSS9  g )Nz--final-backup-expiry-timeFzSpecifies the time at which the final backup will expire. Maximum time allowed is 365 days. For instances managed by BackupDR, the maximum time allowed is 99 years. Format: YYYY-MM-DDTHH:MM:SS.rk   rW   rY   r[   r   DatetimeParserd   s    r$    AddFinalBackupExpiryTimeArgumentr     s0    "%%L  	r&   c                 Z    U R                  SS[        R                  R                  SSS9  g)zuAdd the flag to specify the expiration time of the backup.

Args:
  parser: The current parser to add this argument.
z--expiry-timeFNzSpecifies when the final backup expires. The Maximum time allowed is 365 days from now. Format: YYYY-MM-DDTHH:MM:SS. Provide either ttl-days or expiry-time.r   r   rd   s    r$   AddBackupExpiryTimer     s4     	%%5  
r&   c           	      T    SnU R                  S[        R                  " SSSS9UUS9  g )NzHow many backups to keep. The valid range is between 1 and 365. Default value is 7 for Enterprise edition instances. For Enterprise_Plus, default value is 15. Applicable only if --no-backups is not specified.z--retained-backups-countr   r   Frh   rk   rY   r|   r   r   s      r$   AddRetainedBackupsCountr     s<      	 !!!SE:	  r&   c           	      T    SnU R                  S[        R                  " SSSS9UUS9  g )Na  How many days of transaction logs to keep. The valid range is between 1 and 35. Only use this option when point-in-time recovery is enabled. If logs are stored on disk, storage size for transaction logs could increase when the number of days for log retention increases. For Enterprise, default and max retention values are 7 and 7 respectively. For Enterprise_Plus, default and max retention values are 14 and 35.z--retained-transaction-log-daysr   #   Frh   r   r   r   s      r$   AddRetainedTransactionLogDaysr     s<    (  	'!!!R59	  r&   c           	      l    SnU(       a  US-  nU R                  S[        R                  " SS9SSUUS9  g	)
z!Adds the `--database-flags` flag.a  Comma-separated list of database flags to set on the instance. Use an equals sign to separate flag name and value. Flags without values, like skip_grant_tables, can be written out without a value after, e.g., `skip_grant_tables=`. Use on/off for booleans. View the Instance Resource API for allowed flags. (e.g., `--database-flags max_allowed_packet=55555,skip_grant_tables=,log_output=1`)r   z--database-flagsr   r   
FLAG=VALUEFrk   r   rW   rY   r|   Nr[   r   ArgDict)r]   r   r|   r   s       r$   AddDatabaseFlagsr     sP    *  	ME 	!,  r&   c           	      T    SnU R                  S[        R                  " SS9SSUUS9  g)	zAdds the `--tags` flag.zComma-separated list of tags to set on the instance. Use an equals signto separate tag name and value.(e.g., `--tags tag1:value1,tag2=value2`)z--tagsr   r   z	TAG=VALUEFr   Nr   )r]   r|   r   s      r$   AddTagsr     s?    P  	!,  r&   c           	          / SQnU(       a	  [         S-   OSnSU-   S-   S-   nU(       a  US-  nU(       a  Xt-  nU R                  SS	U(       a  [         OS
U(       a  [        U5      OS
UUS9  g
)zGAdds `--database-version` to the parser with choices restricted or not.)	MYSQL_5_6	MYSQL_5_7r   	MYSQL_8_4POSTGRES_9_6POSTGRES_10POSTGRES_11POSTGRES_12POSTGRES_13POSTGRES_14POSTGRES_15POSTGRES_16POSTGRES_17POSTGRES_18SQLSERVER_2017_EXPRESSSQLSERVER_2017_WEBSQLSERVER_2017_STANDARDSQLSERVER_2017_ENTERPRISESQLSERVER_2019_EXPRESSSQLSERVER_2019_WEBSQLSERVER_2019_STANDARDSQLSERVER_2019_ENTERPRISESQLSERVER_2022_EXPRESSSQLSERVER_2022_WEBSQLSERVER_2022_STANDARDSQLSERVER_2022_ENTERPRISEz	 is used.zno changes occur.z<The database engine type and versions. If left unspecified, z& See the list of database versions at zRhttps://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/SqlDatabaseVersion.zZ Apart from listed major versions, DATABASE_VERSION also accepts supported minor versions.z--database-versionFN)rW   r   rz   rY   r|   )!DEFAULT_INSTANCE_DATABASE_VERSIONr[   r;   )r]   restrict_choicesr|   support_default_versionadditional_help_textrz   help_text_unspecified_partr   s           r$   AddDatabaseVersionr  *  s    '@ 
! (+5  E"#01 	]]  	%I %I	  01A$W-t  	r&   c                 H    SnU R                  S[        R                  UUS9  g)zVAdds `--include-replicas-for-major-version-upgrade` to the parser with boolean choice.a  Enable the major version upgrade of replicas when the in-place major version upgrade of a primary instance is initated with `--database-version`. Use `--include-replicas-for-major-version-upgrade`  to enable and `--no-include-replicas-for-major--version-upgrade` to disable.z,--include-replicas-for-major-version-upgrader   rY   r|   Nr   r   s      r$   (AddIncludeReplicasForMajorVersionUpgrader  s  s4    G  	4--	  r&   c                 2    U R                  S[        SSUS9  g )Nz--cpuFa  Whole number value indicating how many cores are desired in the machine. Both --cpu and --memory must be specified if a custom machine type is desired, and the --tier flag must be omitted.--cpu and --memory flags are not compatible with the Enterprise Plus edition. These flags should not be used when creating an Enterprise Plus edition, as the machine configuration is determined by the --tier flag instead.rk   rW   rY   r|   r[   intr   s     r$   AddCPUr    s(    "   r&   c                 >    U (       a  S[         R                  0$ SS S.$ )Nr   r   )r   r   )r   r   )r   s    r$   r   r     s'    +22  #t44r&   c                 &    U R                  SSUS9  g )N--collationzwCloud SQL server-level collation setting, which specifies the set of rules for comparing characters in a character set.rY   r|   ru   r   s     r$   AddInstanceCollationr    s#    J   r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFzAllows for data recovery from a specific point in time, down to a fraction of a second. Must have automatic backups enabled to use. Make sure storage can support at least 7 days of logs.r   )z--enable-bin-logr   r   s       r$   AddEnableBinLogr    s;     !56&
C 
 	
r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFzAllows for data recovery from a specific point in time, down to a fraction of a second, via write-ahead logs. Must have automatic backups enabled to use. Make sure storage can support at least 7 days of logs.r   )z--enable-point-in-time-recoveryr   r   s       r$   AddEnablePointInTimeRecoveryr    s<     !!56&'
  	r&   c                 L   U R                  SSS9nUR                  SS[        R                  SS9  UR                  S[        R
                  " S	S
S9SSS9  U R                  SSS9nUR                  SSSS9  UR                  SSS9nUR                  SSS9  UR                  SSSS9  UR                  SS[        R                  R                  SS9  UR                  SSS9nUR                  SSS S9  UR                  S!SS9nUR                  S"SS#S9  UR                  S$SS%S9  g&)'zDAdd flags to the parser for creating an external master and replica.Fz;Options for creating a wrapper for an external data source.r   z--source-ip-addressTzQPublic IP address used to connect to and replicate from the external data source.)rW   rk   rY   z--source-portr   i  lower_boundupper_boundi  zKPort number used to connect to and replicate from the external data source.rk   r   rY   zDOptions for creating an internal replica of an external data source.z--master-usernamez9Name of the replication user on the external data source.zPassword group.)mutexz--master-passwordz=Password of the replication user on the external data source.rt   z--prompt-for-master-passwordr   zPrompt for the password of the replication user on the external data source. The password is all typed characters up to but not including the RETURN or ENTER key.r   z--master-dump-file-pathzPath to the MySQL dump file in Google Cloud Storage from which the seed import is made. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported.zClient and server credentials.)rW   z--master-ca-certificate-pathzPath to a file containing the X.509v3 (RFC5280) PEM encoded certificate of the CA that signed the external data source's certificate.zClient credentials.z--client-certificate-pathzPath to a file containing the X.509v3 (RFC5280) PEM encoded certificate that will be used by the replica to authenticate against the external data source.z--client-key-pathzyPath to a file containing the unencrypted PKCS#1 or PKCS#8 PEM encoded private key associated with the clientCertificate.N)		add_groupr[   compute_utilsIPV4Argumentr   rl   r   ObjectReferenceFromArgument)r]   external_master_groupinternal_replica_groupmaster_password_groupcredential_groupclient_credential_groups         r$   AddExternalMasterGroupr&    s    !**H +  $$%%& %  $$!!aUC" % 	 "++
P ,  %%F &  1::t ;  $$J %  $$$:	 %  %%''44 & 
 ,55& 6  $	    -66e 7  &&!.	 '  &&	 ' r&   c                 F    [        U5      nU R                  "  SSSS.UD6  g )NFz,Whether the promote operation is a failover.r   )z
--failoverr   r]   r   r"   s      r$   AddFailoverFlagr)  8  s3     !56&9 		r&   c                 (    U R                  SSUSS9  g )Nz--failover-replica-nameFz7Also create a failover replica with the specified name.rW   r|   rY   ru   r   s     r$   AddFailoverReplicaNamer,  B  s!    D	  r&   c                 (    U R                  SSUSS9  g )Nz--failover-dr-replica-nameFzSet a Disaster Recovery (DR) replica with the specified name for the primary instance. This must be one of the existing cross region replicas of the primary instance. Flag is only available for MySQL and PostgreSQL database instances.r+  ru   r   s     r$   AddFailoverDrReplicaNamer.  K  s#    "/  
r&   c                 H    [        S5      nU R                  "  SSUSS.UD6  g )NFzzClear the DR replica setting for the primary instance. Flag is only available for MySQL and PostgreSQL database instances.r+  )z --clear-failover-dr-replica-namer   r]   r|   r"   s      r$   AddClearFailoverDrReplicaNamer1  Y  s8     '&(	C	 		r&   c                 (    U R                  SSUSS9  g )Nz--master-instance-nameFzName of the instance which will act as master in the replication setup. The newly created instance will be a read replica of the specified master instance.r+  ru   r   s     r$   AddMasterInstanceNamer3  g  s#    6  	r&   c           	      j    U R                  SS[        R                  " 5       (       a  / SQOS/S USS9  g )Nz--storage-typeF)SSDHDDHYPERDISK_BALANCEDr7  zKThe storage type for the instance, determined by the selected machine type.)rW   rz   r   r|   rY   )r[   r   IsDefaultUniverser   s     r$   AddStorageTyper9  t  sB     ))++ /$%  r&   c                 ,    U R                  SSS/USS9  g )Nz--replica-typeREADFAILOVERzThe type of replica to create.)rz   r|   rY   ru   r   s     r$   AddReplicaTyper=    s&    z"+	  r&   c           	      ,    U R                  SSSS USS9  g )Nz--require-sslFr   z3Specified if users connecting over IP must use SSL.r   ru   r   s     r$   AddRequireSslr?    s'    @  r&   c                 &    U R                  SSSS9  g )Nz--follow-gae-appFzFirst Generation instances only. The App Engine app this instance should follow. It must be in the same region as the instance. WARNING: Instance may be restarted.r   ru   rd   s    r$   AddFollowGAEApprA    s     >	  r&   c                 X    [         R                  " SSSSS.SUS9R                  U 5        g )Nz--maintenance-release-channelzweek5 updates release after the production updates. Use the week5 channel to receive a 5 week advance notification about the upcoming maintenance, so you can prepare your application for the release.zMProduction updates are stable and recommended for applications in production.zPreview updates release prior to production updates. You may wish to use the preview channel for dev/test applications so that you can preview their compatibility with your application prior to the production release.)week5
productionpreviewzWhich channel's updates to apply during the maintenance window. If not specified, Cloud SQL chooses the timing of updates to your instance.)rz   r{   r|   r}   r   s     r$   AddMaintenanceReleaseChannelrF    s>    %E0+(& 56 Kr&   c                     U R                  S[        R                  R                  [        R                  R                  SUS9  g )Nz--maintenance-window-dayz5Day of week for maintenance window, in UTC time zone.)rz   rk   rY   r|   )r[   r   	DayOfWeekDAYSr   r   s     r$   AddMaintenanceWindowDayrJ    s<     ##((  &&B  r&   c                 N    U R                  S[        R                  " SSS9SUS9  g )Nz--maintenance-window-hourr      r  z5Hour of day for maintenance window, in UTC time zone.r   r   r   s     r$   AddMaintenanceWindowHourrM    s.    !!!aR@B	  r&   c                 &    U R                  SSUS9  g )Nz$--deny-maintenance-period-start-datezEDate when the deny maintenance period begins, that is ``2020-11-01''.r  ru   r   s     r$   !AddDenyMaintenancePeriodStartDaterO    s"    ,   r&   c                 &    U R                  SSUS9  g )Nz"--deny-maintenance-period-end-datezCDate when the deny maintenance period ends, that is ``2021-01-10''.r  ru   r   s     r$   AddDenyMaintenancePeriodEndDaterQ    s    *
O  r&   c                 &    U R                  SSUS9  g )Nz--deny-maintenance-period-timezKTime when the deny maintenance period starts or ends, that is ``05:00:00''.r  ru   r   s     r$   AddDenyMaintenancePeriodTimerS    s"    &   r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFzPEnable query insights feature to provide query and query plan
        analytics.r   )z(--insights-config-query-insights-enabledr   r   s       r$   %AddInsightsConfigQueryInsightsEnabledrU    s:     !!56&0 	r&   c           	      P    U R                  SS[        R                  " SSS9SUS9  g )Nz%--insights-config-query-string-lengthF   i r  a/  Sets the default query length limit. For Cloud SQL Enterprise edition,
      the range is from 256 to 4500 (in bytes) and the default query length is 1024
      bytes. For Cloud SQL Enterprise Plus edition, the range is from 1024 to 100,000
      (in bytes) and the default query length is 10,000 bytes.rW   rk   rY   r|   r   r   s     r$   "AddInsightsConfigQueryStringLengthrY    s6    -!!cvFB   	r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFzLAllow application tags to be recorded by the query insights
        feature.r   )z)--insights-config-record-application-tagsr   r   s       r$   &AddInsightsConfigRecordApplicationTagsr[    s:     !!56&1 	r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFzNAllow the client address to be recorded by the query insights
        feature.r   )z'--insights-config-record-client-addressr   r   s       r$   $AddInsightsConfigRecordClientAddressr]  !  s:     !!56&/ 	r&   c           	      P    U R                  SS[        R                  " SSS9SUS9  g )Nz(--insights-config-query-plans-per-minuteFr      r  zaNumber of query plans to sample every minute.
        Default value is 5. Allowed range: 0 to 20.rX  r   r   s     r$   $AddInsightsConfigQueryPlansPerMinuter`  /  s3    0!!aR@7  r&   c                 P    U R                  S[        R                  " 5       SSUS9  g )Nz--memoryFa  Whole number value indicating how much memory is desired in the machine. A size unit should be provided (eg. 3072MiB or 9GiB) - if no units are specified, GiB is assumed. Both --cpu and --memory must be specified if a custom machine type is desired, and the --tier flag must be omitted. --cpu and --memory flags are not compatible with the Enterprise Plus edition. These flags should not be used when creating an Enterprise Plus edition, as the machine configuration is determined by the --tier flag instead.r	  r[   r   
BinarySizer   s     r$   	AddMemoryrd  :  s2    !!#E   r&   c                 &    U R                  SSUS9  g)z(Adds the `--network` flag to the parser.z	--networkaC  Network in the current project that the instance will be part of. To specify using a network with a shared VPC, use the full URL of the network. For an example host project, 'testproject', and shared network, 'testsharednetwork', this would use the form: `--network`=`projects/testproject/global/networks/testsharednetwork`r  Nru   r   s     r$   
AddNetworkrf  M  s"       r&   c                 *    U R                  SSSSUS9  g)z.Adds the `--clear-network` flag to the parser.z--clear-networkFr   zClears the network setting. This is useful to restore a backup to a different project or region where the original network configuration isn't available.rW   r   rY   r|   Nru   r   s     r$   AddClearNetworkri  ^  s(    ,   
r&   r]   r|   returnc                 (    U R                  SSSUS9  g)z6Adds the `--clear-disk-encryption` flag to the parser.z--clear-disk-encryptionFz'Disables CMEK in the restored instance.r   Nru   r   s     r$   AddClearDiskEncryptionrl  m  s#     	4	  r&   c                 &    U R                  SSSS9  g)z8Adds the `--allocated-ip-range-name` flag to the parser.z--allocated-ip-range-nameFzThe name of the IP range allocated for a Cloud SQL instance with private network connectivity. For example: 'google-managed-services-default'. If set, the instance IP is created in the allocated range represented by this name.r   Nru   rd   s    r$   AddAllocatedIpRangeNamern  y  s!    !E	  	r&   c                 &    U R                  SSSS9  g)z4Adds the `--maintenance-version` flag to the parser.z--maintenance-versionFz0The desired maintenance version of the instance.r   Nru   rd   s    r$   AddMaintenanceVersionrp    s    =  r&   c                 (    U R                  SSSSS9  g)z;Adds the `--simulate-maintenance-event` flag to the parser.z--simulate-maintenance-eventr   FzSimulate a maintenance event without changing the version. Only applicable to instances that support near-zero downtime planned maintenance.r   rW   rY   Nru   rd   s    r$   AddSimulateMaintenanceEventrs    s#    $  	r&   c                 (    U R                  SSSSS9  g)z9Adds the `--reconcile-psa-networking` flag to the parser.z--reconcile-psa-networkingr   FzReconciles the instance's PSA networking configuration. If the instance is already on a PSA network, the DNS zone and records associated with the PSA write endpoint are either added if missing or updated if incorrect.rr  Nru   rd   s    r$   AddReconcilePsaNetworkingru    s#    "%  
r&   c           	          U R                  SSSUS9  U R                  SS[        R                  " SS9SS	US
9  U R                  SS[        R                  " SS9SSUS
9  g)z2Adds SQL Server audit related flags to the parser.z--audit-bucket-pathFzThe location, as a Cloud Storage bucket, to which audit files are uploaded. The URI is in the form gs://bucketName/folderName. Only available for SQL Server instances.r   z--audit-retention-intervalN7d)r  zwThe number of days for audit log retention on disk, for example, 3dfor 3 days. Only available for SQL Server instances.r   rk   rW   rY   r|   z--audit-upload-interval720mzvHow often to upload audit logs (audit files), for example, 30mfor 30 minutes. Only available for SQL Server instances.r[   r   Durationr   s     r$   AddSqlServerAuditr|    s    0   	 	"D1A   
 	F3E   
r&   c           	      X    [         R                  " SSSS/S SUS9R                  U 5        g )Nz--replicationFsynchronousasynchronouszCType of replication this instance uses. The default is synchronous.rW   rz   r   r{   r|   r}   r   s     r$   AddReplicationr    s3    n-
O	 Kr&   c                 F    [        U5      nU R                  "  SSUS.UD6  g )Na  Storage size can be increased, but it cannot be decreased; storage increases are permanent for the life of the instance. With this setting enabled, a spike in storage requirements can result in permanently increased storage costs for your instance. However, if an instance runs out of available space, it can result in the instance going offline, dropping existing connections. This setting is enabled by default.r  )z--storage-auto-increaser   r   s       r$   AddStorageAutoIncreaser    s7     !56&=  	r&   c           	      R    U R                  S[        R                  " SSS/S9SUS9  g )N--storage-size10GB65536GBGBr  r  suggested_binary_size_scaleszAmount of storage allocated to the instance. Must be an integer number of GB. The default is 10GB. Information on storage limits can be found here: https://cloud.google.com/sql/docs/quotas#storage_limitsr   rb  r   s     r$   AddStorageSizer    s<    !!(,vD
   r&   c                 T    SnU R                  S[        R                  " SSS9SUUS9  g )NzIndicates how many IOPS to provision for the data disk. This sets the number of I/O operations per second that the disk can handle.z--storage-provisioned-iopsr   Tr  ri   Fr	  r   r   s      r$   AddStorageProvisionedIopsr    s>    G  	"!!a4@  r&   c                 T    SnU R                  S[        R                  " SSS9SUUS9  g )NzIndicates how much throughput to provision for the data disk. This sets the throughput in MB per second that the disk can handle.z --storage-provisioned-throughputr   Tr  Fr	  r   r   s      r$   AddStorageProvisionedThroughputr    s>    C  	(!!a4@  r&   c           	      R    U R                  S[        R                  " SSS/S9SSS9  g )	Nr  r  r  r  r  TzmThe target storage size must be an integer that represents the number of GB. For example, --storage-size=10GBr   rb  rd   s    r$   AddStorageSizeForStorageShrinkr     s;    !!(,v
 <  r&   c                 D    SnU(       a  US-  nU R                  SSSX2S9  g)z!Adds '--tier' flag to the parser.a8  Machine type for a shared-core instance e.g. ``db-g1-small''. For all other instances, instead of using tiers, customize your instance by specifying its CPU and memory. You can do so with the `--cpu` and `--memory` flags. Learn more about how CPU and memory affects pricing: https://cloud.google.com/sql/pricing.z% WARNING: Instance will be restarted.z--tierz-tFr   Nru   )r]   is_patchr|   r   s       r$   AddTierr  0  s8    .  88Iu9  r&   c           	      \    [         R                  " SSSS/SSUS9nUR                  U 5        g)z$Adds '-edition-' flag to the parser.z	--editionF
enterprisezenterprise-plusNz,Specifies the edition of Cloud SQL instance.r  r}   )r]   r|   edition_flags      r$   
AddEditionr  B  s:    $$./=, 6"r&   c           
          U R                  5       nUR                  SS[        R                  " SSSS9UUS9  [	        X1US9  g)zDAdds the mutually exclusive `--gce-zone` and `--zone` to the parser.z
--gce-zoneFz^Flag `{flag_name}` is deprecated and will be removed by release 255.0.0. Use `--zone` instead.)removedwarnrh  r|   N)add_mutually_exclusive_groupr[   r   DeprecationActionAddZonesPrimarySecondaryr]   r   r|   
zone_groups       r$   AddZoner  O  sV    224*&&
7	    :@r&   c                 j    U R                  SUS9nUR                  SSXS9  UR                  SSSUS9  g)z7Adds the `--zone` and `--secondary-zone` to the parser.F)rW   r|   z--zoner   z--secondary-zonezRPreferred secondary Compute Engine zone (e.g. us-central1-a, us-central1-b, etc.).Nr  r[   r  s       r$   r  r  d  sX     v>*Y   7   r&   c                 <    U R                  SSU(       a  SOS SUS9  g )Nz--regionFz
us-centralzRegional location (e.g. asia-east1, us-east1). See the full list of regions at https://cloud.google.com/sql/docs/instance-locations.rW   r   rY   r|   ru   )r]   r|   specify_default_regions      r$   	AddRegionr  v  s-    4l$B   
r&   c                 N    U R                  US9n[        UUUS9  [        USUS9  g )Nr  r|   r  zHPreferred Compute Engine zone (e.g. us-central1-a, us-central1-b, etc.).)r   r|   )r  r  r  )r]   r|   r  location_groups       r$   AddLocationGroupr    s=    66f6E.3
 
" r&   c                 .    U R                  S[        SS9  g )NdatabasezCloud SQL database name.rc   )r[   r   rd   s    r$   AddDatabaseNamer    s    -4N  r&   c                 $    U R                  SSS9  g )Nz	--charsetzCloud SQL database charset setting, which specifies the set of symbols and encodings used to store the data in your database. Each database version may support a different set of charsets.rt   ru   rd   s    r$   
AddCharsetr    s    G  r&   c                 6    U R                  SU=(       d    SS9  g )Nr  a  Cloud SQL database collation setting, which specifies the set of rules for comparing characters in a character set. Each database version may support a different set of collations. For PostgreSQL database versions, this may only be set to the collation of the template database.rt   ru   )r]   custom_helps     r$   AddCollationr    s'     b 
b  r&   c                 &    U R                  SSSS9  g )N	operation+z5An identifier that uniquely identifies the operation.)nargsrY   ru   rd   s    r$   AddOperationArgumentr    s    B  r&   c                 $    U R                  SUS9  g)?Add the 'uri' argument to the parser, with help text help_text.urirt   Nru   r]   r   s     r$   AddUriArgumentr    s    e),r&   c                 (    U R                  SUSSS9  g)r  r  ? )rY   r  r   Nru   r  s     r$   AddBakImportUriArgumentr    s    e)3Cr&   c                 &    U R                  SSSS9  g)z)Add the 'offload' argument to the parser.z	--offloadr   zOffload an export to a temporary instance. Doing so reduces strain on source instances and allows other operations to be performed while the export is in progress.r   Nru   rd   s    r$   AddOffloadArgumentr    s     -	  r&   c                 @    U R                  SSSR                  US9S9  g)z*Add the 'parallel' argument to the parser.z
--parallelr   zSPerform a parallel {operation}. This flag is only applicable to MySQL and Postgres.r  r   N)r[   formatr]   r  s     r$   AddParallelArgumentr    s,    !#  r&   c                 d    U R                  S[        R                  " SS9SR                  US9S9  g)z)Add the 'threads' argument to the parser.z	--threadsTrh   zSpecifies the number of threads to use for the parallel {operation}. If `--parallel` is specified and this flag is not provided, Cloud SQL uses a default thread count to optimize performance.r  rj   N)r[   r   rl   r  r  s     r$   AddThreadsArgumentr    s:    !!D1F 	#  r&   c                 &    U R                  SSSS9  g)'Add the 'clean' argument to the parser.--cleanr   zInclude SQL statements (DROP <object>) required to drop database objects prior to import; corresponds to the clean flag for pg_dump. Only applies to PostgreSQL non-parallel exports.r   Nru   rd   s    r$   AddCleanExportArgumentr    s!    P	  r&   c                 &    U R                  SSSS9  g)+Add the 'if-exists' argument to the parser.--if-existsr   zInclude an SQL statement (IF EXISTS) with each drop statement produced by the clean flag; corresponds to the if-exists flag for pg_dump. Only applies to PostgreSQL non-parallel exports.r   Nru   rd   s    r$   AddIfExistsExportsArgumentr    s!    K	  r&   c                 &    U R                  SSSS9  g)r  r  r   zOption to clean (DROP) database objects before recreating them. corresponds to the clean flag for pg_restore. Only applies if --parallel is set. PostgreSQL only.r   Nru   rd   s    r$   AddCleanImportArgumentr    s     1	  r&   c                 &    U R                  SSSS9  g)r  r  r   zInclude an SQL statement (IF EXISTS) with each DROP statement produced by --clean; corresponds to the if-exists flag for pg_restore. Only applies if --parallel is set. PostgreSQL only.r   Nru   rd   s    r$   AddIfExistsImportsArgumentr    s!    M	  r&   c                 $    U R                  SSS9  g)z'Add the 'quote' argument to the parser.z--quoteaR  Specifies the character that encloses values from columns that have string data type. The value of this argument has to be a character in Hex ASCII Code. For example, "22" represents double quotes. This flag is only available for MySQL and Postgres. If this flag is not provided, double quotes character will be used as the default value.rt   Nru   rd   s    r$   AddQuoteArgumentr  "  s      
r&   c                 $    U R                  SSS9  g)z(Add the 'escape' argument to the parser.z--escapeaY  Specifies the character that should appear before a data character that needs to be escaped. The value of this argument has to be a character in Hex ASCII Code. For example, "22" represents double quotes. This flag is only available for MySQL and Postgres. If this flag is not provided, double quotes character will be used as the default value.rt   Nru   rd   s    r$   AddEscapeArgumentr  1  s      
r&   c                 $    U R                  SSS9  g)z6Add the 'fields-terminated-by' argument to the parser.z--fields-terminated-bya#  Specifies the character that splits column values. The value of this argument has to be a character in Hex ASCII Code. For example, "2C" represents a comma. This flag is only available for MySQL and Postgres. If this flag is not provided, a comma character will be used as the default value.rt   Nru   rd   s    r$   AddFieldsDelimiterArgumentr  @  s    (  	r&   c                 $    U R                  SSS9  g)z5Add the 'lines-terminated-by' argument to the parser.z--lines-terminated-bya  Specifies the character that split line records. The value of this argument has to be a character in Hex ASCII Code. For example, "0A" represents a new line. This flag is only available for MySQL. If this flag is not provided, a new line character will be used as the default value.rt   Nru   rd   s    r$   AddLinesDelimiterArgumentr  N  s      	r&   a  Database to which the import is made. The database needs to be created before importing. If not set, it is assumed that the database is specified in the file to be imported. If your SQL dump file includes a database statement, it will override the database set in this flag.z-A new database into which the import is made.c                 &    U R                  SSX!S9  g)a  Add the '--database' and '-d' flags to the parser.

Args:
  parser: The current argparse parser to add these database flags to.
  help_text: String, specifies the help text for the database flags.
  required: Boolean, specifies whether the database flag is required.

--database-dr   Nru   )r]   r   rW   s      r$   AddDatabaser  h  s     	lD8Lr&   zDatabase(s) from which the export is made. Information on requirements can be found here: https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/export#exportContext.databaseszDatabase from which the export is made. Information on requirements can be found here: https://cloud.google.com/sql/docs/sqlserver/admin-api/v1beta4/instances/export#exportContext.databasesc           	          U(       a6  U R                  SSS9nUR                  SS[        R                  " SS9SUS	9  gU R                  SS[        R                  " SS9SSUS
9  g)a  Add the '--database' and '-d' list flags to the parser.

Args:
  parser: The current argparse parser to add these database flags to.
  help_text: String, specifies the help text for the database flags.
  required: Boolean, specifies whether the database flag is required.
FTr  rW   r  r  r   r   DATABASErk   r   rY   r   N)r  r[   r   r   )r]   r   rW   groups       r$   AddDatabaseListr    s{     548E	  A.     A.  r&   c                 $    U R                  SUS9  g)z>Add the '--user' flag to the parser, with help text help_text.z--userrt   Nru   r  s     r$   AddUserr    s    hY/r&   c                     U R                  SSSS9nUR                  SSSS9  UR                  SSS	S9  UR                  SSS
9nUR                  SSS9  UR                  SSSS9  g)zAdd the flags for importing encrypted BAK files.

Add the --cert-path, --pvk-path, --pvk-password and
--prompt-for-pvk-password flags to the parser

Args:
  parser: The current argparse parser to add these database flags to.
Fz;Encryption info to support importing an encrypted .bak filer  rW   rY   --cert-pathTzPath to the encryption certificate file in Google Cloud Storage associated with the BAK file. The URI is in the form `gs://bucketName/fileName`.r   
--pvk-pathzPath to the encryption private key file in Google Cloud Storage associated with the BAK file. The URI is in the form `gs://bucketName/fileName`.r  --pvk-passwordz6The private key password associated with the BAK file.rt   --prompt-for-pvk-passwordr   zPrompt for the private key password associated with the BAK file with character echo disabled. The password is all typed characters up to but not including the RETURN or ENTER key.r   Nr  r]   	enc_grouppassword_groups      r$   AddEncryptedBakFlagsr    s     H  )
 (	   (	   &&TD&A.C   !=	  r&   c                 0    U R                  S[        SSS9  g)zAAdd the 'stripe_count' argument to the parser for striped export.z--stripe_countNz>Specifies the number of stripes to use for SQL Server exports.r  r
  rd   s    r$   AddBakExportStripeCountArgumentr    s!    K	  r&   c                 F    [        U5      nU R                  "  SSSS.UD6  g)z<Add the 'striped' argument to the parser for striped export.Fz,Whether SQL Server export should be striped.r   Nz	--stripedr   r(  s      r$   AddBakExportStripedArgumentr    3     !56&9 		r&   c                    [         R                  R                  R                  R                  R
                  [         R                  R                  R                  R                  R
                  [         R                  R                  R                  R                  R
                  /nSnU R                  SUS[         R                  R                  R                  R                  R
                  US9  g)9Add the 'bak-type' argument to the parser for bak import.zFType of bak file that will be exported, FULL or DIFF. SQL Server only.
--bak-typeFrz   rW   r   rY   N)	messagesExportContextBakExportOptionsValueBakTypeValueValuesEnumFULLnameDIFFTLOGr[   r]   rz   r   s      r$   AddBakExportBakTypeArgumentr
         22IINNSS22IINNSS22IINNSS' O  	$$::QQVV[[  r&   c                 *    U R                  SSSSSS9  g)z=Add the 'dfferential-base' argument to the parser for export.z--differential-baseFr   zlWhether the bak file export can be used as differential base for future differential backup. SQL Server onlyrW   r   r   rY   Nru   rd   s    r$   $AddBakExportDifferentialBaseArgumentr    s&    9  	r&   c                 X    U R                  S[        R                  R                  SSS9  g)zFAdd the 'export-log-start-time' argument to the parser for bak export.z--export-log-start-timeFzOptional flag. The start time of the transaction log files that are included in the export file. Use this flag to export transaction logs for Cloud SQL for SQL Server only. Format: YYYY-MM-DDTHH:MM:SSZ, UTC timezone only.r   Nr   rd   s    r$    AddBakExportLogStartTimeArgumentr    s/    %%6  
r&   c                 X    U R                  S[        R                  R                  SSS9  g)zCAdd the 'xport-log-end-time' argument to the parser for bak import.z--export-log-end-timeFzOptional flag. The end time of the transaction log files that are included in the export file. Use this flag to export transaction logs for Cloud SQL for SQL Server only. Format: YYYY-MM-DDTHH:MM:SSZ, UTC timezone only.r   Nr   rd   s    r$   AddBakExportLogEndTimeArgumentr    s/    %%6  
r&   c                 F    [        U5      nU R                  "  SSSS.UD6  g)z<Add the 'striped' argument to the parser for striped import.Fz,Whether SQL Server import should be striped.r   Nr  r   r(  s      r$   AddBakImportStripedArgumentr  %  r  r&   c                 *    U R                  SSSSSS9  g)zPAdd the 'no-recovery' argument to the parser for import with no recovery option.z--no-recoveryFr   zIWhether or not the SQL Server import is executed with NORECOVERY keyword.r  Nru   rd   s    r$   AddBakImportNoRecoveryArgumentr  0  s&    1  	r&   c                 *    U R                  SSSSSS9  g)z>Add the 'recovery-only' argument to the parser for bak import.z--recovery-onlyFr   zMWhether or not the SQL Server import skip download and bring database online.r  Nru   rd   s    r$    AddBakImportRecoveryOnlyArgumentr  >  s&    5  	r&   c                    [         R                  R                  R                  R                  R
                  [         R                  R                  R                  R                  R
                  [         R                  R                  R                  R                  R
                  /nSnU R                  SUS[         R                  R                  R                  R                  R
                  US9  g)r  zFType of bak file that will be imported. Applicable to SQL Server only.r  Fr   N)	r  ImportContextBakImportOptionsValuer  r  r  r  r  r[   r	  s      r$   AddBakImportBakTypeArgumentr  L  r  r&   c                 X    U R                  S[        R                  R                  SSS9  g)z8Add the 'stop-at' argument to the parser for bak import.z	--stop-atFzEquivalent to SQL Server STOPAT keyword. Used in transaction log import only. Transaction log import stop at this timestamp. Format: YYYY-MM-DDTHH:MM:SS.r   Nr   rd   s    r$   AddBakImportStopAtArgumentr  _  s/    %%)  
r&   c                 &    U R                  SSSS9  g)z=Add the 'stop-at-mark' argument to the parser for bak import.z--stop-at-markFzEquivalent to SQL Server STOPATMARK keyword. Used in transaction log import only. Transaction log import stop at the given mark. To stop at given LSN, use --stop-at-mark=lsn:xxx. r   Nru   rd   s    r$   AddBakImportStopAtMarkArgumentr   n  s     ?	  	r&   c                 *    U R                  SSSSSS9  g)z?Add the 'keep-encrypted' argument to the parser for bak import.z--keep-encryptedr   Fz:Whether or not to decrypt the imported encrypted BAK file.)r   rW   r   rY   Nru   rd   s    r$   !AddBakImportKeepEncryptedArgumentr"  |  s$    G  r&   c                 >   [         R                  R                  R                  R                  [         R                  R                  R
                  R                  [         R                  R                  R                  R                  /nSnU R                  SUSUS9  g)zfAdd the flag to specify reschedule type.

Args:
  parser: The current argparse parser to add this to.
z,The type of reschedule operation to perform.z--reschedule-typeT)rz   rW   rY   N)r  
RescheduleRescheduleTypeValueValuesEnum	IMMEDIATEr  NEXT_AVAILABLE_WINDOWSPECIFIC_TIMEr[   r	  s      r$   AddRescheduleTyper)    s     77AAFF77MMRR77EEJJ'
 =)7T	  r&   c                 V    U R                  S[        R                  R                  SS9  g)ztAdd the flag for maintenance reschedule schedule time.

Args:
  parser: The current argparse parser to add this to.
z--schedule-timeziWhen specifying SPECIFIC_TIME, the date and time at which to schedule the maintenance in ISO 8601 format.rj   Nr   rd   s    r$   AddScheduleTimer+    s.     	%%9	  r&   c                 L    U R                  S[        R                  " SSS9SS9  g)z`Add the flag for ID of backup run.

Args:
  parser: The current argparse parser to add this to.
idr   Tr  zaThe ID of the backup run. You can find the ID by running $ gcloud sql backups list -i {instance}.rj   Nr   rd   s    r$   AddBackupRunIdr.    s/     	
!!a4@5	  r&   c                 $    U R                  SUS9  g)zAdd the flag for the ID of the backup run.

Args:
  parser: The current argparse parser to which to add this.
  help_text: The help text to display.
r-  rt   Nru   r  s     r$   AddBackupIdr0    s     	
  r&   c                 $    U R                  SSS9  g)zcAdd the flag for the NAME of the backup.

Args:
  parser: The current parser to add this argument.
r  zThe NAME of the backup. To find the NAME, run the following command: $ gcloud sql backups list  --filter=type:FINAL instance:{instance}.rt   Nru   rd   s    r$   AddBackupNamer2    s      	Q  r&   c           	      ,    U R                  SSSSSSS9  g)zAdd the flag to specify requests to route to new backup service end point.

Args:
  parser: The current argparse parser to add this to.
z--project-levelTFr   zIf true, then invoke project level backup endpoint. Use 'Name' as the value for backup ID. You can find the 'Name' by running $ gcloud sql backups list.)r|   rW   r   r   rY   Nru   rd   s    r$   AddProjectLevelBackupEndpointr4    s+     	&  r&   c           	      4    U R                  S[        SSSUS9  g)zAdd the flag to specify password policy min length.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z--password-policy-min-lengthFNz5Minimum number of characters allowed in the password.rk   rW   r   rY   r|   r
  r   s     r$   AddPasswordPolicyMinLengthr7    s)     	$B  r&   c           	      2    U R                  SSSS.SSSUS9  g)	zAdd the flag to specify password policy complexity.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z--password-policy-complexityzjThe default value if COMPLEXITY_DEFAULT is not specified. It implies that complexity check is not enabled.zPA combination of lowercase, uppercase, numeric, and non-alphanumeric characters.)COMPLEXITY_UNSPECIFIEDCOMPLEXITY_DEFAULTFNzKThe complexity of the password. This flag is available only for PostgreSQL.rz   rW   r   rY   r|   ru   r   s     r$   AddPasswordPolicyComplexityr<    s;     	$?.	  %  r&   c           	      R    U R                  S[        R                  " SSS9SSSUS9  g)	zAdd the flag to specify password policy reuse interval.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z --password-policy-reuse-intervalr   d   r  FNzPNumber of previous passwords that cannot be reused. The valid range is 0 to 100.r6  r   r   s     r$   AddPasswordPolicyReuseIntervalr?    s:     	(!!aSA   
r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g)zAdd the flag to specify password policy disallow username as substring.

Args:
  parser: The current argparse parser to add this to.
  show_negated_in_help: Show nagative action in help.
  hidden: if the field needs to be hidden.
Fz,Disallow username as a part of the password.r   N)z---password-policy-disallow-username-substringr   r   s       r$   *AddPasswordPolicyDisallowUsernameSubstringrA  2  s8     !!56&59	
 	r&   c           	      P    U R                  SS[        R                  " SS9SSUS9  g)zAdd the flag to specify password policy password change interval.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z*--password-policy-password-change-intervalN1sr  Fa"          Minimum interval after which the password can be changed, for example,
        2m for 2 minutes. See <a href="/sdk/gcloud/reference/topic/datetimes">
        $ gcloud topic datetimes</a> for information on duration formats.
        This flag is available only for PostgreSQL.
      rx  rz  r   s     r$   'AddPasswordPolicyPasswordChangeIntervalrE  F  s8     	2D1
   r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g)zAdd the flag to enable password policy.

Args:
  parser: The current argparse parser to add this to.
  show_negated_in_help: Show nagative action in help.
  hidden: if the field needs to be hidden.
Fz        Enable the password policy, which enforces user password management with
        the policies configured for the instance. This flag is only available for Postgres.
      r   N)z--enable-password-policyr   r   s       r$   %AddPasswordPolicyEnablePasswordPolicyrG  \  s<     !!56& 	
 	 		r&   c                 F    [        U5      nU R                  "  SSSS.UD6  g)zAdd the flag to clear password policy.

Args:
  parser: The current argparse parser to add this to.
  show_negated_in_help: Show nagative action in help.
FzMClear the existing password policy. This flag is only available for Postgres.r   N)z--clear-password-policyr   r(  s      r$   $AddPasswordPolicyClearPasswordPolicyrI  s  s7     !!56&	 	r&   c                 2    U R                  S[        SSSS9  g)zAdd the flag to set number of failed login attempts allowed before a user is locked.

Args:
  parser: The current argparse parser to add this to.
z)--password-policy-allowed-failed-attemptsFNzDNumber of failed login attempts allowed before a user is locked out.)rk   rW   r   rY   r
  rd   s    r$   &AddPasswordPolicyAllowedFailedAttemptsrK    s&     	1
P  r&   c                 N    U R                  SS[        R                  " SS9SSS9  g)zAdd the flag to specify expiration duration after password is updated.

Args:
  parser: The current argparse parser to add this to.
z.--password-policy-password-expiration-durationNrC  rD  Fz        Expiration duration after a password is updated, for example,
        2d for 2 days. See `gcloud topic datetimes` for information on
        duration formats.
      r   rk   rW   rY   rz  rd   s    r$   +AddPasswordPolicyPasswordExpirationDurationrN    s3     	6D1
  
r&   c                 F    [        U5      nU R                  "  SSSS.UD6  g)zAdd the flag to enable the failed login attempts check.

Args:
  parser: The current argparse parser to add this to.
  show_negated_in_help: Show nagative action in help.
Fz7Enables the failed login attempts check if set to true.r   N)z.--password-policy-enable-failed-attempts-checkr   r(  s      r$   *AddPasswordPolicyEnableFailedAttemptsCheckrP    s5     !!56&6D 		r&   c                 F    [        U5      nU R                  "  SSSS.UD6  g)zAdd the flag to specify password policy password verification.

Args:
  parser: The current argparse parser to add this to.
  show_negated_in_help: Show nagative action in help.
FzBThe current password must be specified when altering the password.r   N)z.--password-policy-enable-password-verificationr   r(  s      r$   +AddPasswordPolicyEnablePasswordVerificationrR    s5     !!56&6O 		r&   c                 F    [        S5      nU R                  "  SSSS.UD6  g)z}Will retain the old password when changing to the new password.

Args:
  parser: The current argparse parser to add this to.
FzRetain the old password when changing to the new password. Must set password with this flag. This flag is only available for MySQL 8.0.r   N)z--retain-passwordr   r]   r"   s     r$   AddUserRetainPasswordrU    s7     !'&Q	 	r&   c                 F    [        S5      nU R                  "  SSSS.UD6  g)ziWill discard the user's secondary password.

Args:
  parser: The current argparse parser to add this to.
FzxDiscard the user's secondary password. Cannot set password and set this flag. This flag is only available for MySQL 8.0.r   N)z--discard-dual-passwordr   rT  s     r$   AddUserDiscardDualPasswordrW    s7     !'&C	 	r&   c                 (    U R                  SSSUS9  g)z*Adds the `--time-zone` flag to the parser.z--time-zoneFzESet a non-default time zone. Only available for SQL Server instances.r   Nru   r   s     r$   AddSqlServerTimeZonerY    s%    5   r&   c                 2    U R                  S[        SSUS9  g)z1Adds the `--threads-per-core` flag to the parser.z--threads-per-coreFz        The number of threads per core. The value of this flag can be 1 or 2.
        To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances.
      r	  Nr
  r   s     r$   AddThreadsPerCorer[    s(    
   	r&   c                 F    [        S5      nU R                  "  SSSS.UD6  g)z>Adds the `--show-sql-network-architecture` flag to the parser.Fa   Show the instance's current SqlNetworkArchitecture backend in addition
        to the default output list. An instance could use either the old or new
        network architecture. The new network architecture offers better
        isolation, reliability, and faster new feature adoption.r   N)z--show-sql-network-architecturer   rT  s     r$   AddShowSqlNetworkArchitecturer]  	  s5     '&'D 	r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g)zEAdds the `--show-transactional-log-storage-state` flag to the parser.FzkShow the storage location of the transactional logs used for point-in-time recovery (PITR) by the instance.r   N)z&--show-transactional-log-storage-stater   r   s       r$   #AddShowTransactionalLogStorageStater_  	  s<     !!56&.	< 	 		r&   z0:(settings.userLabels:alias=labels:label=LABELS))r  databaseVersion&firstof(gceZone,region):label=LOCATIONsettings.tierfip_addresses.filter("type:PRIMARY").*extract(ip_address).flatten().yesno(no="-"):label=PRIMARY_ADDRESSfip_addresses.filter("type:PRIVATE").*extract(ip_address).flatten().yesno(no="-"):label=PRIVATE_ADDRESSstate:label=STATUS)r  r`  ra  rb  zsettings.editionrc  rd  re  )r  r`  ra  rb  rc  rd  re  z1sqlNetworkArchitecture:label=NETWORK_ARCHITECTUREc                  X    SR                  [        SR                  [        5      5      n U $ )zWReturns the table format for listing instances with current network architecture field.{} table({}),)r  INSTANCES_USERLABELS_FORMATjoin2INSTANCES_FORMAT_COLUMNS_WITH_NETWORK_ARCHITECTUREtable_formats    r$   2GetInstanceListFormatForNetworkArchitectureUpgradern  a	  s*    &&!	hhAB,
 
r&   )r  r`  ra  rb  rc  rd  re  z_settings.backupConfiguration.transactionalLogStorageState:label=TRANSACTIONAL_LOG_STORAGE_STATEc                  X    SR                  [        SR                  [        5      5      n U $ )zeReturns the table format for listing instances with the storage location of their transactional logs.rg  rh  )r  ri  rj  =INSTANCES_FORMAT_COLUMNS_WITH_TRANSACTIONAL_LOG_STORAGE_STATErl  s    r$   5GetInstanceListFormatForTransactionalLogStorageSwitchrq  }	  s*    &&!	hhLM,
 
r&   c                  X    SR                  [        SR                  [        5      5      n U $ z/Returns the table format for listing instances.rg  rh  )r  ri  rj  INSTANCES_FORMAT_COLUMNSrl  s    r$   GetInstanceListFormatru  	  s)    &&!388,D#E, 
r&   c                  X    SR                  [        SR                  [        5      5      n U $ rs  )r  ri  rj   INSTANCES_FORMAT_COLUMNS_EDITIONrl  s    r$   GetInstanceListFormatEditionrx  	  s)    &&!388,L#M, 
r&   z
  table(
    operation,
    operationType:label=TYPE,
    startTime.iso():label=START,
    endTime.iso():label=END,
    error.errors[0].code.yesno(no="-"):label=ERROR,
    state:label=STATUS
  )
z
  table(
    name,
    operationType:label=TYPE,
    startTime.iso():label=START,
    endTime.iso():label=END,
    error.errors[0].code.yesno(no="-"):label=ERROR,
    status:label=STATUS
  )
zp
  table(
    commonName:label=NAME,
    sha1Fingerprint,
    expirationTime.yesno(no="-"):label=EXPIRATION
  )
zU
  table(
    sha1Fingerprint,
    expirationTime.yesno(no="-"):label=EXPIRATION
  )
zs
  table(
    ssl_cert.sha1Fingerprint,
    ssl_cert.expirationTime.yesno(no="-"):label=EXPIRATION,
    status
  )
zs
  table(
    tier,
    region.list():label=AVAILABLE_REGIONS,
    RAM.size(),
    DiskQuota.size():label=DISK
  )
z
  table(
    tier,
    edition,
    region.list():label=AVAILABLE_REGIONS,
    RAM.size(),
    DiskQuota.size():label=DISK
  )
c                 F    [        S5      nU R                  "  SSSS.UD6  g)z"Show the instance or tier edition.FzShow the edition field.r   N)z--show-editionr   rT  s     r$   AddShowEditionrz  	  s0     '&!&-FJPr&   c                 *    SnU R                  SUUS9  g)zAdds the '--active-directory-domain' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
zzManaged Service for Microsoft Active Directory domain this instance is joined to. Only available for SQL Server instances.z--active-directory-domainr  Nru   r   s      r$   AddActiveDirectoryDomainr|  	  s*    <  	!  r&   c                 *    SnU R                  SUUS9  g)zAdds the '--active-directory-secret-manager-key' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
zbThe secret manager key storing administrator credentials. Only available for SQL Server instances.z%--active-directory-secret-manager-keyr  Nru   r   s      r$   "AddActiveDirectorySecretManagerKeyr~  	  s*    #  	-  r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g )NFzARemoves the list of DNS Servers from the Active Directory Config.r   )z$--clear-active-directory-dns-serversr   r0  s      r$   ClearActiveDirectoryDNSServersr  
  s5     '&,
M 	r&   c                     [         R                  R                  R                  R                  [         R                  R                  R
                  R                  /nSnU R                  SUSUUS9  g)zAdds the '--active-directory-mode' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
zKDefines the Active Directory mode. Only available for SQL Server instances.z--active-directory-modeF)rz   rW   rY   r|   N)r  SqlActiveDirectoryConfigModeValueValuesEnumMANAGED_ACTIVE_DIRECTORYr  !CUSTOMER_MANAGED_ACTIVE_DIRECTORYr[   )r]   r|   rz   r   s       r$   AddActiveDirectoryModer  
  so     '';;TTYY'';;]]bb'
  	  r&   c           	      |    SnU R                  S[        R                  " 5       SUU[        R                  " 5       S9  g)zAdds the '--active-directory-dns-servers' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
zA comma-separated list of the DNS servers to be used for Active Directory. Only available for SQL Server instances. E.g: 10.0.0.1,10.0.0.2z--active-directory-dns-serversDNS_SERVER_IP_ADDRESS)rk   r   rY   r|   r   Nr[   r   r   FlattenActionr   s      r$   AddActiveDirectoryDNSServersr  )
  sE      	& %&&(  r&   c                 *    SnU R                  SUUS9  g)zAdds the '--active-directory-organizational-unit' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
zDefines the organizational unit to be used for Active Directory. Only available for SQL Server instances. E.g: OU=Cloud,DC=ad,DC=example,DC=comz&--active-directory-organizational-unitr  Nru   r   s      r$   $AddActiveDirectoryOrganizationalUnitr  @
  s*    *  	.  r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g)zAdds the '--clear-active-directory' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
Fz*Clears the Active Directory configuration.r   N)z--clear-active-directoryr   r0  s      r$   AddClearActiveDirectoryr  T
  s7     !'& 7	
 	r&   c                 H    SnU R                  S[        R                  UUS9  g)zAdds the '--deletion-protection' flag to the parser for instances patch action.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z3Enable deletion protection on a Cloud SQL instance.z--deletion-protectionr  Nr   r   s      r$   AddDeletionProtectionr  e
  s/     D)--	  r&   c           	      8    SnU R                  SSSSS.SSUUS	9  g)
zAdds the '--connector-enforcement' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
zCloud SQL Connector enforcement mode. It determines how Cloud SQL Connectors are used in the connection. See the list of modes [here](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/instances#connectorenforcement).z--connector-enforcementz4The requirement for Cloud SQL connectors is unknown.z&Does not require Cloud SQL connectors.zRequires all connections to use Cloud SQL connectors, including the Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. Note: This disables all existing authorized networks.)!CONNECTOR_ENFORCEMENT_UNSPECIFIEDNOT_REQUIREDREQUIREDFNr;  ru   r   s      r$   AddConnectorEnforcementr  u
  sF    o 
 	 EB #  r&   c                 R    U R                  SSUU[        R                  " SSS9US9  g)zAdds --timeout flag.z	--timeoutFr   Tr  )rW   r   rY   rk   r|   Nr   )r]   default_max_waitr   r|   s       r$   
AddTimeoutr  
  s6     	!!a4@  r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g )NFzIEnable connecting to the Cloud SQL instance with Private Service Connect.r   )z --enable-private-service-connectr   r   s       r$   AddEnablePrivateServiceConnectr  
  s<     !!56&(	 	 		r&   c           	      P    U R                  S[        R                  " SS9SSSUS9  g )Nz--allowed-psc-projectsr   r   FPROJECTzA comma-separated list of projects. Each project in this list might be represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be established from specified consumer projects.rk   rW   r   rY   r|   r   r   s     r$   AddAllowedPscProjectsr  
  s6    !,>
   r&   c                 F    [        S5      nU R                  "  SSSS.UD6  g )NFzThis will clear the project allowlist of Private Service Connect, disallowing all projects from creating new Private Service Connect bindings to the instance.r   )z--clear-allowed-psc-projectsr   rT  s     r$   AddClearAllowedPscProjectsr  
  s4     '&$	'		 		r&   c           	          U R                  S[        R                  " [        [        S.S/S9SSU[        R                  " 5       S9  g)	z%Adds --psc-auto-connections argument.z--psc-auto-connections)projectnetworkr  )specrequired_keysFa  A comma-separated list of networks or network-project pairs. Each project is represented by a project number (numeric) or by a project ID (alphanumeric). This allows Private Service Connect connections to be created automatically for the specified networks. For example, this connection uses "the form `psc-auto-connections`=`network=projects/testproject1/global/networks/testnetwork1`" or "the form `psc-auto-connections`=`project=testproject1,network=projects/testproject1/global/networks/testnetwork1`")rk   rW   rY   r|   r   N)r[   r   	ArgObjectstrr  r   s     r$   AddPscAutoConnectionsr  
  sS       # 8 &&(-  r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g )NFzThis removes all automatically created connections. Cloud SQL uses these connections to connect to an instance using Private Service Connect.r   )z--clear-psc-auto-connectionsr   r0  s      r$   AddClearPscAutoConnectionsr  
  s9     '&$
 
 	
r&   c           
      z    U R                  S[        R                  " SSS9SSSU[        R                  " 5       S9  g	)
z1Adds --custom-subject-alternative-names argument.z"--custom-subject-alternative-namesr      )r   
max_lengthDNSFa  A comma-separated list of DNS names to add to the instance's SSL certificate. A custom SAN is a structured way to add additional DNS names (host names) that are not managed by Cloud SQL to an instance. It allows for hostname verification during establishment of a database connection using the DNS name over SSL/TLS. When you create and/or update an instance, you can add a comma-separated list of up to three DNS names to the server certificate of your instance.)rk   r   rW   rY   r|   r   Nr  r   s     r$    AddCustomSubjectAlternativeNamesr     sD    *!:+ &&(!  r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g )NFz-This clears the customer specified DNS names.r   )z(--clear-custom-subject-alternative-namesr   r0  s      r$   %AddClearCustomSubjectAlternativeNamesr    s5     '&0:	
 	r&   c                 F    U R                  SSS[        R                  US9  g)z/Adds --recreate-replicas-on-primary-crash flag.z$--recreate-replicas-on-primary-crashFa!  Allow/Disallow replica recreation when a primary MySQL instance operating in reduced durability mode crashes. Not recreating the replicas might lead to data inconsistencies between the primary and its replicas. This setting is only applicable for MySQL instances and is enabled by default.rW   rY   r   r|   Nr   r   s     r$   !AddRecreateReplicasOnPrimaryCrashr  !  s.    ,' --  r&   c                 F    [        S5      nU R                  "  SSSS.UD6  g)z-Adds --upgrade-sql-network-architecture flag.FzUpgrade from old network architecture to new network architecture. The
       new network architecture offers better isolation, reliability, and faster
       new feature adoption.r   N)z"--upgrade-sql-network-architecturer   rT  s     r$    AddUpgradeSqlNetworkArchitecturer  2  s4     '&*	 		 		r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g)z1Adds --enforce-new-sql-network-architecture flag.Fz7Force the instance to use the new network architecture.r   N)z&--enforce-new-sql-network-architecturer   r0  s      r$   AddForceSqlNetworkArchitecturer  A  s5     '&.H	
 	r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g)zAdds --cascadable-replica flag.Fa:  Specifies whether a SQL Server replica is a cascadable replica. A cascadable replica is a SQL Server cross-region replica that supports replica(s) under it. This flag only takes effect when the `--master-instance-name` flag is set, and the replica under creation is in a different region than the primary instance.r   N)z--cascadable-replicar   r0  s      r$   AddCascadableReplicar  M  s:     '&J  	r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g)z.Adds '--enable-data-cache' flag to the parser.Fz}Enable use of data cache for accelerated read performance. This flag is only available for Enterprise_Plus edition instances.r   N)z--enable-data-cacher   r   s       r$   AddEnableDataCacher  _  s;     !56&	F 	 		r&   c                 F    U R                  S[        R                  SSSS9  g)z<Adds '--enable-db-aligned-atomic-writes' flag to the parser.z!--enable-db-aligned-atomic-writesFzEnabling DB Aligned Atomic Writes will reformat the underlying filesystem to use write block size similar to the DB block size.T)r   rW   rY   r|   Nr   rd   s    r$   AddEnableDbAlignedAtomicWritesr  n  s/    )--N   	r&   c                 H    [        S5      nU R                  "  SSSUS.UD6  g)z>Adds '--enable-auto-upgrade-minor-version' flag to the parser.Fz^Enables auto-upgrade for MySQL 8.0 minor versions. The MySQL version must be 8.0.35 or higher.r   N)z#--enable-auto-upgrade-minor-versionr   r0  s      r$   AddEnableAutoUpgrader  |  s;     '&+
 ' 
 	
r&   c                    U R                  SUS9nUR                  S[        R                  SS9  UR                  S[        R                  " SS9S	S
9  UR                  S[        R                  " SS9SS
9  UR                  S[        R
                  " [        [        S.S9SSS9  UR                  S[        R                  SS9  UR                  S[        R                  " SS9SS
9  UR                  S[        R                  " SS9SS
9  g)z+Adds flags for read pool auto-scale config.z-Options for configuring read pool auto scale.r  z--auto-scale-enabledzzEnables read pool auto scaling. Supports automatically increasing and decreasing the read pool's node count based on need.r   z--auto-scale-min-node-countr   rD  z3Minimum number of read pool nodes to be maintained.rj   z--auto-scale-max-node-countz3Maximum number of read pool nodes to be maintained.z--auto-scale-target-metrics)AVERAGE_CPU_UTILIZATIONAVERAGE_DB_CONNECTIONS)r  zMETRIC=VALUEzTarget metrics for read pool auto scaling. Options are: AVERAGE_CPU_UTILIZATION and AVERAGE_DB_CONNECTIONS. Example: --auto-scale-target-metrics=AVERAGE_CPU_UTILIZATION=0.8r  z--auto-scale-disable-scale-inzDisables automatic read pool scale-in. When disabled, read pool auto scaling only supports increasing the read pool node count. By default, both automatic read pool scale-in and scale-out are enabled.z --auto-scale-in-cooldown-seconds<   zThe cooldown period for automatic read pool scale-in. Minimum time between scale-in events. Must be an integer value. For example, if the value is 60, then a scale-in event will not be triggered within 60 seconds of the last scale-in event.z!--auto-scale-out-cooldown-secondszThe cooldown period for automatic read pool scale-out. Minimum time between scale-out events. Must be an integer value. For example, if the value is 60, then a scale-out event will not be triggered within 60 seconds of the last scale-out event.N)r  r[   r   r   rl   r   float)r]   r|   read_pool_auto_scale_groups      r$   AddReadPoolAutoScaleConfigr    sP   %//:6  0   ))--C *  ))#!!a0@ * 
 ))#!!a0@ * 
 ))#).(- E *  ))%--	 * 	 ))(!!b1E	 * 	 )))!!b1F	 * 	r&   c                 l    U R                  S[        R                  " SSS9[        R                  SSS9  g)	zAdds the '--replication-lag-max-seconds-for-recreate' flag to the parser for instances patch action.

Args:
  parser: The current argparse parser to add this to.
z*--replication-lag-max-seconds-for-recreatei,  i3r  FzSet a maximum replication lag for a MySQL read replica in seconds. If the replica lag exceeds the specified value, the readreplica(s) will be recreated. Min value=300 seconds,Max value=31536000 seconds, default value=31536000 seconds.)rk   r   rW   rY   N)r[   r   rl   StoreOnceActionrd   s    r$   &AddReplicationLagMaxSecondsForRecreater    s<     	2!!cxH((H  r&   c           	      8    SnU R                  SSSSS.SSUUS	9  g)
zAdds the '--ssl-mode' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z!Set the SSL mode of the instance.z
--ssl-modez`Allow non-SSL and SSL connections. For SSL connections, client certificate will not be verified.z.Only allow connections encrypted with SSL/TLS.zQOnly allow connections encrypted with SSL/TLS and with valid client certificates.)ALLOW_UNENCRYPTED_AND_ENCRYPTEDENCRYPTED_ONLY#TRUSTED_CLIENT_CERTIFICATE_REQUIREDFNr;  ru   r   s      r$   
AddSslModer    sB     2)3 M&
 !  r&   c           	          U R                  SSSS9  U R                  SSSS9  U R                  SSSS9  U R                  S	S
[        R                  " SSS9SSS9  g
)zFAdds SQL Server Reporting Services (SSRS) related flags to the parser.z--setup-loginTzgExisting login in the Cloud SQL for SQL Server instance that is used as the setup login for SSRS setup.r   z--service-loginziExisting login in the Cloud SQL for SQL Server instance that is used as the service login for SSRS setup.z--report-databasezjExisting or new report database name in the Cloud SQL for SQL Server instance that is used for SSRS setup.z
--durationN1h12hr  FzTime duration, in hours, that the lease will be active to allow SSRS setup. Default lease duration is 5 hours if this flag is not specified.rM  rz  rd   s    r$   AddSqlServerSsrsr     s    5	   	2	   	3	   	DeD  
r&   c                 F    U R                  SSUS[        R                  S9  g)z)Adds --enable-google-ml-integration flag.z--enable-google-ml-integrationFzEnable Vertex AI integration for Google Cloud SQL. You can integrate Vertex AI with Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances only.rW   r|   rY   r   Nr   r   s     r$   AddEnableGoogleMLIntegrationr  *  s.    &+ --  
r&   c                 F    U R                  SSUS[        R                  S9  g)z(Adds --enable-dataplex-integration flag.z--enable-dataplex-integrationFz1Enable Dataplex integration for Google Cloud SQL.r  Nr   r   s     r$   AddEnableDataplexIntegrationr  9  s*    %>--  r&   c           	      P    U R                  SS [        R                  " SSS9SSS9  g )Nz--db-timeoutrC  1dr  Fz(MySQL and PostgreSQL only) Cloud SQL instance operations timeout, which is the sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24h.rM  rz  rd   s    r$   AddSwitchoverDbTimeoutr  D  s4    DdCD  
r&   c           	      8    SnU R                  SSSSS.SSUUS	9  g)
zAdds the '--server-ca-mode' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z'Set the server CA mode of the instance.z--server-ca-modez'Google-managed self-signed internal CA.zrGoogle-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS).zQCustomer-managed CA hosted on Google Cloud's Certificate Authority Service (CAS).)GOOGLE_MANAGED_INTERNAL_CAGOOGLE_MANAGED_CAS_CACUSTOMER_MANAGED_CAS_CAFNr;  ru   r   s      r$   AddServerCaModer  R  sB     8) 8E* %  r&   c                 H    [        U5      nU R                  "  SSSUS.UD6  g)zEAdds '--switch-transaction-logs-to-cloud-storage' flag to the parser.FzWSwitches the location of the transaction logs used for PITR from disk to Cloud Storage.r   N)z*--switch-transaction-logs-to-cloud-storager   r   s       r$   &AddSwitchTransactionLogsToCloudStorager  p  s<     !!56&2	$ 	 		r&   c                     U R                  SSSS9nUR                  SSSS9  UR                  SSS	S9  UR                  S
SSS9  UR                  SSS9nUR                  SSS9  UR                  SSSS9  g)zAdd the flags for importing TDE certificate files.

Add the --certificate, --cert-path, --pvk-path, --pvk-password and
--prompt-for-pvk-password flags to the parser

Args:
  parser: The current argparse parser to add these database flags to.
FTz;Encryption info to support importing a TDE certificate filer  z--certificatez#Name of the encryption certificate.r   r  zsPath to the encryption certificate file in Google Cloud Storage. The URI is in the form `gs://bucketName/fileName`.r  zsPath to the encryption private key file in Google Cloud Storage. The URI is in the form `gs://bucketName/fileName`.r  r  z>The private key password associated with the certificate file.rt   r  r   zPrompt for the private key password associated with the certificate file with character echo disabled. The password is all typed characters up to but not including the RETURN or ENTER key.r   Nr  r  s      r$   AddTdeFlagsr    s     H  )
 0  
 ?	   ?	   &&TD&A.K   !H	  r&   c                 F    U R                  SSUS[        R                  S9  g)zAdds --retain-backups-on-delete flag.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z--retain-backups-on-deleteFzPRetain automated/ondemand backups of the instance after the instance is deleted.r  Nr   r   s     r$   AddRetainBackupsOnDeleter    s0     	" --  	r&   c                 F    U R                  SSSS[        R                  S9  g)zdAdds --enable-connection-pooling flag.

Args:
  parser: The current argparse parser to add this to.
z--enable-connection-poolingFz+Enable connection pooling for the instance.r  Nr   rd   s    r$   AddEnableConnectionPoolingr    s,     	#8--  r&   c           	      l    SnU(       a  US-  nU R                  S[        R                  " SS9SSUSS9  g	)
z(Adds the `--connection-pool-flags` flag.a  Comma-separated list of connection pool flags to set on the instance connection pool. Use an equals sign to separate flag name and value. More information on available flags can be found here: https://cloud.google.com/sql/docs/mysql/managed-connection-pooling#configuration-options for MySQL and https://cloud.google.com/sql/docs/postgres/managed-connection-pooling#configuration-options for PostgreSQL. (e.g., `--connection-pool-flags max_pool_size=1000,max_client_connections=20`)r   z--connection-pool-flagsr   r   r   Fr   Nr   r   s      r$   AddConnectionPoolFlagsr    sQ    Q  	ME 	!,  r&   c                 F    [        S5      nU R                  "  SSSS.UD6  g )NFz>This will clear the connection pool flags set on the instance.r   )z--clear-connection-pool-flagsr   rT  s     r$   AddClearConnectionPoolFlagsr    s2     '&%K 		r&   c                 \    U R                  SSSS.SSSS[        R                  " SS	SS
9S9  g)zgAdds --connection-pooling-pool-mode flag.

Args:
  parser: The current argparse parser to add this to.
z--connection-pooling-pool-modez,Session mode for managed connection pooling.z0Transaction mode for managed connection pooling.)SESSIONTRANSACTIONFNz-The pool mode for managed connection pooling.TDThis flag is deprecated. Please use --connection-pool-flags instead.errorr  )rz   rW   r   rY   r|   r   r[   r   r  rd   s    r$   AddConnectionPoolingPoolModer    sN     	&CK :''
*   r&   c                 |    U R                  S[        R                  " SSS9SSSS[        R                  " SS	SS
9S9  g)zgAdds --connection-pooling-pool-size flag.

Args:
  parser: The current argparse parser to add this to.
z--connection-pooling-pool-sizer    r  FNz-The pool size for managed connection pooling.Tr  r  rk   rW   r   rY   r|   r   r[   r   rl   r   r  rd   s    r$   AddConnectionPoolingPoolSizer    sQ     	&!!aVD:''
*   r&   c                 |    U R                  S[        R                  " SSS9SSSS[        R                  " SS	SS
9S9  g)ztAdds --connection-pooling-max-client-connections flag.

Args:
  parser: The current argparse parser to add this to.
z+--connection-pooling-max-client-connectionsr   r  r  FNz:The max client connections for managed connection pooling.Tr  r  r  r  rd   s    r$   (AddConnectionPoolingMaxClientConnectionsr  -  sQ     	3!!aVDG''
7   r&   c                 T    U R                  SSSSS[        R                  " SSSS9S9  g)	zqAdds --connection-pooling-client-idle-timeout flag.

Args:
  parser: The current argparse parser to add this to.
z(--connection-pooling-client-idle-timeoutFNz7The client idle timeout for managed connection pooling.Tr  r  rW   r   rY   r|   r   r  rd   s    r$   %AddConnectionPoolingClientIdleTimeoutr  E  A     	0D''
4   r&   c                 T    U R                  SSSSS[        R                  " SSSS9S9  g)	zqAdds --connection-pooling-server-idle-timeout flag.

Args:
  parser: The current argparse parser to add this to.
z(--connection-pooling-server-idle-timeoutFNz7The server idle timeout for managed connection pooling.Tr  r  r  r  rd   s    r$   %AddConnectionPoolingServerIdleTimeoutr  \  r   r&   c                 T    U R                  SSSSS[        R                  " SSSS9S9  g)	zpAdds --connection-pooling-query-wait-timeout flag.

Args:
  parser: The current argparse parser to add this to.
z'--connection-pooling-query-wait-timeoutFNz6The query wait timeout for managed connection pooling.Tr  r  r  r  rd   s    r$   $AddConnectionPoolingQueryWaitTimeoutr  s  sA     	/C''
3   r&   c                 .    SnU R                  SSSUUS9  g)zAdds the '--server-ca-pool' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
  hidden: if the field needs to be hidden.
z'Set the server CA pool of the instance.z--server-ca-poolFNr  ru   r   s      r$   AddServerCaPoolr    s+     8)  r&   c           	      4    U R                  SSSSS.SSSSS	9  g)
zXAdds --instance-type flag.

Args:
  parser: The current argparse parser to add this to.
z--instance-typezA primary instance.zA read replica instance.zA read pool instance.)CLOUD_SQL_INSTANCEREAD_REPLICA_INSTANCEREAD_POOL_INSTANCEFNzThe type of the instance.r;  ru   rd   s    r$   AddInstanceTyper    s6     	 5#= 7
 &  r&   c           	      P    U R                  SSS[        R                  " SS9SSS9  g)zUAdds --node-count flag.

Args:
  parser: The current argparse parser to add this to.
z--node-countFNr   rD  zNThe number of nodes in the pool. This option is only available for read pools.)rW   r   rk   rY   r|   r   rd   s    r$   AddNodeCountr    s8     	!!a0   
r&   c                 2    U R                  SSU[        SS9  g)z;Adds the `--psc-network-attachment-uri` flag to the parser.z--psc-network-attachment-uriFa#  Full URI of the network attachment that is configured to support outbound connectivity from a Cloud SQL instance which uses Private Service Connect (PSC). For example, this would be of the form:`--psc-network-attachment-uri=projects/test-project/regions/us-central1/networkAttachments/my-na`)rW   r|   rk   rY   N)r[   r  r   s     r$   AddPSCNetworkAttachmentUrir    s'    $n  r&   c                 (    U R                  SSUSS9  g )Nz"--clear-psc-network-attachment-urir   zaDisable outbound connectivity from a Cloud SQL instance which uses Private Service Connect (PSC).r   r|   rY   ru   r   s     r$   AddClearPSCNetworkAttachmentUrir    s!    *r	  r&   c                 F    U R                  SSS[        R                  SS9  g)z,Adds --enable-accelerated-replica-mode flag.z!--enable-accelerated-replica-modeFzAccelerated replica mode improves the write performance of the replica instance by reducing its durability. In case of replica instance crash, it will be recreated from the primary instance.Tr  Nr   rd   s    r$   AddEnableAcceleratedReplicaModer    s.    )
 --  r&   c           
      x    U R                  S[        R                  " SS9SSSU[        R                  " 5       S9  g)	zAdds --unc-mappings argument.z--unc-mappingsr   r   FzSERVER-NAME=GCS-PATH:MODEzA comma-separated list of UNC mapping to add to the SQL Server instance. The input should be in a format of server-name=gcs-path:mode where mode should be snapshot_read or snapshot_write Example: \serverAS456=gs://bucket/folder:snapshot_read)rk   rW   r   rY   r|   r   Nr  r   s     r$   AddUncMappingsr    sB    !,)? &&(  r&   c                 (    U R                  SSUSS9  g )Nz--clear-unc-mappingsr   z3Clear the UNC mappings for the SQL Server instance.r  ru   r   s     r$   AddClearUncMappingsr    s!    D	  r&   c                 n    U R                  SSUS9nUR                  SSSUS9  UR                  SSSUS9  g	)
zTAdds the `--entra-id-tenant-id` and `--entra-id-application-id` flags to the parser.Fz2Entraid configuration for the SQL Server instance.r   z--entra-id-tenant-idTzSet the Entraid tenant ID. z--entra-id-application-idz Set the Entraid application ID. Nr  )r]   r|   entraid_groups      r$   AddSqlServerEntraIdr    sd     ""? # - 
'   !
,  r&   c                 (    U R                  SSUSS9  g )Nz--clear-entra-id-configr   z6Clear the Entra ID config for the SQL Server instance.r  ru   r   s     r$   AddClearEntraIdConfigr  $  s!    G	  r&   c           	      P    U R                  S[        R                  " SS9SSSUS9  g)	z+Adds --performance-capture-config argument.z--performance-capture-configr   r   Fz	KEY=VALUEap  A comma-separated list of performance capture settings to add to the MySQL instance. The input should be in a format of key=value. Available keys are: enabled, probing-interval-seconds, probe-threshold, running-threads-threshold, seconds-behind-source-threshold,  and transaction-duration-threshold. Example: --performance-capture-config enabled=true,probe-threshold=5r  Nr   r   s     r$   AddPerformanceCaptureConfigr  -  s7    $!,I   r&   c           
      T    U R                  SUS/ S[        R                  " 5       SS9  g)zAdd the flag to specify database roles for the user.

Args:
  parser: The current argparse parser to add this to.
  required: Whether the flag is required.
z--database-rolesTROLEa          A comma-separated list of database roles to be assigned to the user.
        This option is only available for MySQL and PostgreSQL instances. You
        can include predefined Cloud SQL roles, like cloudsqlsuperuser, or your
        own custom roles. Custom roles must be created in the database before
        you can assign them. You can create roles using the CREATE ROLE
        statement for both MySQL and PostgreSQL.
      )rW   r|   r   r   rk   rY   Nr   r   s     r$   AddDatabaseRolesr"  A  s7     	 
  r&   c                 *    U R                  SSSSSS9  g)zzAdd the flag to revoke existing database roles for the user.

Args:
  parser: The current argparse parser to add this to.
z--revoke-existing-rolesFTr   z        A boolean flag for revoking existing database roles from the user.
        This option is only available for MySQL and PostgreSQL instances.
      )rW   r|   r   rY   Nru   rd   s    r$   AddRevokeExistingRolesr$  [  s(     	
  
r&   for_pitrc                 d   U R                   R                  [        5       5        U R                  US9n[	        XS9  [        XS9  [        XS9  [        XS9  [        XS9  [        XS9  [        X!S9  [        XS9  [        XS9  [        XS9  [        XS9  [        U SUS9  [!        XS9  [#        XS9  [%        XS9  ['        XS9  [)        XS9  [+        XS9  [-        U SUSSS9  [/        XS9  [1        XS9  [3        XS9  [5        XS9  [7        XS9  [9        XS9  [;        U SS9  [=        U SS9  [?        U SS9  [A        U SUS9  [C        XS9  [E        X!S9  [G        XS9  [I        XS9  [K        XS9  [M        XS9  [O        XS9  [Q        XS9  [S        XS9  [U        XS9  [W        XSS9  [Y        XS9  [[        XS9  []        XS9  [_        XS9  [a        XS9  [c        U SS9  [e        U SS9  [g        XS9  [i        U SS9  [k        XS9  [m        XS9  [o        U SS9  [q        XS9  [s        XS9  [u        XS9  [w        XS9  [y        XS9  [{        XS9  [}        XS9  [        XS9  [        U SS9  [        XS9  [        U [        R                  US9  [        XS9  S	S
SSS.n[        R                  " U SX1S9  g)a%  Add flags that can be overridden from the source instance.

These flags are used when creating a new Cloud SQL instance via a backup
restore or PITR operation.

Args:
  parser: The current argparse parser to add this to.
  for_pitr: Whether the args are being added for point-in-time-restore.
r  F)r   r|   zt Note for restore to new instance major version upgrades are not supported. Only minor version upgrades are allowed.)r   r|   r  r  T)r   r|   r  z--disk-encryption-keyz--disk-encryption-key-keyringz--disk-encryption-key-locationz--disk-encryption-key-project)zkms-keyzkms-keyringzkms-locationzkms-projectr   )flag_overridesr|   N)Hdisplay_info	AddFormatru  r  r   r  r|  r  r  r~  r  r   r   r   r   r   r   r  r  rl  ri  r  r  r  rQ  rO  rS  r  r  r  r  r  r   r  r  r   r   rU  r`  rY  r[  r]  r  r  rF  rJ  rM  rd  rf  r  r  r?  r  r   r   r  r|  rY  r  r  r  r  r  r9  r   r  r  r   !INSTANCE_CREATION_TIMEOUT_SECONDSr  kms_resource_argsAddKmsKeyResourceArg)r]   r%  psc_setup_groupkms_flag_overridess       r$   AddSourceInstanceOverrideArgsr/  r  s    	 5 78$$H$5/ f.v7631&v?$V=9f&0f.F$Fh?V-!&21&*&2#A	 0!&:#F<v7V%&*VD)vd3vd35 v7 B)f6'@&v?$V=(A&v?v/65Iv7&263F$V%t,VD1(6$/&28&&F,v/V%1F4!&:))	&	&"i99( !9(464	 ((j);r&   c                 2    U R                  SSSSS.SSSS	9  g)
zAdds --data-api-access flag.z--data-api-accessz>Unspecified mode, effectively the same as `DISALLOW_DATA_API`.z9Disallow using ExecuteSql API to connect to the instance.zAllow using ExecuteSql API to connect to the instance. For Private IP instances, this will allow authorized users to access the instance from the public internet using ExecuteSql API.)DATA_API_ACCESS_UNSPECIFIEDDISALLOW_DATA_APIALLOW_DATA_APIFNz;Controls connectivity to the instance using ExecuteSql API.r   ru   rd   s    r$   AddDataApiAccessr4    s8    & J H'  r&   c                 .    SnU R                  SSSUSS9  g)zAdds the '--server-certificate-rotation-mode' flag to the parser.

Args:
  parser: The current argparse parser to add this to.
z9Set the server certificate rotation mode of the instance.z"--server-certificate-rotation-modeFNTr  ru   r  s     r$    AddServerCertificateRotationModer6    s,     J)*  r&   )F)FF)TFTN)T)TF)FTr?   )zThe ID of the backup run. To find the ID, run the following command: $ gcloud sql backups list -i {instance}.Or, the NAME of the backup. To find the NAME, run the following command:  $ gcloud sql backups list --filter=instance:{instance})zTime to synchronously wait for the operation to complete, after which the operation continues asynchronously. Ignored if --async flag is specified. By default, set to 3600s. To wait indefinitely, set to *unlimited*.F(  __doc__rm   googlecloudsdk.api_lib.computer   r  googlecloudsdk.api_lib.storager   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   r   r   r	   googlecloudsdk.command_lib.kmsr
   r+  googlecloudsdk.command_lib.sqlr   googlecloudsdk.command_lib.utilr   googlecloudsdk.corer   GetMessagesModuler  r   _IP_ADDRESS_PART_CIDR_PREFIX_PARTr  r   ListCommandCompleterr   r1   r6   listr;   rJ   r_   ra   re   ro   rr   rv   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r   r  r  r  r&  r)  r,  r.  r1  r3  r9  r=  r?  rA  rF  rJ  rM  rO  rQ  rS  rU  rY  r[  r]  r`  rd  rf  ri  	Namespaceboolrl  rn  rp  rs  ru  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  !DEFAULT_DATABASE_IMPORT_HELP_TEXT#SQLSERVER_DATABASE_IMPORT_HELP_TEXTr  &DEFAULT_DATABASE_LIST_EXPORT_HELP_TEXT(SQLSERVER_DATABASE_LIST_EXPORT_HELP_TEXTr  r  r  r  r  r
  r  r  r  r  r  r  r  r  r   r"  r)  r+  r.  r0  r2  r4  r7  r<  r?  rA  rE  rG  rI  rK  rN  rP  rR  rU  rW  rY  r[  r]  r_  ri  rt  rw  rk  rn  rp  rq  ru  rx  OPERATION_FORMATOPERATION_FORMAT_BETACLIENT_CERTS_FORMATSERVER_CA_CERTS_FORMATSERVER_CERTS_FORMATTIERS_FORMATTIERS_FORMAT_EDITIONrz  r|  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r$  r/  r4  r6  r   r&   r$   <module>rR     s    A 7 , + / ( 5 M 4 6 *!!%3$/ !8 0 CJJ,= K 
	
77 	
77 	J33 	T  			 ,&G	""
 05&&:	

&
("$2$  FR"$5  05$jZ
$	> 05
 05 05&"  9>	''	15			#L
$$ $
#A*$ (-
D

	




K " 4 $
M7 '7 )80
-`&&" &	B*(":* /4(. 05.&"( "&& "&$$$
 05" Q   $  "6 2$A =$	 	     $$
0.(" H h	$ 05  8,"	$ AH(8'T> 05"0f&4600..."(&" &8(40 ;@e''e37e	eR2r&   