
                            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dl
mZ ddl
mZ  e	j                  e	j                  j                  e	j                  j                          G d	 d
e	j"                               Z e	j                  e	j                  j&                         G d de             ZddddZee_        ee_        y)zC`gcloud access-context-manager perimeters dry-run enforce` command.    )absolute_import)division)unicode_literals)zones)base)
perimeters)policiesc                   *    e Zd ZdZdZed        Zd Zy)EnforcePerimeterDryRun5Enforces a Service Perimeter's dry-run configuration.v1c                 X    t        j                  | d       | j                  ddd       y )Nzto resetz--async
store_truezZReturn immediately, without waiting for the operation in
            progress to complete.)actionhelp)r   AddResourceArgadd_argument)parsers    @lib/surface/access_context_manager/perimeters/dry_run/enforce.pyArgszEnforcePerimeterDryRun.Args    s0    fj1
%  &    c                     t        j                  | j                        }|j                  j                  j                         }t        j                  ||       |j                  |      S )N)version)		zones_apiClient_API_VERSIONCONCEPTS	perimeterParser	   ValidateAccessPolicyArgEnforceDryRunConfig)selfargsclientperimeter_refs       r   RunzEnforcePerimeterDryRun.Run)   sQ    d&7&78FMM++113M$$]D9%%m44r   N)__name__
__module____qualname____doc__r   staticmethodr   r&    r   r   r   r      s!    =,& &5r   r   c                       e Zd ZdZdZy)EnforcePerimeterDryRunAlphar   v1alphaN)r'   r(   r)   r*   r   r,   r   r   r.   r.   0   s
    =,r   r.   r   ag          Copies a Service Perimeter's dry-run mode configuration to its
        enforcement mode configuration and unsets the explicit dry-run spec.
        After this operation succeeds, the Service Perimeter will not have
        an explicit dry-run mode configuration, and, instead, the previous
        dry-run mode configuration will become the enforcement mode
        configuration. The operation will not be performed if there is no
        explicit dry-run mode configuration or if the dry-run mode
        configuration is incompatible with the overall enforcement mode VPC
        Service Controls policy.zo        To enforce the dry-run mode configuration for a Service Perimeter:


          $ {command} my-perimeter)briefDESCRIPTIONEXAMPLESN)r*   
__future__r   r   r   +googlecloudsdk.api_lib.accesscontextmanagerr   r   googlecloudsdk.callioper   /googlecloudsdk.command_lib.accesscontextmanagerr   r	   ReleaseTracksReleaseTrackBETAGAUpdateCommandr   ALPHAr.   detailed_helpr,   r   r   <module>r>      s    J &  ' J ( F D D%%**D,=,=,@,@A5T// 5 B5( D%%++,"8  - 	A		$	&( -:  )'4  $r   