
    *                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SS	K	Jr  SS
K	Jr  SSKJr  SSKJr  SSKJr  SSKJr  \
R*                   " S S\
R,                  5      5       rg)zCommand to create a fleet.    )absolute_import)division)unicode_literals)client)types)util)base)parser_arguments)parser_extensions)flags)labels_util)logc                   ~    \ rS rSrSr\S\R                  4S j5       rS\	R                  S\R                  4S jrSrg	)
Create"   a  Create 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 create a fleet in project `example-foo-bar-1` with display name `my-fleet`,
run:

  $ {command} --display-name=my-fleet --project=example-foo-bar-1
parserc                     [         R                  " U 5      nUR                  5         UR                  5         UR	                  5         [
        R                  " U 5        g )N)fleet_flags
FleetFlagsAddAsyncAddDisplayNameAddDefaultClusterConfigr   AddCreateLabelsFlags)r   r   s     %lib/surface/container/fleet/create.pyArgsCreate.Args3   sB    ""6*E	NN		!!#$$V,    argsreturnc                 L   [         R                  " XR                  5       S9nSUR                  5       ;  a@  UR	                  5       (       a  [
        R                  Ul        O[
        R                  Ul        UR                  5       n[        R                  " U R                  5       S9n[        R                  " UR                  S9nUR                  UR                   R                  R"                  S5      R%                  5       nXcl        UR                   R'                  U[(        R*                  " UR-                  5       5      S9nUR/                  U5      n[(        R0                  " UR-                  5       5      n	UR	                  5       (       a&  [2        R4                  " U	SUR	                  5       S9  U$ [        R6                  " U R                  5       5      n
U
R9                  [(        R:                  " U5      5      n[2        R4                  " U	SUR	                  5       S9  U$ )a  Runs the fleet create command.

User specified --format takes the highest priority. If not specified, it
prints the default format of long-running operation or fleet, depending on
whether --async is specified.

$ {command} --async
  The output is in default operation format.

$ {command} --async --format
  The output is in user specified format.

$ {command}
  The output is in default fleet format.

$ {command} --format
  The output is in user specified format.

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.
)release_trackz--format)	additionsN)fleetparentzAnthos fleet)kindis_async)r   FleetFlagParserReleaseTrackGetSpecifiedArgNamesAsync
fleet_utilOPERATION_FORMATformatFLEET_FORMATFleetr   FleetClientr   DifflabelsApplymessagesLabelsValue	GetOrNone*GkehubProjectsLocationsFleetsCreateRequestr   FleetParentNameProjectCreateFleetFleetRefr   CreatedResourceOperationClientWaitOperationRef)selfr   flag_parserr#   fleetclientlabels_diffr2   req	operation	fleet_refoperation_clientcompleted_operations               r   Run
Create.Run;   s   4 ----/K 2244					 11 --E$$43D3D3FGK""T[[9K""..ik  L



I
I##K$7$7$9: J C '',Ik1134I	
.;3D3D3F --d.?.?.AB*//0A0A)0LM1B1B1D r    N)__name__
__module____qualname____firstlineno____doc__staticmethodr
   ArgumentInterceptorr   r   	Namespacer   	OperationrI   __static_attributes__rK   r   r   r   r   "   sG     -#77 - -='11 =eoo =r   r   N)rP   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   r   r   googlecloudsdk.callioper	   r
   r   *googlecloudsdk.command_lib.container.fleetr   r   r+   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   DefaultUniverseOnlyCreateCommandr   rK   r   r   <module>r^      s[     ! &  ' 9 8 7 ( 4 5 K I < # UT U Ur   