Ë
    €Ïi  ã                   óh   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ d„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zy)z8Utilities for defining Org Policy arguments on a parser.é    )Úabsolute_import)Údivision)Úunicode_literals)Ú
completers)Úcommon_argsc                 ó,   — | j                  ddd¬«       y)zuAdds argument for the constraint name to the parser.

  Args:
    parser: ArgumentInterceptor, An argparse parser.
  Ú
constraintÚ
CONSTRAINTz±Name of the org policy constraint. The list of available constraints can be found here: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints©ÚmetavarÚhelpN©Úadd_argument©Úparsers    ú8lib/googlecloudsdk/command_lib/org_policies/arguments.pyÚAddConstraintArgToParserr      s#   € ð 	×ÑØØðfð	 õ 	ó    c                 ó,   — | j                  ddd¬«       y)z|Adds argument for the custom constraint name to the parser.

  Args:
    parser: ArgumentInterceptor, An argparse parser.
  Úcustom_constraintÚCUSTOM_CONSTRAINTzName of the custom constraint.r   Nr   r   s    r   ÚAddCustomConstraintArgToParserr   )   s    € ð 	×ÑØØ!Ø,ð õ /r   c                 ó.   — | j                  dddd¬«       y)zrAdds argument for a list of values to the parser.

  Args:
    parser: ArgumentInterceptor, An argparse parser.
  ÚvalueÚVALUEÚ*zËValues to add to the policy. The set of valid values corresponding to the different constraints are covered here: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints)r   Únargsr   Nr   r   s    r   ÚAddValueArgToParserr   5   s&   € ð 	×ÑØØØðfð õ 	r   c                 óâ   — | j                  dd¬«      }|j                  ddt        j                  d¬«       |j                  dd	d
¬«       t	        j
                  d¬«      j                  |«       y)a7  Adds flags for the resource ID to the parser.

  Adds --organization, --folder, and --project flags to the parser. The flags
  are added as a required group with a mutex condition, which ensures that the
  user passes in exactly one of the flags.

  Args:
    parser: ArgumentInterceptor, An argparse parser.
  Tz9Resource that is associated with the organization policy.)Úrequiredr   ú--organizationÚORGANIZATION_IDúOrganization ID.)r   Ú	completerr   z--folderÚ	FOLDER_IDz
Folder ID.r   zProject ID.)Úhelp_text_to_overwriteN)Úadd_mutually_exclusive_groupr   r   ÚOrganizationCompleterr   ÚProjectArgumentÚAddToParser)r   Úresource_groups     r   ÚAddResourceFlagsToParserr,   F   s~   € ð ×6Ñ6ØØFð 7ó H€.ð ×ÑØØÜ×0Ñ0Øð	 ô ð
 ×ÑØ˜+¨Lð ô :ä×ÑØ*ô,ß,7©K¸Õ,Gr   c                 ó.   — | j                  dddd¬«       y)z½Adds flag for the organization ID to the parser.

  Adds --organization flag to the parser. The flag
  is added as required.

  Args:
    parser: ArgumentInterceptor, An argparse parser.
  r!   r"   Tr#   )r   r    r   Nr   r   s    r   Ú$AddOrganizationResourceFlagsToParserr.   ^   s#   € ð 	×ÑØØØØð	 õ !r   c                 ó,   — | j                  ddd¬«       y)zvAdds argument for the update-mask flag to the parser.

  Args:
    parser: ArgumentInterceptor, An argparse parser.
  z--update-maskÚUPDATE_MASKaƒ  Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request. The update-mask flag can be empty, or have values `policy.spec`, `policy.dry_run_spec` or `*`. If the policy does not contain the dry_run_spec and update-mask flag is not provided, then it defaults to `policy.spec`.r   Nr   r   s    r   ÚAddUpdateMaskArgToParserr1   n   s"   € ð 	×ÑØØð1ð õ 	3r   N)Ú__doc__Ú
__future__r   r   r   Ú+googlecloudsdk.command_lib.resource_managerr   Ú$googlecloudsdk.command_lib.util.argsr   r   r   r   r,   r.   r1   © r   r   Ú<module>r7      s8   ðñ ?å &Ý Ý 'å BÝ <ò	ò 	/ò	ò"Hò0!ó 3r   