
    *	                         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	d
Z
e	j                   G d de	j                               Ze
e_        y)z#'logging buckets describe' command.    )absolute_import)division)unicode_literals)util)arg_parsers)basez4
        Displays information about a log view.
    zr
     To describe a view in a project, run:

        $ {command} my-view --bucket=my-bucket --location=global
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Describez!Display information about a view.c                     | j                  dd       t        j                  | d       t        j                  | dd       | j                  ddt	        j
                  dd	      d
       y)z Register flags for this command.VIEW_IDzId of the view to describe.)helpzview to describeTzLocation of the bucket.z--bucketz.+zmust be non-emptyzID of bucket)requiredtyper   N)add_argumentr   AddParentArgsAddBucketLocationArgr   RegexpValidator)parsers    %lib/surface/logging/views/describe.pyArgszDescribe.Args)   si     	(EFv12fd,EF
((0CD	      c                 B   t        j                         j                  j                  t        j                         j                  t        j                  t        j                  t        j                  |      d|j                        d|j                                    S )zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      The specified view
    bucketsviews)name)
r   	GetClient projects_locations_buckets_viewsGetGetMessages.LoggingProjectsLocationsBucketsViewsGetRequestCreateResourceNameGetBucketLocationFromArgsbucketr   )selfargss     r   RunzDescribe.Run5   s}     >><<@@II((''2248)KK!")4<<9 	J 	:; ;r   N)__name__
__module____qualname____doc__staticmethodr   r(    r   r   r   r   %   s    )	 	;r   r   N)r,   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   r   DETAILED_HELPUniverseCompatibleDescribeCommandr   detailed_helpr.   r   r   <module>r6      s_    * &  ' / / (		 ;t## ; ;B ' r   