HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/lib/surface/services/__pycache__/disable.cpython-312.pyc
�

���$����dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZdd	lm
Z
d
ZedzZej ej"ej$ej&j(�Gd�d
ej*����Zej$ej&j.ej&j0�Gd�dej*��Zy)zservices disable command.�)�
services_util)�serviceusage)�base)�arg_parsers)�common_flags)�log)�
properties)�
console_ioz gcloud beta services operations zwait {0}c�&�eZdZdZed��Zd�Zy)�DisableAlphaa�Disable a service for consumption for a project, folder or organization.

  This command disables one or more previously-enabled services for
  consumption.

  To see a list of the enabled services for a project, run:

    $ {parent_command} list

  More information on listing services can be found at:
  https://cloud.google.com/service-usage/docs/list-services and on
  disabling a service at:
  https://cloud.google.com/service-usage/docs/enable-disable

  ## EXAMPLES
  To disable a service called `my-consumed-service` for the current
  project, run:

    $ {command} my-consumed-service

  To disable a service called `my-consumed-service` for the project
  `my-project`, run:

    $ {command} my-consumed-service --project=my-project

  To disable a service called `my-consumed-service` for the folder
  `my-folder`, run:

    $ {command} my-consumed-service --folder=my-folder

  To disable a service called `my-consumed-service` for the organization
  `my-organization`, run:

    $ {command} my-consumed-service --organization=my-organization

  To run the same command asynchronously (non-blocking), run:

    $ {command} my-consumed-service --async
  c�`�tjd��j|�tj|�tj
j|�tj|d��tj|�tj|�|jddd��y)	��Args is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command. Positional arguments are allowed.
    �
to disable��suffix�disable�--force�
store_trueaIf specified, the disable call will proceed even if there are enabled services which depend on the service to be disabled, or the service to be disabled was used in the last 30 days, or the service to be disabled was enabled in the last 3 days. Forcing the call means that the services which depend on the service to be disabled will also be disabled. (Note): If  --bypass-api-usage-check, --bypass-dependency-service-check, or --disable-dependency-services flags are used, they will take precedence over --force.��action�helpN)
r�consumer_service_flag�AddToParser�add_resource_argsr�
ASYNC_FLAG�validate_only_args�bypass_api_usage_check_flag�add_dependency_check_args�add_argument��parsers �lib/surface/services/disable.py�ArgszDisableAlpha.ArgsMs����&�&�l�;�G�G��O��"�"�6�*��O�O����'��#�#�F�9�=��,�,�V�4��*�*�6�2�
�����
(�	��c
��|jd�r|jn3tjjjjd��}|jd�r|jnd}|jd�r|jnd}|j}d}d}|jd�s|jd	�rd}|jd
�rd}|jd�rd}g}|jD]}	tj|	�}	tj|	�}
|
r@|jd�rtj��tj |
dd�
�}|s�o|j#|	���|sytj$||||||j&||��}|j(rAt*j-|j.�}
t0j2j5d|
���t7j8|j.tj:�}|j&rt7j<|�yt7j>|�y)��Run 'services disable'.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
        with.

    Returns:
      Nothing.
    �projectT��required�folderN�organizationF�force�disable_dependency_services�bypass_api_usage_check�bypass_dependency_service_check�quiet��default�throw_if_unattended)r,r*r+�
validate_only�skip_dependency_checkr-�`Asynchronous operation is in progress... Use the following command to wait for its completion:
 ) �IsSpecifiedr'r	�VALUES�core�Getr*r+r,�servicer�GetServiceNameFromArgr�GetProtectedServiceWarningr
�RequiredPromptError�PromptContinue�append�RemoveEnableRuler4�async_�OP_WAIT_CMD�format�namer�status�Printr�
WaitOperation�GetOperationV2Beta�PrintOperation�1PrintOperationWithResponseForUpdateConsumerPolicy)�self�argsr'r*r+r.r5r-�
service_names�service_name�
protected_msg�
do_disable�op�cmds              r"�RunzDisableAlpha.Runks!�����I�&�	
���
�
�
�
#�
#�
+�
+�
/�
/��
/�
>��
!�,�,�X�6�T�[�[�D�F�!�-�-�n�=����4��"�Z�Z��
"��"'������ �D�$4�$4�%�%�%)�!����0�1�#�����9�:�"���M����� �6�6�|�D�l�"�=�=�l�K�m�	����G�$��.�.�0�
0��.�.��5�d�
�
��
����<�(�%���	�	&�	&���$��!��(�(�3�$?�	
�B��{�{����r�w�w�'�c�	�j�j���4�47�5�:��
�	$�	$�R�W�W�l�.M�.M�	N�B�����"�"�2�&��E�E�b�Ir$N��__name__�
__module__�__qualname__�__doc__�staticmethodr#rT�r$r"rr!s#��&�P����:RJr$rc�&�eZdZdZed��Zd�Zy)�Disablea�Disable a service for consumption for a project.

  This command disables one or more previously-enabled services for
  consumption.

  To see a list of the enabled services for a project, run:

    $ {parent_command} list

  More information on listing services can be found at:
  https://cloud.google.com/service-usage/docs/list-services and on
  disabling a service at:
  https://cloud.google.com/service-usage/docs/enable-disable

  ## EXAMPLES
  To disable a service called `my-consumed-service` for the active
  project, run:

    $ {command} my-consumed-service

  To run the same command asynchronously (non-blocking), run:

    $ {command} my-consumed-service --async
  c��tjd��j|�tjj|�|jddd��y)rrrrra1If specified, the disable call will proceed even if there are enabled services which depend on the service to be disabled or disable the service used in last 30 days or was enabled in recent 3 days. Forcing the call means that the services which depend on the service to be disabled will also be disabled.rN)rrrrrrr s r"r#zDisable.Args�sN���&�&�l�;�G�G��O��O�O����'�
�����
K�	�
r$c���tjjjj	d��}|j
D�].}t
j|�}tj|�}|r@|jd�rtj��tj|dd��}|s�ptj|||j�}|j r��|j"rBt$j'|j(�}t*j,j/d|�����t1j2|j(tj4�}t1j6|���1y)r&Tr(r0Fr1r6N)r	r8r9r'r:r;rr<rr=r7r
r>r?�DisableApiCallr,�donerBrCrDrErrFrGrrH�GetOperationrJ)rLrMr'rOrPrQrRrSs        r"rTzDisable.Run�s#�����$�$�,�,�0�0�$�0�?�G����� �6�6�|�D�l�"�=�=�l�K�m�	����G�$��.�.�0�
0��.�.��5�d�
�
��
��&�&�w��d�j�j�I�b�	����	
���� � ����)���
�
���
� �E�
#�	
�
	��&�&�r�w�w��0I�0I�J�b��"�"�2�&�1%r$NrUr[r$r"r]r]�s ���2����*#'r$r]N)rY�googlecloudsdk.api_lib.servicesrr�googlecloudsdk.callioper�#googlecloudsdk.command_lib.servicesrr�googlecloudsdk.corerr	�googlecloudsdk.core.consoler
�OP_BASE_CMDrC�UniverseCompatible�Hidden�
ReleaseTracks�ReleaseTrack�ALPHA�
SilentCommandr�BETA�GAr]r[r$r"�<module>rqs���  �9�8�(�;�<�#�*�2�1���J�&������������D�%�%�+�+�,�YJ�4�%�%�YJ�-�
��YJ�x����D�%�%�*�*�D�,=�,=�,@�,@�A�S'�d� � �S'�B�S'r$