
    H                     4   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  S	S
0r\	R                  " \	R                  R                  \	R                  R                   \	R                  R"                  5       " S S\	R$                  5      5       rg)z/recommender API insights Mark Accepted command.    )absolute_import)division)unicode_literals)insight)arg_parsers)base)flagsEXAMPLESz
        To mark an insight as ACCEPTED:

          $ {command} abcd-1234 --project=project-id --location=global --insight-type=google.compute.firewall.Insight --etag=abc123
        c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)MarkAccepted$   zMark an insight's state as ACCEPTED.

Mark an insight's state as ACCEPTED. Can be applied to insights in ACTIVE
or ACCEPTED state. The following are currently supported: project,
billing_account, folder, and organization.
c           	      .   [         R                  " U 5        U R                  S[        SS9  U R                  SSSSS9  U R                  S	S
SSS9  U R                  SSSSS9  U R                  S[        R
                  " SS90 SS[        R                  S9  g)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 accepted)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   z--state-metadata   )
min_lengthzXState metadata for recommendation, in format of --state-metadata=key1=value1,key2=value2z	KEY=VALUE)r   defaultr   r   actionN)r	   AddParentFlagsToParseradd_argumentstrr   ArgDictStoreOnceAction)parsers    1lib/surface/recommender/insights/mark_accepted.pyArgsMarkAccepted.Args0   s     
  (
:  
 j4j  J
+	  -
 46I  K
  A.g**  ,    c                     [         R                  " U R                  5       5      n[        R                  " U5      nUR                  X1R                  UR                  5      $ )zRun 'gcloud recommender insights mark-accepted'.

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

Returns:
  The result insights after being marked as accepted
)r   CreateClientReleaseTrackr	   GetInsightNamer   state_metadatar   )selfargsclientnames       r"   RunMarkAccepted.RunO   sJ     !!$"3"3"56F%Dt%8%8$))DDr%    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr#   r/   __static_attributes__r1   r%   r"   r   r   $   s&      -, ,<Er%   r   N)r6   
__future__r   r   r   "googlecloudsdk.api_lib.recommenderr   googlecloudsdk.callioper   r   &googlecloudsdk.command_lib.recommenderr	   r7   ReleaseTracksr(   ALPHABETAGACommandr   r1   r%   r"   <module>rD      s    6 &  ' 6 / ( 8 	 D%%++T->->-C-C%%((*5E4<< 5E*5Er%   