# coding: utf-8

"""
    Pure1 Public REST API

    Pure1 Public REST API, developed by [Pure Storage, Inc.](http://www.purestorage.com/)  [Knowledge base reference documentation](https://support.purestorage.com/Pure1/Pure1_Manage/Pure1_Manage_-_REST_API/Pure1_Manage_-_REST_API__Reference)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from pypureclient.pure1.models.fixed_reference import FixedReference  # noqa: F401,E501


class PodArrayStatus(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 = {
        'id': 'str',
        'name': 'str',
        'resource_type': 'str',
        'frozen_at': 'int',
        'mediator_status': 'str',
        'status': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'resource_type': 'resource_type',
        'frozen_at': 'frozen_at',
        'mediator_status': 'mediator_status',
        'status': 'status'
    }

    def __init__(self, id=None, name=None, resource_type=None, frozen_at=None, mediator_status=None, status=None):  # noqa: E501
        """PodArrayStatus - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._resource_type = None
        self._frozen_at = None
        self._mediator_status = None
        self._status = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.resource_type = resource_type
        self.frozen_at = frozen_at
        self.mediator_status = mediator_status
        self.status = status

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

        The opaque and unique id of this resource.  # noqa: E501

        :return: The id of this PodArrayStatus.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        The opaque and unique id of this resource.  # noqa: E501

        :param id: The id of this PodArrayStatus.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The name of this resource  # noqa: E501

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

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

        The name of this resource  # noqa: E501

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

        self._name = name

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

        The type of this resource represented by the name of its REST endpoint. For example, \"arrays\", \"network-interfaces\", and \"metrics\".  # noqa: E501

        :return: The resource_type of this PodArrayStatus.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type):
        """Sets the resource_type of this PodArrayStatus.

        The type of this resource represented by the name of its REST endpoint. For example, \"arrays\", \"network-interfaces\", and \"metrics\".  # noqa: E501

        :param resource_type: The resource_type of this PodArrayStatus.  # noqa: E501
        :type: str
        """

        self._resource_type = resource_type

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

        The Unix timestamp of when the array was last in sync with the pod. (or null if the array is currently in sync)  # noqa: E501

        :return: The frozen_at of this PodArrayStatus.  # noqa: E501
        :rtype: int
        """
        return self._frozen_at

    @frozen_at.setter
    def frozen_at(self, frozen_at):
        """Sets the frozen_at of this PodArrayStatus.

        The Unix timestamp of when the array was last in sync with the pod. (or null if the array is currently in sync)  # noqa: E501

        :param frozen_at: The frozen_at of this PodArrayStatus.  # noqa: E501
        :type: int
        """

        self._frozen_at = frozen_at

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

        The status of the mediator as assessed by this array. Possible values are flummoxed, online, unknown, and unreachable. flummoxed - The array has the wrong UUID for the mediator. This means that the array can reach a mediator, but is talking to the wrong one. Typically, this would be due to a misconfiguration in the customer environment (e.g. DNS misconfiguration). UUIDs also have a TTL. If a pod goes offline on one array, and stays like that for weeks (such that the TTL expires), it may also show this status until the peer array is reachable again. online - The array is successfully communicating with the mediator. unreachable - The array cannot reach the mediator. This could be due to a network issue or the mediator is down.  # noqa: E501

        :return: The mediator_status of this PodArrayStatus.  # noqa: E501
        :rtype: str
        """
        return self._mediator_status

    @mediator_status.setter
    def mediator_status(self, mediator_status):
        """Sets the mediator_status of this PodArrayStatus.

        The status of the mediator as assessed by this array. Possible values are flummoxed, online, unknown, and unreachable. flummoxed - The array has the wrong UUID for the mediator. This means that the array can reach a mediator, but is talking to the wrong one. Typically, this would be due to a misconfiguration in the customer environment (e.g. DNS misconfiguration). UUIDs also have a TTL. If a pod goes offline on one array, and stays like that for weeks (such that the TTL expires), it may also show this status until the peer array is reachable again. online - The array is successfully communicating with the mediator. unreachable - The array cannot reach the mediator. This could be due to a network issue or the mediator is down.  # noqa: E501

        :param mediator_status: The mediator_status of this PodArrayStatus.  # noqa: E501
        :type: str
        """

        self._mediator_status = mediator_status

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

        Status of an array in the pod. Possible values are offline, online, resyncing, and unknown. offline - There is a problem. This array cannot confirm it has the latest data for this pod. This array can not handle IO to the pod nor could it take over during an HA event. online - Everything is fine. This array has the latest data for this pod. This array can handle IO to the pod and can take over during an HA event. resyncing - There was a problem. This array is actively catching up to get the latest data for this pod. This array can handle IO to this pod's volumes, however it could not take over during an HA event. unknown - The state of the pod on this array cannot be determined. This state is only seen on disconnected arrays. The disconnected array cannot determine if the pod on another array is online or offline.  # noqa: E501

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

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

        Status of an array in the pod. Possible values are offline, online, resyncing, and unknown. offline - There is a problem. This array cannot confirm it has the latest data for this pod. This array can not handle IO to the pod nor could it take over during an HA event. online - Everything is fine. This array has the latest data for this pod. This array can handle IO to the pod and can take over during an HA event. resyncing - There was a problem. This array is actively catching up to get the latest data for this pod. This array can handle IO to this pod's volumes, however it could not take over during an HA event. unknown - The state of the pod on this array cannot be determined. This state is only seen on disconnected arrays. The disconnected array cannot determine if the pod on another array is online or offline.  # noqa: E501

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

        self._status = status

    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
        if issubclass(PodArrayStatus, dict):
            for key, value in self.items():
                result[key] = 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, PodArrayStatus):
            return False

        return self.__dict__ == other.__dict__

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