# coding: utf-8

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

from typing import List, Dict  # noqa: F401

from tapi_server.models.base_model_ import Model
from tapi_server.models.tapi_common_capacity_unit import TapiCommonCapacityUnit  # noqa: F401,E501
from tapi_server import util


class TapiCommonCapacityValue(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    def __init__(self, value: int=None, unit: TapiCommonCapacityUnit=None):  # noqa: E501
        """TapiCommonCapacityValue - a model defined in Swagger

        :param value: The value of this TapiCommonCapacityValue.  # noqa: E501
        :type value: int
        :param unit: The unit of this TapiCommonCapacityValue.  # noqa: E501
        :type unit: TapiCommonCapacityUnit
        """
        self.swagger_types = {
            'value': int,
            'unit': TapiCommonCapacityUnit
        }

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

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

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

    @property
    def value(self) -> int:
        """Gets the value of this TapiCommonCapacityValue.

        none  # noqa: E501

        :return: The value of this TapiCommonCapacityValue.
        :rtype: int
        """
        return self._value

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

        none  # noqa: E501

        :param value: The value of this TapiCommonCapacityValue.
        :type value: int
        """

        self._value = value

    @property
    def unit(self) -> TapiCommonCapacityUnit:
        """Gets the unit of this TapiCommonCapacityValue.


        :return: The unit of this TapiCommonCapacityValue.
        :rtype: TapiCommonCapacityUnit
        """
        return self._unit

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


        :param unit: The unit of this TapiCommonCapacityValue.
        :type unit: TapiCommonCapacityUnit
        """

        self._unit = unit
