# 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 VersionSpec(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 = {
        'bases': 'list[int]',
        'description': 'str',
        'elemental_id': 'str',
        'name': 'str',
        'show_empty': 'bool'
    }

    attribute_map = {
        'bases': 'bases',
        'description': 'description',
        'elemental_id': 'elemental_id',
        'name': 'name',
        'show_empty': 'show_empty'
    }

    def __init__(self, bases=None, description='', elemental_id=None, name=None, show_empty=True, local_vars_configuration=None):  # noqa: E501
        """VersionSpec - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._bases = None
        self._description = None
        self._elemental_id = None
        self._name = None
        self._show_empty = None
        self.discriminator = None

        if bases is not None:
            self.bases = bases
        if description is not None:
            self.description = description
        if elemental_id is not None:
            self.elemental_id = elemental_id
        self.name = name
        if show_empty is not None:
            self.show_empty = show_empty

    @property
    def bases(self):
        """
        Array of other version IDs that are dependencies of this version.

        :return: The bases of this VersionSpec. 
        :rtype: list[int]
        """
        return self._bases

    @bases.setter
    def bases(self, bases):
        """
        Array of other version IDs that are dependencies of this version.

        :param bases: The bases of this VersionSpec.
        :type: list[int]
        """

        self._bases = bases

    @property
    def description(self):
        """
        Description of the version.

        :return: The description of this VersionSpec. 
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Description of the version.

        :param description: The description of this VersionSpec.
        :type: str
        """

        self._description = description

    @property
    def elemental_id(self):
        """
        Unique ID of an element

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

    @elemental_id.setter
    def elemental_id(self, elemental_id):
        """
        Unique ID of an element

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

        self._elemental_id = elemental_id

    @property
    def name(self):
        """
        Name of the version.

        :return: The name of this VersionSpec. 
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Name of the version.

        :param name: The name of this VersionSpec.
        :type: 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 show_empty(self):
        """
        Whether to show this version on media for which no annotations exist.

        :return: The show_empty of this VersionSpec. 
        :rtype: bool
        """
        return self._show_empty

    @show_empty.setter
    def show_empty(self, show_empty):
        """
        Whether to show this version on media for which no annotations exist.

        :param show_empty: The show_empty of this VersionSpec.
        :type: bool
        """

        self._show_empty = show_empty

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

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