# 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 AggregatedInstanceUsageWithCostModel(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 = {
        'date': 'date',
        'organization_id': 'str',
        'organization_name': 'str',
        'cloud_hosting_type': 'CloudHostingType',
        'cloud_id': 'str',
        'cloud_name': 'str',
        'project_id': 'str',
        'project_name': 'str',
        'user_id': 'str',
        'user_email': 'str',
        'cluster_id': 'str',
        'workspace_id': 'str',
        'job_id': 'str',
        'job_queue_id': 'str',
        'service_id': 'str',
        'instance_type': 'str',
        'instance_seconds': 'float',
        'cloud_provider': 'CloudProviders',
        'anyscale_credits': 'float'
    }

    attribute_map = {
        'date': 'date',
        'organization_id': 'organization_id',
        'organization_name': 'organization_name',
        'cloud_hosting_type': 'cloud_hosting_type',
        'cloud_id': 'cloud_id',
        'cloud_name': 'cloud_name',
        'project_id': 'project_id',
        'project_name': 'project_name',
        'user_id': 'user_id',
        'user_email': 'user_email',
        'cluster_id': 'cluster_id',
        'workspace_id': 'workspace_id',
        'job_id': 'job_id',
        'job_queue_id': 'job_queue_id',
        'service_id': 'service_id',
        'instance_type': 'instance_type',
        'instance_seconds': 'instance_seconds',
        'cloud_provider': 'cloud_provider',
        'anyscale_credits': 'anyscale_credits'
    }

    def __init__(self, date=None, organization_id=None, organization_name=None, cloud_hosting_type=None, cloud_id=None, cloud_name=None, project_id=None, project_name=None, user_id=None, user_email=None, cluster_id=None, workspace_id=None, job_id=None, job_queue_id=None, service_id=None, instance_type=None, instance_seconds=None, cloud_provider=None, anyscale_credits=None, local_vars_configuration=None):  # noqa: E501
        """AggregatedInstanceUsageWithCostModel - 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._date = None
        self._organization_id = None
        self._organization_name = None
        self._cloud_hosting_type = None
        self._cloud_id = None
        self._cloud_name = None
        self._project_id = None
        self._project_name = None
        self._user_id = None
        self._user_email = None
        self._cluster_id = None
        self._workspace_id = None
        self._job_id = None
        self._job_queue_id = None
        self._service_id = None
        self._instance_type = None
        self._instance_seconds = None
        self._cloud_provider = None
        self._anyscale_credits = None
        self.discriminator = None

        self.date = date
        self.organization_id = organization_id
        self.organization_name = organization_name
        self.cloud_hosting_type = cloud_hosting_type
        self.cloud_id = cloud_id
        self.cloud_name = cloud_name
        self.project_id = project_id
        self.project_name = project_name
        self.user_id = user_id
        self.user_email = user_email
        self.cluster_id = cluster_id
        if workspace_id is not None:
            self.workspace_id = workspace_id
        if job_id is not None:
            self.job_id = job_id
        if job_queue_id is not None:
            self.job_queue_id = job_queue_id
        if service_id is not None:
            self.service_id = service_id
        self.instance_type = instance_type
        self.instance_seconds = instance_seconds
        self.cloud_provider = cloud_provider
        self.anyscale_credits = anyscale_credits

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


        :return: The date of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: date
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this AggregatedInstanceUsageWithCostModel.


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

        self._date = date

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


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

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


        :param organization_id: The organization_id of this AggregatedInstanceUsageWithCostModel.  # 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 organization_name(self):
        """Gets the organization_name of this AggregatedInstanceUsageWithCostModel.  # noqa: E501


        :return: The organization_name of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._organization_name

    @organization_name.setter
    def organization_name(self, organization_name):
        """Sets the organization_name of this AggregatedInstanceUsageWithCostModel.


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

        self._organization_name = organization_name

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


        :return: The cloud_hosting_type of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: CloudHostingType
        """
        return self._cloud_hosting_type

    @cloud_hosting_type.setter
    def cloud_hosting_type(self, cloud_hosting_type):
        """Sets the cloud_hosting_type of this AggregatedInstanceUsageWithCostModel.


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

        self._cloud_hosting_type = cloud_hosting_type

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


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

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


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

        self._cloud_id = cloud_id

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


        :return: The cloud_name of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._cloud_name

    @cloud_name.setter
    def cloud_name(self, cloud_name):
        """Sets the cloud_name of this AggregatedInstanceUsageWithCostModel.


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

        self._cloud_name = cloud_name

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


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

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


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

        self._project_id = project_id

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


        :return: The project_name of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this AggregatedInstanceUsageWithCostModel.


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

        self._project_name = project_name

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


        :return: The user_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this AggregatedInstanceUsageWithCostModel.


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

        self._user_id = user_id

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


        :return: The user_email of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._user_email

    @user_email.setter
    def user_email(self, user_email):
        """Sets the user_email of this AggregatedInstanceUsageWithCostModel.


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

        self._user_email = user_email

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


        :return: The cluster_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this AggregatedInstanceUsageWithCostModel.


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

        self._cluster_id = cluster_id

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


        :return: The workspace_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._workspace_id

    @workspace_id.setter
    def workspace_id(self, workspace_id):
        """Sets the workspace_id of this AggregatedInstanceUsageWithCostModel.


        :param workspace_id: The workspace_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :type: str
        """

        self._workspace_id = workspace_id

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


        :return: The job_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._job_id

    @job_id.setter
    def job_id(self, job_id):
        """Sets the job_id of this AggregatedInstanceUsageWithCostModel.


        :param job_id: The job_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :type: str
        """

        self._job_id = job_id

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


        :return: The job_queue_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._job_queue_id

    @job_queue_id.setter
    def job_queue_id(self, job_queue_id):
        """Sets the job_queue_id of this AggregatedInstanceUsageWithCostModel.


        :param job_queue_id: The job_queue_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :type: str
        """

        self._job_queue_id = job_queue_id

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


        :return: The service_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._service_id

    @service_id.setter
    def service_id(self, service_id):
        """Sets the service_id of this AggregatedInstanceUsageWithCostModel.


        :param service_id: The service_id of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :type: str
        """

        self._service_id = service_id

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


        :return: The instance_type of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: str
        """
        return self._instance_type

    @instance_type.setter
    def instance_type(self, instance_type):
        """Sets the instance_type of this AggregatedInstanceUsageWithCostModel.


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

        self._instance_type = instance_type

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


        :return: The instance_seconds of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: float
        """
        return self._instance_seconds

    @instance_seconds.setter
    def instance_seconds(self, instance_seconds):
        """Sets the instance_seconds of this AggregatedInstanceUsageWithCostModel.


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

        self._instance_seconds = instance_seconds

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


        :return: The cloud_provider of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: CloudProviders
        """
        return self._cloud_provider

    @cloud_provider.setter
    def cloud_provider(self, cloud_provider):
        """Sets the cloud_provider of this AggregatedInstanceUsageWithCostModel.


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

        self._cloud_provider = cloud_provider

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


        :return: The anyscale_credits of this AggregatedInstanceUsageWithCostModel.  # noqa: E501
        :rtype: float
        """
        return self._anyscale_credits

    @anyscale_credits.setter
    def anyscale_credits(self, anyscale_credits):
        """Sets the anyscale_credits of this AggregatedInstanceUsageWithCostModel.


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

        self._anyscale_credits = anyscale_credits

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

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