# 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 StateDelete(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 = {
        'pedantic': 'int',
        'prune': 'int'
    }

    attribute_map = {
        'pedantic': 'pedantic',
        'prune': 'prune'
    }

    def __init__(self, pedantic=0, prune=0, local_vars_configuration=None):  # noqa: E501
        """StateDelete - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._pedantic = None
        self._prune = None
        self.discriminator = None

        if pedantic is not None:
            self.pedantic = pedantic
        if prune is not None:
            self.prune = prune

    @property
    def pedantic(self):
        """
        Set to 1 to enforce that this is the latest mark; else push edits to end of branch.

        :return: The pedantic of this StateDelete. 
        :rtype: int
        """
        return self._pedantic

    @pedantic.setter
    def pedantic(self, pedantic):
        """
        Set to 1 to enforce that this is the latest mark; else push edits to end of branch.

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

        self._pedantic = pedantic

    @property
    def prune(self):
        """
        If set to 1 will purge the object from the database entirely. This removes any record, change-log, that this metadatum ever existed.

        :return: The prune of this StateDelete. 
        :rtype: int
        """
        return self._prune

    @prune.setter
    def prune(self, prune):
        """
        If set to 1 will purge the object from the database entirely. This removes any record, change-log, that this metadatum ever existed.

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

        self._prune = prune

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

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