ó
    €Ïm*  ã                   ó¼   • 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 r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rg)zËUtility for updating Looker instances.

This utily is primarily used for modifying request hooks for update requests for
Looker instances. See go/gcloud-creating-commands#request-hooks for more
details.
é    )Úabsolute_import)Údivision)Úunicode_literals)Úapis)Ú
console_ioc                  ó>   • Sn U S-  n [         R                  " U SSS9  g)z:Adds prompt that warns about allowed email domains update.z3Change to instance allowed email domain requested. z®Updating the allowed email domains from cli means the value provided will be considered as the entire list and not an amendment to the existing list of allowed email domains.ú#Do you want to proceed with update?T©ÚmessageÚprompt_stringÚcancel_on_noN©r   ÚPromptContinue©r   s    Ú>lib/googlecloudsdk/command_lib/looker/instances_update_util.pyÚ_WarnForAdminSettingsUpdater      s/   € àA€'Ø	ð1ñ€'ô
 ×ÒØØ9Øóó    c                  ó>   • Sn U S-  n [         R                  " U SSS9  g)z1Adds prompt that warns about allowed vpcs update.zIChange to instance PSC allowed Virtual Private Cloud networks requested. z¤Updating the allowed VPC networks from cli means the value provided will be considered as the entire list and not an amendment to the existing list of allowed vpcs.r	   Tr
   Nr   r   s    r   Ú_WarnForPscAllowedVpcsUpdater   -   s6   € ðð 
ð 
ð(ñ€'ô
 ×ÒØØ9Øór   c                  ó4   • Sn [         R                  " U SSS9  g)z2Adds prompt that warns about allowed vpcs removal.z0Removal of instance PSC allowed vpcs requested. z8Do you want to proceed with removal of PSC allowed vpcs?Tr
   Nr   r   s    r   Ú#_WarnForPscAllowedVpcsRemovalUpdater   ?   s   € à>€'ä×ÒØØNØór   c                  ó>   • Sn U S-  n [         R                  " U SSS9  g)z8Adds prompt that warns about service attachments update.z6Change to instance PSC service attachments requested. z±Updating the PSC service attachments from cli means the value provided will be considered as the entire list and not an amendment to the existing list of PSC service attachmentsr	   Tr
   Nr   r   s    r   Ú#_WarnForPscServiceAttachmentsUpdater   J   s/   € àD€'Ø	ð2ñ€'ô
 ×ÒØØ9Øór   c                  ó4   • Sn [         R                  " U SSS9  g)z9Adds prompt that warns about service attachments removal.z7Removal of instance PSC service attachments requested. z;Do you want to proceed with removal of service attachments?Tr
   Nr   r   s    r   Ú*_WarnForPscServiceAttachmentsRemovalUpdater   Y   s   € àE€'ä×ÒØà
Gàór   c                 ó‚   • UR                   nU(       a%  UR                  U 5      S:X  a  U< SU < 3Ul         U$ Xl         U$ )a_  Adds fields to the update mask of the patch request.

Args:
  field: the field of the update mask to patch request for Looker instances.
  patch_request: the request of the actual update command to be modified

Returns:
  A patch request object to be sent to the server. The object is an instance
  of UpdateInstanceRequest: http://shortn/_yn9MhWaGJx
r   Ú,)Ú
updateMaskÚcount)ÚfieldÚpatch_requestÚupdate_masks      r   ÚAddFieldToUpdateMaskr#   f   sH   € ð ×(Ñ(€+ÞØ×Ñ˜Ó 1Ó$Û,7ºÐ!?€mÔð 
Ðð  %ÔØ	Ðr   c                 ó¨   • UR                  S5      (       a;  [        5         UR                  UR                  R                  l        [        SU5      nU$ )zNPython hook to modify allowed email domains in looker instance update request.Úallowed_email_domainsz$admin_settings.allowed_email_domains)ÚIsSpecifiedr   r%   ÚinstanceÚadminSettingsÚallowedEmailDomainsr#   ©Úunused_instance_refÚargsr!   s      r   ÚModifyAllowedEmailDomainsr-   z   sR   € à	×ÑÐ-×.Ñ.ô  Ô!à×"Ñ"ð ×Ñ×(Ñ(Ô<ô )Ø.°ó€Mð 
Ðr   c                 óv   • UR                  S5      (       d  UR                  S5      (       a  [        SU5      nU$ )zDHook to update maintenance window to the update mask of the request.Úmaintenance_window_dayÚmaintenance_window_timeÚmaintenance_window©r&   r#   r*   s      r   ÚUpdateMaintenanceWindowr3   ‰   s>   € à	×ÑÐ.×/Ñ/°4×3CÑ3CØ÷4ñ 4ô )Ð)=¸}ÓM€MØ	Ðr   c                 óJ   • UR                  S5      (       a  [        SU5      nU$ )zEHook to update public IP to the update mask of the request for alpha.Úenable_public_ipr2   r*   s      r   ÚUpdateEnablePublicIpAlphar6   ’   s'   € à	×ÑÐ(×)Ñ)Ü(Ð);¸]ÓK€MØ	Ðr   c                 óJ   • UR                  S5      (       a  [        SU5      nU$ )zAHook to update public IP to the update mask of the request fo GA.Úpublic_ip_enabledr2   r*   s      r   ÚUpdatePublicIPEnabledr9   ™   s'   € à	×ÑÐ)×*Ñ*Ü(Ð)<¸mÓL€MØ	Ðr   c                 óŽ   • UR                  S5      (       a.  UR                  S5      (       a  [        SU5      n[        SU5      nU$ )z?Hook to update Oauth configs to the update mask of the request.Úoauth_client_idÚoauth_client_secretzoauth_config.client_idzoauth_config.client_secretr2   r*   s      r   ÚUpdateOauthClientr=       sS   € à	×ÑÐ'×(Ñ(¨T×-=Ñ-=Ø÷.ñ .ô )Ø  -ó€Mô )Ø$ mó€Mð 
Ðr   c                 ó¢   • UR                  S5      (       d,  UR                  S5      (       d  UR                  S5      (       a  [        SU5      nU$ )zIHook to update deny maintenance period to the update mask of the request.Ú"deny_maintenance_period_start_dateÚ deny_maintenance_period_end_dateÚdeny_maintenance_period_timeÚdeny_maintenance_periodr2   r*   s      r   ÚUpdateDenyMaintenancePeriodrC   ¯   sQ   € ð ×ÑÐ;×<Ñ<Ø	×	Ñ	Ð<×	=Ñ	=Ø	×	Ñ	Ð8×	9Ñ	9ä(Ø! =ó€Mð 
Ðr   c                 ó¢   • UR                  S5      (       d,  UR                  S5      (       d  UR                  S5      (       a  [        SU5      nU$ )zDHook to update deny user metadata to the update mask of the request.Úadd_viewer_usersÚadd_standard_usersÚadd_developer_usersÚuser_metadatar2   r*   s      r   ÚUpdateUserMetadatarI   ¼   sL   € ð ×ÑÐ)×*Ñ*Ø	×	Ñ	Ð.×	/Ñ	/Ø	×	Ñ	Ð/×	0Ñ	0ä(¨¸-ÓH€MØ	Ðr   c                 óJ   • UR                  S5      (       a  [        SU5      nU$ )z?Hook to update custom domain to the update mask of the request.Úcustom_domainr2   r*   s      r   ÚUpdateCustomDomainrL   Ç   s%   € à	×Ño×&Ñ&Ü(¨¸-ÓH€MØ	Ðr   c                 ó  • UR                  S5      (       a=  [        5         UR                  UR                  R                  l        [        SU5      nU$ UR                  S5      (       a  [        5         [        SU5      nU$ )zJHook to update psc confing allowed vpcs to the update mask of the request.Úpsc_allowed_vpcszpsc_config.allowed_vpcsÚclear_psc_allowed_vpcs)r&   r   rN   r'   Ú	pscConfigÚallowedVpcsr#   r   r*   s      r   ÚUpdatePscAllowedVpcsrR   Î   s~   € à	×ÑÐ(×)Ñ)ô !Ô"Ø37×3HÑ3H€M×Ñ×$Ñ$Ô0Ü(Ø! =ó€Mð 
Ðð ×ÑÐ0×1Ñ1Ü'Ô)Ü(Ø! =ó€Mð 
Ðr   c                 óº   • UR                  S5      (       a  [        5         [        SU5      nU$ UR                  S5      (       a  [        5         [        SU5      nU$ )zQHook to update psc confing service attachments to the update mask of the request.Úpsc_service_attachmentzpsc_config.service_attachmentsÚclear_psc_service_attachments)r&   r   r#   r   r*   s      r   ÚUpdatePscServiceAttachmentsrV   à   sb   € à	×ÑÐ.×/Ñ/Ü'Ô)Ü(Ø(¨-ó€Mð 
Ðð ×ÑÐ7×8Ñ8Ü.Ô0Ü(Ø(¨-ó€Mð 
Ðr   c                 óÒ   • UR                  S5      (       a  [        SU5      nUR                  S5      (       a  [        SU5      nUR                  S5      (       a  [        SU5      nU$ )z@Hook to update gemini enabled to the update mask of the request.Úgemini_enabledÚgemini_preview_tester_enabledzgemini_ai_config.trusted_testerÚgemini_prompt_log_enabledzgemini_ai_config.prompt_loggingr2   r*   s      r   ÚUpdateGeminiAiConfigr[   ï   sm   € à	×ÑÐ&×'Ñ'Ü(Ð)9¸=ÓI€MØ	×ÑÐ5×6Ñ6Ü(Ø)¨=ó€Mð 
×ÑÐ1×2Ñ2Ü(Ø)¨=ó€Mð 
Ðr   c                 ó  • UR                  S5      (       dB  UR                  S5      (       d,  UR                  S5      (       d  UR                  S5      (       a  [        SU5      nUR                  S5      (       a  SUR                  l        U$ )z.Hook to handle periodic export config updates.Úclear_periodic_export_configÚperiodic_export_kms_keyÚperiodic_export_gcs_uriÚperiodic_export_start_timeÚperiodic_export_configN)r&   r#   r'   ÚperiodicExportConfigr*   s      r   ÚUpdatePeriodicExportConfigrc   þ   sƒ   € ð ×ÑÐ5×6Ñ6Ø	×	Ñ	Ð3×	4Ñ	4Ø	×	Ñ	Ð3×	4Ñ	4Ø	×	Ñ	Ð6×	7Ñ	7ä(Ø  -ó€Mð 
×ÑÐ4×5Ñ5Ø26€M×ÑÔ/Ø	Ðr   c                 ó  • UR                  S5      (       a  [        SU5      nUR                  S5      (       a'  UR                  (       a
  [        5         [        SU5      nUR                  S5      (       a  [        SU5      nU$ )z0Hook to handle controlled egress config updates.Úegress_enabledÚcontrolled_egress_enabledÚmarketplace_enabledz,controlled_egress_config.marketplace_enabledÚegress_fqdnsz%controlled_egress_config.egress_fqdns)r&   r#   rg   Ú _WarnForMarketplaceEnabledUpdater*   s      r   ÚUpdateControlledEgressConfigrj     s   € à	×ÑÐ&×'Ñ'Ü(Ø# ]ó€Mð 
×ÑÐ+×,Ñ,Ø××Ü&Ô(Ü(Ø6¸ó€Mð 
×Ñn×%Ñ%Ü(Ø/°ó€Mð 
Ðr   c                  ó>   • Sn U S-  n [         R                  " U SSS9  g)z8Adds prompt that warns about marketplace enabled update.z2Change to instance marketplace enabled requested. zSEnabling connection to the Looker Marketplace will also allow egress to github.com.r	   Tr
   Nr   r   s    r   ri   ri   "  s/   € à@€'Ø	ðñ€'ô ×ÒØØ9Øór   N)Ú__doc__Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.utilr   Úgooglecloudsdk.core.consoler   r   r   r   r   r   r#   r-   r3   r6   r9   r=   rC   rI   rL   rR   rV   r[   rc   rj   ri   © r   r   Ú<module>rq      s   ðñõ 'Ý Ý 'å ,Ý 2òòò$òò
òò(òòòòò
òòòò$òòò"ó&r   