# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class StateTypeUpdate(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 = {
        'delete_child_localizations': 'bool',
        'description': 'str',
        'grouping_default': 'bool',
        'name': 'str',
        'visible': 'bool'
    }

    attribute_map = {
        'delete_child_localizations': 'delete_child_localizations',
        'description': 'description',
        'grouping_default': 'grouping_default',
        'name': 'name',
        'visible': 'visible'
    }

    def __init__(self, delete_child_localizations=False, description=None, grouping_default=True, name=None, visible=None, local_vars_configuration=None):  # noqa: E501
        """StateTypeUpdate - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._delete_child_localizations = None
        self._description = None
        self._grouping_default = None
        self._name = None
        self._visible = None
        self.discriminator = None

        if delete_child_localizations is not None:
            self.delete_child_localizations = delete_child_localizations
        if description is not None:
            self.description = description
        if grouping_default is not None:
            self.grouping_default = grouping_default
        if name is not None:
            self.name = name
        if visible is not None:
            self.visible = visible

    @property
    def delete_child_localizations(self):
        """
        True if child localizations should be deleted when this state is deleted. Localizations will only be deleted if they are not associated with another state. 

        :return: The delete_child_localizations of this StateTypeUpdate. 
        :rtype: bool
        """
        return self._delete_child_localizations

    @delete_child_localizations.setter
    def delete_child_localizations(self, delete_child_localizations):
        """
        True if child localizations should be deleted when this state is deleted. Localizations will only be deleted if they are not associated with another state. 

        :param delete_child_localizations: The delete_child_localizations of this StateTypeUpdate.
        :type: bool
        """

        self._delete_child_localizations = delete_child_localizations

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

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

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

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

        self._description = description

    @property
    def grouping_default(self):
        """
        Whether to group elements in the UI by default.

        :return: The grouping_default of this StateTypeUpdate. 
        :rtype: bool
        """
        return self._grouping_default

    @grouping_default.setter
    def grouping_default(self, grouping_default):
        """
        Whether to group elements in the UI by default.

        :param grouping_default: The grouping_default of this StateTypeUpdate.
        :type: bool
        """

        self._grouping_default = grouping_default

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

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

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

        :param name: The name of this StateTypeUpdate.
        :type: str
        """

        self._name = name

    @property
    def visible(self):
        """
        Whether this state type should be displayed.

        :return: The visible of this StateTypeUpdate. 
        :rtype: bool
        """
        return self._visible

    @visible.setter
    def visible(self, visible):
        """
        Whether this state type should be displayed.

        :param visible: The visible of this StateTypeUpdate.
        :type: bool
        """

        self._visible = visible

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

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