
    [                        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- and update-deployment 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   zCreate or update a deployment.

This command updates a deployment when it already exists, otherwise the
deployment will be created.
EXAMPLESa  
        Create a deployment named `my-deployment` from a storage `my-bucket`:

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

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

          $ {command} projects/p1/locations/us-central1/deployments/my-deployment --git-source-repo="https://github.com/examples/repository.git"
            --git-source-directory="staging/compute" --git-source-ref="mainline"

        Update a deployment's labels:

          $ {command} projects/p1/locations/us-central1/deployments/my-deployment --git-source-repo="https://github.com/examples/repository.git"
            --git-source-directory="staging/compute" --git-source-ref="mainline" --labels="env=prod,team=finance"
      c                 d   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      /5      R!                  U 5        g )Na  Labels to apply to the deployment. Existing values are overwritten. To retain
the existing labels on a deployment, do not specify this flag.

Examples:

Update labels for an existing deployment:

  $ {command} projects/p1/locations/us-central1/deployments/my-deployment --gcs-source="gs://my-bucket" --labels="env=prod,team=finance"

Clear labels for an existing deployment:

  $ {command} projects/p1/locations/us-central1/deployments/my-deployment --gcs-source="gs://my-bucket" --labels=""

Add a label to an existing deployment:

  First, fetch the current labels using the `describe` command, then follow the
  preceding example for updating labels.
a  Annotations to apply to the deployment. Existing values are overwritten. To retain
the existing annotations on a deployment, do not specify this flag.

Examples:

Update annotations for an existing deployment:

  $ {command} projects/p1/locations/us-central1/deployments/my-deployment --gcs-source="gs://my-bucket" --annotations="env=prod,team=finance"

Clear annotations for an existing deployment:

  $ {command} projects/p1/locations/us-central1/deployments/my-deployment --gcs-source="gs://my-bucket" --annotations=""

Add an annotation to an existing deployment:

  First, fetch the current annotations using the `describe` command, then follow the
  preceding example for updating annotations.
z#the deployment to create or update.)r	   AddLabelsFlagAddAnnotationsFlagAddAsyncFlagAddTerraformBlueprintFlagAddServiceAccountFlagAddWorkerPoolFlagAddImportExistingResourcesFlagAddArtifactsGCSBucketFlagAddTFVersionConstraintFlagAddQuotaValidationFlagAddProviderSourceFlagr   ConceptParserr
   GetDeploymentResourceArgSpecAddToParser)parserlabels_help_textannotations_help_texts      .lib/surface/infra_manager/deployments/apply.pyArgsCreate.Args8   s    && 
1	V;	v	##F+	'	F#	((0	##F+	$$V,	  (	'!!665	
 k&    c                 d   [         R                  " 5       nUR                  R                  R	                  5       nUR                  5       n[        R                  " UUR                  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R,                  UR.                  UR0                  UR2                  UR4                  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 Deployment resource or, in the case that args.async_ is
    True, a long-running operation.
)r   GetMessagesModuleCONCEPTS
deploymentParseRelativeNamer   Applyasync_service_accounttf_version_constraintlocal_sourcestage_bucketignore_fileimport_existing_resourcesartifacts_gcs_bucketworker_pool
gcs_sourcegit_source_repogit_source_directorygit_source_refinput_valuesinputs_filelabelsquota_validationannotationsprovider_source)selfargsmessagesdeployment_refdeployment_full_names        r"   Run
Create.Runt   s     "335H]]--335N)668""&&!!!!+ r%    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr#   rE   __static_attributes__rG   r%   r"   r   r      s2       
 -" 9 9v%r%   r   N)rL   
__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   rG   r%   r"   <module>rZ      sn    - &  ' C ( @ : B D D%%(()zT z * zr%   