
                             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)z?Command to provision a new Spectrum Access System's deployment.    )absolute_import)division)unicode_literals)sas_portal_api)base)log)
properties)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)	Provision   zProvision a new Spectrum Access System's deployment.

## EXAMPLES

The following command provisions a new SAS deployment:

  $ gcloud spectrum-access provision --organization-name=MyOrgName
  --deployment-name=MyDeploymentName
c                 H    U R                  SSSS9  U R                  SSSS9  g )Nz--organization-nameFzThe display name to use in case a new SAS Portal organization needs to be created. If not set, a default display name of the form "Cloud organizations/[ID]" will be used where ID is the current Cloud Platform Organization ID.)requiredhelpz--deployment-namezThe display name to use in case a new SAS Portal deployment needs to be created. If not set, a default display name of the form "Cloud [ID]" will be used where ID is the current Cloud Platform Project ID.)add_argument)parsers    (lib/surface/spectrum_access/provision.pyArgsProvision.Args)   s@    
7	  	 	  	    c                    [         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l        UR!                  U5      nUR"                  (       d  [$        R&                  R(                  R+                  S5      R-                  5       nSnU(       a  SU;   a  S	n[$        R&                  R.                  R0                  R-                  5       n[         R                  R                  S
R3                  X5      5        U$ )Na  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_string	sasportalzg.co/sasportalzprod-tt-sasportalz0https://wirelessconnectivity.google.com/test-saszA new SAS deployment with userID: {}  has been created. Go to {} to check spectrum availability, pre-register CBSDs, check CBSD status and manage users.)r   statusPrintr
   PromptContinuer   EnableUserProjectQuotar   GetClientInstance	customersGetMessagesModule#SasPortalProvisionDeploymentRequestorganization_namenewOrganizationDisplayNamedeployment_namenewDeploymentDisplayNameProvisionDeploymenterrorMessager	   VALUESapi_endpoint_overridesPropertyGetcoreprojectformat)	selfargsclientmesssage_modulereqresultportal_api_overridesas_portal_urlr/   s	            r   RunProvision.Run@   s.   JJ	< 4 	!--/99F$668O

=
=
?C%)%;%;C"#'#7#7C '',F&--DDMM
  (n	"59L"LK!!&&..224g	jj1171P Mr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r9   __static_attributes__r;   r   r   r   r      s       ,&r   r   N)r@   
__future__r   r   r   &googlecloudsdk.api_lib.spectrum_accessr   googlecloudsdk.callioper   googlecloudsdk.corer   r	   googlecloudsdk.core.consoler
   HiddenDescribeCommandr   r;   r   r   <module>rJ      sK     F &  ' A ( # * 2 H$$ H Hr   