# coding: utf-8

"""
    Abstract API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class PolicyClause(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'collection_id': 'str',
        'dataset_id': 'str',
        'published': 'bool',
        'role': 'str',
        'user_id': 'str'
    }

    attribute_map = {
        'collection_id': 'collection_id',
        'dataset_id': 'dataset_id',
        'published': 'published',
        'role': 'role',
        'user_id': 'user_id'
    }

    def __init__(self, collection_id=None, dataset_id=None, published=False, role='null', user_id='null'):  # noqa: E501
        """PolicyClause - a model defined in Swagger"""  # noqa: E501

        self._collection_id = None
        self._dataset_id = None
        self._published = None
        self._role = None
        self._user_id = None
        self.discriminator = None

        if collection_id is not None:
            self.collection_id = collection_id
        if dataset_id is not None:
            self.dataset_id = dataset_id
        if published is not None:
            self.published = published
        if role is not None:
            self.role = role
        if user_id is not None:
            self.user_id = user_id

    @property
    def collection_id(self):
        """Gets the collection_id of this PolicyClause.  # noqa: E501


        :return: The collection_id of this PolicyClause.  # noqa: E501
        :rtype: str
        """
        return self._collection_id

    @collection_id.setter
    def collection_id(self, collection_id):
        """Sets the collection_id of this PolicyClause.


        :param collection_id: The collection_id of this PolicyClause.  # noqa: E501
        :type: str
        """

        self._collection_id = collection_id

    @property
    def dataset_id(self):
        """Gets the dataset_id of this PolicyClause.  # noqa: E501


        :return: The dataset_id of this PolicyClause.  # noqa: E501
        :rtype: str
        """
        return self._dataset_id

    @dataset_id.setter
    def dataset_id(self, dataset_id):
        """Sets the dataset_id of this PolicyClause.


        :param dataset_id: The dataset_id of this PolicyClause.  # noqa: E501
        :type: str
        """

        self._dataset_id = dataset_id

    @property
    def published(self):
        """Gets the published of this PolicyClause.  # noqa: E501


        :return: The published of this PolicyClause.  # noqa: E501
        :rtype: bool
        """
        return self._published

    @published.setter
    def published(self, published):
        """Sets the published of this PolicyClause.


        :param published: The published of this PolicyClause.  # noqa: E501
        :type: bool
        """

        self._published = published

    @property
    def role(self):
        """Gets the role of this PolicyClause.  # noqa: E501


        :return: The role of this PolicyClause.  # noqa: E501
        :rtype: str
        """
        return self._role

    @role.setter
    def role(self, role):
        """Sets the role of this PolicyClause.


        :param role: The role of this PolicyClause.  # noqa: E501
        :type: str
        """

        self._role = role

    @property
    def user_id(self):
        """Gets the user_id of this PolicyClause.  # noqa: E501


        :return: The user_id of this PolicyClause.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this PolicyClause.


        :param user_id: The user_id of this PolicyClause.  # noqa: E501
        :type: str
        """

        self._user_id = user_id

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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, PolicyClause):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
