
    ]                         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  SSKJr  \R&                  " SSSS9\R(                   " S S\R*                  5      5       5       rg)z.`gcloud domains registrations import` command.    )absolute_import)division)unicode_literals)registrations)base)flags)resource_args)util)labels_util)log)
console_ioTzhThis command is deprecated. See https://cloud.google.com/domains/docs/deprecations/feature-deprecations.zkThis command has been removed. See https://cloud.google.com/domains/docs/deprecations/feature-deprecations.)
is_removedwarningerrorc                   .    \ rS rSrSr\S 5       rS rSrg)Import   a  Import a domain from Google Domains registrar to Cloud Domains.

Create a new Cloud Domains registration resource by importing an existing
domain from Google Domains registrar.
The new resource's ID will be equal to the domain name.

After this command executes, a resource is created with state ACTIVE,
indicating that the import was successful. Cloud Domains will automatically
renew your domain as long as your Cloud Billing account is active. If this
command fails, no resource is created.

Other users may lose access to the domain and will need IAM permissions on the
Cloud project containing the registration resource to regain access.

## EXAMPLES

To import ``example.com'', run:

  $ {command} example.com
c                     [         R                  " U SSS9  [        R                  " U 5        [        R
                  " U 5        g )NzThe domain namez	to import)nounverb)r	   AddRegistrationResourceArgr   AddCreateLabelsFlagsr   AddAsyncFlagToParser)parsers    +lib/surface/domains/registrations/import.pyArgsImport.ArgsA   s4    ,,&[:$$V,	v&    c                    [         R                  " U5      n[         R                  " U5      nUR                  5         [        R
                  " UR                  5      nXAR                  :w  a7  [        R                  " SR                  UR                  U5      SSSS9  XAl        UR                  R                  R                  5       nUR                  5       n[        R                  " XR                  R                   R"                  5      nUR%                  XeR&                  US9n[        R(                  " X(UR*                  5      n[,        R.                  " UR1                  5       SUR*                  5        U$ )Nz8Domain name '{}' has been normalized to equivalent '{}'.FT)throw_if_unattendedcancel_on_nodefault)labelsregistration)r   GetApiVersionFromArgsRegistrationsClientPrintSQSPAckr
   NormalizeResourceNamer$   r   PromptContinueformatCONCEPTSParseParentr   ParseCreateArgsmessagesImportDomainRequestLabelsValuer   registrationsIdWaitForOperationasync_r   CreatedResourceName)	selfargsapi_versionclient
normalizedregistration_reflocation_refr#   responses	            r   Run
Import.RunH   s6   55d;K..{;F
++D,=,=>J&&&
I
P
P-# %}}11779#**,L((oo11==?F }}66v  GH $$[DKKHH
 Or    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r?   __static_attributes__rA   r   r   r   r      s     * ' 'r   r   N)rF   
__future__r   r   r   googlecloudsdk.api_lib.domainsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.domainsr   r	   r
   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   googlecloudsdk.core.consoler   	DeprecateDefaultUniverseOnlyCreateCommandr   rA   r   r   <module>rS      st    5 &  ' 8 ( 4 < 3 < # 2 	T	T
 <T < 
<r   