
                         P   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  \R(                  " \R*                  R,                  \R*                  R.                  5      \R0                   " S S\R2                  5      5       5       rg)z.`gcloud dataplex entry-groups update` command.    )absolute_import)division)unicode_literals)entry_group)util)
exceptions)base)resource_args)labels_util)logc                   `    \ rS rSrSrSS0r\S 5       r\R                  " S5      S 5       r
Srg	)
Update   zUpdate a Dataplex Entry Group.EXAMPLESa  
          To update Entry Group `test-entry-group` in project `test-project` at location `us-central1`,
          with description `updated description` and display name `updated display name`, run:

            $ {command} test-entry-group --location=us-central1 --project=test-project --description='updated description'
            --display-name='updated display name'

          c                 F   [         R                  " U S5        U R                  SSSS9  U R                  SSSS9  U R                  SSS	S9  U R                  S
SS9nUR                  SSSSS9  [        R
                  R                  U5        [        R                  " U 5        g )Nz
to update.z--descriptionFzDescription of the Entry Group.)requiredhelpz--display-namez Display name of the Entry Group.z--etagz&etag value for particular Entry Group.T)mutexr   z--validate-only
store_truez:Validate the update action, but don't actually perform it.)actiondefaultr   )	r
    AddDataplexEntryGroupResourceArgadd_argument	add_groupr	   
ASYNC_FLAGAddToParserr   AddCreateLabelsFlags)parserasync_groups     +lib/surface/dataplex/entry_groups/update.pyArgsUpdate.Args1   s    226<H
%.O   /  
 5'O   """>KI	   	OO,$$V,    z-Status code: {status_code}. {status_message}.c           
      :   [         R                  " U5      n[        U5      S:  a  [        R                  " S5      eUR
                  R                   R                  5       n[        R                  " 5       nUR                  R                  [        R                  " 5       R                  UR                  5       UR                  SR                  U5      [         R                   " U5      S95      n[#        USS5      nU(       a   [$        R&                  R)                  S5        g [#        USS5      nU(       d-  [         R*                  " U5      n[$        R,                  " US	S
9  U$ [$        R&                  R)                  SR/                  X5R0                  5      5        U$ )N   zIUpdate commands must specify at least one additional parameter to change.,)namevalidateOnly
updateMaskgoogleCloudDataplexV1EntryGroupvalidate_onlyFzValidation complete.async_zOperation was successful.)detailsz0Updating Entry Group [{0}] with operation [{1}].)r   GenerateEntryGroupUpdateMasklenr   HttpExceptionCONCEPTSParsedataplex_utilGetClientInstanceprojects_locations_entryGroupsPatchGetMessageModule0DataplexProjectsLocationsEntryGroupsPatchRequestRelativeNamer+   join"GenerateEntryGroupForUpdateRequestgetattrr   statusPrintWaitForOperationUpdatedResourceformatr'   )	selfargsupdate_maskentry_group_refdataplex_clientupdate_req_opr+   r,   responses	            r    Run
Update.RunI   s]    ::4@K
;!$$ 
 mm//557O#557O#BBHH&& 	

:
: --/++yy-,7//-004-6	 ; 78M D/59M	jj-.T8U+F--m<h	/3NOoJJ:AA//	12 r#    N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr!   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionrI   __static_attributes__rK   r#   r    r   r      sN     ' - - -. 445!!r#   r   N)rP   
__future__r   r   r   googlecloudsdk.api_lib.dataplexr   r   r3   googlecloudsdk.api_lib.utilr   rS   googlecloudsdk.callioper	   #googlecloudsdk.command_lib.dataplexr
   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   ReleaseTracksReleaseTrackALPHAGADefaultUniverseOnlyCommandr   rK   r#   r    <module>rc      s    5 &  ' 7 A F ( . = < # D%%++T->->-A-ABLT\\ L  CLr#   