
                         4    S r SSKr/ SQrS rSS jrS rS rg)	zHooks for ApiHub commands.    N)enum_values
enumValuesstring_valuesstringValuesjson_values
jsonValues
uri_values	uriValuesc                     U R                  S5      n/ nU H+  nUR                  [        R                  " SS U5      5        M-     SR	                  U5      $ )z9Converts a snake_case string to camelCase, handling dots..z_([a-z])c                 @    U R                  S5      R                  5       $ )N   )groupupper)xs    .lib/googlecloudsdk/command_lib/apihub/hooks.py<lambda>_CamelCase.<locals>.<lambda>&   s    QWWQZ5E5E5G    )splitappendresubjoin)	snake_strpartscamel_partsparts       r   
_CamelCaser   !   sJ    
//#
%+drvvk+GNO 	+	r   c                 h    Uc  Un[        U5      nU H  nX0U SU 3'   X:w  d  M  X0U SU 3'   M     g)a'  Adds config entries for a field, handling snake_case and camelCase.

Args:
  config: The dictionary to add entries to.
  snake_field: The field name in snake_case.
  suffixes: A list of suffixes for this field.
  target: The top-level field name in the update mask. Defaults to
    snake_field.
Nr   )r   )configsnake_fieldsuffixestargetcamel_fieldsuffixs         r   _AddConfigEntriesr'   *   sN     ^F;'+f(.k]!F8$%!*0}AfX&' r   c                 6    U H  n[        X[        5        M     g N)r'   _SYSTEM_ATTRIBUTE_SUFFIXES)r!   snake_fieldsfields      r    _AddSystemAttributeConfigEntriesr-   >   s    ef%?@ r   c                    UR                   (       d  U$ 0 n[        USSSSSSSS5	        [        US	/ S
Q5        [        USSS/5        0 n[        USSS5        [        USSS/5        0 n[        USSS/5        [        USSS/5        [        USS/5        0 n[        US5        [        USSS/5        [        US/ SQ5        0 n[        USSSSS5        [        USSS/5        U R                  5       nUUUUUS.n	U	R	                  U0 5      n
/ nUR                   R                  S 5      nU H  nUR                  5       nS!nU
R                  5        H?  u  nnX:X  d  UR                  US"-   5      (       d  M&  UU;  a  UR                  U5        S#n  O   U(       a  Mq  UR                  U5        M     [        [        [        U5      5      5      nS R                  U5      Ul         U$ )$zModifies the update mask to use top-level fields for complex attributes.

Args:
  ref: The resource reference.
  unused_args: The parsed command arguments.
  request: The request message.

Returns:
  The modified request.
teamtarget_userbusiness_unitmaturity_level	api_styleapi_requirementsapi_functional_requirementsapi_technical_requirementsowner)emaildisplay_namedisplayNamedocumentationexternal_uriexternalUri	lifecycle
complianceaccreditationzdetails.documentationzdetails.http_operation.pathdescriptionpathzdetails.http_operation.methodmethod	spec_typecontents)	mime_typemimeTyperE   deployment_typesloenvironmentmanagement_url
source_uri)zapihub.projects.locations.apisz'apihub.projects.locations.apis.versionsz-apihub.projects.locations.apis.versions.specsz%apihub.projects.locations.deploymentsz2apihub.projects.locations.apis.versions.operations,Fr   T)
updateMaskr-   r'   
Collectiongetr   stripitems
startswithr   sortedlistsetr   )refunused_argsrequestapi_field_configversion_field_configoperation_field_configspec_field_configdeployment_field_config
collection
config_mapmask_replacementsnew_mask_paths	raw_pathsrB   replaced
granulated	top_levels                    r   ModifyUpdateMaskrg   C   sK    
		N "#"
 !I .-)H "K Onm-L }%
 #f
 =z "#4kB>=*I %J " 0O
 ~~*(81E7H/F
 * !nnZ4.  &&s+)d::<DH!2!8!8!:
I		tzC/?@@N*


	
* "; 8D!   $s>234.xx/'	.r   r)   )__doc__r   r*   r   r'   r-   rg    r   r   <module>rj      s-    ! 
	 1(A
{r   