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__/enable.cpython-312.pyc
�

�������dZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
dZed	zZd
dd�Z
d
dd�Zejej ej"ej$j&�Gd�dej(����Ze
e_ej"ej$j.ej$j0�Gd�dej(��Zee_y)zservices enable command.�)�
services_util)�serviceusage)�base)�common_flags)�log)�
propertiesz gcloud beta services operations zwait {0}a�        This command enables a service for consumption for a project, folder or organization.

        To see a list of available services for a project, run:

          $ {parent_command} list --available

     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
        a�        To enable a service called `my-consumed-service` on the current
        project, run:

          $ {command} my-consumed-service

        To enable a service called `my-consumed-service` on the project
        `my-project`, run:

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

        To enable a service called `my-consumed-service` on the folder
        `my-folder, run:

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

        To enable a service called `my-consumed-service` on 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

        To enable services called `service1`, `service2`, and `service3` on the
        current project, run:

          $ {command} service1 service2 service3
        )�DESCRIPTION�EXAMPLESa�        This command enables a service for consumption for a project.

        To see a list of available services for a project, run:

          $ {parent_command} list --available

     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
        a�        To enable a service called `my-consumed-service` on the current
        project, run:

          $ {command} my-consumed-service

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

          $ {command} my-consumed-service --async

        To enable services called `service1`, `service2`, and `service3` on the
        current project, run:

          $ {command} service1 service2 service3
        c�&�eZdZdZed��Zd�Zy)�EnableAlphazHEnables a service for consumption for a project, folder or organization.c��tjd��j|�tj|�tj
j|�tj|d��tj|�y)z�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 enable��suffix�enableN)r�available_service_flag�AddToParser�add_resource_argsr�
ASYNC_FLAG�validate_only_args�skip_dependency_flag��parsers �lib/surface/services/enable.py�ArgszEnableAlpha.Argsos[���'�'�{�;�G�G��O��"�"�6�*��O�O����'��#�#�F�8�<��%�%�f�-�c��|jd�r|jn3tjjjjd��}|jd�r|jnd}|jd�r|jnd}tj|j||||j|j��}|jrBtj|j �}t"j$j'd|���yt)j*|j tj,�}|jrt)j.|�yt)j0|�y)	z�Run 'services enable'.

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

    Returns:
      Nothing.
    �projectT��required�folderN�organization)r!r"�
validate_only�skip_dependency�`Asynchronous operation is in progress... Use the following command to wait for its completion:
 )�IsSpecifiedrr�VALUES�core�Getr!r"r�
AddEnableRule�servicer#r$�async_�_OP_WAIT_CMD�format�namer�status�Printr�
WaitOperation�GetOperationV2Beta�PrintOperation�PrintOperationWithResponse)�self�argsrr!r"�op�cmds       r�RunzEnableAlpha.Run}s2�����I�&�	
���
�
�
�
#�
#�
+�
+�
/�
/��
/�
>��
!�,�,�X�6�T�[�[�D�F�!�-�-�n�=����4��
�	#�	#������!��(�(��,�,�

�B��{�{�������(�c�	�j�j�����%�!��

�	�	$�	$�R�W�W�l�.M�.M�	N�B�����"�"�2�&��.�.�r�2rN��__name__�
__module__�__qualname__�__doc__�staticmethodrr:�rrrris��Q��.��.�)3rrc�&�eZdZdZed��Zd�Zy)�Enablez0Enables a service for consumption for a project.c��tjd��j|�tjj|�y)z�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.
    rrN)rrrrrrs rrzEnable.Args�s/���'�'�{�;�G�G��O��O�O����'rc�`�tjjjj	d��}t|j�dk(r$tj||jd�}n tj||j�}|jry|jrBtj|j�}tj j#d|���yt%j&|jtj(�}t%j*|�y)z�Run 'services enable'.

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

    Returns:
      Nothing.
    Tr�rNr%)rr'r(rr)�lenr+r�
EnableApiCall�BatchEnableApiCall�doner,r-r.r/rr0r1rr2�GetOperationr4)r6r7rr8r9s     rr:z
Enable.Run�s������$�$�,�,�0�0�$�0�?�G�
�4�<�<��A���%�%�g�t�|�|�A��?�b��*�*�7�D�L�L�A�b�	�w�w���{�{�������(�c�	�j�j�����%�!��

�	�	$�	$�R�W�W�l�.G�.G�	H�B�� � ��$rNr;rArrrCrC�s��8��	(��	(�%rrCN)r?�googlecloudsdk.api_lib.servicesrr�googlecloudsdk.callioper�#googlecloudsdk.command_lib.servicesr�googlecloudsdk.corerr�_OP_BASE_CMDr-�_DETAILED_HELP_ALPHA�_DETAILED_HELP�UniverseCompatible�Hidden�
ReleaseTracks�ReleaseTrack�ALPHA�
SilentCommandr�
detailed_help�BETA�GArCrArr�<module>r\s�� �9�8�(�<�#�*�1���j�(����+��\����@����������D�%�%�+�+�,�:3�$�$�$�:3�-�
��:3�x1�������D�%�%�*�*�D�,=�,=�,@�,@�A�)%�T�
�
�)%�B�)%�X&��r