o
     i                     @   s   d Z G dd deZedZedZG dd deZG dd deZG d	d
 d
eZG dd deZG dd deZ	G dd deZ
G dd deZdS )z4Helpful constants to use for Google Cloud Firestore.c                   @   s6   e Zd ZdZdZdddZdd Zd	d
 Zdd ZdS )Sentinelz1Sentinel objects used to signal special handling.descriptionreturnNc                 C   s
   || _ d S Nr   )selfr    r   /var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/google/cloud/firestore_v1/transforms.py__init__   s   
zSentinel.__init__c                 C   s   d | jS )NzSentinel: {})formatr   r   r   r   r   __repr__   s   zSentinel.__repr__c                 C      | S r   r   r   r   r   r   __copy__      zSentinel.__copy__c                 C   r   r   r   )r   memor   r   r   __deepcopy__!   r   zSentinel.__deepcopy__r   N)	__name__
__module____qualname____doc__	__slots__r	   r   r   r   r   r   r   r   r      s    
r   z+Value used to delete a field in a document.z;Value used to set a document field to the server timestamp.c                   @   s2   e Zd ZdZdZdddZdd Zed	d
 ZdS )
_ValueListzcRead-only list of values.

    Args:
        values (List | Tuple): values held in the helper.
    _valuesr   Nc                 C   s8   t |ttfstdt|dkrtdt|| _d S )Nz!'values' must be a list or tuple.    z'values' must be non-empty.)
isinstancelisttuple
ValueErrorlenr   )r   valuesr   r   r   r	   7   s
   z_ValueList.__init__c                 C      t || jstS | j|jkS r   )r   	__class__NotImplementedr   r   otherr   r   r   __eq__@      z_ValueList.__eq__c                 C      | j S )zgValues to append.

        Returns (List):
            values to be appended by the transform.
        r   r   r   r   r   r!   E      z_ValueList.valuesr   )	r   r   r   r   slotsr	   r'   propertyr!   r   r   r   r   r   .   s    
	r   c                   @      e Zd ZdZdS )
ArrayUniona{  Field transform: appends missing values to an array field.

    See:
    https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements

    Args:
        values (List | Tuple): values to append.
    Nr   r   r   r   r   r   r   r   r.   O       r.   c                   @   r-   )ArrayRemovear  Field transform: remove values from an array field.

    See:
    https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array

    Args:
        values (List | Tuple): values to remove.
    Nr/   r   r   r   r   r1   Z   r0   r1   c                   @   s.   e Zd ZdZd
ddZedd Zdd	 ZdS )_NumericValuezeHold a single integer / float value.

    Args:
        value (float): value held in the helper.
    r   Nc                 C   s    t |ttfstd|| _d S )NzPass an integer / float value.)r   intfloatr   _value)r   valuer   r   r   r	   l   s   
z_NumericValue.__init__c                 C   r)   )zlValue used by the transform.

        Returns:
            (Lloat) value passed in the constructor.
        )r5   r   r   r   r   r6   r   r*   z_NumericValue.valuec                 C   r"   r   )r   r#   r$   r5   r%   r   r   r   r'   {   r(   z_NumericValue.__eq__r   )r   r   r   r   r	   r,   r6   r'   r   r   r   r   r2   e   s    

r2   c                   @   r-   )	Incrementa|  Field transform: increment a numeric field with specified value.

    See:
    https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.increment

    Args:
        value (float): value used to increment the field.
    Nr/   r   r   r   r   r7      r0   r7   c                   @   r-   )Maximumap  Field transform: bound numeric field with specified value.

    See:
    https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.maximum

    Args:
        value (float): value used to bound the field.
    Nr/   r   r   r   r   r8      r0   r8   c                   @   r-   )Minimumap  Field transform: bound numeric field with specified value.

    See:
    https://cloud.google.com/firestore/docs/reference/rpc/google.firestore.v1#google.firestore.v1.DocumentTransform.FieldTransform.FIELDS.google.firestore.v1.ArrayValue.google.firestore.v1.DocumentTransform.FieldTransform.minimum

    Args:
        value (float): value used to bound the field.
    Nr/   r   r   r   r   r9      r0   r9   N)r   objectr   DELETE_FIELDSERVER_TIMESTAMPr   r.   r1   r2   r7   r8   r9   r   r   r   r   <module>   s   !