
    v                     D   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  ej"                  ej$                  j&                  ej$                  j(                  ej$                  j*                         G d dej,                               Zy)z*gcloud dns response-policies list command.    )absolute_import)division)unicode_literals)
list_pager)util)apis)base)flags)
propertiesc                   6    e Zd ZdZed        Zed        Zd Zy)ListzDisplays the list of all Cloud DNS response policies in a given project.

      ## EXAMPLES

      To list response policies in Global Cloud DNS server (default), run:

        $ {command}
  c                     | j                         t        j                   j                  t        j                   j                  fv S )N)ReleaseTrackr	   BETAALPHA)clss    )lib/surface/dns/response_policies/list.py_BetaOrAlphazList._BetaOrAlpha)   s:    $"3"3"8"8"&"3"3"9"9"; ; ;    c                     t        j                         j                  |       |j                  j	                  d       y )Njson)r
   GetLocationArgAddToParserdisplay_info	AddFormat)r   parsers     r   Argsz	List.Args.   s-    	&&v.
!!&)r   c                    t        j                  | j                         |      }t        j                  |      }t	        j
                  d|      }|j                  t        j                  j                  j                  j                               }|dk(  r|j                  |_        t        j                  |j                  |d      S )Ndns)projectv2responsePolicies)field)r   GetApiFromTrackAndArgsr   GetApiClientr   GetMessagesModuleDnsResponsePoliciesListRequestr   VALUEScorer    	GetOrFaillocationr   YieldFromListr"   )selfargsapi_versionclientmessagesrequests         r   RunzList.Run3   s    --d.?.?.A4HK{+F%%e[9H55!!&&..88: 6 <G dg##0BD Dr   N)__name__
__module____qualname____doc__classmethodr   r   r3    r   r   r   r      s5     ; ; * *Dr   r   N)r7   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.dnsr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   googlecloudsdk.command_lib.dnsr
   googlecloudsdk.corer   ReleaseTracksr   r   r   GAListCommandr   r9   r   r   <module>rD      s    1 &  ' ' + , ( 0 * D%%++T->->-C-C%%((* D4  D* Dr   