
                             d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddl	mZ dd	l	mZ dd
lmZ ddlmZ  ej"                  ddd       G d dej$                               Zy)z.`gcloud domains registrations export` command.    )absolute_import)division)unicode_literals)registrations)base)flags)resource_args)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                   &    e Zd ZdZed        Zd Zy)Exporta  Export a Cloud Domains registration.

  Export the domain to direct management by Google Domains. The domain remains
  valid until expiry.

  After you export a registered domain, the auto-renewal will be disabled, but
  you will continue to incur billing charges until the next yearly renewal date.
  You will also become the sole owner of the domain in Google Domains, and Cloud
  IAM is not used anymore.

  To manage your domain after exporting, visit Google Domains at
  https://domains.google.com/registrar, or see
  https://support.google.com/domains/answer/3251174 for more information.

  ## EXAMPLES

  To export a registration for ``example.com'', run:

    $ {command} example.com
  c                 Z    t        j                  | d       t        j                  |        y )Nz	to export)r	   AddRegistrationResourceArgr   AddAsyncFlagToParser)parsers    +lib/surface/domains/registrations/export.pyArgszExport.Args?   s     ,,V[A	v&    c                    t        j                  |      }t        j                  |      }t        j                  |j
                        |_        |j                  j
                  j                         }t        j                  dj                  |j                        dd       |j                  |      }t        j                  |||j                        }t        j                   |j#                         d|j                  d       |S )Nz)You are about to export registration '{}'T)throw_if_unattendedcancel_on_noregistrationzNote:
Registration remains valid until expiry. Manage it in Google Domains at https://domains.google.com/registrar, or see https://support.google.com/domains/answer/3251174 for more information.)is_asyncdetails)r   GetApiVersionFromArgsRegistrationsClientr
   NormalizeResourceNamer   CONCEPTSParser   PromptContinueformatregistrationsIdr   WaitForOperationasync_r   ExportResourceName)selfargsapi_versionclientregistration_refresponses         r   Runz
Export.RunD   s    55d;K..{;F2243D3DED}}117795<<,,	. 	 }}-.H$$[(DKKHH%	' Or   N)__name__
__module____qualname____doc__staticmethodr   r1    r   r   r   r      s     * ' 'r   r   N)r5   
__future__r   r   r   googlecloudsdk.api_lib.domainsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.domainsr   r	   r
   googlecloudsdk.corer   googlecloudsdk.core.consoler   	DeprecateDeleteCommandr   r7   r   r   <module>r@      sc    5 &  ' 8 ( 4 < 3 # 2 	T	T
2T 2
2r   