# coding: utf-8

"""
MirrorProxyVolume.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


class MirrorProxyVolume(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        MirrorProxyVolume - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'world_wide_name': 'str',  # (required parameter)
            'mirror_proxy_ref': 'str',  # (required parameter)
            'volume_handle': 'int',  # (required parameter)
            'local_mirror_status': 'str',  # (required parameter)
            'remote_mirror_status': 'str',  # (required parameter)
            'local_role': 'str',  # (required parameter)
            'remote_role': 'str',  # (required parameter)
            'local_priority': 'str',  # (required parameter)
            'peer_priority': 'str',  # (required parameter)
            'usable_capacity': 'int',  # (required parameter)
            'current_manager': 'str',  # (required parameter)
            'base_volume': 'str',  # (required parameter)
            'remote_vol_ref': 'str',  # (required parameter)
            'action': 'str',  # (required parameter)
            'reserved1': 'str',  
            'reserved2': 'str',  
            'local_write_mode': 'str',  # (required parameter)
            'auto_resync': 'bool',  # (required parameter)
            'consistency_group_ref': 'str'
        }

        self.attribute_map = {
            'world_wide_name': 'worldWideName',  # (required parameter)
            'mirror_proxy_ref': 'mirrorProxyRef',  # (required parameter)
            'volume_handle': 'volumeHandle',  # (required parameter)
            'local_mirror_status': 'localMirrorStatus',  # (required parameter)
            'remote_mirror_status': 'remoteMirrorStatus',  # (required parameter)
            'local_role': 'localRole',  # (required parameter)
            'remote_role': 'remoteRole',  # (required parameter)
            'local_priority': 'localPriority',  # (required parameter)
            'peer_priority': 'peerPriority',  # (required parameter)
            'usable_capacity': 'usableCapacity',  # (required parameter)
            'current_manager': 'currentManager',  # (required parameter)
            'base_volume': 'baseVolume',  # (required parameter)
            'remote_vol_ref': 'remoteVolRef',  # (required parameter)
            'action': 'action',  # (required parameter)
            'reserved1': 'reserved1',  
            'reserved2': 'reserved2',  
            'local_write_mode': 'localWriteMode',  # (required parameter)
            'auto_resync': 'autoResync',  # (required parameter)
            'consistency_group_ref': 'consistencyGroupRef'
        }

        self._world_wide_name = None
        self._mirror_proxy_ref = None
        self._volume_handle = None
        self._local_mirror_status = None
        self._remote_mirror_status = None
        self._local_role = None
        self._remote_role = None
        self._local_priority = None
        self._peer_priority = None
        self._usable_capacity = None
        self._current_manager = None
        self._base_volume = None
        self._remote_vol_ref = None
        self._action = None
        self._reserved1 = None
        self._reserved2 = None
        self._local_write_mode = None
        self._auto_resync = None
        self._consistency_group_ref = None

    @property
    def world_wide_name(self):
        """
        Gets the world_wide_name of this MirrorProxyVolume.
        The WWN of the local mirror volume.

        :return: The world_wide_name of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._world_wide_name

    @world_wide_name.setter
    def world_wide_name(self, world_wide_name):
        """
        Sets the world_wide_name of this MirrorProxyVolume.
        The WWN of the local mirror volume.

        :param world_wide_name: The world_wide_name of this MirrorProxyVolume.
        :type: str
        """
        self._world_wide_name = world_wide_name

    @property
    def mirror_proxy_ref(self):
        """
        Gets the mirror_proxy_ref of this MirrorProxyVolume.
        The reference to the local mirror volume.

        :return: The mirror_proxy_ref of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._mirror_proxy_ref

    @mirror_proxy_ref.setter
    def mirror_proxy_ref(self, mirror_proxy_ref):
        """
        Sets the mirror_proxy_ref of this MirrorProxyVolume.
        The reference to the local mirror volume.

        :param mirror_proxy_ref: The mirror_proxy_ref of this MirrorProxyVolume.
        :type: str
        """
        self._mirror_proxy_ref = mirror_proxy_ref

    @property
    def volume_handle(self):
        """
        Gets the volume_handle of this MirrorProxyVolume.
        The ssid of the local mirror volume.

        :return: The volume_handle of this MirrorProxyVolume.
        :rtype: int
        :required/optional: required
        """
        return self._volume_handle

    @volume_handle.setter
    def volume_handle(self, volume_handle):
        """
        Sets the volume_handle of this MirrorProxyVolume.
        The ssid of the local mirror volume.

        :param volume_handle: The volume_handle of this MirrorProxyVolume.
        :type: int
        """
        self._volume_handle = volume_handle

    @property
    def local_mirror_status(self):
        """
        Gets the local_mirror_status of this MirrorProxyVolume.
        The status of the local mirror volume.

        :return: The local_mirror_status of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._local_mirror_status

    @local_mirror_status.setter
    def local_mirror_status(self, local_mirror_status):
        """
        Sets the local_mirror_status of this MirrorProxyVolume.
        The status of the local mirror volume.

        :param local_mirror_status: The local_mirror_status of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["optimal", "unsynchronized", "synchronizing", "notready", "suspended", "failed", "failedsuspended", "degradedSynchronizing", "degradedUnsynchronized", "__UNDEFINED"]
        if local_mirror_status not in allowed_values:
            raise ValueError(
                "Invalid value for `local_mirror_status`, must be one of {0}"
                .format(allowed_values)
            )
        self._local_mirror_status = local_mirror_status

    @property
    def remote_mirror_status(self):
        """
        Gets the remote_mirror_status of this MirrorProxyVolume.
        The status of the remote mirror volume.

        :return: The remote_mirror_status of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._remote_mirror_status

    @remote_mirror_status.setter
    def remote_mirror_status(self, remote_mirror_status):
        """
        Sets the remote_mirror_status of this MirrorProxyVolume.
        The status of the remote mirror volume.

        :param remote_mirror_status: The remote_mirror_status of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["optimal", "unsynchronized", "synchronizing", "notready", "suspended", "failed", "failedsuspended", "degradedSynchronizing", "degradedUnsynchronized", "__UNDEFINED"]
        if remote_mirror_status not in allowed_values:
            raise ValueError(
                "Invalid value for `remote_mirror_status`, must be one of {0}"
                .format(allowed_values)
            )
        self._remote_mirror_status = remote_mirror_status

    @property
    def local_role(self):
        """
        Gets the local_role of this MirrorProxyVolume.
        The role of the local mirror volume.

        :return: The local_role of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._local_role

    @local_role.setter
    def local_role(self, local_role):
        """
        Sets the local_role of this MirrorProxyVolume.
        The role of the local mirror volume.

        :param local_role: The local_role of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["primary", "secondary", "invalid", "__UNDEFINED"]
        if local_role not in allowed_values:
            raise ValueError(
                "Invalid value for `local_role`, must be one of {0}"
                .format(allowed_values)
            )
        self._local_role = local_role

    @property
    def remote_role(self):
        """
        Gets the remote_role of this MirrorProxyVolume.
        The role of the remote mirror volume.

        :return: The remote_role of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._remote_role

    @remote_role.setter
    def remote_role(self, remote_role):
        """
        Sets the remote_role of this MirrorProxyVolume.
        The role of the remote mirror volume.

        :param remote_role: The remote_role of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["primary", "secondary", "invalid", "__UNDEFINED"]
        if remote_role not in allowed_values:
            raise ValueError(
                "Invalid value for `remote_role`, must be one of {0}"
                .format(allowed_values)
            )
        self._remote_role = remote_role

    @property
    def local_priority(self):
        """
        Gets the local_priority of this MirrorProxyVolume.
        The synchronization priority for the local mirror volume.

        :return: The local_priority of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._local_priority

    @local_priority.setter
    def local_priority(self, local_priority):
        """
        Sets the local_priority of this MirrorProxyVolume.
        The synchronization priority for the local mirror volume.

        :param local_priority: The local_priority of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["priority0", "priority1", "priority2", "priority3", "priority4", "unknown", "__UNDEFINED"]
        if local_priority not in allowed_values:
            raise ValueError(
                "Invalid value for `local_priority`, must be one of {0}"
                .format(allowed_values)
            )
        self._local_priority = local_priority

    @property
    def peer_priority(self):
        """
        Gets the peer_priority of this MirrorProxyVolume.
        The synchronization priority for the remote mirror volume.

        :return: The peer_priority of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._peer_priority

    @peer_priority.setter
    def peer_priority(self, peer_priority):
        """
        Sets the peer_priority of this MirrorProxyVolume.
        The synchronization priority for the remote mirror volume.

        :param peer_priority: The peer_priority of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["priority0", "priority1", "priority2", "priority3", "priority4", "unknown", "__UNDEFINED"]
        if peer_priority not in allowed_values:
            raise ValueError(
                "Invalid value for `peer_priority`, must be one of {0}"
                .format(allowed_values)
            )
        self._peer_priority = peer_priority

    @property
    def usable_capacity(self):
        """
        Gets the usable_capacity of this MirrorProxyVolume.
        The amount of capacity being used by the mirror.

        :return: The usable_capacity of this MirrorProxyVolume.
        :rtype: int
        :required/optional: required
        """
        return self._usable_capacity

    @usable_capacity.setter
    def usable_capacity(self, usable_capacity):
        """
        Sets the usable_capacity of this MirrorProxyVolume.
        The amount of capacity being used by the mirror.

        :param usable_capacity: The usable_capacity of this MirrorProxyVolume.
        :type: int
        """
        self._usable_capacity = usable_capacity

    @property
    def current_manager(self):
        """
        Gets the current_manager of this MirrorProxyVolume.
        The controller reference that owns the local mirror volume.

        :return: The current_manager of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._current_manager

    @current_manager.setter
    def current_manager(self, current_manager):
        """
        Sets the current_manager of this MirrorProxyVolume.
        The controller reference that owns the local mirror volume.

        :param current_manager: The current_manager of this MirrorProxyVolume.
        :type: str
        """
        self._current_manager = current_manager

    @property
    def base_volume(self):
        """
        Gets the base_volume of this MirrorProxyVolume.
        The reference to the base volume of the local mirror.

        :return: The base_volume of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._base_volume

    @base_volume.setter
    def base_volume(self, base_volume):
        """
        Sets the base_volume of this MirrorProxyVolume.
        The reference to the base volume of the local mirror.

        :param base_volume: The base_volume of this MirrorProxyVolume.
        :type: str
        """
        self._base_volume = base_volume

    @property
    def remote_vol_ref(self):
        """
        Gets the remote_vol_ref of this MirrorProxyVolume.
        The reference to the remote volume.

        :return: The remote_vol_ref of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._remote_vol_ref

    @remote_vol_ref.setter
    def remote_vol_ref(self, remote_vol_ref):
        """
        Sets the remote_vol_ref of this MirrorProxyVolume.
        The reference to the remote volume.

        :param remote_vol_ref: The remote_vol_ref of this MirrorProxyVolume.
        :type: str
        """
        self._remote_vol_ref = remote_vol_ref

    @property
    def action(self):
        """
        Gets the action of this MirrorProxyVolume.
        An indication of what current long-running activity, if any, is currently in progress on the volume.

        :return: The action of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._action

    @action.setter
    def action(self, action):
        """
        Sets the action of this MirrorProxyVolume.
        An indication of what current long-running activity, if any, is currently in progress on the volume.

        :param action: The action of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["none", "copyback", "initializing", "reconstructing", "remappingDce", "remappingDrm", "remappingDcedrm", "remappingDseg", "remappingDve", "remappingDcedve", "remappingInternal", "remappingDefrag", "formatting", "synchronizing", "parityScan", "volumeCopy", "snapshotRollback", "pitRollback", "asyncMirrorGroupInitialSync", "reconstructingCritical", "rebalancing", "copyThenFail", "copyThenFailPending", "copyThenReplace", "copyThenReplaceAndFail", "thinDefrag", "creating", "deleting", "__UNDEFINED"]
        if action not in allowed_values:
            raise ValueError(
                "Invalid value for `action`, must be one of {0}"
                .format(allowed_values)
            )
        self._action = action

    @property
    def reserved1(self):
        """
        Gets the reserved1 of this MirrorProxyVolume.


        :return: The reserved1 of this MirrorProxyVolume.
        :rtype: str
        :required/optional: optional
        """
        return self._reserved1

    @reserved1.setter
    def reserved1(self, reserved1):
        """
        Sets the reserved1 of this MirrorProxyVolume.


        :param reserved1: The reserved1 of this MirrorProxyVolume.
        :type: str
        """
        self._reserved1 = reserved1

    @property
    def reserved2(self):
        """
        Gets the reserved2 of this MirrorProxyVolume.


        :return: The reserved2 of this MirrorProxyVolume.
        :rtype: str
        :required/optional: optional
        """
        return self._reserved2

    @reserved2.setter
    def reserved2(self, reserved2):
        """
        Sets the reserved2 of this MirrorProxyVolume.


        :param reserved2: The reserved2 of this MirrorProxyVolume.
        :type: str
        """
        self._reserved2 = reserved2

    @property
    def local_write_mode(self):
        """
        Gets the local_write_mode of this MirrorProxyVolume.
        The local mirror volume's write mode.

        :return: The local_write_mode of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._local_write_mode

    @local_write_mode.setter
    def local_write_mode(self, local_write_mode):
        """
        Sets the local_write_mode of this MirrorProxyVolume.
        The local mirror volume's write mode.

        :param local_write_mode: The local_write_mode of this MirrorProxyVolume.
        :type: str
        """
        allowed_values = ["synchronousMode", "asynchronousMode", "consistentAsyncMode", "__UNDEFINED"]
        if local_write_mode not in allowed_values:
            raise ValueError(
                "Invalid value for `local_write_mode`, must be one of {0}"
                .format(allowed_values)
            )
        self._local_write_mode = local_write_mode

    @property
    def auto_resync(self):
        """
        Gets the auto_resync of this MirrorProxyVolume.
        Indicates whether auto resynchronization is allowed.

        :return: The auto_resync of this MirrorProxyVolume.
        :rtype: bool
        :required/optional: required
        """
        return self._auto_resync

    @auto_resync.setter
    def auto_resync(self, auto_resync):
        """
        Sets the auto_resync of this MirrorProxyVolume.
        Indicates whether auto resynchronization is allowed.

        :param auto_resync: The auto_resync of this MirrorProxyVolume.
        :type: bool
        """
        self._auto_resync = auto_resync

    @property
    def consistency_group_ref(self):
        """
        Gets the consistency_group_ref of this MirrorProxyVolume.
        The write consistency group reference.

        :return: The consistency_group_ref of this MirrorProxyVolume.
        :rtype: str
        :required/optional: required
        """
        return self._consistency_group_ref

    @consistency_group_ref.setter
    def consistency_group_ref(self, consistency_group_ref):
        """
        Sets the consistency_group_ref of this MirrorProxyVolume.
        The write consistency group reference.

        :param consistency_group_ref: The consistency_group_ref of this MirrorProxyVolume.
        :type: str
        """
        self._consistency_group_ref = consistency_group_ref

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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 pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        if self is None:
           return None
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if self is None or other is None:
            return None
        return self.__dict__ == other.__dict__

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

