a
    !ft                     @   s(   d Z G dd deZG dd deZdS )zLabel Descriptors for the `Google Monitoring API (V3)`_.

.. _Google Monitoring API (V3):
    https://cloud.google.com/monitoring/api/ref_v3/rest/v3/LabelDescriptor
c                   @   s   e Zd ZdZdZdZdZdS )LabelValueTypezAllowed values for the `type of a label`_.

    .. _type of a label:
        https://cloud.google.com/monitoring/api/ref_v3/rest/v3/        LabelDescriptor#ValueType
    STRINGBOOLINT64N)__name__
__module____qualname____doc__r   r   r    r	   r	   X/var/www/html/python-backend/venv/lib/python3.9/site-packages/gcloud/monitoring/label.pyr      s   r   c                   @   sL   e Zd ZdZejdfddZedd Zdd Z	d	d
 Z
dd Zdd ZdS )LabelDescriptora  Schema specification and documentation for a single label.

    :type key: string
    :param key: The name of the label.

    :type value_type: string
    :param value_type:
        The type of the label. It must be one of :data:`LabelValueType.STRING`,
        :data:`LabelValueType.BOOL`, or :data:`LabelValueType.INT64`.
        See :class:`LabelValueType`.

    :type description: string
    :param description: A human-readable description for the label.
     c                 C   s   || _ || _|| _d S Nkey
value_typedescription)selfr   r   r   r	   r	   r
   __init__3   s    zLabelDescriptor.__init__c                 C   s"   | |d | dtj| ddS )a  Construct a label descriptor from the parsed JSON representation.

        :type info: dict
        :param info:
            A ``dict`` parsed from the JSON wire-format representation.

        :rtype: :class:`LabelDescriptor`
        :returns: A label descriptor.
        r   	valueTyper   r   )getr   r   )clsinfor	   r	   r
   
_from_dict8   s
    
zLabelDescriptor._from_dictc                 C   s"   | j | jd}| jr| j|d< |S )zBuild a dictionary ready to be serialized to the JSON wire format.

        :rtype: dict
        :returns: A dictionary.
        )r   r   r   r   )r   r   r	   r	   r
   _to_dictI   s    
zLabelDescriptor._to_dictc                 C   s   | j |j kS r   __dict__r   otherr	   r	   r
   __eq__Y   s    zLabelDescriptor.__eq__c                 C   s   | j |j kS r   r   r   r	   r	   r
   __ne__\   s    zLabelDescriptor.__ne__c                 C   s   dj f i | jS )NzTLabelDescriptor(key={key!r}, value_type={value_type!r}, description={description!r}))formatr   )r   r	   r	   r
   __repr___   s    zLabelDescriptor.__repr__N)r   r   r   r   r   r   r   classmethodr   r   r   r   r!   r	   r	   r	   r
   r   #   s   
r   N)r   objectr   r   r	   r	   r	   r
   <module>   s   