# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.category_info import CategoryInfo  # noqa: F401,E501
from kps_api.models.project_user_info import ProjectUserInfo  # noqa: F401,E501


class Project(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 = {
        'cloud_credential_ids': 'list[str]',
        'description': 'str',
        'docker_profile_ids': 'list[str]',
        'edge_ids': 'list[str]',
        'edge_selector_type': 'str',
        'edge_selectors': 'list[CategoryInfo]',
        'id': 'str',
        'name': 'str',
        'privileged': 'bool',
        'users': 'list[ProjectUserInfo]'
    }

    attribute_map = {
        'cloud_credential_ids': 'cloudCredentialIds',
        'description': 'description',
        'docker_profile_ids': 'dockerProfileIds',
        'edge_ids': 'edgeIds',
        'edge_selector_type': 'edgeSelectorType',
        'edge_selectors': 'edgeSelectors',
        'id': 'id',
        'name': 'name',
        'privileged': 'privileged',
        'users': 'users'
    }

    def __init__(self, cloud_credential_ids=None, description=None, docker_profile_ids=None, edge_ids=None, edge_selector_type=None, edge_selectors=None, id=None, name=None, privileged=None, users=None):  # noqa: E501
        """Project - a model defined in Swagger"""  # noqa: E501
        self._cloud_credential_ids = None
        self._description = None
        self._docker_profile_ids = None
        self._edge_ids = None
        self._edge_selector_type = None
        self._edge_selectors = None
        self._id = None
        self._name = None
        self._privileged = None
        self._users = None
        self.discriminator = None
        self.cloud_credential_ids = cloud_credential_ids
        self.description = description
        self.docker_profile_ids = docker_profile_ids
        if edge_ids is not None:
            self.edge_ids = edge_ids
        self.edge_selector_type = edge_selector_type
        if edge_selectors is not None:
            self.edge_selectors = edge_selectors
        if id is not None:
            self.id = id
        self.name = name
        if privileged is not None:
            self.privileged = privileged
        self.users = users

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

        List of cloud profile credential IDs that the project can access.  # noqa: E501

        :return: The cloud_credential_ids of this Project.  # noqa: E501
        :rtype: list[str]
        """
        return self._cloud_credential_ids

    @cloud_credential_ids.setter
    def cloud_credential_ids(self, cloud_credential_ids):
        """Sets the cloud_credential_ids of this Project.

        List of cloud profile credential IDs that the project can access.  # noqa: E501

        :param cloud_credential_ids: The cloud_credential_ids of this Project.  # noqa: E501
        :type: list[str]
        """
        if cloud_credential_ids is None:
            raise ValueError("Invalid value for `cloud_credential_ids`, must not be `None`")  # noqa: E501

        self._cloud_credential_ids = cloud_credential_ids

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

        Describe the project.  # noqa: E501

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

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

        Describe the project.  # noqa: E501

        :param description: The description of this Project.  # noqa: E501
        :type: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

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

        List of Docker container registry profile IDs that the project can access.  # noqa: E501

        :return: The docker_profile_ids of this Project.  # noqa: E501
        :rtype: list[str]
        """
        return self._docker_profile_ids

    @docker_profile_ids.setter
    def docker_profile_ids(self, docker_profile_ids):
        """Sets the docker_profile_ids of this Project.

        List of Docker container registry profile IDs that the project can access.  # noqa: E501

        :param docker_profile_ids: The docker_profile_ids of this Project.  # noqa: E501
        :type: list[str]
        """
        if docker_profile_ids is None:
            raise ValueError("Invalid value for `docker_profile_ids`, must not be `None`")  # noqa: E501

        self._docker_profile_ids = docker_profile_ids

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

        List of edge IDs for edges in this project. Only relevant when edgeSelectorType === 'Explicit'  # noqa: E501

        :return: The edge_ids of this Project.  # noqa: E501
        :rtype: list[str]
        """
        return self._edge_ids

    @edge_ids.setter
    def edge_ids(self, edge_ids):
        """Sets the edge_ids of this Project.

        List of edge IDs for edges in this project. Only relevant when edgeSelectorType === 'Explicit'  # noqa: E501

        :param edge_ids: The edge_ids of this Project.  # noqa: E501
        :type: list[str]
        """

        self._edge_ids = edge_ids

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

        Type of edge selector: Category or Explicit. Specify whether edges belonging to this project are given by edgeIDs (Explicit) or edgeSelectors (Category).  # noqa: E501

        :return: The edge_selector_type of this Project.  # noqa: E501
        :rtype: str
        """
        return self._edge_selector_type

    @edge_selector_type.setter
    def edge_selector_type(self, edge_selector_type):
        """Sets the edge_selector_type of this Project.

        Type of edge selector: Category or Explicit. Specify whether edges belonging to this project are given by edgeIDs (Explicit) or edgeSelectors (Category).  # noqa: E501

        :param edge_selector_type: The edge_selector_type of this Project.  # noqa: E501
        :type: str
        """
        if edge_selector_type is None:
            raise ValueError("Invalid value for `edge_selector_type`, must not be `None`")  # noqa: E501
        allowed_values = ["Category", "Explicit"]  # noqa: E501
        if edge_selector_type not in allowed_values:
            raise ValueError(
                "Invalid value for `edge_selector_type` ({0}), must be one of {1}"  # noqa: E501
                .format(edge_selector_type, allowed_values)
            )

        self._edge_selector_type = edge_selector_type

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

        Edge selectors - CategoryInfo list. Only relevant when edgeSelectorType === 'Category'  # noqa: E501

        :return: The edge_selectors of this Project.  # noqa: E501
        :rtype: list[CategoryInfo]
        """
        return self._edge_selectors

    @edge_selectors.setter
    def edge_selectors(self, edge_selectors):
        """Sets the edge_selectors of this Project.

        Edge selectors - CategoryInfo list. Only relevant when edgeSelectorType === 'Category'  # noqa: E501

        :param edge_selectors: The edge_selectors of this Project.  # noqa: E501
        :type: list[CategoryInfo]
        """

        self._edge_selectors = edge_selectors

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

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

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

        :param id: The id of this Project.  # noqa: E501
        :type: str
        """

        self._id = id

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

        Project name.  # noqa: E501

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

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

        Project name.  # noqa: E501

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

        self._name = name

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

        Privileged projects can use all Kubernetes resources  # noqa: E501

        :return: The privileged of this Project.  # noqa: E501
        :rtype: bool
        """
        return self._privileged

    @privileged.setter
    def privileged(self, privileged):
        """Sets the privileged of this Project.

        Privileged projects can use all Kubernetes resources  # noqa: E501

        :param privileged: The privileged of this Project.  # noqa: E501
        :type: bool
        """

        self._privileged = privileged

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

        List of users who can access the project.  # noqa: E501

        :return: The users of this Project.  # noqa: E501
        :rtype: list[ProjectUserInfo]
        """
        return self._users

    @users.setter
    def users(self, users):
        """Sets the users of this Project.

        List of users who can access the project.  # noqa: E501

        :param users: The users of this Project.  # noqa: E501
        :type: list[ProjectUserInfo]
        """
        if users is None:
            raise ValueError("Invalid value for `users`, must not be `None`")  # noqa: E501

        self._users = users

    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(Project, 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, Project):
            return False

        return self.__dict__ == other.__dict__

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