
                             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                   G d dej                                Zy)z9Command to show metadata of a notification configuration.    )absolute_import)division)unicode_literals)api_factory)base)errors)#notification_configuration_iterator)storage_url)resource_projectorc                   0    e Zd ZdZdddZed        Zd Zy)Describez/Show metadata for a notification configuration.zU
      *{command}* prints populated metadata for a notification configuration.
      z
      Describe a single notification configuration (with ID 3) in the
      bucket `example-bucket`:

        $ {command} projects/_/buckets/example-bucket/notificationConfigs/3
      )DESCRIPTIONEXAMPLESc                 *    | j                  dd       y )Nurlz)The url of the notification configuration)help)add_argument)parsers    5lib/surface/storage/buckets/notifications/describe.pyArgszDescribe.Args0   s    
$OP    c                 2   t        j                  |j                        \  }}|r|s"t        j                  d|j                  z         t        j                  t        j                  t        j                  j                        j                  ||            S )Nz1Received invalid notification configuration URL: )r	   +get_bucket_url_and_notification_id_from_urlr   r   InvalidUrlErrorr   MakeSerializabler   get_apir
   ProviderPrefixGCSget_notification_configuration)selfargs
bucket_urlnotification_ids       r   RunzDescribe.Run4   s    +	4	4TXX	?  J ?""
=
HJ J..&&**	,,J,JO--. .r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r$    r   r   r   r      s1    7

- Q Q
.r   r   N)r(   
__future__r   r   r   googlecloudsdk.api_lib.storager   googlecloudsdk.callioper   "googlecloudsdk.command_lib.storager   r	   r
   googlecloudsdk.core.resourcer   UniverseCompatibleDescribeCommandr   r+   r   r   <module>r3      sM     @ &  ' 6 ( 5 R : ; .t## . .r   