
    .                         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 Zej                   G d	 d
ej                               Zy)z%Cloud Pub/Sub topic describe command.    )absolute_import)division)unicode_literals)topics)base)resource_argsc                 V    | d u xs$ | j                  d      xs | j                  d      S )Nyamldefault)
startswith)output_formats    %lib/surface/pubsub/topics/describe.py _FormatRequiresDelimiterEscapingr      s5    t -		!	!&	)-		!	!)	,    c                   &    e Zd ZdZed        Zd Zy)Describez Describes a Cloud Pub/Sub topic.c                 0    t        j                  | d       y )Nzto describe.)r   AddTopicResourceArg)parsers    r   ArgszDescribe.Args&   s    %%fn=r   c                    t        j                         }|j                  j                  j	                         }|j                  |      }t        |j                        s|S |j                  }|rj|j                  r^|j                  j                  rH|j                  j                  j                  dk(  r%d|j                  j                  j                  _        |S )N
z\n)r   TopicsClientCONCEPTStopicParseGetr   formatingestionDataSourceSettingscloudStorage
textFormat	delimiter)selfargsclient	topic_reftopic_resultingestion_settingss         r   RunzDescribe.Run*   s      "F##))+I::i(L,T[[9 &AA++++66++66@@DH  ..;;FFP r   N)__name__
__module____qualname____doc__staticmethodr   r)    r   r   r   r   "   s    (> >r   r   N)r-   
__future__r   r   r   googlecloudsdk.api_lib.pubsubr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.pubsubr   r   UniverseCompatibleDescribeCommandr   r/   r   r   <module>r6      sH    , &  ' 0 ( ; t##  r   