
    
                     ,   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  e
j                  e
j                  j                  e
j                  j                   e
j                  j"                         G d	 d
e
j$                               Zy)z(gcloud dns record-sets describe command.    )absolute_import)division)unicode_literals)util)apis)base)flagsc                   6    e Zd ZdZed        Zed        Zd Zy)Describea  Describe a record-set in a managed-zone.

  This command describes a record-set contained within the specified
  managed-zone.

  ## EXAMPLES

  To describe a record-set with dnsName foo.bar.com. and record type A, rrdata
  run:

    $ {command} foo.bar.com. --type=A --zone=my_zone
  c                     | j                         t        j                   j                  t        j                   j                  fv S )N)ReleaseTrackr   BETAALPHA)clss    'lib/surface/dns/record_sets/describe.py_BetaOrAlphazDescribe._BetaOrAlpha+   s:    $"3"3"8"8"&"3"3"9"9"; ; ;    c                    t        j                         j                  |       t        j                         j                  |       t        j                  d      j                  |       t        j
                         j                  |       |j                  j                  d        |j                  j                  t         j                         |j                  j                  t         j                         y )NT)r	   
GetZoneArgAddToParserGetResourceRecordSetsNameArgGetResourceRecordSetsTypeArgGetLocationArgdisplay_infoAddCacheUpdaterAddTransformsRESOURCERECORDSETS_TRANSFORMS	AddFormatRESOURCERECORDSETS_FORMAT)r   parsers     r   ArgszDescribe.Args0   s    	""6*	&&(44V<	&&t,88@	&&v.
''-
%%e&I&IJ
!!%"A"ABr   c                 4   t        j                  | j                         |      }t        j                  d|      }t        j
                  |      }t        j                  |      j                  |j                  t        j                  ||      d      }|j                  |j                  |j                         t        j                  |j                        |j                        }|dk(  r|j                   |_        |j"                  j%                  |      S )Ndnszdns.managedZones)params
collection)projectmanagedZonenametypev2)r   GetApiFromTrackAndArgsr   r   GetMessagesModuleGetApiClientGetRegistryParsezoneGetParamsForRegistryDnsResourceRecordSetsGetRequestr&   NameAppendTrailingDotr(   r)   locationresourceRecordSetsGet)selfargsapi_versionmessages
dns_clientzone_refrequests          r   RunzDescribe.Run:   s    --d.?.?.A4HK%%e[9H"";/J,22		((d;% 3 'H
 66  MMO##DII.YY	 7 G dg((,,W55r   N)__name__
__module____qualname____doc__classmethodr   r!   r?    r   r   r   r      s6     ; ; C C6r   r   N)rC   
__future__r   r   r   googlecloudsdk.api_lib.dnsr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   googlecloudsdk.command_lib.dnsr	   ReleaseTracksr   GAr   r   DescribeCommandr   rE   r   r   <module>rN      sx    / &  ' + , ( 0 D%%(($*;*;*@*@%%++-26t## 26-26r   