
                             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  \R                   " S
 S\R                  5      5       rg)zVCommand to migrate a existing Spectrum Access System's organization into Google Cloud.    )absolute_import)division)unicode_literals)sas_portal_api)base)
exceptions)log)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Migrate   a"  Migrates an existing SAS organization into Google Cloud.

This will create a Google Cloud project for each existing deployment
under the organization.

## EXAMPLES

The following command migrates an existing SAS organization:

  $ gcloud cbrs-spectrum-access migrate --organization-id=1234
c                 0    U R                  SS[        SS9  g )Nz--organization-idTz2The id of an existing SAS organization to migrate.)requiredtypehelp)add_argumentint)parsers    +lib/surface/cbrs_spectrum_access/migrate.pyArgsMigrate.Args+   s!    
A	      c                    UR                   (       d  [        R                  " SS5      e[        R                  R                  S5        [        R                  " SSSS9  [        R                  " 5         [        R                  " 5       R                  n[        R                  " 5       nUR                  5       nUR                   Ul        UR!                  U5      nUR"                  (       d  [        R                  R                  S5        U$ )	Nzorganization-idz.Organization id must be passed to the command.a  This command will enable the Spectrum Access System and create a new SAS deployment for your organization. The Spectrum Access System is governed by your Google Cloud Agreement or Cloud Master Agreement and the Spectrum Access System specific terms at cloud.google.com/terms.FTzDo you accept the agreement?)defaultcancel_on_noprompt_stringz_A long running operation has started to migrate your organization, this may take a few minutes.)organization_idr   InvalidArgumentExceptionr	   statusPrintr
   PromptContinuer   EnableUserProjectQuotar   GetClientInstance	customersGetMessagesModule#SasPortalMigrateOrganizationRequestorganizationIdMigrateOrganizationerror)selfargsclientmessage_modulereqresults         r   RunMigrate.Run4   s    //

: 
 JJ	< 4 	!--/99F#557N

<
<
>C--C'',F<< 
jj*
 Mr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r0   __static_attributes__r2   r   r   r   r      s     
  #r   r   N)r7   
__future__r   r   r   &googlecloudsdk.api_lib.spectrum_accessr   googlecloudsdk.callioper   r   googlecloudsdk.corer	   googlecloudsdk.core.consoler
   HiddenDescribeCommandr   r2   r   r   <module>rA      sH     ] &  ' A ( . # 2 9d"" 9 9r   