# coding: utf-8

"""
    VPlex REST API

    A defnition for the next-gen VPlex API  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from vplexapi.models.consistency_group_operational_status import ConsistencyGroupOperationalStatus  # noqa: F401,E501


class ConsistencyGroup(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 = {
        'name': 'str',
        'operational_status': 'list[ConsistencyGroupOperationalStatus]',
        'active_clusters': 'list[str]',
        'passive_clusters': 'list[str]',
        'detach_rule': 'object',
        'auto_resume_at_loser': 'bool',
        'cache_mode': 'str',
        'read_only': 'bool',
        'storage_at_clusters': 'list[str]',
        'virtual_volumes': 'list[str]',
        'visibility': 'list[str]',
        'recoverpoint_enabled': 'bool',
        'recoverpoint': 'object'
    }

    attribute_map = {
        'name': 'name',
        'operational_status': 'operational_status',
        'active_clusters': 'active_clusters',
        'passive_clusters': 'passive_clusters',
        'detach_rule': 'detach_rule',
        'auto_resume_at_loser': 'auto_resume_at_loser',
        'cache_mode': 'cache_mode',
        'read_only': 'read_only',
        'storage_at_clusters': 'storage_at_clusters',
        'virtual_volumes': 'virtual_volumes',
        'visibility': 'visibility',
        'recoverpoint_enabled': 'recoverpoint_enabled',
        'recoverpoint': 'recoverpoint'
    }

    def __init__(self, name=None, operational_status=None, active_clusters=None, passive_clusters=None, detach_rule=None, auto_resume_at_loser=None, cache_mode=None, read_only=None, storage_at_clusters=None, virtual_volumes=None, visibility=None, recoverpoint_enabled=None, recoverpoint=None):  # noqa: E501
        """ConsistencyGroup - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._operational_status = None
        self._active_clusters = None
        self._passive_clusters = None
        self._detach_rule = None
        self._auto_resume_at_loser = None
        self._cache_mode = None
        self._read_only = None
        self._storage_at_clusters = None
        self._virtual_volumes = None
        self._visibility = None
        self._recoverpoint_enabled = None
        self._recoverpoint = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if operational_status is not None:
            self.operational_status = operational_status
        if active_clusters is not None:
            self.active_clusters = active_clusters
        if passive_clusters is not None:
            self.passive_clusters = passive_clusters
        if detach_rule is not None:
            self.detach_rule = detach_rule
        if auto_resume_at_loser is not None:
            self.auto_resume_at_loser = auto_resume_at_loser
        if cache_mode is not None:
            self.cache_mode = cache_mode
        if read_only is not None:
            self.read_only = read_only
        if storage_at_clusters is not None:
            self.storage_at_clusters = storage_at_clusters
        if virtual_volumes is not None:
            self.virtual_volumes = virtual_volumes
        if visibility is not None:
            self.visibility = visibility
        if recoverpoint_enabled is not None:
            self.recoverpoint_enabled = recoverpoint_enabled
        if recoverpoint is not None:
            self.recoverpoint = recoverpoint

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


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

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


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

        self._name = name

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


        :return: The operational_status of this ConsistencyGroup.  # noqa: E501
        :rtype: list[ConsistencyGroupOperationalStatus]
        """
        return self._operational_status

    @operational_status.setter
    def operational_status(self, operational_status):
        """Sets the operational_status of this ConsistencyGroup.


        :param operational_status: The operational_status of this ConsistencyGroup.  # noqa: E501
        :type: list[ConsistencyGroupOperationalStatus]
        """

        self._operational_status = operational_status

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


        :return: The active_clusters of this ConsistencyGroup.  # noqa: E501
        :rtype: list[str]
        """
        return self._active_clusters

    @active_clusters.setter
    def active_clusters(self, active_clusters):
        """Sets the active_clusters of this ConsistencyGroup.


        :param active_clusters: The active_clusters of this ConsistencyGroup.  # noqa: E501
        :type: list[str]
        """

        self._active_clusters = active_clusters

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


        :return: The passive_clusters of this ConsistencyGroup.  # noqa: E501
        :rtype: list[str]
        """
        return self._passive_clusters

    @passive_clusters.setter
    def passive_clusters(self, passive_clusters):
        """Sets the passive_clusters of this ConsistencyGroup.


        :param passive_clusters: The passive_clusters of this ConsistencyGroup.  # noqa: E501
        :type: list[str]
        """

        self._passive_clusters = passive_clusters

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


        :return: The detach_rule of this ConsistencyGroup.  # noqa: E501
        :rtype: object
        """
        return self._detach_rule

    @detach_rule.setter
    def detach_rule(self, detach_rule):
        """Sets the detach_rule of this ConsistencyGroup.


        :param detach_rule: The detach_rule of this ConsistencyGroup.  # noqa: E501
        :type: object
        """

        self._detach_rule = detach_rule

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


        :return: The auto_resume_at_loser of this ConsistencyGroup.  # noqa: E501
        :rtype: bool
        """
        return self._auto_resume_at_loser

    @auto_resume_at_loser.setter
    def auto_resume_at_loser(self, auto_resume_at_loser):
        """Sets the auto_resume_at_loser of this ConsistencyGroup.


        :param auto_resume_at_loser: The auto_resume_at_loser of this ConsistencyGroup.  # noqa: E501
        :type: bool
        """

        self._auto_resume_at_loser = auto_resume_at_loser

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


        :return: The cache_mode of this ConsistencyGroup.  # noqa: E501
        :rtype: str
        """
        return self._cache_mode

    @cache_mode.setter
    def cache_mode(self, cache_mode):
        """Sets the cache_mode of this ConsistencyGroup.


        :param cache_mode: The cache_mode of this ConsistencyGroup.  # noqa: E501
        :type: str
        """

        self._cache_mode = cache_mode

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


        :return: The read_only of this ConsistencyGroup.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this ConsistencyGroup.


        :param read_only: The read_only of this ConsistencyGroup.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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


        :return: The storage_at_clusters of this ConsistencyGroup.  # noqa: E501
        :rtype: list[str]
        """
        return self._storage_at_clusters

    @storage_at_clusters.setter
    def storage_at_clusters(self, storage_at_clusters):
        """Sets the storage_at_clusters of this ConsistencyGroup.


        :param storage_at_clusters: The storage_at_clusters of this ConsistencyGroup.  # noqa: E501
        :type: list[str]
        """

        self._storage_at_clusters = storage_at_clusters

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


        :return: The virtual_volumes of this ConsistencyGroup.  # noqa: E501
        :rtype: list[str]
        """
        return self._virtual_volumes

    @virtual_volumes.setter
    def virtual_volumes(self, virtual_volumes):
        """Sets the virtual_volumes of this ConsistencyGroup.


        :param virtual_volumes: The virtual_volumes of this ConsistencyGroup.  # noqa: E501
        :type: list[str]
        """

        self._virtual_volumes = virtual_volumes

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


        :return: The visibility of this ConsistencyGroup.  # noqa: E501
        :rtype: list[str]
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """Sets the visibility of this ConsistencyGroup.


        :param visibility: The visibility of this ConsistencyGroup.  # noqa: E501
        :type: list[str]
        """

        self._visibility = visibility

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


        :return: The recoverpoint_enabled of this ConsistencyGroup.  # noqa: E501
        :rtype: bool
        """
        return self._recoverpoint_enabled

    @recoverpoint_enabled.setter
    def recoverpoint_enabled(self, recoverpoint_enabled):
        """Sets the recoverpoint_enabled of this ConsistencyGroup.


        :param recoverpoint_enabled: The recoverpoint_enabled of this ConsistencyGroup.  # noqa: E501
        :type: bool
        """

        self._recoverpoint_enabled = recoverpoint_enabled

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


        :return: The recoverpoint of this ConsistencyGroup.  # noqa: E501
        :rtype: object
        """
        return self._recoverpoint

    @recoverpoint.setter
    def recoverpoint(self, recoverpoint):
        """Sets the recoverpoint of this ConsistencyGroup.


        :param recoverpoint: The recoverpoint of this ConsistencyGroup.  # noqa: E501
        :type: object
        """

        self._recoverpoint = recoverpoint

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

        return self.__dict__ == other.__dict__

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