
    %                     "   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  SSKJr  SSKJr  SSKJr  \R,                  " SSSS9\R.                   " S S\R0                  5      5       5       rg)z0`gcloud domains registrations transfer` command.    )absolute_import)division)unicode_literals)registrations)base)contacts_util)dns_util)flags)resource_args)util)labels_util)
exceptions)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                   4    \ rS rSrSr\S 5       rS rS rSr	g)Transfer"   ad  Transfer a domain from another registrar.

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

After this command executes, the resource will be in state
TRANSFER_PENDING. To complete the transfer, the registrant may need to approve
the transfer through an email sent by the current registrar. Domain transfers
can take 5-7 days to complete. After the transfer is completed, the resource
transitions to state ACTIVE, indicating that the transfer was successful. If
the transfer is rejected or the request expires without being approved, the
resource ends up in state TRANSFER_FAILED. If the transfer fails, you can
safely delete the resource and retry the transfer. Transfers in state
TRANSFER_PENDING can also be cancelled with the delete command.

## EXAMPLES

To transfer ``example.com'' interactively, run:

  $ {command} example.com

To transfer ``example.com'' using contact data from a YAML file
``contacts.yaml'', run:

  $ {command} example.com --contact-data-from-file=contacts.yaml

To transfer ``example.com'' with interactive prompts disabled, provide
--authorization-code-from-file, --contact-data-from-file, --contact-privacy,
--yearly-price flags and one of the flags for setting authoritative name
servers. Sometimes also --notices flag is required.
c                     [         R                  " U SSS9  [        R                  " U 5        [        R
                  " U 5        [        R                  " U SSS9  [        R                  " U 5        g )NzThe domain namezto transfer)nounverbtransferdomain)r   r   )r   AddRegistrationResourceArgr
   AddTransferFlagsToParserr   AddCreateLabelsFlagsAddValidateOnlyFlagToParserAddAsyncFlagToParser)parsers    -lib/surface/domains/registrations/transfer.pyArgsTransfer.ArgsQ   sT    ,,&]<	""6*$$V,	%%f:HM	v&    c                     Uc  [         R                  " S5      eS H>  nUR                  U5      (       a  M  [         R                  " SR                  U5      5      e   g )NzProviding contacts is required.)registrantContactadminContacttechnicalContactzProviding {} is required.)r   Errorget_assigned_valueformat)selfcontactsfields      r"   _ValidateContactsTransfer._ValidateContactsZ   sS    >??J((//:AA%HII Kr%   c                 v   [         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UR                  XeR                  5      nUR                  R                   R"                  R$                  nUR&                  U:X  a/  [(        R*                  " SR                  UR&                  5      5      e[        R,                  " UR.                  5      n	[0        R2                  " XR                  R4                  R6                  5      n
S nUR8                  (       dR  [:        R<                  " US UR>                  UR@                  S UR                  [:        RB                  RD                  S9u  p[F        RH                  " UURJ                  5      nU(       a  U RM                  U5        [F        RN                  " UURP                  5      n[        RR                  " X!RT                  5      n[        RV                  " URX                  5      u  nnU	c  [        RZ                  " 5       n	Uc9  [        R\                  " UR^                  5      nUc  [(        R*                  " S5      e[        R`                  " XR^                  5      (       dX  [(        R*                  " SR                  [        Rb                  " U5      [        Rb                  " UR^                  5      5      5      eUR8                  nUcJ  U(       dC  [:        Rd                  " X%R                  5      u  pnUc  U(       d  [(        R*                  " S	5      eUc'  [F        Rf                  " U5      nU RM                  U5        Ucy  URh                   Vs/ s H2  n[j        Rl                  " UR                  5      Ro                  U5      PM4     nn[F        Rp                  " UU5      nUc  [(        R*                  " S
5      eXl9        UR                  Rt                  Rv                  Rx                  nU(       d@  UU:X  a:  [F        Rz                  " UR|                  U5      nUc  [(        R*                  " S5      eUR                  UUR                  UUU	R                  5       UUU
UR                  S9	nUR                  (       a!  [        R                  R                  S5        U$ [        R                  " UUUR                  5      n[        R                  " UR                  5       SUR                  SS9  U$ s  snf )Nz8Domain name '{}' has been normalized to equivalent '{}'.FT)throw_if_unattendedcancel_on_nodefaultzEDomains must be unlocked before transferring. Transfer lock state: {})dnssec_updatez#Accepting yearly price is required.z+Incorrect yearly_price: '{}', expected: {}.z#Providing DNS settings is required.z&Providing Contact Privacy is required.zAcceptance is required.)dns_settingscontact_settingsauthorization_codeyearly_pricepublic_privacy_acceptedlabelsvalidate_onlyzKThe command will not have any effect because validate-only flag is present.registrationa  Note:
The domain transfer has been initiated, but is not yet complete. The registrant may need to follow instructions in a transfer confirmation email sent by the current registrar in order for the transfer to proceed. Even after confirmation, transfers can sometimes take several days to complete. The transfer will be complete when the registration resource changes state to ACTIVE.)details)Ir   GetApiVersionFromArgsRegistrationsClientPrintSQSPAckr   NormalizeResourceNamer>   r   PromptContinuer,   CONCEPTSParseParentRetrieveTransferParametersregistrationsIdmessagesTransferParameters TransferLockStateValueValuesEnumLOCKEDtransferLockStater   r*   ReadFileContentsauthorization_code_from_filer   ParseCreateArgsRegistrationLabelsValuekeep_dns_settingsr	   ParseDNSSettingscloud_dns_zoneuse_google_domains_dnsDNSSECUpdateDISABLEr   ParseContactDatacontact_data_from_filer0   ParseContactPrivacycontact_privacyParseYearlyPricer:   ParseRegisterNoticesnoticesPromptForAuthCodePromptForYearlyPriceAckyearlyPrice
EqualPriceTransformMoneyTypePromptForNameServersTransferPromptForContactssupportedPrivacyr
   ContactPrivacyEnumMapperGetChoiceForEnumPromptForContactPrivacyprivacyContactSettingsPrivacyValueValuesEnumPUBLIC_CONTACT_DATAPromptForPublicContactsAck
domainNamer   stripr=   r   statusPrintWaitForOperationasync_CreatedResourceName)r-   argsapi_versionclient
normalizedregistration_reflocation_reftransfer_paramslocked_enum	auth_coder<   r7   _r.   r]   r:   public_contacts_ackrT   enumchoicespublic_privacy_enumresponses                         r"   RunTransfer.Runb   s   55d;K..{;F
++D,=,=>J&&&
H
O
O-# %}}11779#**,L 77668O //44UU\\K((K7
Q6/3346 6 %%d&G&GHI((oo**668F L!! 11






%
%


*
* --557ol --k.2.I.IKH
X&#778<8L8LNO((6G6GHL "66t||D((*i11/2M2MNl		DEE??<)D)DEE
9
@
@%%l3%%o&A&ABDE E
 ..$5+3+P+P
77,9(l(		&7DEE00=h
X& &666d 
(
(
9
J
J4
P6   &==
w o		 GHH& //99PPdd?6I#I)DD

$
$h0		$899((!!$??,! 3((  	*H 	jj 8 9" O &&{HdkkJh	



!

++"$ O]s   9V6 N)
__name__
__module____qualname____firstlineno____doc__staticmethodr#   r0   r   __static_attributes__r   r%   r"   r   r   "   s(    B ' 'JDr%   r   N)r   
__future__r   r   r   googlecloudsdk.api_lib.domainsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.domainsr   r	   r
   r   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r   googlecloudsdk.core.consoler   	DeprecateDefaultUniverseOnlyCreateCommandr   r   r%   r"   <module>r      s    7 &  ' 8 ( < 7 4 < 3 < * # 2 	T	T
 xt!! x 
xr%   