
    y                         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  \R"                   " S S\R$                  5      5       rg)z/gcloud dns record-sets transaction add command.    )absolute_import)division)unicode_literals)resource_record_sets)transaction_util)util)base)flags)logc                   .    \ rS rSrSr\S 5       rS rSrg)Add   a  Append a record-set addition to the transaction.

This command appends a record-set addition to the transaction.

For a guide detailing how to manage records, see:
https://cloud.google.com/dns/records/

## EXAMPLES

To add an A record with an IP address of "1.2.3.4", domain name of
"my.domain.", and a managed zone "MANAGED_ZONE", run:

  $ {command} "1.2.3.4" \
      --name=my.domain. --ttl=1234 \
      --type=A --zone=MANAGED_ZONE

To add a TXT record with multiple data values while specifying time to
live as 14400 seconds, run:

  $ {command} "Hello world" "Bye world" \
      --name=my.domain. --ttl=14400 \
      --type=TXT --zone=MANAGED_ZONE
c                     [         R                  " 5       R                  U 5        U R                  SSSS9  U R                  SS[        SS9  U R                  SSS	S9  U R                  S
SSS9  g )Nz--nameTz,DNS or domain name of the record-set to add.)requiredhelpz--ttlz-TTL (time to live) for the record-set to add.)r   typer   z--typez)DNS record type of the record-set to add.rrdatas+zDNS data (Address/CNAME/MX info, etc.) of the record-set to add. This is RDATA; the format of this information varies depending on the type and class of the resource record.)nargsr   )r
   
GetZoneArgAddToParseradd_argumentint)parsers    .lib/surface/dns/record_sets/transaction/add.pyArgsAdd.Args8   s    	""6*
4;  = $S<  > 48  : =  >    c                 j   SnU R                  5       [        R                   R                  :X  a  SnO.U R                  5       [        R                   R                  :X  a  Sn[        R
                  " UR                  5       n[        R                  " X2S9nS S S 5        [        R                  " U5      R                  UR                  [        R                  " X!5      SS9nWR                  R                  [        R                   " UUR"                  US95        [        R
                  " UR                  S5       n[        R$                  " X45        S S S 5        [&        R(                  R+                  SR-                  UR                  5      5        g ! , (       d  f       GN= f! , (       d  f       NY= f)	Nv1v1beta2v1alpha2)api_versionzdns.managedZones)params
collectionwz1Record addition appended to transaction at [{0}].)ReleaseTrackr	   BETAALPHA
trans_utilTransactionFiletransaction_fileChangeFromYamlFiler   GetRegistryParsezoneGetParamsForRegistry	additionsappendrrsets_utilCreateRecordSetFromArgsprojectWriteToYamlFiler   statusPrintformat)selfargsr#   
trans_filechangezone_refs         r   RunAdd.RunJ   sT   K d//444k				 1 1 7 7	7k		#	#D$9$9	:j,,
/f 
; ,22		((;% 3 'H ++#	%& 
	#	#D$9$93	?:  4 
@ JJ;BB!!	#$# 
;	: 
@	?s    F:F$
F!$
F2 N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r@   __static_attributes__rB   r   r   r   r      s     0 > >"$r   r   N)rG   
__future__r   r   r   googlecloudsdk.api_lib.dnsr   r4   r   r*   r   googlecloudsdk.callioper	   googlecloudsdk.command_lib.dnsr
   googlecloudsdk.corer   UniverseCompatibleCommandr   rB   r   r   <module>rQ      sM     6 &  ' J E + ( 0 # G$$,, G$ G$r   