# coding: utf-8

"""
    Gluster Management API

    Gluster Management APIs  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: you@your-company.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class Auto(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    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 = {
        'size': 'int',
        'name': 'str',
        'transport': 'str',
        'force': 'bool',
        'options': 'object',
        'advanced': 'bool',
        'experimental': 'bool',
        'deprecated': 'bool',
        'metadata': 'object',
        'flags': 'object',
        'distribute': 'int',
        'replica': 'int',
        'arbiter': 'int',
        'disperse': 'int',
        'disperse_redundancy': 'int',
        'disperse_data': 'int',
        'snapshot': 'bool',
        'snapshot_reserve_factor': 'float',
        'limit_peers': 'list[str]',
        'limit_zones': 'list[str]',
        'exclude_peers': 'list[str]',
        'exclude_zones': 'list[str]',
        'subvolume_zones_overlap': 'bool'
    }

    attribute_map = {
        'size': 'size',
        'name': 'name',
        'transport': 'transport',
        'force': 'force',
        'options': 'options',
        'advanced': 'advanced',
        'experimental': 'experimental',
        'deprecated': 'deprecated',
        'metadata': 'metadata',
        'flags': 'flags',
        'distribute': 'distribute',
        'replica': 'replica',
        'arbiter': 'arbiter',
        'disperse': 'disperse',
        'disperse_redundancy': 'disperse-redundancy',
        'disperse_data': 'disperse-data',
        'snapshot': 'snapshot',
        'snapshot_reserve_factor': 'snapshot-reserve-factor',
        'limit_peers': 'limit-peers',
        'limit_zones': 'limit-zones',
        'exclude_peers': 'exclude-peers',
        'exclude_zones': 'exclude-zones',
        'subvolume_zones_overlap': 'subvolume-zones-overlap'
    }

    def __init__(self, size=None, name=None, transport=None, force=None, options=None, advanced=None, experimental=None, deprecated=None, metadata=None, flags=None, distribute=None, replica=None, arbiter=None, disperse=None, disperse_redundancy=None, disperse_data=None, snapshot=None, snapshot_reserve_factor=None, limit_peers=None, limit_zones=None, exclude_peers=None, exclude_zones=None, subvolume_zones_overlap=None):  # noqa: E501
        """Auto - a model defined in OpenAPI"""  # noqa: E501

        self._size = None
        self._name = None
        self._transport = None
        self._force = None
        self._options = None
        self._advanced = None
        self._experimental = None
        self._deprecated = None
        self._metadata = None
        self._flags = None
        self._distribute = None
        self._replica = None
        self._arbiter = None
        self._disperse = None
        self._disperse_redundancy = None
        self._disperse_data = None
        self._snapshot = None
        self._snapshot_reserve_factor = None
        self._limit_peers = None
        self._limit_zones = None
        self._exclude_peers = None
        self._exclude_zones = None
        self._subvolume_zones_overlap = None
        self.discriminator = None

        self.size = size
        if name is not None:
            self.name = name
        if transport is not None:
            self.transport = transport
        if force is not None:
            self.force = force
        if options is not None:
            self.options = options
        if advanced is not None:
            self.advanced = advanced
        if experimental is not None:
            self.experimental = experimental
        if deprecated is not None:
            self.deprecated = deprecated
        if metadata is not None:
            self.metadata = metadata
        if flags is not None:
            self.flags = flags
        if distribute is not None:
            self.distribute = distribute
        if replica is not None:
            self.replica = replica
        if arbiter is not None:
            self.arbiter = arbiter
        if disperse is not None:
            self.disperse = disperse
        if disperse_redundancy is not None:
            self.disperse_redundancy = disperse_redundancy
        if disperse_data is not None:
            self.disperse_data = disperse_data
        if snapshot is not None:
            self.snapshot = snapshot
        if snapshot_reserve_factor is not None:
            self.snapshot_reserve_factor = snapshot_reserve_factor
        if limit_peers is not None:
            self.limit_peers = limit_peers
        if limit_zones is not None:
            self.limit_zones = limit_zones
        if exclude_peers is not None:
            self.exclude_peers = exclude_peers
        if exclude_zones is not None:
            self.exclude_zones = exclude_zones
        if subvolume_zones_overlap is not None:
            self.subvolume_zones_overlap = subvolume_zones_overlap

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

        Volume Size  # noqa: E501

        :return: The size of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this Auto.

        Volume Size  # noqa: E501

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

        self._size = size

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

        Volume Name  # noqa: E501

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

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

        Volume Name  # noqa: E501

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

        self._name = name

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

        Transport Type  # noqa: E501

        :return: The transport of this Auto.  # noqa: E501
        :rtype: str
        """
        return self._transport

    @transport.setter
    def transport(self, transport):
        """Sets the transport of this Auto.

        Transport Type  # noqa: E501

        :param transport: The transport of this Auto.  # noqa: E501
        :type: str
        """

        self._transport = transport

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

        Force  # noqa: E501

        :return: The force of this Auto.  # noqa: E501
        :rtype: bool
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this Auto.

        Force  # noqa: E501

        :param force: The force of this Auto.  # noqa: E501
        :type: bool
        """

        self._force = force

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

        Options to be configured  # noqa: E501

        :return: The options of this Auto.  # noqa: E501
        :rtype: object
        """
        return self._options

    @options.setter
    def options(self, options):
        """Sets the options of this Auto.

        Options to be configured  # noqa: E501

        :param options: The options of this Auto.  # noqa: E501
        :type: object
        """

        self._options = options

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

        Allow setting advanced options  # noqa: E501

        :return: The advanced of this Auto.  # noqa: E501
        :rtype: bool
        """
        return self._advanced

    @advanced.setter
    def advanced(self, advanced):
        """Sets the advanced of this Auto.

        Allow setting advanced options  # noqa: E501

        :param advanced: The advanced of this Auto.  # noqa: E501
        :type: bool
        """

        self._advanced = advanced

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

        Allow setting experimental options  # noqa: E501

        :return: The experimental of this Auto.  # noqa: E501
        :rtype: bool
        """
        return self._experimental

    @experimental.setter
    def experimental(self, experimental):
        """Sets the experimental of this Auto.

        Allow setting experimental options  # noqa: E501

        :param experimental: The experimental of this Auto.  # noqa: E501
        :type: bool
        """

        self._experimental = experimental

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

        Allow setting deprecated options  # noqa: E501

        :return: The deprecated of this Auto.  # noqa: E501
        :rtype: bool
        """
        return self._deprecated

    @deprecated.setter
    def deprecated(self, deprecated):
        """Sets the deprecated of this Auto.

        Allow setting deprecated options  # noqa: E501

        :param deprecated: The deprecated of this Auto.  # noqa: E501
        :type: bool
        """

        self._deprecated = deprecated

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

        Set Volume Metadata  # noqa: E501

        :return: The metadata of this Auto.  # noqa: E501
        :rtype: object
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this Auto.

        Set Volume Metadata  # noqa: E501

        :param metadata: The metadata of this Auto.  # noqa: E501
        :type: object
        """

        self._metadata = metadata

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

        Set Flags  # noqa: E501

        :return: The flags of this Auto.  # noqa: E501
        :rtype: object
        """
        return self._flags

    @flags.setter
    def flags(self, flags):
        """Sets the flags of this Auto.

        Set Flags  # noqa: E501

        :param flags: The flags of this Auto.  # noqa: E501
        :type: object
        """

        self._flags = flags

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

        Distribute count  # noqa: E501

        :return: The distribute of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._distribute

    @distribute.setter
    def distribute(self, distribute):
        """Sets the distribute of this Auto.

        Distribute count  # noqa: E501

        :param distribute: The distribute of this Auto.  # noqa: E501
        :type: int
        """

        self._distribute = distribute

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

        Replica Count  # noqa: E501

        :return: The replica of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._replica

    @replica.setter
    def replica(self, replica):
        """Sets the replica of this Auto.

        Replica Count  # noqa: E501

        :param replica: The replica of this Auto.  # noqa: E501
        :type: int
        """

        self._replica = replica

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

        Arbiter Count  # noqa: E501

        :return: The arbiter of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._arbiter

    @arbiter.setter
    def arbiter(self, arbiter):
        """Sets the arbiter of this Auto.

        Arbiter Count  # noqa: E501

        :param arbiter: The arbiter of this Auto.  # noqa: E501
        :type: int
        """

        self._arbiter = arbiter

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

        Disperse count  # noqa: E501

        :return: The disperse of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._disperse

    @disperse.setter
    def disperse(self, disperse):
        """Sets the disperse of this Auto.

        Disperse count  # noqa: E501

        :param disperse: The disperse of this Auto.  # noqa: E501
        :type: int
        """

        self._disperse = disperse

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

        Disperse Redundancy count  # noqa: E501

        :return: The disperse_redundancy of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._disperse_redundancy

    @disperse_redundancy.setter
    def disperse_redundancy(self, disperse_redundancy):
        """Sets the disperse_redundancy of this Auto.

        Disperse Redundancy count  # noqa: E501

        :param disperse_redundancy: The disperse_redundancy of this Auto.  # noqa: E501
        :type: int
        """

        self._disperse_redundancy = disperse_redundancy

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

        Disperse Data count  # noqa: E501

        :return: The disperse_data of this Auto.  # noqa: E501
        :rtype: int
        """
        return self._disperse_data

    @disperse_data.setter
    def disperse_data(self, disperse_data):
        """Sets the disperse_data of this Auto.

        Disperse Data count  # noqa: E501

        :param disperse_data: The disperse_data of this Auto.  # noqa: E501
        :type: int
        """

        self._disperse_data = disperse_data

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

        Enable Snapshot for the Volume  # noqa: E501

        :return: The snapshot of this Auto.  # noqa: E501
        :rtype: bool
        """
        return self._snapshot

    @snapshot.setter
    def snapshot(self, snapshot):
        """Sets the snapshot of this Auto.

        Enable Snapshot for the Volume  # noqa: E501

        :param snapshot: The snapshot of this Auto.  # noqa: E501
        :type: bool
        """

        self._snapshot = snapshot

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

        Snapshot reserve factor  # noqa: E501

        :return: The snapshot_reserve_factor of this Auto.  # noqa: E501
        :rtype: float
        """
        return self._snapshot_reserve_factor

    @snapshot_reserve_factor.setter
    def snapshot_reserve_factor(self, snapshot_reserve_factor):
        """Sets the snapshot_reserve_factor of this Auto.

        Snapshot reserve factor  # noqa: E501

        :param snapshot_reserve_factor: The snapshot_reserve_factor of this Auto.  # noqa: E501
        :type: float
        """

        self._snapshot_reserve_factor = snapshot_reserve_factor

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

        Create Volume only from these peers  # noqa: E501

        :return: The limit_peers of this Auto.  # noqa: E501
        :rtype: list[str]
        """
        return self._limit_peers

    @limit_peers.setter
    def limit_peers(self, limit_peers):
        """Sets the limit_peers of this Auto.

        Create Volume only from these peers  # noqa: E501

        :param limit_peers: The limit_peers of this Auto.  # noqa: E501
        :type: list[str]
        """

        self._limit_peers = limit_peers

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

        Create Volume only from these zones  # noqa: E501

        :return: The limit_zones of this Auto.  # noqa: E501
        :rtype: list[str]
        """
        return self._limit_zones

    @limit_zones.setter
    def limit_zones(self, limit_zones):
        """Sets the limit_zones of this Auto.

        Create Volume only from these zones  # noqa: E501

        :param limit_zones: The limit_zones of this Auto.  # noqa: E501
        :type: list[str]
        """

        self._limit_zones = limit_zones

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

        Do not create Volume from these peers  # noqa: E501

        :return: The exclude_peers of this Auto.  # noqa: E501
        :rtype: list[str]
        """
        return self._exclude_peers

    @exclude_peers.setter
    def exclude_peers(self, exclude_peers):
        """Sets the exclude_peers of this Auto.

        Do not create Volume from these peers  # noqa: E501

        :param exclude_peers: The exclude_peers of this Auto.  # noqa: E501
        :type: list[str]
        """

        self._exclude_peers = exclude_peers

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

        Do not create Volume from these zones  # noqa: E501

        :return: The exclude_zones of this Auto.  # noqa: E501
        :rtype: list[str]
        """
        return self._exclude_zones

    @exclude_zones.setter
    def exclude_zones(self, exclude_zones):
        """Sets the exclude_zones of this Auto.

        Do not create Volume from these zones  # noqa: E501

        :param exclude_zones: The exclude_zones of this Auto.  # noqa: E501
        :type: list[str]
        """

        self._exclude_zones = exclude_zones

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

        Bricks of different subvolume can be created on same device/peer/zone  # noqa: E501

        :return: The subvolume_zones_overlap of this Auto.  # noqa: E501
        :rtype: bool
        """
        return self._subvolume_zones_overlap

    @subvolume_zones_overlap.setter
    def subvolume_zones_overlap(self, subvolume_zones_overlap):
        """Sets the subvolume_zones_overlap of this Auto.

        Bricks of different subvolume can be created on same device/peer/zone  # noqa: E501

        :param subvolume_zones_overlap: The subvolume_zones_overlap of this Auto.  # noqa: E501
        :type: bool
        """

        self._subvolume_zones_overlap = subvolume_zones_overlap

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

        return self.__dict__ == other.__dict__

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