# 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.bucket_flag import BucketFlag  # noqa: F401,E501


class ObjectStorageBucketCreateReqBucket(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 = {
        'all_user_permission': 'str',
        'auth_user_permission': 'str',
        'flag': 'BucketFlag',
        'name': 'str',
        'owner_id': 'int',
        'owner_permission': 'str',
        'policy_id': 'int',
        'quota_max_objects': 'int',
        'quota_max_size': 'int',
        'replication_policy_id': 'int'
    }

    attribute_map = {
        'all_user_permission': 'all_user_permission',
        'auth_user_permission': 'auth_user_permission',
        'flag': 'flag',
        'name': 'name',
        'owner_id': 'owner_id',
        'owner_permission': 'owner_permission',
        'policy_id': 'policy_id',
        'quota_max_objects': 'quota_max_objects',
        'quota_max_size': 'quota_max_size',
        'replication_policy_id': 'replication_policy_id'
    }

    def __init__(self, all_user_permission=None, auth_user_permission=None, flag=None, name=None, owner_id=None, owner_permission=None, policy_id=None, quota_max_objects=None, quota_max_size=None, replication_policy_id=None):  # noqa: E501
        """ObjectStorageBucketCreateReqBucket - a model defined in Swagger"""  # noqa: E501

        self._all_user_permission = None
        self._auth_user_permission = None
        self._flag = None
        self._name = None
        self._owner_id = None
        self._owner_permission = None
        self._policy_id = None
        self._quota_max_objects = None
        self._quota_max_size = None
        self._replication_policy_id = None
        self.discriminator = None

        if all_user_permission is not None:
            self.all_user_permission = all_user_permission
        if auth_user_permission is not None:
            self.auth_user_permission = auth_user_permission
        if flag is not None:
            self.flag = flag
        self.name = name
        self.owner_id = owner_id
        if owner_permission is not None:
            self.owner_permission = owner_permission
        self.policy_id = policy_id
        if quota_max_objects is not None:
            self.quota_max_objects = quota_max_objects
        if quota_max_size is not None:
            self.quota_max_size = quota_max_size
        if replication_policy_id is not None:
            self.replication_policy_id = replication_policy_id

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

        permission setting of all users  # noqa: E501

        :return: The all_user_permission of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: str
        """
        return self._all_user_permission

    @all_user_permission.setter
    def all_user_permission(self, all_user_permission):
        """Sets the all_user_permission of this ObjectStorageBucketCreateReqBucket.

        permission setting of all users  # noqa: E501

        :param all_user_permission: The all_user_permission of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: str
        """

        self._all_user_permission = all_user_permission

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

        permission setting of authenticated users  # noqa: E501

        :return: The auth_user_permission of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: str
        """
        return self._auth_user_permission

    @auth_user_permission.setter
    def auth_user_permission(self, auth_user_permission):
        """Sets the auth_user_permission of this ObjectStorageBucketCreateReqBucket.

        permission setting of authenticated users  # noqa: E501

        :param auth_user_permission: The auth_user_permission of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: str
        """

        self._auth_user_permission = auth_user_permission

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

        bucket options  # noqa: E501

        :return: The flag of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: BucketFlag
        """
        return self._flag

    @flag.setter
    def flag(self, flag):
        """Sets the flag of this ObjectStorageBucketCreateReqBucket.

        bucket options  # noqa: E501

        :param flag: The flag of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: BucketFlag
        """

        self._flag = flag

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

        bucket name  # noqa: E501

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

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

        bucket name  # noqa: E501

        :param name: The name of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        bucket owner  # noqa: E501

        :return: The owner_id of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: int
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this ObjectStorageBucketCreateReqBucket.

        bucket owner  # noqa: E501

        :param owner_id: The owner_id of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: int
        """
        if owner_id is None:
            raise ValueError("Invalid value for `owner_id`, must not be `None`")  # noqa: E501

        self._owner_id = owner_id

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

        permission setting of owner  # noqa: E501

        :return: The owner_permission of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: str
        """
        return self._owner_permission

    @owner_permission.setter
    def owner_permission(self, owner_permission):
        """Sets the owner_permission of this ObjectStorageBucketCreateReqBucket.

        permission setting of owner  # noqa: E501

        :param owner_permission: The owner_permission of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: str
        """

        self._owner_permission = owner_permission

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

        storage policy  # noqa: E501

        :return: The policy_id of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: int
        """
        return self._policy_id

    @policy_id.setter
    def policy_id(self, policy_id):
        """Sets the policy_id of this ObjectStorageBucketCreateReqBucket.

        storage policy  # noqa: E501

        :param policy_id: The policy_id of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: int
        """
        if policy_id is None:
            raise ValueError("Invalid value for `policy_id`, must not be `None`")  # noqa: E501

        self._policy_id = policy_id

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

        max number of objects  # noqa: E501

        :return: The quota_max_objects of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: int
        """
        return self._quota_max_objects

    @quota_max_objects.setter
    def quota_max_objects(self, quota_max_objects):
        """Sets the quota_max_objects of this ObjectStorageBucketCreateReqBucket.

        max number of objects  # noqa: E501

        :param quota_max_objects: The quota_max_objects of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: int
        """

        self._quota_max_objects = quota_max_objects

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

        max size of all objects  # noqa: E501

        :return: The quota_max_size of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: int
        """
        return self._quota_max_size

    @quota_max_size.setter
    def quota_max_size(self, quota_max_size):
        """Sets the quota_max_size of this ObjectStorageBucketCreateReqBucket.

        max size of all objects  # noqa: E501

        :param quota_max_size: The quota_max_size of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: int
        """

        self._quota_max_size = quota_max_size

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

        replication policy  # noqa: E501

        :return: The replication_policy_id of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :rtype: int
        """
        return self._replication_policy_id

    @replication_policy_id.setter
    def replication_policy_id(self, replication_policy_id):
        """Sets the replication_policy_id of this ObjectStorageBucketCreateReqBucket.

        replication policy  # noqa: E501

        :param replication_policy_id: The replication_policy_id of this ObjectStorageBucketCreateReqBucket.  # noqa: E501
        :type: int
        """

        self._replication_policy_id = replication_policy_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, ObjectStorageBucketCreateReqBucket):
            return False

        return self.__dict__ == other.__dict__

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