
    9Yf                     ,    d dl mZmZ  G d dee      Zy)    )GetableAPIResourceUpdatableAPIResourcec                   D     e Zd ZdZdZe fd       Ze fd       Z xZS )Metadataz3
    A wrapper around Metric Metadata HTTP API
    metricsc                 D    |st        d      t        t        |   |      S )z
        Get metadata information on an existing Datadog metric

        param metric_name: metric name (ex. system.cpu.idle)

        :returns: Dictionary representing the API's JSON response
        #'metric_name' parameter is required)KeyErrorsuperr   get)clsmetric_name	__class__s     T/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/datadog/api/metadata.pyr   zMetadata.get   s&     @AAXs'44    c                 H    |st        d      t        t        |   dd|i|S )a  
        Update metadata fields for an existing Datadog metric.
        If the metadata does not exist for the metric it is created by
        the update.

        :param type: type of metric (ex. "gauge", "rate", etc.)
                            see http://docs.datadoghq.com/metrictypes/
        :type type: string

        :param description: description of the metric
        :type description: string

        :param short_name: short name of the metric
        :type short_name: string

        :param unit: unit type associated with the metric (ex. "byte", "operation")
                     see http://docs.datadoghq.com/units/ for full list
        :type unit: string

        :param per_unit: per unit type (ex. "second" as in "queries per second")
                         see http://docs.datadoghq.com/units/ for full list
        :type per_unit: string

        :param statsd_interval: statsd flush interval for metric in seconds (if applicable)
        :type statsd_interval: integer

        :returns: Dictionary representing the API's JSON response

        >>> api.Metadata.update(metric_name='api.requests.served', metric_type="counter")
        r	   id )r
   r   r   update)r   r   paramsr   s      r   r   zMetadata.update   s/    @ @AAXs*DkDVDDr   )	__name__
__module____qualname____doc___resource_nameclassmethodr   r   __classcell__)r   s   @r   r   r      s7     N5 5 "E "Er   r   N)datadog.api.resourcesr   r   r   r   r   r   <module>r      s   
 K8E!#7 8Er   