
                         ,   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  \	R                   " \	R"                  R$                  \	R"                  R&                  5      \	R(                   " S	 S
\	R*                  5      5       5       rg)z7`gcloud dataplex glossaries categories update` command.    )glossary)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Updates a glossary category.EXAMPLESa&            To update display name, desciption and labels of glossary category
          `test-category` in glossary `test-glossary` in project `test-project`
          in location `us-central1`, run:

          $ {command} test-category --location=us-central1 --project=test-project
          --glossary=test-glossary --description='updated description'
          --display-name='updated displayName' --labels=key1=value1,key2=value2

          To update parent of glossary category `test-category` in glossary
          `test-glossary` in project `test-project` in location `us-central1`, run:

          $ {command} test-category --location=us-central1 --project=test-project
          --glossary=test-glossary --parent='projects/test-project/locations/us-central1/glossaries/updated-glossary'

          c                     [         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  [        R                  " U 5        g )
Nz
to update.z--descriptionFz%Description of the glossary category.)requiredhelpz--display-namez&Display Name of the glossary category.z--parentz2Immediate parent of the created glossary category.)r   AddGlossaryCategoryResourceArgadd_argumentr   AddCreateLabelsFlags)parsers    4lib/surface/dataplex/glossaries/categories/update.pyArgsUpdate.Args3   sz    00F
4  
 5  
 A  
 $$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       SR                  U5      [         R                   " U5      S95      n["        R$                  " U5        U$ )N   zHUpdate command must specify at least one additional parameter to change.,)name
updateMask%googleCloudDataplexV1GlossaryCategory)r   GenerateCategoryUpdateMasklenr   HttpExceptionCONCEPTSglossary_categoryParsedataplex_utilGetClientInstance(projects_locations_glossaries_categoriesPatchGetMessageModule9DataplexProjectsLocationsGlossariesCategoriesPatchRequestRelativeNamejoin(GenerateGlossaryCategoryForUpdateRequestr	   UpdatedResource)selfargsupdate_maskglossary_category_refdataplex_clientupdate_responses         r   Run
Update.RunG   s     55d;K
;!$$ 
 !MM;;AAC#557O%NNTT&&(bb&335xx,2:2c2c3 	c 	
O -.r    N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionr5   __static_attributes__r7   r   r   r   r      sN     %  -& - -& 445r   r   N)r<   googlecloudsdk.api_lib.dataplexr   r   r%   googlecloudsdk.api_lib.utilr   r?   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataplexr   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer	   ReleaseTracksReleaseTrackALPHAGADefaultUniverseOnlyCommandr   r7   r   r   <module>rN      sx    > 4 A F ( . = < # D%%++T->->-A-ABBT\\ B  CBr   