
    
                         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"                  5       " S S\R$                  5      5       rg)zImport state file 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)	ImportStatefile   zfImport a terraform state file.

This command generates a signed url to upload a terraform state file.
EXAMPLESz
        Import state file for `my-deployment` with lock-id `1658343229583347`:

          $ {command} projects/p1/locations/us-central1/deployments/my-deployment --lock-id=1658343229583347

      c                     Sn[         R                  " X5        [         R                  " U 5        [        R                  " [
        R                  " S5      /5      R                  U 5        g )Nz        File path for importing statefile into a deployment. It specifies the
        local file path of an existing Terraform statefile to directly upload
        for a deployment.z$the deployment to be used as parent.)r	   AddFileFlagAddLockFlagr   ConceptParserr
   GetDeploymentResourceArgSpecAddToParser)parserfile_help_texts     9lib/surface/infra_manager/deployments/import_statefile.pyArgsImportStatefile.Args+   sW    N 
f-	f!!666	
 k&    c                     [         R                  " 5       nUR                  R                  R	                  5       nUR                  5       n[        R                  " UUUR                  UR                  5      $ )zThis 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:
  A statefile containing signed url that can be used to upload state file.
)
r   GetMessagesModuleCONCEPTS
deploymentParseRelativeNamer   ImportStateFilelock_idfile)selfargsmessagesdeployment_refdeployment_full_names        r   RunImportStatefile.Run<   s`     "335H]]--335N)668&&			 r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r*   __static_attributes__r,   r   r   r   r      s1    
   
 -   r   r   N)r1   
__future__r   r   r   $googlecloudsdk.api_lib.infra_managerr   googlecloudsdk.callioper   (googlecloudsdk.command_lib.infra_managerr   r	   r
   (googlecloudsdk.command_lib.util.conceptsr   ReleaseTracksReleaseTrackGACommandr   r,   r   r   <module>r>      s[    ! &  ' C ( @ : B D D%%(()1dll 1 *1r   