
    
                         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
  ej                  ej                  j                         G d d	ej                               Zy
)z4recommender API recommendations Mark Active command.    )absolute_import)division)unicode_literals)recommendation)base)flagsc                   &    e Zd ZdZed        Zd Zy)
MarkActivea  Mark Active operations for a recommendation.

     Mark a recommendation's state as ACTIVE. Can be applied to recommendations
     in DISMISSED state. This currently supports the following parent entities:
     project, billing account, folder, and organization.

     ## EXAMPLES
     To mark a recommenation as ACTIVE:

      $ {command} RECOMMENDATION_ID --project=${PROJECT} --location=${LOCATION}
      --recommender=${RECOMMENDER} --etag=etag
  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.
    RECOMMENDATIONz0Recommendation id which will be marked as active)typehelpz
--locationLOCATIONTLocation)metavarrequiredr   z--recommenderRECOMMENDERz"Recommender of the recommendationsz--etagETAGzEtag of the recommendation)r   r   r   N)r   AddParentFlagsToParseradd_argumentstr)parsers    6lib/surface/recommender/recommendations/mark_active.pyArgszMarkActive.Args)   s     
  (
?  
 j4j  J
1	  3
 )	  +    c                     t        j                  | j                               }t        j                  |      }|j                  ||j                        S )zRun 'gcloud recommender recommendations mark-active'.

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

    Returns:
      The result recommendations after being marked as active
    )r   CreateClientReleaseTrackr   GetRecommendationNamer
   etag)selfargsclientnames       r   RunzMarkActive.RunD   sD     (():):)<=F&&t,DT499--r   N)__name__
__module____qualname____doc__staticmethodr   r%    r   r   r
   r
      s      + +4.r   r
   N)r)   
__future__r   r   r   "googlecloudsdk.api_lib.recommenderr   googlecloudsdk.callioper   &googlecloudsdk.command_lib.recommenderr   ReleaseTracksr   ALPHACommandr
   r+   r   r   <module>r3      sT    ; &  ' = ( 8 D%%++,5. 5. -5.r   