# coding: utf-8

"""
    Tator REST API

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

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


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class StateSpec(object):
    """
    """

    """
    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 = {
        'attributes': 'dict(str, object)',
        'elemental_id': 'str',
        'frame': 'int',
        'localization_ids': 'list[int]',
        'mark': 'int',
        'media_ids': 'list[int]',
        'parent': 'float',
        'type': 'int',
        'user_elemental_id': 'str',
        'version': 'int'
    }

    attribute_map = {
        'attributes': 'attributes',
        'elemental_id': 'elemental_id',
        'frame': 'frame',
        'localization_ids': 'localization_ids',
        'mark': 'mark',
        'media_ids': 'media_ids',
        'parent': 'parent',
        'type': 'type',
        'user_elemental_id': 'user_elemental_id',
        'version': 'version'
    }

    def __init__(self, attributes=None, elemental_id=None, frame=None, localization_ids=None, mark=None, media_ids=None, parent=None, type=None, user_elemental_id=None, version=None, local_vars_configuration=None):  # noqa: E501
        """StateSpec - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._attributes = None
        self._elemental_id = None
        self._frame = None
        self._localization_ids = None
        self._mark = None
        self._media_ids = None
        self._parent = None
        self._type = None
        self._user_elemental_id = None
        self._version = None
        self.discriminator = None

        if attributes is not None:
            self.attributes = attributes
        self.elemental_id = elemental_id
        if frame is not None:
            self.frame = frame
        if localization_ids is not None:
            self.localization_ids = localization_ids
        if mark is not None:
            self.mark = mark
        self.media_ids = media_ids
        self.parent = parent
        self.type = type
        if user_elemental_id is not None:
            self.user_elemental_id = user_elemental_id
        if version is not None:
            self.version = version

    @property
    def attributes(self):
        """
        Object containing attribute values.

        :return: The attributes of this StateSpec. 
        :rtype: dict(str, object)
        """
        return self._attributes

    @attributes.setter
    def attributes(self, attributes):
        """
        Object containing attribute values.

        :param attributes: The attributes of this StateSpec.
        :type: dict(str, object)
        """

        self._attributes = attributes

    @property
    def elemental_id(self):
        """
        The elemental ID of the object.

        :return: The elemental_id of this StateSpec. 
        :rtype: str
        """
        return self._elemental_id

    @elemental_id.setter
    def elemental_id(self, elemental_id):
        """
        The elemental ID of the object.

        :param elemental_id: The elemental_id of this StateSpec.
        :type: str
        """

        self._elemental_id = elemental_id

    @property
    def frame(self):
        """
        Frame number this state applies to.

        :return: The frame of this StateSpec. 
        :rtype: int
        """
        return self._frame

    @frame.setter
    def frame(self, frame):
        """
        Frame number this state applies to.

        :param frame: The frame of this StateSpec.
        :type: int
        """

        self._frame = frame

    @property
    def localization_ids(self):
        """
        List of localization IDs that this state applies to.

        :return: The localization_ids of this StateSpec. 
        :rtype: list[int]
        """
        return self._localization_ids

    @localization_ids.setter
    def localization_ids(self, localization_ids):
        """
        List of localization IDs that this state applies to.

        :param localization_ids: The localization_ids of this StateSpec.
        :type: list[int]
        """

        self._localization_ids = localization_ids

    @property
    def mark(self):
        """
        Revision number of this object on this version branch

        :return: The mark of this StateSpec. 
        :rtype: int
        """
        return self._mark

    @mark.setter
    def mark(self, mark):
        """
        Revision number of this object on this version branch

        :param mark: The mark of this StateSpec.
        :type: int
        """

        self._mark = mark

    @property
    def media_ids(self):
        """
        List of media IDs that this state applies to.

        :return: The media_ids of this StateSpec. 
        :rtype: list[int]
        """
        return self._media_ids

    @media_ids.setter
    def media_ids(self, media_ids):
        """
        List of media IDs that this state applies to.

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

        self._media_ids = media_ids

    @property
    def parent(self):
        """
        If a clone, the pk of the parent.

        :return: The parent of this StateSpec. 
        :rtype: float
        """
        return self._parent

    @parent.setter
    def parent(self, parent):
        """
        If a clone, the pk of the parent.

        :param parent: The parent of this StateSpec.
        :type: float
        """

        self._parent = parent

    @property
    def type(self):
        """
        Unique integer identifying a state type.

        :return: The type of this StateSpec. 
        :rtype: int
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Unique integer identifying a state type.

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

        self._type = type

    @property
    def user_elemental_id(self):
        """
        Unique ID of the original user who created this. If permissions allow, will change the creating user to the one referenced by this elemental_id

        :return: The user_elemental_id of this StateSpec. 
        :rtype: str
        """
        return self._user_elemental_id

    @user_elemental_id.setter
    def user_elemental_id(self, user_elemental_id):
        """
        Unique ID of the original user who created this. If permissions allow, will change the creating user to the one referenced by this elemental_id

        :param user_elemental_id: The user_elemental_id of this StateSpec.
        :type: str
        """

        self._user_elemental_id = user_elemental_id

    @property
    def version(self):
        """
        Unique integer identifying the version.

        :return: The version of this StateSpec. 
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """
        Unique integer identifying the version.

        :param version: The version of this StateSpec.
        :type: int
        """

        self._version = version

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

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