# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

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


import pprint
import re  # noqa: F401
import six

# from xms_client.models.pool_nestview import PoolNestview  # noqa: F401,E501


class ObjectStoragePolicy(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 = {
        'bucket_num': 'int',
        'compress': 'bool',
        'create': 'datetime',
        'crypto': 'bool',
        'data_pool': 'PoolNestview',
        'default': 'bool',
        'description': 'str',
        'id': 'int',
        'index_pool': 'PoolNestview',
        'name': 'str',
        'object_size_threshold': 'int',
        'policy_name': 'str',
        'update': 'datetime'
    }

    attribute_map = {
        'bucket_num': 'bucket_num',
        'compress': 'compress',
        'create': 'create',
        'crypto': 'crypto',
        'data_pool': 'data_pool',
        'default': 'default',
        'description': 'description',
        'id': 'id',
        'index_pool': 'index_pool',
        'name': 'name',
        'object_size_threshold': 'object_size_threshold',
        'policy_name': 'policy_name',
        'update': 'update'
    }

    def __init__(self, bucket_num=None, compress=None, create=None, crypto=None, data_pool=None, default=None, description=None, id=None, index_pool=None, name=None, object_size_threshold=None, policy_name=None, update=None):  # noqa: E501
        """ObjectStoragePolicy - a model defined in Swagger"""  # noqa: E501

        self._bucket_num = None
        self._compress = None
        self._create = None
        self._crypto = None
        self._data_pool = None
        self._default = None
        self._description = None
        self._id = None
        self._index_pool = None
        self._name = None
        self._object_size_threshold = None
        self._policy_name = None
        self._update = None
        self.discriminator = None

        if bucket_num is not None:
            self.bucket_num = bucket_num
        if compress is not None:
            self.compress = compress
        if create is not None:
            self.create = create
        if crypto is not None:
            self.crypto = crypto
        if data_pool is not None:
            self.data_pool = data_pool
        if default is not None:
            self.default = default
        if description is not None:
            self.description = description
        if id is not None:
            self.id = id
        if index_pool is not None:
            self.index_pool = index_pool
        if name is not None:
            self.name = name
        if object_size_threshold is not None:
            self.object_size_threshold = object_size_threshold
        if policy_name is not None:
            self.policy_name = policy_name
        if update is not None:
            self.update = update

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


        :return: The bucket_num of this ObjectStoragePolicy.  # noqa: E501
        :rtype: int
        """
        return self._bucket_num

    @bucket_num.setter
    def bucket_num(self, bucket_num):
        """Sets the bucket_num of this ObjectStoragePolicy.


        :param bucket_num: The bucket_num of this ObjectStoragePolicy.  # noqa: E501
        :type: int
        """

        self._bucket_num = bucket_num

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


        :return: The compress of this ObjectStoragePolicy.  # noqa: E501
        :rtype: bool
        """
        return self._compress

    @compress.setter
    def compress(self, compress):
        """Sets the compress of this ObjectStoragePolicy.


        :param compress: The compress of this ObjectStoragePolicy.  # noqa: E501
        :type: bool
        """

        self._compress = compress

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


        :return: The create of this ObjectStoragePolicy.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this ObjectStoragePolicy.


        :param create: The create of this ObjectStoragePolicy.  # noqa: E501
        :type: datetime
        """

        self._create = create

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


        :return: The crypto of this ObjectStoragePolicy.  # noqa: E501
        :rtype: bool
        """
        return self._crypto

    @crypto.setter
    def crypto(self, crypto):
        """Sets the crypto of this ObjectStoragePolicy.


        :param crypto: The crypto of this ObjectStoragePolicy.  # noqa: E501
        :type: bool
        """

        self._crypto = crypto

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


        :return: The data_pool of this ObjectStoragePolicy.  # noqa: E501
        :rtype: PoolNestview
        """
        return self._data_pool

    @data_pool.setter
    def data_pool(self, data_pool):
        """Sets the data_pool of this ObjectStoragePolicy.


        :param data_pool: The data_pool of this ObjectStoragePolicy.  # noqa: E501
        :type: PoolNestview
        """

        self._data_pool = data_pool

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


        :return: The default of this ObjectStoragePolicy.  # noqa: E501
        :rtype: bool
        """
        return self._default

    @default.setter
    def default(self, default):
        """Sets the default of this ObjectStoragePolicy.


        :param default: The default of this ObjectStoragePolicy.  # noqa: E501
        :type: bool
        """

        self._default = default

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


        :return: The description of this ObjectStoragePolicy.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ObjectStoragePolicy.


        :param description: The description of this ObjectStoragePolicy.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The id of this ObjectStoragePolicy.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ObjectStoragePolicy.


        :param id: The id of this ObjectStoragePolicy.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The index_pool of this ObjectStoragePolicy.  # noqa: E501
        :rtype: PoolNestview
        """
        return self._index_pool

    @index_pool.setter
    def index_pool(self, index_pool):
        """Sets the index_pool of this ObjectStoragePolicy.


        :param index_pool: The index_pool of this ObjectStoragePolicy.  # noqa: E501
        :type: PoolNestview
        """

        self._index_pool = index_pool

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


        :return: The name of this ObjectStoragePolicy.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ObjectStoragePolicy.


        :param name: The name of this ObjectStoragePolicy.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The object_size_threshold of this ObjectStoragePolicy.  # noqa: E501
        :rtype: int
        """
        return self._object_size_threshold

    @object_size_threshold.setter
    def object_size_threshold(self, object_size_threshold):
        """Sets the object_size_threshold of this ObjectStoragePolicy.


        :param object_size_threshold: The object_size_threshold of this ObjectStoragePolicy.  # noqa: E501
        :type: int
        """

        self._object_size_threshold = object_size_threshold

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


        :return: The policy_name of this ObjectStoragePolicy.  # noqa: E501
        :rtype: str
        """
        return self._policy_name

    @policy_name.setter
    def policy_name(self, policy_name):
        """Sets the policy_name of this ObjectStoragePolicy.


        :param policy_name: The policy_name of this ObjectStoragePolicy.  # noqa: E501
        :type: str
        """

        self._policy_name = policy_name

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


        :return: The update of this ObjectStoragePolicy.  # noqa: E501
        :rtype: datetime
        """
        return self._update

    @update.setter
    def update(self, update):
        """Sets the update of this ObjectStoragePolicy.


        :param update: The update of this ObjectStoragePolicy.  # noqa: E501
        :type: datetime
        """

        self._update = update

    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, ObjectStoragePolicy):
            return False

        return self.__dict__ == other.__dict__

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