# 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 AnsysLicense(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 = {
        'display_name': 'str',
        'flexlm_host': 'str',
        'flexlm_port': 'int',
        'ansysli_host': 'str',
        'ansysli_port': 'int'
    }

    attribute_map = {
        'display_name': 'display_name',
        'flexlm_host': 'flexlm_host',
        'flexlm_port': 'flexlm_port',
        'ansysli_host': 'ansysli_host',
        'ansysli_port': 'ansysli_port'
    }

    def __init__(self, display_name=None, flexlm_host=None, flexlm_port=None, ansysli_host=None, ansysli_port=None, local_vars_configuration=None):  # noqa: E501
        """AnsysLicense - 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._display_name = None
        self._flexlm_host = None
        self._flexlm_port = None
        self._ansysli_host = None
        self._ansysli_port = None
        self.discriminator = None

        self.display_name = display_name
        self.flexlm_host = flexlm_host
        if flexlm_port is not None:
            self.flexlm_port = flexlm_port
        self.ansysli_host = ansysli_host
        if ansysli_port is not None:
            self.ansysli_port = ansysli_port

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

        Name to display to user when selecting this license  # noqa: E501

        :return: The display_name of this AnsysLicense.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this AnsysLicense.

        Name to display to user when selecting this license  # noqa: E501

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

        self._display_name = display_name

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

        Hostname or ip address of flexlm host  # noqa: E501

        :return: The flexlm_host of this AnsysLicense.  # noqa: E501
        :rtype: str
        """
        return self._flexlm_host

    @flexlm_host.setter
    def flexlm_host(self, flexlm_host):
        """Sets the flexlm_host of this AnsysLicense.

        Hostname or ip address of flexlm host  # noqa: E501

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

        self._flexlm_host = flexlm_host

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

        Port number of flexlm host  # noqa: E501

        :return: The flexlm_port of this AnsysLicense.  # noqa: E501
        :rtype: int
        """
        return self._flexlm_port

    @flexlm_port.setter
    def flexlm_port(self, flexlm_port):
        """Sets the flexlm_port of this AnsysLicense.

        Port number of flexlm host  # noqa: E501

        :param flexlm_port: The flexlm_port of this AnsysLicense.  # noqa: E501
        :type flexlm_port: int
        """
        if (self.local_vars_configuration.client_side_validation and
                flexlm_port is not None and flexlm_port > 65535):  # noqa: E501
            raise ValueError("Invalid value for `flexlm_port`, must be a value less than or equal to `65535`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                flexlm_port is not None and flexlm_port < 1024):  # noqa: E501
            raise ValueError("Invalid value for `flexlm_port`, must be a value greater than or equal to `1024`")  # noqa: E501

        self._flexlm_port = flexlm_port

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

        Hostname or ip address of ansys interconnect server  # noqa: E501

        :return: The ansysli_host of this AnsysLicense.  # noqa: E501
        :rtype: str
        """
        return self._ansysli_host

    @ansysli_host.setter
    def ansysli_host(self, ansysli_host):
        """Sets the ansysli_host of this AnsysLicense.

        Hostname or ip address of ansys interconnect server  # noqa: E501

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

        self._ansysli_host = ansysli_host

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

        Port number of ansys interconnect server  # noqa: E501

        :return: The ansysli_port of this AnsysLicense.  # noqa: E501
        :rtype: int
        """
        return self._ansysli_port

    @ansysli_port.setter
    def ansysli_port(self, ansysli_port):
        """Sets the ansysli_port of this AnsysLicense.

        Port number of ansys interconnect server  # noqa: E501

        :param ansysli_port: The ansysli_port of this AnsysLicense.  # noqa: E501
        :type ansysli_port: int
        """
        if (self.local_vars_configuration.client_side_validation and
                ansysli_port is not None and ansysli_port > 65535):  # noqa: E501
            raise ValueError("Invalid value for `ansysli_port`, must be a value less than or equal to `65535`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                ansysli_port is not None and ansysli_port < 1024):  # noqa: E501
            raise ValueError("Invalid value for `ansysli_port`, must be a value greater than or equal to `1024`")  # noqa: E501

        self._ansysli_port = ansysli_port

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

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