
    /                        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  \R                  \R                   " \R"                  R$                  5       " S S\R&                  5      5       5       rg)zCreate-preview command.    )absolute_import)division)unicode_literals)configmanager_util)base)deploy_util)flags)resource_args)concept_parsersc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Create   z3Create a preview.

This command creates a preview.
EXAMPLESa\  
        Create a preview named `my-preview` from a storage `my-bucket`:

          $ {command} projects/p1/locations/us-central1/previews/my-preview --gcs-source="gs://my-bucket" --input-values="project=p1,region=us-central1"

        Create a preview named `my-preview` from git repo "https://github.com/examples/repository.git", "staging/compute" folder, "mainline" branch:

          $ {command} projects/p1/locations/us-central1/previews/my-preview --git-source-repo="https://github.com/examples/repository.git"
            --git-source-directory="staging/compute" --git-source-ref="mainline"
      c           	         SnSn[         R                  " X5        [         R                  " X5        [         R                  " U 5        [         R                  " U 5        [         R
                  " U 5        [         R                  " U 5        [         R                  " U 5        [         R                  " U 5        [         R                  " U 5        [         R                  " U 5        [         R                  " U 5        [        R                  " [        R                  " S5      [        R                   " SSSS05      /SS	/0S
9R#                  U 5        g )Nz0Preview labels cannot be updated after creation.z5Preview annotations cannot be updated after creation.z"the location to be used as parent.zthe preview to be used as parent. It is optional and will be
              generated if not specified with a fully specified name.Flocation zPREVIEW.locationz--location.location)command_level_fallthroughs)r	   AddLabelsFlagAddAnnotationsFlagAddAsyncFlagAddDeploymentFlagAddPreviewModeFlagAddTerraformBlueprintFlagAddServiceAccountFlagAddWorkerPoolFlagAddArtifactsGCSBucketFlagAddProviderSourceFlagAddTFVersionConstraintFlagr   ConceptParserr
   GetLocationResourceArgSpecGetPreviewResourceArgSpecAddToParser)parserlabels_help_textannotations_help_texts      ,lib/surface/infra_manager/previews/create.pyArgsCreate.Args2   s   I?  
1	V;	v	F#	V$	##F+	'	F#	##F+	'	$$V,!!444 33IR 		
	
 !6 7$
 k&    c                    [         R                  " 5       nUR                  R                  R	                  5       nUb/  UR                  5       nUR                  5       R                  5       nO6SnUR                  R                  R	                  5       nUR                  5       n[        R                  " UUR                  UUUR                  UR                  UR                  UR                  UR                  UR                   UR"                  UR$                  UR&                  UR(                  UR*                  UR,                  UR.                  UR0                  UR2                  UR4                  UR6                  UR8                  5      $ )a  This is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  The resulting Preview resource or, in the case that args.async_ is
    True, a long-running operation.
N)r   GetMessagesModuleCONCEPTSpreviewParseRelativeNameParentr   r   r   async_
deploymentpreview_modeservice_accountlocal_sourcestage_bucketignore_fileartifacts_gcs_bucketworker_pool
gcs_sourcegit_source_repogit_source_directorygit_source_refinput_valuesinputs_filelabelsannotationsprovider_sourcetf_version_constraint)selfargsmessagespreview_refpreview_full_namelocation_full_namelocation_refs          r&   Run
Create.RunU   sC    "335H--''--/K%224&--/<<>]]++113l'446!!!!""- r)    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr'   rK   __static_attributes__rM   r)   r&   r   r      s2      	 
 	-    D,r)   r   N)rR   
__future__r   r   r   $googlecloudsdk.api_lib.infra_managerr   googlecloudsdk.callioper   (googlecloudsdk.command_lib.infra_managerr   r	   r
   (googlecloudsdk.command_lib.util.conceptsr   DefaultUniverseOnlyReleaseTracksReleaseTrackGACreateCommandr   rM   r)   r&   <module>r`      sn     &  ' C ( @ : B D D%%(()bT b * br)   