# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from gpa_api.models.base_model_ import Model
from gpa_api import util


class Metric(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, value=None, unit=None):  # noqa: E501
        """Metric - a model defined in OpenAPI

        :param value: The value of this Metric.  # noqa: E501
        :type value: float
        :param unit: The unit of this Metric.  # noqa: E501
        :type unit: str
        """
        self.openapi_types = {
            'value': float,
            'unit': str
        }

        self.attribute_map = {
            'value': 'value',
            'unit': 'unit'
        }

        self._value = value
        self._unit = unit

    @classmethod
    def from_dict(cls, dikt) -> 'Metric':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Metric of this Metric.  # noqa: E501
        :rtype: Metric
        """
        return util.deserialize_model(dikt, cls)

    @property
    def value(self):
        """Gets the value of this Metric.


        :return: The value of this Metric.
        :rtype: float
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this Metric.


        :param value: The value of this Metric.
        :type value: float
        """

        self._value = value

    @property
    def unit(self):
        """Gets the unit of this Metric.


        :return: The unit of this Metric.
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this Metric.


        :param unit: The unit of this Metric.
        :type unit: str
        """

        self._unit = unit
