
    {
                         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	iZ ej                  ej                  j                         G d
 dej                               Zy)z-recommender API insights Mark Active command.    )absolute_import)division)unicode_literals)insight)base)flagsEXAMPLESz
        To mark an insight as ACTIVE:

          $ {command} abcd-1234 --project=project-id --location=global --insight-type=google.compute.firewall.Insight --etag=abc123
        c                   *    e Zd ZdZeZed        Zd Zy)
MarkActivezMark an insight's state as ACTIVE.

     Mark an insight's state as ACTIVE. Can be applied to insights in DISMISSED
     state. The following are currently supported: project, billing_account,
     folder, and organization.
  c                     t        j                  |        | j                  dt        d       | j                  dddd       | j                  d	d
dd       | j                  dddd       y)zArgs is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command.
    INSIGHTz)Insight id which will be marked as active)typehelpz
--locationLOCATIONTLocation)metavarrequiredr   z--insight-typeINSIGHT_TYPEzInsight Type of the insightsz--etagetagzEtag of a insight)r   r   r   N)r   AddParentFlagsToParseradd_argumentstr)parsers    /lib/surface/recommender/insights/mark_active.pyArgszMarkActive.Args.   s     
  (
8  
 j4j  J
+	  -
 46I  K    c                     t        j                  | j                               }t        j                  |      }|j                  ||j                        S )zRun 'gcloud recommender insights mark-active'.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
        with.

    Returns:
      The result insights after being marked as active
    )r   CreateClientReleaseTrackr   GetInsightNamer   r   )selfargsclientnames       r   RunzMarkActive.RunF   sD     !!$"3"3"56F%DT499--r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r%    r   r   r   r   #   s'      -K K..r   r   N)r)   
__future__r   r   r   "googlecloudsdk.api_lib.recommenderr   googlecloudsdk.callioper   &googlecloudsdk.command_lib.recommenderr   r*   ReleaseTracksr   ALPHACommandr   r-   r   r   <module>r5      se    4 &  ' 6 ( 8 	 D%%++,.. .. -..r   