
    P                     8   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	K
Jr  SS	KJr  \	R                   \	R"                  " \	R$                  R&                  \	R$                  R(                  5       " S
 S\	R*                  5      5       5       rg)zHCommand to bulk mute Security Command Center findings based on a filter.    )absolute_import)division)print_function)unicode_literals)securitycenter_client)base)flags)utilc                   :    \ rS rSrSrSSSS.r\S 5       rS rSr	g	)
BulkMute   z=Bulk mute Security Command Center findings based on a filter.a  
      To bulk mute findings given organization ``123'' based on a filter on
      category that equals ``XSS_SCRIPTING'', run:

        $ {command} --organization=organizations/123
          --filter="category=\"XSS_SCRIPTING\""

      To bulk mute findings given folder ``123'' based on a filter on category
      that equals ``XSS_SCRIPTING'', run:

        $ {command} --folder=folders/123 --filter="category=\"XSS_SCRIPTING\""

      To bulk mute findings given project ``123'' based on a filter on category
      that equals ``XSS_SCRIPTING'', run:

        $ {command} --project=projects/123
          --filter="category=\"XSS_SCRIPTING\""

      To bulk mute findings given organization ``123'' based on a filter on
      category that equals ``XSS_SCRIPTING'' and `location=eu` run:

        $ {command} --organization=organizations/123
          --filter="category=\"XSS_SCRIPTING\"" --location=locations/eu
      z
      This command uses the Security Command Center API. For more information,
      see [Security Command Center API.](https://cloud.google.com/security-command-center/docs/reference/rest))DESCRIPTIONEXAMPLESzAPI REFERENCEc                 r   U R                  SSS9nUR                  SSS9  UR                  SSS9  UR                  SS	S9  U R                  S
SSS9  [        R                  " SSSS/SS9R	                  U 5        [
        R                  R	                  U 5        [
        R                  R	                  U 5        g )NT)mutexrequiredz--organizationzl
        Organization where the findings reside. Formatted as
        ``organizations/123'' or just ``123''.)helpz--folderz`
        Folder where the findings reside. Formatted as ``folders/456'' or just
        ``456''.z	--projectzq
        Project (id or number) where the findings reside. Formatted as
        ``projects/789'' or just ``789''.z--filterz9Expression that identifies findings that should be muted.)r   r   z--mute-statemuted	undefinedz"Desired mute state of the finding.)defaultchoiceshelp_str)	add_groupadd_argumentr   ChoiceArgumentAddToParser	scc_flagsAPI_VERSION_FLAGLOCATION_FLAG)parserparent_groups     %lib/surface/scc/findings/bulk_mute.pyArgsBulkMute.ArgsC   s     ##$#>L2      -   H   	+&5	
 k&**62''/    c                    [         R                  " U5      n[        R                  " U5      nUR	                  5       nUR                  UR                  [        R                  " UR                  U5      S9Ul
        [        R                  " U5      Ul        SUl        US:X  a%  [        R                  " XR                  5      Ul        [        R                  " U5      nUR                  R!                  U5      $ )N)filter	muteState v2)scc_utilGetVersionFromArgumentsr   GetMessages2SecuritycenterOrganizationsFindingsBulkMuteRequestBulkMuteFindingsRequestr'   r
   ConvertMuteStateInput
mute_statebulkMuteFindingsRequestValidateAndGetParentparent(ValidateLocationAndGetRegionalizedParent	GetClientorganizations_findingsr   )selfargsversionmessagesrequestclients         r"   RunBulkMute.Runm   s    ..t4G$009HIIKG&.&F&F{{,,T__hG 'G 'G# ..t4GNDK$DD
gn #,,W5F((11'::r%    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr#   r>   __static_attributes__r@   r%   r"   r   r      s;     F J
0r9-B '0 '0R;r%   r   N)rE   
__future__r   r   r   r   googlecloudsdk.api_lib.sccr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sccr	   r   r
   r+   'googlecloudsdk.command_lib.scc.findingsDefaultUniverseOnlyReleaseTracksReleaseTrackGAALPHACommandr   r@   r%   r"   <module>rT      s|    O &  % ' < ( = ; 8 D%%(($*;*;*A*AB`;t|| `; C `;r%   