
    *	                     Z   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  ej                  ej                  j                   ej                  j"                         ej$                  d
d      ej&                   G d dej(                                             Zy)z"The gcloud run integrations group.    )absolute_import)division)unicode_literals)cast)base)	platforms)
exceptions)flagsTz/Cloud Run integrations are no longer supported.)
is_removederrorc                   4    e Zd ZdZddiZed        Zd Zd Zy)IntegrationszView and manage your Cloud Run (fully managed) integrations.

  This set of commands can be used to view and manage your Cloud Run
  integrations.
  EXAMPLESzX
          To list your existing integrations, run:

            $ {command} list
      c                 .    t        j                  |        y)zAdds --region flag.N)r
   AddRegionArg)parsers    (lib/surface/run/integrations/__init__.pyArgszIntegrations.Args4   s     
v    c                 (    ~| j                          |S )a^  Runs before command.Run and validates platform with passed args.

    Args:
      context: {str:object}, A set of key-value pairs that can be used for
          common initialization among commands.
      args: argparse.Namespace: The same namespace given to the corresponding
          .Run() invocation.

    Returns:
      The updated context
    )_CheckPlatform)selfcontextargss      r   FilterzIntegrations.Filter9   s     	Nr   c                 |    t        j                         }|t         j                  k7  rt        j                  d      y )NzCThis command group is only supported for Cloud Run (fully managed).)r   GetPlatformPLATFORM_MANAGEDr	   PlatformError)r   platforms     r   r   zIntegrations._CheckPlatformI   s;    $$&H9---$$
OQ Q .r   N)	__name__
__module____qualname____doc__detailed_helpstaticmethodr   r   r    r   r   r   r      s7      
-   Qr   r   N)r$   
__future__r   r   r   typingr   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   "googlecloudsdk.command_lib.runappsr	   r
   ReleaseTracksReleaseTrackALPHABETA	DeprecateDefaultUniverseOnlyGroupr   r'   r   r   <module>r4      s    ) &  '  ( 4 9 4  
; (Q4:: (Q 	(Qr   