# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class AlertResponse(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',
        'time_of_alert': 'datetime',
        'is_acknowledged': 'bool',
        'time_acknowledged': 'datetime',
        'acknowledge_by_user': 'UserChild',
        'alert_type': 'AlertType',
        'external_notification': 'ExternalNotificationChild',
        'indicator': 'IndicatorChild',
        'hierarchy': 'list[HierarchyChild]',
        'location': 'LocationChild'
    }

    attribute_map = {
        'id': 'Id',
        'time_of_alert': 'TimeOfAlert',
        'is_acknowledged': 'IsAcknowledged',
        'time_acknowledged': 'TimeAcknowledged',
        'acknowledge_by_user': 'AcknowledgeByUser',
        'alert_type': 'AlertType',
        'external_notification': 'ExternalNotification',
        'indicator': 'Indicator',
        'hierarchy': 'Hierarchy',
        'location': 'Location'
    }

    def __init__(self, id=None, time_of_alert=None, is_acknowledged=None, time_acknowledged=None, acknowledge_by_user=None, alert_type=None, external_notification=None, indicator=None, hierarchy=None, location=None):  # noqa: E501
        """AlertResponse - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._time_of_alert = None
        self._is_acknowledged = None
        self._time_acknowledged = None
        self._acknowledge_by_user = None
        self._alert_type = None
        self._external_notification = None
        self._indicator = None
        self._hierarchy = None
        self._location = None
        self.discriminator = None
        self.id = id
        self.time_of_alert = time_of_alert
        self.is_acknowledged = is_acknowledged
        if time_acknowledged is not None:
            self.time_acknowledged = time_acknowledged
        if acknowledge_by_user is not None:
            self.acknowledge_by_user = acknowledge_by_user
        self.alert_type = alert_type
        if external_notification is not None:
            self.external_notification = external_notification
        self.indicator = indicator
        self.hierarchy = hierarchy
        self.location = location

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

        The unique Id for the Alert  # noqa: E501

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

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

        The unique Id for the Alert  # noqa: E501

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

        self._id = id

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

        The time the alert was created  # noqa: E501

        :return: The time_of_alert of this AlertResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._time_of_alert

    @time_of_alert.setter
    def time_of_alert(self, time_of_alert):
        """Sets the time_of_alert of this AlertResponse.

        The time the alert was created  # noqa: E501

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

        self._time_of_alert = time_of_alert

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

        Determines whether or not the alert has been acknowledged  # noqa: E501

        :return: The is_acknowledged of this AlertResponse.  # noqa: E501
        :rtype: bool
        """
        return self._is_acknowledged

    @is_acknowledged.setter
    def is_acknowledged(self, is_acknowledged):
        """Sets the is_acknowledged of this AlertResponse.

        Determines whether or not the alert has been acknowledged  # noqa: E501

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

        self._is_acknowledged = is_acknowledged

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

        The time the alert was acknowledged by the user  # noqa: E501

        :return: The time_acknowledged of this AlertResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._time_acknowledged

    @time_acknowledged.setter
    def time_acknowledged(self, time_acknowledged):
        """Sets the time_acknowledged of this AlertResponse.

        The time the alert was acknowledged by the user  # noqa: E501

        :param time_acknowledged: The time_acknowledged of this AlertResponse.  # noqa: E501
        :type: datetime
        """

        self._time_acknowledged = time_acknowledged

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


        :return: The acknowledge_by_user of this AlertResponse.  # noqa: E501
        :rtype: UserChild
        """
        return self._acknowledge_by_user

    @acknowledge_by_user.setter
    def acknowledge_by_user(self, acknowledge_by_user):
        """Sets the acknowledge_by_user of this AlertResponse.


        :param acknowledge_by_user: The acknowledge_by_user of this AlertResponse.  # noqa: E501
        :type: UserChild
        """

        self._acknowledge_by_user = acknowledge_by_user

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


        :return: The alert_type of this AlertResponse.  # noqa: E501
        :rtype: AlertType
        """
        return self._alert_type

    @alert_type.setter
    def alert_type(self, alert_type):
        """Sets the alert_type of this AlertResponse.


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

        self._alert_type = alert_type

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


        :return: The external_notification of this AlertResponse.  # noqa: E501
        :rtype: ExternalNotificationChild
        """
        return self._external_notification

    @external_notification.setter
    def external_notification(self, external_notification):
        """Sets the external_notification of this AlertResponse.


        :param external_notification: The external_notification of this AlertResponse.  # noqa: E501
        :type: ExternalNotificationChild
        """

        self._external_notification = external_notification

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


        :return: The indicator of this AlertResponse.  # noqa: E501
        :rtype: IndicatorChild
        """
        return self._indicator

    @indicator.setter
    def indicator(self, indicator):
        """Sets the indicator of this AlertResponse.


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

        self._indicator = indicator

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

        The list of the parent groups for the indicator  # noqa: E501

        :return: The hierarchy of this AlertResponse.  # noqa: E501
        :rtype: list[HierarchyChild]
        """
        return self._hierarchy

    @hierarchy.setter
    def hierarchy(self, hierarchy):
        """Sets the hierarchy of this AlertResponse.

        The list of the parent groups for the indicator  # noqa: E501

        :param hierarchy: The hierarchy of this AlertResponse.  # noqa: E501
        :type: list[HierarchyChild]
        """
        if hierarchy is None:
            raise ValueError("Invalid value for `hierarchy`, must not be `None`")  # noqa: E501

        self._hierarchy = hierarchy

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


        :return: The location of this AlertResponse.  # noqa: E501
        :rtype: LocationChild
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this AlertResponse.


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

        self._location = location

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

        return self.__dict__ == other.__dict__

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