# 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.object_storage_bucket import ObjectStorageBucket  # noqa: F401,E501
# from xms_client.models.object_storage_bucket_stat import ObjectStorageBucketStat  # noqa: F401,E501
# from xms_client.models.object_storage_lifecycle import ObjectStorageLifecycle  # noqa: F401,E501
# from xms_client.models.object_storage_policy_nestview import ObjectStoragePolicyNestview  # noqa: F401,E501
# from xms_client.models.object_storage_replication_policy_nestview import ObjectStorageReplicationPolicyNestview  # noqa: F401,E501
# from xms_client.models.object_storage_user_nestview import ObjectStorageUserNestview  # noqa: F401,E501
# from xms_client.models.object_storage_zone_nestview import ObjectStorageZoneNestview  # noqa: F401,E501


class ObjectStorageBucketRecord(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 = {
        'action_status': 'str',
        'all_user_permission': 'str',
        'auth_user_permission': 'str',
        'create': 'datetime',
        'flag': 'object',
        'id': 'int',
        'lifecycle': 'ObjectStorageLifecycle',
        'name': 'str',
        'nfs_client_num': 'int',
        'owner': 'ObjectStorageUserNestview',
        'owner_permission': 'str',
        'policy': 'ObjectStoragePolicyNestview',
        'quota_max_objects': 'int',
        'quota_max_size': 'int',
        'replication_policy': 'ObjectStorageReplicationPolicyNestview',
        'shards': 'int',
        'status': 'str',
        'update': 'datetime',
        'virtual': 'bool',
        'zone': 'ObjectStorageZoneNestview',
        'samples': 'list[ObjectStorageBucketStat]'
    }

    attribute_map = {
        'action_status': 'action_status',
        'all_user_permission': 'all_user_permission',
        'auth_user_permission': 'auth_user_permission',
        'create': 'create',
        'flag': 'flag',
        'id': 'id',
        'lifecycle': 'lifecycle',
        'name': 'name',
        'nfs_client_num': 'nfs_client_num',
        'owner': 'owner',
        'owner_permission': 'owner_permission',
        'policy': 'policy',
        'quota_max_objects': 'quota_max_objects',
        'quota_max_size': 'quota_max_size',
        'replication_policy': 'replication_policy',
        'shards': 'shards',
        'status': 'status',
        'update': 'update',
        'virtual': 'virtual',
        'zone': 'zone',
        'samples': 'samples'
    }

    def __init__(self, action_status=None, all_user_permission=None, auth_user_permission=None, create=None, flag=None, id=None, lifecycle=None, name=None, nfs_client_num=None, owner=None, owner_permission=None, policy=None, quota_max_objects=None, quota_max_size=None, replication_policy=None, shards=None, status=None, update=None, virtual=None, zone=None, samples=None):  # noqa: E501
        """ObjectStorageBucketRecord - a model defined in Swagger"""  # noqa: E501

        self._action_status = None
        self._all_user_permission = None
        self._auth_user_permission = None
        self._create = None
        self._flag = None
        self._id = None
        self._lifecycle = None
        self._name = None
        self._nfs_client_num = None
        self._owner = None
        self._owner_permission = None
        self._policy = None
        self._quota_max_objects = None
        self._quota_max_size = None
        self._replication_policy = None
        self._shards = None
        self._status = None
        self._update = None
        self._virtual = None
        self._zone = None
        self._samples = None
        self.discriminator = None

        if action_status is not None:
            self.action_status = action_status
        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 create is not None:
            self.create = create
        if flag is not None:
            self.flag = flag
        if id is not None:
            self.id = id
        if lifecycle is not None:
            self.lifecycle = lifecycle
        if name is not None:
            self.name = name
        if nfs_client_num is not None:
            self.nfs_client_num = nfs_client_num
        if owner is not None:
            self.owner = owner
        if owner_permission is not None:
            self.owner_permission = owner_permission
        if policy is not None:
            self.policy = policy
        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 is not None:
            self.replication_policy = replication_policy
        if shards is not None:
            self.shards = shards
        if status is not None:
            self.status = status
        if update is not None:
            self.update = update
        if virtual is not None:
            self.virtual = virtual
        if zone is not None:
            self.zone = zone
        if samples is not None:
            self.samples = samples

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


        :return: The action_status of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: str
        """
        return self._action_status

    @action_status.setter
    def action_status(self, action_status):
        """Sets the action_status of this ObjectStorageBucketRecord.


        :param action_status: The action_status of this ObjectStorageBucketRecord.  # noqa: E501
        :type: str
        """

        self._action_status = action_status

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


        :return: The all_user_permission of this ObjectStorageBucketRecord.  # 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 ObjectStorageBucketRecord.


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

        self._all_user_permission = all_user_permission

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


        :return: The auth_user_permission of this ObjectStorageBucketRecord.  # 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 ObjectStorageBucketRecord.


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

        self._auth_user_permission = auth_user_permission

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


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

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


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

        self._create = create

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


        :return: The flag of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: object
        """
        return self._flag

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


        :param flag: The flag of this ObjectStorageBucketRecord.  # noqa: E501
        :type: object
        """

        self._flag = flag

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


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

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


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

        self._id = id

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


        :return: The lifecycle of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: ObjectStorageLifecycle
        """
        return self._lifecycle

    @lifecycle.setter
    def lifecycle(self, lifecycle):
        """Sets the lifecycle of this ObjectStorageBucketRecord.


        :param lifecycle: The lifecycle of this ObjectStorageBucketRecord.  # noqa: E501
        :type: ObjectStorageLifecycle
        """

        self._lifecycle = lifecycle

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


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

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


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

        self._name = name

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


        :return: The nfs_client_num of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: int
        """
        return self._nfs_client_num

    @nfs_client_num.setter
    def nfs_client_num(self, nfs_client_num):
        """Sets the nfs_client_num of this ObjectStorageBucketRecord.


        :param nfs_client_num: The nfs_client_num of this ObjectStorageBucketRecord.  # noqa: E501
        :type: int
        """

        self._nfs_client_num = nfs_client_num

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


        :return: The owner of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: ObjectStorageUserNestview
        """
        return self._owner

    @owner.setter
    def owner(self, owner):
        """Sets the owner of this ObjectStorageBucketRecord.


        :param owner: The owner of this ObjectStorageBucketRecord.  # noqa: E501
        :type: ObjectStorageUserNestview
        """

        self._owner = owner

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


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

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


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

        self._owner_permission = owner_permission

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


        :return: The policy of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: ObjectStoragePolicyNestview
        """
        return self._policy

    @policy.setter
    def policy(self, policy):
        """Sets the policy of this ObjectStorageBucketRecord.


        :param policy: The policy of this ObjectStorageBucketRecord.  # noqa: E501
        :type: ObjectStoragePolicyNestview
        """

        self._policy = policy

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


        :return: The quota_max_objects of this ObjectStorageBucketRecord.  # 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 ObjectStorageBucketRecord.


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

        self._quota_max_objects = quota_max_objects

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


        :return: The quota_max_size of this ObjectStorageBucketRecord.  # 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 ObjectStorageBucketRecord.


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

        self._quota_max_size = quota_max_size

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


        :return: The replication_policy of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: ObjectStorageReplicationPolicyNestview
        """
        return self._replication_policy

    @replication_policy.setter
    def replication_policy(self, replication_policy):
        """Sets the replication_policy of this ObjectStorageBucketRecord.


        :param replication_policy: The replication_policy of this ObjectStorageBucketRecord.  # noqa: E501
        :type: ObjectStorageReplicationPolicyNestview
        """

        self._replication_policy = replication_policy

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


        :return: The shards of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: int
        """
        return self._shards

    @shards.setter
    def shards(self, shards):
        """Sets the shards of this ObjectStorageBucketRecord.


        :param shards: The shards of this ObjectStorageBucketRecord.  # noqa: E501
        :type: int
        """

        self._shards = shards

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


        :return: The status of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ObjectStorageBucketRecord.


        :param status: The status of this ObjectStorageBucketRecord.  # noqa: E501
        :type: str
        """

        self._status = status

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


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

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


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

        self._update = update

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


        :return: The virtual of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: bool
        """
        return self._virtual

    @virtual.setter
    def virtual(self, virtual):
        """Sets the virtual of this ObjectStorageBucketRecord.


        :param virtual: The virtual of this ObjectStorageBucketRecord.  # noqa: E501
        :type: bool
        """

        self._virtual = virtual

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


        :return: The zone of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: ObjectStorageZoneNestview
        """
        return self._zone

    @zone.setter
    def zone(self, zone):
        """Sets the zone of this ObjectStorageBucketRecord.


        :param zone: The zone of this ObjectStorageBucketRecord.  # noqa: E501
        :type: ObjectStorageZoneNestview
        """

        self._zone = zone

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


        :return: The samples of this ObjectStorageBucketRecord.  # noqa: E501
        :rtype: list[ObjectStorageBucketStat]
        """
        return self._samples

    @samples.setter
    def samples(self, samples):
        """Sets the samples of this ObjectStorageBucketRecord.


        :param samples: The samples of this ObjectStorageBucketRecord.  # noqa: E501
        :type: list[ObjectStorageBucketStat]
        """

        self._samples = samples

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

        return self.__dict__ == other.__dict__

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