# 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 RowProtectionSpec(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 = {
        'algorithm': 'int',
        'bucket': 'int',
        'file': 'int',
        'group': 'int',
        'hosted_template': 'int',
        'job_cluster': 'int',
        'localization': 'int',
        'media': 'int',
        'organization': 'int',
        'permission': 'int',
        'project': 'int',
        'section': 'int',
        'state': 'int',
        'target_group': 'int',
        'target_organization': 'int',
        'user': 'int',
        'version': 'int'
    }

    attribute_map = {
        'algorithm': 'algorithm',
        'bucket': 'bucket',
        'file': 'file',
        'group': 'group',
        'hosted_template': 'hosted_template',
        'job_cluster': 'job_cluster',
        'localization': 'localization',
        'media': 'media',
        'organization': 'organization',
        'permission': 'permission',
        'project': 'project',
        'section': 'section',
        'state': 'state',
        'target_group': 'target_group',
        'target_organization': 'target_organization',
        'user': 'user',
        'version': 'version'
    }

    def __init__(self, algorithm=None, bucket=None, file=None, group=None, hosted_template=None, job_cluster=None, localization=None, media=None, organization=None, permission=None, project=None, section=None, state=None, target_group=None, target_organization=None, user=None, version=None, local_vars_configuration=None):  # noqa: E501
        """RowProtectionSpec - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._algorithm = None
        self._bucket = None
        self._file = None
        self._group = None
        self._hosted_template = None
        self._job_cluster = None
        self._localization = None
        self._media = None
        self._organization = None
        self._permission = None
        self._project = None
        self._section = None
        self._state = None
        self._target_group = None
        self._target_organization = None
        self._user = None
        self._version = None
        self.discriminator = None

        if algorithm is not None:
            self.algorithm = algorithm
        if bucket is not None:
            self.bucket = bucket
        if file is not None:
            self.file = file
        if group is not None:
            self.group = group
        if hosted_template is not None:
            self.hosted_template = hosted_template
        if job_cluster is not None:
            self.job_cluster = job_cluster
        if localization is not None:
            self.localization = localization
        if media is not None:
            self.media = media
        if organization is not None:
            self.organization = organization
        self.permission = permission
        if project is not None:
            self.project = project
        if section is not None:
            self.section = section
        if state is not None:
            self.state = state
        if target_group is not None:
            self.target_group = target_group
        if target_organization is not None:
            self.target_organization = target_organization
        if user is not None:
            self.user = user
        if version is not None:
            self.version = version

    @property
    def algorithm(self):
        """
        Reference to protected object.

        :return: The algorithm of this RowProtectionSpec. 
        :rtype: int
        """
        return self._algorithm

    @algorithm.setter
    def algorithm(self, algorithm):
        """
        Reference to protected object.

        :param algorithm: The algorithm of this RowProtectionSpec.
        :type: int
        """

        self._algorithm = algorithm

    @property
    def bucket(self):
        """
        Reference to protected object.

        :return: The bucket of this RowProtectionSpec. 
        :rtype: int
        """
        return self._bucket

    @bucket.setter
    def bucket(self, bucket):
        """
        Reference to protected object.

        :param bucket: The bucket of this RowProtectionSpec.
        :type: int
        """

        self._bucket = bucket

    @property
    def file(self):
        """
        Reference to protected object.

        :return: The file of this RowProtectionSpec. 
        :rtype: int
        """
        return self._file

    @file.setter
    def file(self, file):
        """
        Reference to protected object.

        :param file: The file of this RowProtectionSpec.
        :type: int
        """

        self._file = file

    @property
    def group(self):
        """
        Group this rule applies to.

        :return: The group of this RowProtectionSpec. 
        :rtype: int
        """
        return self._group

    @group.setter
    def group(self, group):
        """
        Group this rule applies to.

        :param group: The group of this RowProtectionSpec.
        :type: int
        """

        self._group = group

    @property
    def hosted_template(self):
        """
        Reference to protected object.

        :return: The hosted_template of this RowProtectionSpec. 
        :rtype: int
        """
        return self._hosted_template

    @hosted_template.setter
    def hosted_template(self, hosted_template):
        """
        Reference to protected object.

        :param hosted_template: The hosted_template of this RowProtectionSpec.
        :type: int
        """

        self._hosted_template = hosted_template

    @property
    def job_cluster(self):
        """
        Reference to protected object.

        :return: The job_cluster of this RowProtectionSpec. 
        :rtype: int
        """
        return self._job_cluster

    @job_cluster.setter
    def job_cluster(self, job_cluster):
        """
        Reference to protected object.

        :param job_cluster: The job_cluster of this RowProtectionSpec.
        :type: int
        """

        self._job_cluster = job_cluster

    @property
    def localization(self):
        """
        Reference to protected object.

        :return: The localization of this RowProtectionSpec. 
        :rtype: int
        """
        return self._localization

    @localization.setter
    def localization(self, localization):
        """
        Reference to protected object.

        :param localization: The localization of this RowProtectionSpec.
        :type: int
        """

        self._localization = localization

    @property
    def media(self):
        """
        Reference to protected object.

        :return: The media of this RowProtectionSpec. 
        :rtype: int
        """
        return self._media

    @media.setter
    def media(self, media):
        """
        Reference to protected object.

        :param media: The media of this RowProtectionSpec.
        :type: int
        """

        self._media = media

    @property
    def organization(self):
        """
        Organization this rule applies to.

        :return: The organization of this RowProtectionSpec. 
        :rtype: int
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """
        Organization this rule applies to.

        :param organization: The organization of this RowProtectionSpec.
        :type: int
        """

        self._organization = organization

    @property
    def permission(self):
        """
        Bitfield represented by PermissionMask

        :return: The permission of this RowProtectionSpec. 
        :rtype: int
        """
        return self._permission

    @permission.setter
    def permission(self, permission):
        """
        Bitfield represented by PermissionMask

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

        self._permission = permission

    @property
    def project(self):
        """
        Reference to protected object.

        :return: The project of this RowProtectionSpec. 
        :rtype: int
        """
        return self._project

    @project.setter
    def project(self, project):
        """
        Reference to protected object.

        :param project: The project of this RowProtectionSpec.
        :type: int
        """

        self._project = project

    @property
    def section(self):
        """
        Reference to protected object.

        :return: The section of this RowProtectionSpec. 
        :rtype: int
        """
        return self._section

    @section.setter
    def section(self, section):
        """
        Reference to protected object.

        :param section: The section of this RowProtectionSpec.
        :type: int
        """

        self._section = section

    @property
    def state(self):
        """
        Reference to protected object.

        :return: The state of this RowProtectionSpec. 
        :rtype: int
        """
        return self._state

    @state.setter
    def state(self, state):
        """
        Reference to protected object.

        :param state: The state of this RowProtectionSpec.
        :type: int
        """

        self._state = state

    @property
    def target_group(self):
        """
        Reference to protected object.

        :return: The target_group of this RowProtectionSpec. 
        :rtype: int
        """
        return self._target_group

    @target_group.setter
    def target_group(self, target_group):
        """
        Reference to protected object.

        :param target_group: The target_group of this RowProtectionSpec.
        :type: int
        """

        self._target_group = target_group

    @property
    def target_organization(self):
        """
        Reference to protected object.

        :return: The target_organization of this RowProtectionSpec. 
        :rtype: int
        """
        return self._target_organization

    @target_organization.setter
    def target_organization(self, target_organization):
        """
        Reference to protected object.

        :param target_organization: The target_organization of this RowProtectionSpec.
        :type: int
        """

        self._target_organization = target_organization

    @property
    def user(self):
        """
        User this rule applies to.

        :return: The user of this RowProtectionSpec. 
        :rtype: int
        """
        return self._user

    @user.setter
    def user(self, user):
        """
        User this rule applies to.

        :param user: The user of this RowProtectionSpec.
        :type: int
        """

        self._user = user

    @property
    def version(self):
        """
        Reference to protected object.

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

    @version.setter
    def version(self, version):
        """
        Reference to protected object.

        :param version: The version of this RowProtectionSpec.
        :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, RowProtectionSpec):
            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, RowProtectionSpec):
            return True

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