# coding: utf-8

"""
    Canopy.Api

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from canopy.openapi.configuration import Configuration


class SimTypeDefinition(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 = {
        'sim_type': 'str',
        'name': 'str',
        'known_output_files': 'list[str]',
        'state': 'SimTypeState',
        'input_telemetry_channels': 'SimTypeDefinitionInputTelemetryChannels',
        'previous_definitions': 'list[IPreviousDefinitionSimTypeDefinition]'
    }

    attribute_map = {
        'sim_type': 'simType',
        'name': 'name',
        'known_output_files': 'knownOutputFiles',
        'state': 'state',
        'input_telemetry_channels': 'inputTelemetryChannels',
        'previous_definitions': 'previousDefinitions'
    }

    def __init__(self, sim_type=None, name=None, known_output_files=None, state=None, input_telemetry_channels=None, previous_definitions=None, local_vars_configuration=None):  # noqa: E501
        """SimTypeDefinition - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._sim_type = None
        self._name = None
        self._known_output_files = None
        self._state = None
        self._input_telemetry_channels = None
        self._previous_definitions = None
        self.discriminator = None

        self.sim_type = sim_type
        self.name = name
        self.known_output_files = known_output_files
        self.state = state
        self.input_telemetry_channels = input_telemetry_channels
        self.previous_definitions = previous_definitions

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


        :return: The sim_type of this SimTypeDefinition.  # noqa: E501
        :rtype: str
        """
        return self._sim_type

    @sim_type.setter
    def sim_type(self, sim_type):
        """Sets the sim_type of this SimTypeDefinition.


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

        self._sim_type = sim_type

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


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

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


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

        self._name = name

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


        :return: The known_output_files of this SimTypeDefinition.  # noqa: E501
        :rtype: list[str]
        """
        return self._known_output_files

    @known_output_files.setter
    def known_output_files(self, known_output_files):
        """Sets the known_output_files of this SimTypeDefinition.


        :param known_output_files: The known_output_files of this SimTypeDefinition.  # noqa: E501
        :type known_output_files: list[str]
        """
        if self.local_vars_configuration.client_side_validation and known_output_files is None:  # noqa: E501
            raise ValueError("Invalid value for `known_output_files`, must not be `None`")  # noqa: E501

        self._known_output_files = known_output_files

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


        :return: The state of this SimTypeDefinition.  # noqa: E501
        :rtype: SimTypeState
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this SimTypeDefinition.


        :param state: The state of this SimTypeDefinition.  # noqa: E501
        :type state: SimTypeState
        """

        self._state = state

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


        :return: The input_telemetry_channels of this SimTypeDefinition.  # noqa: E501
        :rtype: SimTypeDefinitionInputTelemetryChannels
        """
        return self._input_telemetry_channels

    @input_telemetry_channels.setter
    def input_telemetry_channels(self, input_telemetry_channels):
        """Sets the input_telemetry_channels of this SimTypeDefinition.


        :param input_telemetry_channels: The input_telemetry_channels of this SimTypeDefinition.  # noqa: E501
        :type input_telemetry_channels: SimTypeDefinitionInputTelemetryChannels
        """

        self._input_telemetry_channels = input_telemetry_channels

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


        :return: The previous_definitions of this SimTypeDefinition.  # noqa: E501
        :rtype: list[IPreviousDefinitionSimTypeDefinition]
        """
        return self._previous_definitions

    @previous_definitions.setter
    def previous_definitions(self, previous_definitions):
        """Sets the previous_definitions of this SimTypeDefinition.


        :param previous_definitions: The previous_definitions of this SimTypeDefinition.  # noqa: E501
        :type previous_definitions: list[IPreviousDefinitionSimTypeDefinition]
        """
        if self.local_vars_configuration.client_side_validation and previous_definitions is None:  # noqa: E501
            raise ValueError("Invalid value for `previous_definitions`, must not be `None`")  # noqa: E501

        self._previous_definitions = previous_definitions

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, SimTypeDefinition):
            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, SimTypeDefinition):
            return True

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