
                         &   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  \R(                  " \R*                  R,                  \R*                  R.                  5       " S S\R0                  5      5       rg)z/Command to move a project into an organization.    )absolute_import)division)unicode_literals)projects_api)base)flags)util)log)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Move   a  Move a project into an organization.

Moves the given project into the given organization.

This command can fail for the following reasons:
    * There is no project with the given ID.
    * There is no organization with the given ID, if an organization is given
      as the destination.
    * There is no folder with the given ID, if a folder is given as the
      destination.
    * More than one of organization or folder is provided.
    * The active account does not have  the
      resourcemanager.projects.update permission for the given
      project.
    * The active account does not have  the
      resourcemanager.projects.create permission for the given
      organization.
    * The given project is already in an organization.

## EXAMPLES

The following command moves a project with the ID `super-awesome-project` into
the organization `25872158`:

  $ {command} super-awesome-project --organization=25872158
c                     [         R                  " S5      R                  U 5        [        R                  " U 5        U R
                  R                  [        R                  5        g )Nmove)	project_flagsGetProjectIDNumberFlagAddToParserfolder_flagsAddParentFlagsToParserdisplay_info	AddFormatcommand_lib_utilLIST_FORMAT)parsers    lib/surface/projects/move.pyArgs	Move.Args;   sD    ((0<<VD''/
!!"2">">?    c                 P   [         R                  " U5        [        R                  " UR                  5      n[
        R                  " S5      (       d  g [        R                  " U[        R                  " [         R                  " U5      5      S9n[        R                  " U5        U$ )Na  Your project will be moved. This may alter the policies enforced on your Project, either exposing your Project to more security risk through looser polices or cause an outage through stricter polices. See these public notes on policy implications for more information: https://cloud.google.com/resource-manager/docs/creating-managing-folders#moving-folders-policy-considerations and https://cloud.google.com/resource-manager/docs/migrating-projects-billing#note_on_policy_implications. Once moved, you can move the Project again so long as you have the appropriate permissions. See our public documentation for more information: https://cloud.google.com/resource-manager/docs/creating-managing-folders#moving_a_project_into_a_folder)parent)r   CheckParentFlagsr   ParseProjectidr   PromptContinuer   UpdateParentNameToResourceIdGetParentFromFlagsr
   UpdatedResource)selfargsproject_refresults       r   RunMove.RunA   s    !!$'"//8K$$	C    22++D134F $Mr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r-   __static_attributes__r/   r   r   r   r      s"    6 @ @
r   r   N)r4   
__future__r   r   r   +googlecloudsdk.api_lib.cloudresourcemanagerr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.projectsr   r   r	   r   +googlecloudsdk.command_lib.resource_managerr   googlecloudsdk.corer
   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackALPHABETACommandr   r/   r   r   <module>rC      sm    6 &  ' D ( F H M # 2 D%%++T->->-C-CD94<< 9 E9r   