
    
                     n    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\R                  5      rg	)
z$Command to create a fleet namespace.    )client)util)base)	resources)labels_utilc                   .    \ rS rSrSr\S 5       rS rSrg)Create   a  Create a fleet namespace.

This command can fail for the following reasons:
* The project specified does not exist.
* The project has a fleet namespace with the same name.
* The caller does not have permission to access the given project.

## EXAMPLES

To create a fleet namespace with name `NAMESPACE` in the active project, run:

  $ {command} NAMESPACE

To create a fleet namespace in fleet scope `SCOPE` in project `PROJECT_ID`
with name
`NAMESPACE`, run:

  $ {command} NAMESPACE --scope=SCOPE --project=PROJECT_ID
c                     [         R                  " U[        R                  U R	                  5          SSS9  [
        R                  " U5        [         R                  " U5        g )NzpName of the fleet namespace to be created. Must comply with RFC 1123 (up to 63 characters, alphanumeric and '-')T)api_versionnamespace_helprequired)r   AddScopeNamespaceResourceArgr   VERSION_MAPReleaseTrackr   AddCreateLabelsFlagsAddCreateNamespaceLabelsFlags)clsparsers     7lib/surface/container/fleet/scopes/namespaces/create.pyArgsCreate.Args.   sS    **$$S%5%5%78D  $$V,++F3    c                    UR                   R                  R                  5       nUR                  5       nUR	                  5       nUR                  5       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[        R                  " UR"                  S9n	U	R                  UR                  R                  R$                  S 5      R!                  5       n
UR'                  UUUUU
S9$ )N)release_track)	additions)labelsnamespace_labels)CONCEPTS	namespaceParseNameRelativeNameParentr   FleetClientr   r   Diffr   Applymessages	NamespaceLabelsValue	GetOrNoner   NamespaceLabelsValueCreateScopeNamespace)selfargsnamespace_argnamenamespace_pathparent_pathfleetclientlabels_diffr   ns_labels_diff	ns_labelss              r   Run
Create.Run<   s   MM++113MD"//1N&&(557K$$43D3D3FGK""T[[9K&&22Dik  !%%0E0EFN$$&&;;Tik  ++" ,  r    N)	__name__
__module____qualname____firstlineno____doc__classmethodr   r8   __static_attributes__r:   r   r   r	   r	      s     ( 4 4r   r	   N)r?   &googlecloudsdk.api_lib.container.fleetr   r   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.fleetr   $googlecloudsdk.command_lib.util.argsr   CreateCommandr	   r:   r   r   <module>rG      s-    + : 7 ( @ <7T 7r   