
    y                     >   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.                  R0                  \R.                  R2                  5       " S S\R4                  5      5       rg)z)`gcloud dataplex content update` command.    )absolute_import)division)unicode_literals)content)util)
exceptions)base)resource_args)	arg_utils)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    zAUpdate a Dataplex Content Resource with the given configurations.EXAMPLESa]  
          To update a Dataplex content `test-content` in project `test-project` within lake `test-lake` in location `us-central1` and
          change the description to `Updated Description`, run:

            $ {command}  test-content --project=test-project --location=us-central1 --lake=test-lake  --description='Updated Description'

          c                    [         R                  " U S5        U R                  SSS9  U R                  SSS9  U R                  SSS9  U R                  S	S
S9nUR                  SS9nUR                  SSS0[        R
                  SS9  UR                  SS9nUR                  SSS0[        R
                  SS9  U R                  SSSSS9  [        R                  " U 5        g )Nzto Update a Content to.z--descriptionzDescription of the Content)helpz--data-textzContent data in string formatz--pathzAThe path for the Content file, represented as directory structureTz.Sql script or notebook related configurations.)mutexr   z Notebook related configurations.z--kernel-typePYTHON3python3zKernel Type of the notebook.)choicestyper   z"Sql script related configurations.z--query-engineSPARKsparkz*Query Engine to be used for the Sql Query.z--validate-only
store_trueFz:Validate the update action, but don't actually perform it.)actiondefaultr   )r
   AddContentitemResourceArgadd_argument	add_groupr   ChoiceToEnumNamer   AddCreateLabelsFlags)parsersqlscript_or_notebooknotebook
sql_scripts       &lib/surface/dataplex/content/update.pyArgsUpdate.Args0   s1   ++F4MN
.JK
,KL
P  
 #,,I - K %../ / 1H I&''+	  - '001 1 3J '"''9	  ; J	  L
 $$V,    z-Status code: {status_code}. {status_message}.c           
      r   [         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        [#        USS5      nU(       a   [$        R&                  R)                  S5        g [$        R*                  " U5        g )N   zIUpdate commands must specify at least one additional parameter to change.,)namevalidateOnly
updateMaskgoogleCloudDataplexV1Contentvalidate_onlyFzValidation complete.)r   GenerateUpdateMasklenr   HttpExceptionCONCEPTSParsedataplex_utilGetClientInstance%projects_locations_lakes_contentitemsPatchGetMessageModule6DataplexProjectsLocationsLakesContentitemsPatchRequestRelativeNamer2   joinGenerateContentForUpdateRequestgetattrr   statusPrintUpdatedResource)selfargsupdate_maskcontent_refdataplex_clientr2   s         r'   Run
Update.RunW   s     ,,T2K
;!$$
U  --''--/K#557O99??&& 	

@
@))+++yy-)0,,*--1*3	 A 45 D/59M	jj-.$r*    N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr(   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionrJ   __static_attributes__rL   r*   r'   r   r       sM    I 
- $- $-L 4457%7%r*   r   N)rQ   
__future__r   r   r   googlecloudsdk.api_lib.dataplexr   r   r8   googlecloudsdk.api_lib.utilr   rT   googlecloudsdk.callioper	   #googlecloudsdk.command_lib.dataplexr
   $googlecloudsdk.command_lib.util.apisr   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   ReleaseTracksReleaseTrackALPHAGACommandr   rL   r*   r'   <module>rd      sv    0 &  ' 3 A F ( . = : < # D%%++T->->-A-ABN%T\\ N% CN%r*   