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/logging/__pycache__/copy.cpython-312.pyc
�

�����R�dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ejejejjejjejj �Gd�d	ej"���Zd
dd�e_y
)z'logging copy' command.�)�absolute_import)�division)�unicode_literals)�util)�base)�
console_ioc�,�eZdZdZed��Zd�Zd�Zy)�CopyzCopy log entries.c���|jdd��|jdd��|jddd�	�|jd
dd�	�tj|d
�y)z Register flags for this command.�	bucket_idz:Id of the log bucket to copy logs from. Example: my-bucket)�help�destinationzjDestination to copy logs to. Example: Cloud Storage bucket: storage.googleapis.com/my-cloud-storage-bucketz
--locationTzLocation of the log bucket.)�requiredr
z--log-filterFz�A filter specifying which log entries to copy. The filter must be no more than 20k characters. An empty filter matches all log entries.zlog entries to copyN)�add_argumentr�
AddParentArgs)�parsers �lib/surface/logging/copy.py�Argsz	Copy.Args!s�������
I�������
>�������t�*G��������
7�	��	���v�4�5�c��|jstjdd��tjtjtj
|�d|j�d|j�}tj�j|j|j|��}tj�jj|�S)Nz(An empty filter matches all log entries.T)�cancel_on_no�	locations�buckets)r�filter�name)�
log_filterr�PromptContinuer�CreateResourceName�GetParentFromArgs�locationr�GetMessages�CopyLogEntriesRequestr�	GetClient�entriesr
)�self�args�parent_name�requests    r�_Runz	Copy._Run>s����?�?����
4�4�I��)�)�����"�"�4�(�+�t�}�}�	F��4�>�>�#�K���� �6�6��$�$�T�_�_�;�7�P�G��>�>��#�#�(�(��1�1rc�$�|j|�S)z�This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      A copy_log_entries operation.

    )r))r%r&s  r�RunzCopy.RunLs���9�9�T�?�rN)�__name__�
__module__�__qualname__�__doc__�staticmethodrr)r+�rrr
r
s#��
��6��6�82�rr
za        {command} starts the process to copy log entries from a log bucket to a destination.
    aN        To start a copy log entries operation, run:

          $ {command} BUCKET_ID DESTINATION --location=LOCATION

        To copy log entries in a specific time window, run:

          $ {command} BUCKET_ID DESTINATION --location=LOCATION --log-filter='timestamp<="2021-05-31T23:59:59Z" AND timestamp>="2021-05-31T00:00:00Z"'
    )�DESCRIPTION�EXAMPLESN)r/�
__future__rrr�googlecloudsdk.api_lib.loggingr�googlecloudsdk.callioper�googlecloudsdk.core.consoler�DefaultUniverseOnly�
ReleaseTracks�ReleaseTrack�ALPHA�BETA�GA�Commandr
�
detailed_helpr1rr�<module>r@s����&��'�/�(�2�������������T�.�.�3�3�T�5F�5F�5I�5I��9�4�<�<�9���9�z	�	�
��r