# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class Alert(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 = {
        'acknowledge_time': 'datetime',
        'acknowledge_user': 'str',
        'acknowledged': 'bool',
        'available': 'bool',
        'contents': 'str',
        'count': 'int',
        'created_at': 'datetime',
        'created_by': 'str',
        'endpoint': 'str',
        'errors': 'list[str]',
        'last_modified_at': 'datetime',
        'last_modified_by': 'str',
        'level': 'str',
        'name': 'str',
        'note': 'str',
        'params': 'dict(str, object)',
        'principal': 'str',
        'read_only': 'bool',
        'time': 'datetime',
        'uuid': 'str',
        'validated': 'bool'
    }

    attribute_map = {
        'acknowledge_time': 'AcknowledgeTime',
        'acknowledge_user': 'AcknowledgeUser',
        'acknowledged': 'Acknowledged',
        'available': 'Available',
        'contents': 'Contents',
        'count': 'Count',
        'created_at': 'CreatedAt',
        'created_by': 'CreatedBy',
        'endpoint': 'Endpoint',
        'errors': 'Errors',
        'last_modified_at': 'LastModifiedAt',
        'last_modified_by': 'LastModifiedBy',
        'level': 'Level',
        'name': 'Name',
        'note': 'Note',
        'params': 'Params',
        'principal': 'Principal',
        'read_only': 'ReadOnly',
        'time': 'Time',
        'uuid': 'Uuid',
        'validated': 'Validated'
    }

    def __init__(self, acknowledge_time=None, acknowledge_user=None, acknowledged=None, available=None, contents=None, count=None, created_at=None, created_by=None, endpoint=None, errors=None, last_modified_at=None, last_modified_by=None, level=None, name=None, note=None, params=None, principal=None, read_only=None, time=None, uuid=None, validated=None, _configuration=None):  # noqa: E501
        """Alert - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._acknowledge_time = None
        self._acknowledge_user = None
        self._acknowledged = None
        self._available = None
        self._contents = None
        self._count = None
        self._created_at = None
        self._created_by = None
        self._endpoint = None
        self._errors = None
        self._last_modified_at = None
        self._last_modified_by = None
        self._level = None
        self._name = None
        self._note = None
        self._params = None
        self._principal = None
        self._read_only = None
        self._time = None
        self._uuid = None
        self._validated = None
        self.discriminator = None

        if acknowledge_time is not None:
            self.acknowledge_time = acknowledge_time
        if acknowledge_user is not None:
            self.acknowledge_user = acknowledge_user
        if acknowledged is not None:
            self.acknowledged = acknowledged
        if available is not None:
            self.available = available
        if contents is not None:
            self.contents = contents
        if count is not None:
            self.count = count
        if created_at is not None:
            self.created_at = created_at
        if created_by is not None:
            self.created_by = created_by
        if endpoint is not None:
            self.endpoint = endpoint
        if errors is not None:
            self.errors = errors
        if last_modified_at is not None:
            self.last_modified_at = last_modified_at
        if last_modified_by is not None:
            self.last_modified_by = last_modified_by
        if level is not None:
            self.level = level
        if name is not None:
            self.name = name
        if note is not None:
            self.note = note
        if params is not None:
            self.params = params
        if principal is not None:
            self.principal = principal
        if read_only is not None:
            self.read_only = read_only
        if time is not None:
            self.time = time
        self.uuid = uuid
        if validated is not None:
            self.validated = validated

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

        AcknowledgeTime - time of acknowledgement  # noqa: E501

        :return: The acknowledge_time of this Alert.  # noqa: E501
        :rtype: datetime
        """
        return self._acknowledge_time

    @acknowledge_time.setter
    def acknowledge_time(self, acknowledge_time):
        """Sets the acknowledge_time of this Alert.

        AcknowledgeTime - time of acknowledgement  # noqa: E501

        :param acknowledge_time: The acknowledge_time of this Alert.  # noqa: E501
        :type: datetime
        """

        self._acknowledge_time = acknowledge_time

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

        AcknowledgeUser - user who acknowledged  # noqa: E501

        :return: The acknowledge_user of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._acknowledge_user

    @acknowledge_user.setter
    def acknowledge_user(self, acknowledge_user):
        """Sets the acknowledge_user of this Alert.

        AcknowledgeUser - user who acknowledged  # noqa: E501

        :param acknowledge_user: The acknowledge_user of this Alert.  # noqa: E501
        :type: str
        """

        self._acknowledge_user = acknowledge_user

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

        Acknowledged - has the alert been acknowledged  # noqa: E501

        :return: The acknowledged of this Alert.  # noqa: E501
        :rtype: bool
        """
        return self._acknowledged

    @acknowledged.setter
    def acknowledged(self, acknowledged):
        """Sets the acknowledged of this Alert.

        Acknowledged - has the alert been acknowledged  # noqa: E501

        :param acknowledged: The acknowledged of this Alert.  # noqa: E501
        :type: bool
        """

        self._acknowledged = acknowledged

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

        Available tracks whether or not the model passed validation.  # noqa: E501

        :return: The available of this Alert.  # noqa: E501
        :rtype: bool
        """
        return self._available

    @available.setter
    def available(self, available):
        """Sets the available of this Alert.

        Available tracks whether or not the model passed validation.  # noqa: E501

        :param available: The available of this Alert.  # noqa: E501
        :type: bool
        """

        self._available = available

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

        Contents is the full information about the alert  # noqa: E501

        :return: The contents of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._contents

    @contents.setter
    def contents(self, contents):
        """Sets the contents of this Alert.

        Contents is the full information about the alert  # noqa: E501

        :param contents: The contents of this Alert.  # noqa: E501
        :type: str
        """

        self._contents = contents

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

        Count is the number of times this Name has been called uniquely  # noqa: E501

        :return: The count of this Alert.  # noqa: E501
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count):
        """Sets the count of this Alert.

        Count is the number of times this Name has been called uniquely  # noqa: E501

        :param count: The count of this Alert.  # noqa: E501
        :type: int
        """

        self._count = count

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

        CreatedAt is the time that this object was created.  # noqa: E501

        :return: The created_at of this Alert.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Alert.

        CreatedAt is the time that this object was created.  # noqa: E501

        :param created_at: The created_at of this Alert.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

        :return: The created_by of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this Alert.

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

        :param created_by: The created_by of this Alert.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :return: The endpoint of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """Sets the endpoint of this Alert.

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :param endpoint: The endpoint of this Alert.  # noqa: E501
        :type: str
        """

        self._endpoint = endpoint

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

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :return: The errors of this Alert.  # noqa: E501
        :rtype: list[str]
        """
        return self._errors

    @errors.setter
    def errors(self, errors):
        """Sets the errors of this Alert.

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :param errors: The errors of this Alert.  # noqa: E501
        :type: list[str]
        """

        self._errors = errors

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

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :return: The last_modified_at of this Alert.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_at

    @last_modified_at.setter
    def last_modified_at(self, last_modified_at):
        """Sets the last_modified_at of this Alert.

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :param last_modified_at: The last_modified_at of this Alert.  # noqa: E501
        :type: datetime
        """

        self._last_modified_at = last_modified_at

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

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :return: The last_modified_by of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._last_modified_by

    @last_modified_by.setter
    def last_modified_by(self, last_modified_by):
        """Sets the last_modified_by of this Alert.

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :param last_modified_by: The last_modified_by of this Alert.  # noqa: E501
        :type: str
        """

        self._last_modified_by = last_modified_by

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

        Level of the alert Range of values: Error, Warn, Info, Debug  # noqa: E501

        :return: The level of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._level

    @level.setter
    def level(self, level):
        """Sets the level of this Alert.

        Level of the alert Range of values: Error, Warn, Info, Debug  # noqa: E501

        :param level: The level of this Alert.  # noqa: E501
        :type: str
        """

        self._level = level

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

        Name is a short name for this alert.  This can contain any reference information for humans you want associated with the alert.  # noqa: E501

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

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

        Name is a short name for this alert.  This can contain any reference information for humans you want associated with the alert.  # noqa: E501

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

        self._name = name

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

        Notes - field for additional information about the Alert Use this field for notes about what is done with the alert.  # noqa: E501

        :return: The note of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._note

    @note.setter
    def note(self, note):
        """Sets the note of this Alert.

        Notes - field for additional information about the Alert Use this field for notes about what is done with the alert.  # noqa: E501

        :param note: The note of this Alert.  # noqa: E501
        :type: str
        """

        self._note = note

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

        Params - structure of data elements - filterable  # noqa: E501

        :return: The params of this Alert.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._params

    @params.setter
    def params(self, params):
        """Sets the params of this Alert.

        Params - structure of data elements - filterable  # noqa: E501

        :param params: The params of this Alert.  # noqa: E501
        :type: dict(str, object)
        """

        self._params = params

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

        Principal is the creator of the alert.  # noqa: E501

        :return: The principal of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._principal

    @principal.setter
    def principal(self, principal):
        """Sets the principal of this Alert.

        Principal is the creator of the alert.  # noqa: E501

        :param principal: The principal of this Alert.  # noqa: E501
        :type: str
        """

        self._principal = principal

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

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

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

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

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

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

        self._read_only = read_only

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

        Time of the alert.  # noqa: E501

        :return: The time of this Alert.  # noqa: E501
        :rtype: datetime
        """
        return self._time

    @time.setter
    def time(self, time):
        """Sets the time of this Alert.

        Time of the alert.  # noqa: E501

        :param time: The time of this Alert.  # noqa: E501
        :type: datetime
        """

        self._time = time

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

        The UUID of the alert. This is auto-created at Create time, and cannot change afterwards.  # noqa: E501

        :return: The uuid of this Alert.  # noqa: E501
        :rtype: str
        """
        return self._uuid

    @uuid.setter
    def uuid(self, uuid):
        """Sets the uuid of this Alert.

        The UUID of the alert. This is auto-created at Create time, and cannot change afterwards.  # noqa: E501

        :param uuid: The uuid of this Alert.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and uuid is None:
            raise ValueError("Invalid value for `uuid`, must not be `None`")  # noqa: E501

        self._uuid = uuid

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

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :return: The validated of this Alert.  # noqa: E501
        :rtype: bool
        """
        return self._validated

    @validated.setter
    def validated(self, validated):
        """Sets the validated of this Alert.

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :param validated: The validated of this Alert.  # noqa: E501
        :type: bool
        """

        self._validated = validated

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
