# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'name': 'str',
        'budget_amount': 'float',
        'evaluation_period': 'InstanceUsageBudgetEvaluationPeriod',
        'project_id': 'str',
        'cloud_id': 'str',
        'id': 'str',
        'creator_id': 'str',
        'creator': 'MiniUser',
        'organization_id': 'str',
        'curr_instance_usage_in_dollars': 'float',
        'created_at': 'datetime',
        'deleted_at': 'datetime',
        'is_enabled': 'bool',
        'last_notified_at': 'datetime',
        'last_usage_updated_at': 'datetime'
    }

    attribute_map = {
        'name': 'name',
        'budget_amount': 'budget_amount',
        'evaluation_period': 'evaluation_period',
        'project_id': 'project_id',
        'cloud_id': 'cloud_id',
        'id': 'id',
        'creator_id': 'creator_id',
        'creator': 'creator',
        'organization_id': 'organization_id',
        'curr_instance_usage_in_dollars': 'curr_instance_usage_in_dollars',
        'created_at': 'created_at',
        'deleted_at': 'deleted_at',
        'is_enabled': 'is_enabled',
        'last_notified_at': 'last_notified_at',
        'last_usage_updated_at': 'last_usage_updated_at'
    }

    def __init__(self, name=None, budget_amount=None, evaluation_period=None, project_id=None, cloud_id=None, id=None, creator_id=None, creator=None, organization_id=None, curr_instance_usage_in_dollars=None, created_at=None, deleted_at=None, is_enabled=None, last_notified_at=None, last_usage_updated_at=None, local_vars_configuration=None):  # noqa: E501
        """InstanceUsageBudget - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._budget_amount = None
        self._evaluation_period = None
        self._project_id = None
        self._cloud_id = None
        self._id = None
        self._creator_id = None
        self._creator = None
        self._organization_id = None
        self._curr_instance_usage_in_dollars = None
        self._created_at = None
        self._deleted_at = None
        self._is_enabled = None
        self._last_notified_at = None
        self._last_usage_updated_at = None
        self.discriminator = None

        self.name = name
        self.budget_amount = budget_amount
        self.evaluation_period = evaluation_period
        if project_id is not None:
            self.project_id = project_id
        if cloud_id is not None:
            self.cloud_id = cloud_id
        self.id = id
        self.creator_id = creator_id
        self.creator = creator
        self.organization_id = organization_id
        self.curr_instance_usage_in_dollars = curr_instance_usage_in_dollars
        self.created_at = created_at
        if deleted_at is not None:
            self.deleted_at = deleted_at
        self.is_enabled = is_enabled
        if last_notified_at is not None:
            self.last_notified_at = last_notified_at
        if last_usage_updated_at is not None:
            self.last_usage_updated_at = last_usage_updated_at

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


        :return: The name of this InstanceUsageBudget.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this InstanceUsageBudget.


        :param name: The name of this InstanceUsageBudget.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The budget_amount of this InstanceUsageBudget.  # noqa: E501
        :rtype: float
        """
        return self._budget_amount

    @budget_amount.setter
    def budget_amount(self, budget_amount):
        """Sets the budget_amount of this InstanceUsageBudget.


        :param budget_amount: The budget_amount of this InstanceUsageBudget.  # noqa: E501
        :type: float
        """
        if self.local_vars_configuration.client_side_validation and budget_amount is None:  # noqa: E501
            raise ValueError("Invalid value for `budget_amount`, must not be `None`")  # noqa: E501

        self._budget_amount = budget_amount

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


        :return: The evaluation_period of this InstanceUsageBudget.  # noqa: E501
        :rtype: InstanceUsageBudgetEvaluationPeriod
        """
        return self._evaluation_period

    @evaluation_period.setter
    def evaluation_period(self, evaluation_period):
        """Sets the evaluation_period of this InstanceUsageBudget.


        :param evaluation_period: The evaluation_period of this InstanceUsageBudget.  # noqa: E501
        :type: InstanceUsageBudgetEvaluationPeriod
        """
        if self.local_vars_configuration.client_side_validation and evaluation_period is None:  # noqa: E501
            raise ValueError("Invalid value for `evaluation_period`, must not be `None`")  # noqa: E501

        self._evaluation_period = evaluation_period

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


        :return: The project_id of this InstanceUsageBudget.  # noqa: E501
        :rtype: str
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this InstanceUsageBudget.


        :param project_id: The project_id of this InstanceUsageBudget.  # noqa: E501
        :type: str
        """

        self._project_id = project_id

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


        :return: The cloud_id of this InstanceUsageBudget.  # noqa: E501
        :rtype: str
        """
        return self._cloud_id

    @cloud_id.setter
    def cloud_id(self, cloud_id):
        """Sets the cloud_id of this InstanceUsageBudget.


        :param cloud_id: The cloud_id of this InstanceUsageBudget.  # noqa: E501
        :type: str
        """

        self._cloud_id = cloud_id

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


        :return: The id of this InstanceUsageBudget.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this InstanceUsageBudget.


        :param id: The id of this InstanceUsageBudget.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


        :return: The creator_id of this InstanceUsageBudget.  # noqa: E501
        :rtype: str
        """
        return self._creator_id

    @creator_id.setter
    def creator_id(self, creator_id):
        """Sets the creator_id of this InstanceUsageBudget.


        :param creator_id: The creator_id of this InstanceUsageBudget.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and creator_id is None:  # noqa: E501
            raise ValueError("Invalid value for `creator_id`, must not be `None`")  # noqa: E501

        self._creator_id = creator_id

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


        :return: The creator of this InstanceUsageBudget.  # noqa: E501
        :rtype: MiniUser
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this InstanceUsageBudget.


        :param creator: The creator of this InstanceUsageBudget.  # noqa: E501
        :type: MiniUser
        """
        if self.local_vars_configuration.client_side_validation and creator is None:  # noqa: E501
            raise ValueError("Invalid value for `creator`, must not be `None`")  # noqa: E501

        self._creator = creator

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


        :return: The organization_id of this InstanceUsageBudget.  # noqa: E501
        :rtype: str
        """
        return self._organization_id

    @organization_id.setter
    def organization_id(self, organization_id):
        """Sets the organization_id of this InstanceUsageBudget.


        :param organization_id: The organization_id of this InstanceUsageBudget.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and organization_id is None:  # noqa: E501
            raise ValueError("Invalid value for `organization_id`, must not be `None`")  # noqa: E501

        self._organization_id = organization_id

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


        :return: The curr_instance_usage_in_dollars of this InstanceUsageBudget.  # noqa: E501
        :rtype: float
        """
        return self._curr_instance_usage_in_dollars

    @curr_instance_usage_in_dollars.setter
    def curr_instance_usage_in_dollars(self, curr_instance_usage_in_dollars):
        """Sets the curr_instance_usage_in_dollars of this InstanceUsageBudget.


        :param curr_instance_usage_in_dollars: The curr_instance_usage_in_dollars of this InstanceUsageBudget.  # noqa: E501
        :type: float
        """
        if self.local_vars_configuration.client_side_validation and curr_instance_usage_in_dollars is None:  # noqa: E501
            raise ValueError("Invalid value for `curr_instance_usage_in_dollars`, must not be `None`")  # noqa: E501

        self._curr_instance_usage_in_dollars = curr_instance_usage_in_dollars

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


        :return: The created_at of this InstanceUsageBudget.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this InstanceUsageBudget.


        :param created_at: The created_at of this InstanceUsageBudget.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and created_at is None:  # noqa: E501
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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


        :return: The deleted_at of this InstanceUsageBudget.  # noqa: E501
        :rtype: datetime
        """
        return self._deleted_at

    @deleted_at.setter
    def deleted_at(self, deleted_at):
        """Sets the deleted_at of this InstanceUsageBudget.


        :param deleted_at: The deleted_at of this InstanceUsageBudget.  # noqa: E501
        :type: datetime
        """

        self._deleted_at = deleted_at

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


        :return: The is_enabled of this InstanceUsageBudget.  # noqa: E501
        :rtype: bool
        """
        return self._is_enabled

    @is_enabled.setter
    def is_enabled(self, is_enabled):
        """Sets the is_enabled of this InstanceUsageBudget.


        :param is_enabled: The is_enabled of this InstanceUsageBudget.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and is_enabled is None:  # noqa: E501
            raise ValueError("Invalid value for `is_enabled`, must not be `None`")  # noqa: E501

        self._is_enabled = is_enabled

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


        :return: The last_notified_at of this InstanceUsageBudget.  # noqa: E501
        :rtype: datetime
        """
        return self._last_notified_at

    @last_notified_at.setter
    def last_notified_at(self, last_notified_at):
        """Sets the last_notified_at of this InstanceUsageBudget.


        :param last_notified_at: The last_notified_at of this InstanceUsageBudget.  # noqa: E501
        :type: datetime
        """

        self._last_notified_at = last_notified_at

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


        :return: The last_usage_updated_at of this InstanceUsageBudget.  # noqa: E501
        :rtype: datetime
        """
        return self._last_usage_updated_at

    @last_usage_updated_at.setter
    def last_usage_updated_at(self, last_usage_updated_at):
        """Sets the last_usage_updated_at of this InstanceUsageBudget.


        :param last_usage_updated_at: The last_usage_updated_at of this InstanceUsageBudget.  # noqa: E501
        :type: datetime
        """

        self._last_usage_updated_at = last_usage_updated_at

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

        for attr, _ in six.iteritems(self.openapi_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

        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, InstanceUsageBudget):
            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, InstanceUsageBudget):
            return True

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