# coding: utf-8

"""
    EPIC API

    REST API for interacting with EPIC (https://epic.zenotech.com) services. <br />                             Please note this API is in BETA and does not yet contain                             all EPIC functionality.  # noqa: E501

    The version of the OpenAPI document: v2
    Contact: support@zenotech.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from epiccore.configuration import Configuration


class ProjectDetails(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 = {
        'pk': 'int',
        'project_id': 'str',
        'description': 'str',
        'closed': 'bool',
        'all_users': 'bool',
        'authorized_user_profiles': 'list[int]',
        'has_budget': 'bool',
        'spend_limit': 'SpendLimit',
        'current_spend': 'CurrentSpend'
    }

    attribute_map = {
        'pk': 'pk',
        'project_id': 'project_id',
        'description': 'description',
        'closed': 'closed',
        'all_users': 'all_users',
        'authorized_user_profiles': 'authorized_user_profiles',
        'has_budget': 'has_budget',
        'spend_limit': 'spend_limit',
        'current_spend': 'current_spend'
    }

    def __init__(self, pk=None, project_id=None, description=None, closed=None, all_users=None, authorized_user_profiles=None, has_budget=None, spend_limit=None, current_spend=None, local_vars_configuration=None):  # noqa: E501
        """ProjectDetails - 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._pk = None
        self._project_id = None
        self._description = None
        self._closed = None
        self._all_users = None
        self._authorized_user_profiles = None
        self._has_budget = None
        self._spend_limit = None
        self._current_spend = None
        self.discriminator = None

        if pk is not None:
            self.pk = pk
        if project_id is not None:
            self.project_id = project_id
        self.description = description
        if closed is not None:
            self.closed = closed
        if all_users is not None:
            self.all_users = all_users
        if authorized_user_profiles is not None:
            self.authorized_user_profiles = authorized_user_profiles
        if has_budget is not None:
            self.has_budget = has_budget
        if spend_limit is not None:
            self.spend_limit = spend_limit
        if current_spend is not None:
            self.current_spend = current_spend

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


        :return: The pk of this ProjectDetails.  # noqa: E501
        :rtype: int
        """
        return self._pk

    @pk.setter
    def pk(self, pk):
        """Sets the pk of this ProjectDetails.


        :param pk: The pk of this ProjectDetails.  # noqa: E501
        :type pk: int
        """

        self._pk = pk

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


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

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


        :param project_id: The project_id of this ProjectDetails.  # noqa: E501
        :type project_id: str
        """
        if (self.local_vars_configuration.client_side_validation and
                project_id is not None and len(project_id) < 1):
            raise ValueError("Invalid value for `project_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._project_id = project_id

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


        :return: The description of this ProjectDetails.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ProjectDetails.


        :param description: The description of this ProjectDetails.  # noqa: E501
        :type description: str
        """

        self._description = description

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


        :return: The closed of this ProjectDetails.  # noqa: E501
        :rtype: bool
        """
        return self._closed

    @closed.setter
    def closed(self, closed):
        """Sets the closed of this ProjectDetails.


        :param closed: The closed of this ProjectDetails.  # noqa: E501
        :type closed: bool
        """

        self._closed = closed

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


        :return: The all_users of this ProjectDetails.  # noqa: E501
        :rtype: bool
        """
        return self._all_users

    @all_users.setter
    def all_users(self, all_users):
        """Sets the all_users of this ProjectDetails.


        :param all_users: The all_users of this ProjectDetails.  # noqa: E501
        :type all_users: bool
        """

        self._all_users = all_users

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


        :return: The authorized_user_profiles of this ProjectDetails.  # noqa: E501
        :rtype: list[int]
        """
        return self._authorized_user_profiles

    @authorized_user_profiles.setter
    def authorized_user_profiles(self, authorized_user_profiles):
        """Sets the authorized_user_profiles of this ProjectDetails.


        :param authorized_user_profiles: The authorized_user_profiles of this ProjectDetails.  # noqa: E501
        :type authorized_user_profiles: list[int]
        """

        self._authorized_user_profiles = authorized_user_profiles

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


        :return: The has_budget of this ProjectDetails.  # noqa: E501
        :rtype: bool
        """
        return self._has_budget

    @has_budget.setter
    def has_budget(self, has_budget):
        """Sets the has_budget of this ProjectDetails.


        :param has_budget: The has_budget of this ProjectDetails.  # noqa: E501
        :type has_budget: bool
        """

        self._has_budget = has_budget

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


        :return: The spend_limit of this ProjectDetails.  # noqa: E501
        :rtype: SpendLimit
        """
        return self._spend_limit

    @spend_limit.setter
    def spend_limit(self, spend_limit):
        """Sets the spend_limit of this ProjectDetails.


        :param spend_limit: The spend_limit of this ProjectDetails.  # noqa: E501
        :type spend_limit: SpendLimit
        """

        self._spend_limit = spend_limit

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


        :return: The current_spend of this ProjectDetails.  # noqa: E501
        :rtype: CurrentSpend
        """
        return self._current_spend

    @current_spend.setter
    def current_spend(self, current_spend):
        """Sets the current_spend of this ProjectDetails.


        :param current_spend: The current_spend of this ProjectDetails.  # noqa: E501
        :type current_spend: CurrentSpend
        """

        self._current_spend = current_spend

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

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