
    C                         S r SSKJr  SSKJr  SSKJr  SSKJr  SrSrSR                  \\S	9r
S
 rS rS rS rS rS rS rS rS rS rS rg)zCFlags and helpers for AlloyDB Connection Profiles related commands.    )absolute_import)division)unicode_literals)arg_parsersz"(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           	      0    SnU R                  SSSSSUS9  g)z3Adds a --enable-public-ip flag to the given parser.zH    If true, the AlloyDB instance will be accessible via public IP.
    z--enable-public-ipF
store_trueenable_public_iprequiredactiondestdefaulthelpNadd_argumentparser	help_texts     Vlib/googlecloudsdk/command_lib/database_migration/connection_profiles/alloydb_flags.pyAddEnablePublicIpFlagr      s0    ) 	      c           	      0    SnU R                  SSSSSUS9  g)z<Adds a --enable-outbound-public-ip flag to the given parser.z    If true, Enables an outbound public IP address to support a database
    server sending requests out into the internet.
    z--enable-outbound-public-ipFr
   enable_outbound_public_ipr   Nr   r   s     r   AddEnableOutboundPublicIpFlagr   .   s0    ) 	#&  r   c           	          [         R                  " [        S5      nSnU R                  SS[         R                  " US9S/ US9  g)	zAAdds a --authorized-network-cidr-ranges flag to the given parser.z[Must be specified in CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24).zV    Comma-separated list of CIDR ranges that can connect to the AlloyDB instance.
    z --authorized-network-cidr-rangesF)element_typeNETWORK)r   typemetavarr   r   N)r   RegexpValidator_CIDR_REGEXr   ArgList)r   cidr_validatorr   s      r   "AddAuthorizedNetworkCidrRangesFlagr&   >   sS    ..6.) 	(N;  r   c                 &    U R                  SSSS9  g)z%Add the password field to the parser.z
--passwordTz)Initial password for the 'postgres' user.)r   r   Nr   )r   s    r   AddPasswordFlagr(   T   s    6  8r   c                 (    SnU R                  SUS9  g)z*Adds a --network flag to the given parser.z    The VPC network from which the AlloyDB instance is accessible via private
    IP. For example, projects/myProject/global/networks/default. This setting
    cannot be updated after it is set.
    z	--network)r   Nr   r   s     r   AddNetworkFlagr*   \   s    )
 	k	2r   c                 R    SnU R                  SS[        R                  " 5       US9  g)z1Adds a --cluster-labels flag to the given parser.zm    The resource labels for an AlloyDB cluster. An object containing a list
    of "key": "value" pairs.
    z--cluster-labels	KEY=VALUEr!   r    r   Nr   r   ArgDictr   s     r   AddClusterLabelsFlagr0   f   3    ) 	 	  r   c                 *    SnU R                  SUSS9  g)z-Adds a --primary-id flag to the given parser.zA    The ID of the primary instance for this AlloyDB cluster.
    z--primary-idT)r   r   Nr   r   s     r   AddPrimaryIdFlagr3   s   s     ) 	n9tDr   c                 :    SnU R                  SU[        / SQSS9  g)z,Adds a --cpu-count flag to the given parser.z    Whole number value indicating how many vCPUs the machine should
    contain. Each vCPU count corresponds to a N2 high-mem machine:
    (https://cloud.google.com/compute/docs/general-purpose-machines#n2_machines).
  z--cpu-count)                @   T)r   r    choicesr   N)r   intr   s     r   AddCpuCountFlagr=   {   s-    )
 	#  r   c                 R    SnU R                  S[        R                  " 5       SUS9  g)z1Adds a --database-flags flag to the given parser.a      Comma-separated list of database flags to set on the AlloyDB primary
    instance. Use an equals sign to separate the flag name and value. Flags
    without values, like skip_grant_tables, can be written out without a value,
    e.g., `skip_grant_tables=`. Use on/off values for booleans. View AlloyDB's
    documentation for allowed flags (e.g., `--database-flags
    max_allowed_packet=55555,skip_grant_tables=,log_output=1`).
  z--database-flagsz
FLAG=VALUE)r    r!   r   Nr.   r   s     r   AddDatabaseFlagsFlagr?      s3    ) 	 	  r   c                 R    SnU R                  SS[        R                  " 5       US9  g)z1Adds a --primary-labels flag to the given parser.zv    The resource labels for an AlloyDB primary instance. An object containing a
    list of "key": "value" pairs.
    z--primary-labelsr,   r-   Nr.   r   s     r   AddPrimaryLabelsFlagrA      r1   r   c                 0    Sn/ SQnU R                  SXS9  g)z3Adds a --database-version flag to the given parser.zDatabase engine major version.)POSTGRES_14POSTGRES_15POSTGRES_16POSTGRES_17z--database-version)r   r;   Nr   )r   r   r;   s      r   AddDatabaseVersionFlagrG      s$    .)' 	*Lr   N)__doc__
__future__r   r   r   googlecloudsdk.callioper   _IP_ADDRESS_PART_CIDR_PREFIX_PARTformatr#   r   r   r&   r(   r*   r0   r3   r=   r?   rA   rG    r   r   <module>rO      sx    J &  ' /8 0 CJJ,= K 
 ,83
E"

Mr   