
    
                        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 dd	lmZ dd
lmZ dd
lmZ dZe
j&                   e
j(                  e
j*                  j,                         G d de
j.                                      Zy)z4Command to unenroll an Anthos cluster on bare metal.    )absolute_import)division)unicode_literals)bare_metal_clusters)
operations)base)parser_arguments)cluster_flags)	constantsz{
To unenroll a cluster named `my-cluster` managed in location `us-west1`,
run:

$ {command} my-cluster --location=us-west1
c                   H    e Zd ZdZdeiZedej                  fd       Z	d Z
y)Unenrollz)Unenroll an Anthos cluster on bare metal.EXAMPLESparserc                    | j                   j                  t        j                         t	        j
                  | d       t	        j                  |        t	        j                  |        t        j                  j                  |        y)z!Registers flags for this command.zto unenroll)verbN)display_info	AddFormatbare_metal_constantsBARE_METAL_CLUSTERS_FORMATflagsAddClusterResourceArgAddForceClusterAddAllowMissingClusterr   
ASYNC_FLAGAddToParser)r   s    5lib/surface/container/bare_metal/clusters/unenroll.pyArgszUnenroll.Args,   sa     !!77 
];	&!	  (OO'    c                    t        j                         }|j                  j                  j	                         }|j                  |      }|j                  y|j                  r&|j                  d      st        j                  |_        |j                  r"t        j                  ||j                         |S t        j                         }|j                  |      }t        j                  ||j                         |S )zRuns the unenroll command.Nformat)apisClustersClientCONCEPTSclusterParser   nameasync_IsSpecifiedr   OPERATIONS_FORMATr    r   log_unenrollOperationsClientWait)selfargscluster_clientcluster_ref	operationoperation_clientoperation_responses          r   RunzUnenroll.Run7   s    ((*N--''--/K''-I ~~{{4++H5//dk{{k4;;7#446+00;k4;;7r   N)__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr   r4    r   r   r   r   %   s6     2y)-(#77 ( ( r   r   N)r8   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r!   r   googlecloudsdk.callioper   r	   /googlecloudsdk.command_lib.container.bare_metalr
   r   r   r   .googlecloudsdk.command_lib.container.gkeonpremr9   HiddenReleaseTracksReleaseTrackALPHACommandr   r=   r   r   <module>rH      ss    ; &  ' R A ( 4 R ] D	 D%%++,% t|| %  - % r   