# 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 DesktopInstance(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 = {
        'id': 'int',
        'status': 'str',
        'connection_type': 'DesktopNodeConnectionType',
        'connection_string': 'str',
        'application': 'DesktopNodeApplicationVersionSummary',
        'launched_by': 'str',
        'team': 'str',
        'created': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'status': 'status',
        'connection_type': 'connection_type',
        'connection_string': 'connection_string',
        'application': 'application',
        'launched_by': 'launched_by',
        'team': 'team',
        'created': 'created'
    }

    def __init__(self, id=None, status=None, connection_type=None, connection_string=None, application=None, launched_by=None, team=None, created=None, local_vars_configuration=None):  # noqa: E501
        """DesktopInstance - 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._id = None
        self._status = None
        self._connection_type = None
        self._connection_string = None
        self._application = None
        self._launched_by = None
        self._team = None
        self._created = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if status is not None:
            self.status = status
        self.connection_type = connection_type
        self.connection_string = connection_string
        if application is not None:
            self.application = application
        if launched_by is not None:
            self.launched_by = launched_by
        self.team = team
        if created is not None:
            self.created = created

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


        :return: The id of this DesktopInstance.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this DesktopInstance.  # noqa: E501
        :type id: int
        """

        self._id = id

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

        Current desktop status  # noqa: E501

        :return: The status of this DesktopInstance.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this DesktopInstance.

        Current desktop status  # noqa: E501

        :param status: The status of this DesktopInstance.  # noqa: E501
        :type status: str
        """

        self._status = status

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


        :return: The connection_type of this DesktopInstance.  # noqa: E501
        :rtype: DesktopNodeConnectionType
        """
        return self._connection_type

    @connection_type.setter
    def connection_type(self, connection_type):
        """Sets the connection_type of this DesktopInstance.


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

        self._connection_type = connection_type

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

        The URL or hostname of the desktop  # noqa: E501

        :return: The connection_string of this DesktopInstance.  # noqa: E501
        :rtype: str
        """
        return self._connection_string

    @connection_string.setter
    def connection_string(self, connection_string):
        """Sets the connection_string of this DesktopInstance.

        The URL or hostname of the desktop  # noqa: E501

        :param connection_string: The connection_string of this DesktopInstance.  # noqa: E501
        :type connection_string: str
        """

        self._connection_string = connection_string

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


        :return: The application of this DesktopInstance.  # noqa: E501
        :rtype: DesktopNodeApplicationVersionSummary
        """
        return self._application

    @application.setter
    def application(self, application):
        """Sets the application of this DesktopInstance.


        :param application: The application of this DesktopInstance.  # noqa: E501
        :type application: DesktopNodeApplicationVersionSummary
        """

        self._application = application

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

        Full name of user that launched the desktop  # noqa: E501

        :return: The launched_by of this DesktopInstance.  # noqa: E501
        :rtype: str
        """
        return self._launched_by

    @launched_by.setter
    def launched_by(self, launched_by):
        """Sets the launched_by of this DesktopInstance.

        Full name of user that launched the desktop  # noqa: E501

        :param launched_by: The launched_by of this DesktopInstance.  # noqa: E501
        :type launched_by: str
        """

        self._launched_by = launched_by

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

        ID of the active Team for the desktop  # noqa: E501

        :return: The team of this DesktopInstance.  # noqa: E501
        :rtype: str
        """
        return self._team

    @team.setter
    def team(self, team):
        """Sets the team of this DesktopInstance.

        ID of the active Team for the desktop  # noqa: E501

        :param team: The team of this DesktopInstance.  # noqa: E501
        :type team: str
        """

        self._team = team

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


        :return: The created of this DesktopInstance.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this DesktopInstance.


        :param created: The created of this DesktopInstance.  # noqa: E501
        :type created: datetime
        """

        self._created = created

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

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