# coding: utf-8

"""
    MEC Sandbox API

    The MEC Sandbox API described using OpenAPI  # noqa: E501

    OpenAPI spec version: 0.0.9
    Contact: cti_support@etsi.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ApplicationInfo(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 = {
        'id': 'str',
        'name': 'str',
        'node_name': 'str',
        'type': 'str',
        'persist': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'node_name': 'nodeName',
        'type': 'type',
        'persist': 'persist'
    }

    def __init__(self, id=None, name=None, node_name=None, type=None, persist=None):  # noqa: E501
        """ApplicationInfo - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._node_name = None
        self._type = None
        self._persist = None
        self.discriminator = None
        if id is not None:
            self.id = id
        self.name = name
        self.node_name = node_name
        if type is not None:
            self.type = type
        if persist is not None:
            self.persist = persist

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

        Application Instance UUID  # noqa: E501

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

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

        Application Instance UUID  # noqa: E501

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

        self._id = id

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

        Application name  # noqa: E501

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

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

        Application name  # noqa: E501

        :param name: The name of this ApplicationInfo.  # 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 node_name(self):
        """Gets the node_name of this ApplicationInfo.  # noqa: E501

        Name of node where application instance is running  # noqa: E501

        :return: The node_name of this ApplicationInfo.  # noqa: E501
        :rtype: str
        """
        return self._node_name

    @node_name.setter
    def node_name(self, node_name):
        """Sets the node_name of this ApplicationInfo.

        Name of node where application instance is running  # noqa: E501

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

        self._node_name = node_name

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

        Application Type  # noqa: E501

        :return: The type of this ApplicationInfo.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ApplicationInfo.

        Application Type  # noqa: E501

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

        self._type = type

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

        Reserved for internal platform usage  # noqa: E501

        :return: The persist of this ApplicationInfo.  # noqa: E501
        :rtype: bool
        """
        return self._persist

    @persist.setter
    def persist(self, persist):
        """Sets the persist of this ApplicationInfo.

        Reserved for internal platform usage  # noqa: E501

        :param persist: The persist of this ApplicationInfo.  # noqa: E501
        :type: bool
        """

        self._persist = persist

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

        return self.__dict__ == other.__dict__

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