
                             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dlmZ ddlmZ e
j&                   G d de
j(                               Zy)zCommand to delete a fleet.    )absolute_import)division)unicode_literals)client)types)util)base)parser_arguments)parser_extensions)flags)logc                   r    e Zd ZdZedej                  fd       Zdej                  de
j                  fdZy)Deleteab  Delete a fleet.

  This command can fail for the following reasons:
  * The project specified does not exist.
  * The project specified already has a fleet.
  * The active account does not have permission to access the given project.

  ## EXAMPLES

  To delete a fleet in project `example-foo-bar-1`, run:

    $ {command} --project=example-foo-bar-1
  parserc                 N    t        j                  |       }|j                          y )N)fleet_flags
FleetFlagsAddAsync)r   r   s     %lib/surface/container/fleet/delete.pyArgszDelete.Args1   s    ""6*E	NN    argsreturnc                 4   t        j                  || j                               }d|j                         vr%|j	                         rt
        j                  |_        |j                  j                  t        j                  |j                                     }t        j                  | j                               }|j                  |      }t        j                   |j                               }|j	                         r(t#        j$                  |d|j	                                |S t        j&                  | j                               }t        j(                  |      }|j+                  |      }	t#        j$                  |d|j	                                |	S )au  Runs the fleet delete command.

    A completed fleet delete operation response body is empty, gcloud client
    won't apply the default output format in non-async mode.

    Args:
      args: Arguments received from command line.

    Returns:
      A completed create operation; if `--async` is specified, return a
      long-running operation to be polled manually.
    z--format)namezAnthos fleet)kindis_async)release_track)r   FleetFlagParserReleaseTrackGetSpecifiedArgNamesAsync
fleet_utilOPERATION_FORMATformatmessages*GkehubProjectsLocationsFleetsDeleteRequestr   FleetResourceNameProjectr   FleetClientDeleteFleetFleetRefr   DeletedResourceOperationClientOperationRefWait)
selfr   flag_parserreqfleetclient	operation	fleet_refoperation_clientoperation_refcompleted_operations
             r   Runz
Delete.Run6   sQ    --dD4E4E4GHK2244				 11



I
I##K$7$7$9: J C $$T%6%6%89K'',Ik1134I	
.;3D3D3F --D<M<M<OP%%i0M*//>1B1B1D r   N)__name__
__module____qualname____doc__staticmethodr
   ArgumentInterceptorr   r   	Namespacer   	Operationr:    r   r   r   r   !   sG     #77  &'11 &eoo &r   r   N)r>   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   r   r   googlecloudsdk.callioper	   r
   r   *googlecloudsdk.command_lib.container.fleetr   r   r#   googlecloudsdk.corer   DefaultUniverseOnlyDeleteCommandr   rC   r   r   <module>rK      sU     ! &  ' 9 8 7 ( 4 5 K I # :T : :r   