# coding: utf-8

"""
    Cudo Compute service

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from cudo_compute.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'time': 'datetime',
        'vcpus': 'float',
        'vcpu_revenue_usd': 'Decimal',
        'gpus': 'float',
        'gpu_revenue_usd': 'Decimal',
        'memory_gib': 'float',
        'memory_revenue_usd': 'Decimal'
    }

    attribute_map = {
        'time': 'time',
        'vcpus': 'vcpus',
        'vcpu_revenue_usd': 'vcpuRevenueUsd',
        'gpus': 'gpus',
        'gpu_revenue_usd': 'gpuRevenueUsd',
        'memory_gib': 'memoryGib',
        'memory_revenue_usd': 'memoryRevenueUsd'
    }

    def __init__(self, time=None, vcpus=None, vcpu_revenue_usd=None, gpus=None, gpu_revenue_usd=None, memory_gib=None, memory_revenue_usd=None, _configuration=None):  # noqa: E501
        """DataCenterCommitmentInterval - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._time = None
        self._vcpus = None
        self._vcpu_revenue_usd = None
        self._gpus = None
        self._gpu_revenue_usd = None
        self._memory_gib = None
        self._memory_revenue_usd = None
        self.discriminator = None

        if time is not None:
            self.time = time
        if vcpus is not None:
            self.vcpus = vcpus
        if vcpu_revenue_usd is not None:
            self.vcpu_revenue_usd = vcpu_revenue_usd
        if gpus is not None:
            self.gpus = gpus
        if gpu_revenue_usd is not None:
            self.gpu_revenue_usd = gpu_revenue_usd
        if memory_gib is not None:
            self.memory_gib = memory_gib
        if memory_revenue_usd is not None:
            self.memory_revenue_usd = memory_revenue_usd

    @property
    def time(self):
        """Gets the time of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The time of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: datetime
        """
        return self._time

    @time.setter
    def time(self, time):
        """Sets the time of this DataCenterCommitmentInterval.


        :param time: The time of this DataCenterCommitmentInterval.  # noqa: E501
        :type: datetime
        """

        self._time = time

    @property
    def vcpus(self):
        """Gets the vcpus of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The vcpus of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: float
        """
        return self._vcpus

    @vcpus.setter
    def vcpus(self, vcpus):
        """Sets the vcpus of this DataCenterCommitmentInterval.


        :param vcpus: The vcpus of this DataCenterCommitmentInterval.  # noqa: E501
        :type: float
        """

        self._vcpus = vcpus

    @property
    def vcpu_revenue_usd(self):
        """Gets the vcpu_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The vcpu_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: Decimal
        """
        return self._vcpu_revenue_usd

    @vcpu_revenue_usd.setter
    def vcpu_revenue_usd(self, vcpu_revenue_usd):
        """Sets the vcpu_revenue_usd of this DataCenterCommitmentInterval.


        :param vcpu_revenue_usd: The vcpu_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501
        :type: Decimal
        """

        self._vcpu_revenue_usd = vcpu_revenue_usd

    @property
    def gpus(self):
        """Gets the gpus of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The gpus of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: float
        """
        return self._gpus

    @gpus.setter
    def gpus(self, gpus):
        """Sets the gpus of this DataCenterCommitmentInterval.


        :param gpus: The gpus of this DataCenterCommitmentInterval.  # noqa: E501
        :type: float
        """

        self._gpus = gpus

    @property
    def gpu_revenue_usd(self):
        """Gets the gpu_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The gpu_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: Decimal
        """
        return self._gpu_revenue_usd

    @gpu_revenue_usd.setter
    def gpu_revenue_usd(self, gpu_revenue_usd):
        """Sets the gpu_revenue_usd of this DataCenterCommitmentInterval.


        :param gpu_revenue_usd: The gpu_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501
        :type: Decimal
        """

        self._gpu_revenue_usd = gpu_revenue_usd

    @property
    def memory_gib(self):
        """Gets the memory_gib of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The memory_gib of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: float
        """
        return self._memory_gib

    @memory_gib.setter
    def memory_gib(self, memory_gib):
        """Sets the memory_gib of this DataCenterCommitmentInterval.


        :param memory_gib: The memory_gib of this DataCenterCommitmentInterval.  # noqa: E501
        :type: float
        """

        self._memory_gib = memory_gib

    @property
    def memory_revenue_usd(self):
        """Gets the memory_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501


        :return: The memory_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501
        :rtype: Decimal
        """
        return self._memory_revenue_usd

    @memory_revenue_usd.setter
    def memory_revenue_usd(self, memory_revenue_usd):
        """Sets the memory_revenue_usd of this DataCenterCommitmentInterval.


        :param memory_revenue_usd: The memory_revenue_usd of this DataCenterCommitmentInterval.  # noqa: E501
        :type: Decimal
        """

        self._memory_revenue_usd = memory_revenue_usd

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(DataCenterCommitmentInterval, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, DataCenterCommitmentInterval):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, DataCenterCommitmentInterval):
            return True

        return self.to_dict() != other.to_dict()
