
                         \   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  SS	KJr  SS
KJr  SSKJr  \	R&                  \	R(                  " \	R*                  R,                  \	R*                  R.                  5       " S S\	R0                  5      5       5       rg)z>Command to update a Cloud Security Command Center mute config.    )absolute_import)division)print_function)unicode_literals)securitycenter_client)base)flags)util)log)
propertiesc                   :    \ rS rSrSrSSSS.r\S 5       rS rSr	g	)
Update    z-Update a Security Command Center mute config.a  
        Update a mute config with ``ID=test-mute-config'' under
        ``organization=123'' with a filter on category that equals to
        XSS_SCRIPTING:

          $ {command} test-mute-config --organization=123
            --description="This is a test mute config"
            --filter="category=\"XSS_SCRIPTING\""

        Update a mute config with ``ID=test-mute-config'' under
        ``folder=456'' with a filter on category that equals to XSS_SCRIPTING:

          $ {command} test-mute-config --folder=456
            --description="This is a test mute config"
            --filter="category=\"XSS_SCRIPTING\""

        Update a mute config with ``ID=test-mute-config'' under
        ``project=789'' with a filter on category that equals to XSS_SCRIPTING:

          $ {command} test-mute-config --project=789
            --description="This is a test mute config"
            --filter="category=\"XSS_SCRIPTING\""

        Update a mute config with ``ID=test-mute-config'' under
        ``organization=123'' `location=eu`  with a filter on category that
        equals to XSS_SCRIPTING:

          $ {command} test-mute-config --organization=123
            --description="This is a test mute config"
            --filter="category=\"XSS_SCRIPTING\"" --location=euz
      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                 Z   [         R                  " U 5        [         R                  R                  U 5        [         R                  R                  U 5        [         R
                  R                  U 5        [         R                  R                  U 5        [        R                  R                  U 5        [        R                  R                  U 5        U R                  SSS9  U R                  R                  [        R                  R                  R                   R#                  5       5        g )Nz--update-maskz
        Optional: If left unspecified (default), an update-mask is automatically
        created using the flags specified in the command and only those values
        are updated.)help)r	   AddParentGroupMUTE_CONFIG_FLAGAddToParserDESCRIPTION_FLAGFILTER_FLAGEXPIRY_TIME_FLAG	scc_flagsAPI_VERSION_FLAGLOCATION_FLAGadd_argumentdisplay_info	AddFormatr   VALUEScoredefault_formatGet)parsers    %lib/surface/scc/muteconfigs/update.pyArgsUpdate.ArgsJ   s     
 	&&v.	&&v.	!!&)	&&v.**62''/
   !!*"3"3"8"8"G"G"K"K"MN    c                    [         R                  " XR                  5      n[        R                  " U5      nUR                  5       n[        R                  " U5      nUS:X  a+  UR                  UR                  UR                  US9Ul        O*UR                  UR                  UR                  US9Ul        UR                  (       d  / nUR                  S5      (       a  UR!                  S5        UR                  S5      (       a  UR!                  S5        UR                  S5      (       a  UR!                  S5        SR#                  U5      Ul        OUR                  Ul        [        R&                  " XU5      n[         R(                  " UR$                  5      Ul        SUl
        [        R*                  " U5      nUR,                  R/                  U5      n[0        R2                  R5                  S	5        U$ )
Nv2)descriptionfilter
expiryTimer+   r,   zexpiry-timeexpiry_time, zUpdated.)scc_utilGetVersionFromArgumentsmute_configr   GetMessages2SecuritycenterOrganizationsMuteConfigsPatchRequestr
   ValidateAndGetExpiryTime%GoogleCloudSecuritycenterV2MuteConfigr+   r,   %googleCloudSecuritycenterV2MuteConfig%GoogleCloudSecuritycenterV1MuteConfig%googleCloudSecuritycenterV1MuteConfigupdate_maskIsKnownAndSpecifiedappendjoin
updateMaskGenerateMuteConfigNameCleanUpUserMaskInput	GetClientorganizations_muteConfigsPatchr   statusPrint)	selfargsversionmessagesrequestr.   computed_update_maskclientresponses	            r%   Run
Update.Run]   s   ..t5E5EFG$009HIIKG//5K$

8
8**[[$ 9  3 
8
8**[[$ 9  3 		!	!-	0	0##M2		!	!(	+	+##H-		!	!-	0	0##M288$89g++g ))$AG!66w7I7IJGDK",,W5F//55g>HJJZ Or(    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr&   rO   __static_attributes__rQ   r(   r%   r   r       s=     6 EE<rA#-J O O$-r(   r   N)rV   
__future__r   r   r   r   googlecloudsdk.api_lib.sccr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sccr	   r   r
   r1   *googlecloudsdk.command_lib.scc.muteconfigsgooglecloudsdk.corer   r   DefaultUniverseOnlyReleaseTracksReleaseTrackGAALPHAUpdateCommandr   rQ   r(   r%   <module>rf      s    E &  % ' < ( = ; < ; # * D%%(($*;*;*A*ABhT h C hr(   