# coding: utf-8

"""
EventControl.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 EventControl(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        EventControl - 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 = {
            'oem_priority': 'str',  # (required parameter)
            'default_needs_attention': 'bool',  # (required parameter)
            'default_send_alert': 'bool',  # (required parameter)
            'default_visibility': 'bool',  # (required parameter)
            'oem_needs_attention': 'str',  # (required parameter)
            'oem_send_alert': 'str',  # (required parameter)
            'oem_visibility': 'str',  # (required parameter)
            'collect_support_bundle': 'bool',  # (required parameter)
            'priority_case_creation_trigger': 'bool'
        }

        self.attribute_map = {
            'oem_priority': 'oemPriority',  # (required parameter)
            'default_needs_attention': 'defaultNeedsAttention',  # (required parameter)
            'default_send_alert': 'defaultSendAlert',  # (required parameter)
            'default_visibility': 'defaultVisibility',  # (required parameter)
            'oem_needs_attention': 'oemNeedsAttention',  # (required parameter)
            'oem_send_alert': 'oemSendAlert',  # (required parameter)
            'oem_visibility': 'oemVisibility',  # (required parameter)
            'collect_support_bundle': 'collectSupportBundle',  # (required parameter)
            'priority_case_creation_trigger': 'priorityCaseCreationTrigger'
        }

        self._oem_priority = None
        self._default_needs_attention = None
        self._default_send_alert = None
        self._default_visibility = None
        self._oem_needs_attention = None
        self._oem_send_alert = None
        self._oem_visibility = None
        self._collect_support_bundle = None
        self._priority_case_creation_trigger = None

    @property
    def oem_priority(self):
        """
        Gets the oem_priority of this EventControl.
        If this value if equal to EVENT_DEFAULT_PRIORITY then the management client should use the priority value from the MelEntry structure when filtering events for display, otherwise this value should be used.

        :return: The oem_priority of this EventControl.
        :rtype: str
        :required/optional: required
        """
        return self._oem_priority

    @oem_priority.setter
    def oem_priority(self, oem_priority):
        """
        Sets the oem_priority of this EventControl.
        If this value if equal to EVENT_DEFAULT_PRIORITY then the management client should use the priority value from the MelEntry structure when filtering events for display, otherwise this value should be used.

        :param oem_priority: The oem_priority of this EventControl.
        :type: str
        """
        allowed_values = ["priorityDefault", "priorityCritical", "priorityInfo", "priorityEmergency", "priorityAlert", "priorityError", "priorityWarning", "priorityNotice", "priorityDebug", "__UNDEFINED"]
        if oem_priority not in allowed_values:
            raise ValueError(
                "Invalid value for `oem_priority`, must be one of {0}"
                .format(allowed_values)
            )
        self._oem_priority = oem_priority

    @property
    def default_needs_attention(self):
        """
        Gets the default_needs_attention of this EventControl.
        This is the default value for needs attention. Its value can be overridden by oemNeedsAttention.

        :return: The default_needs_attention of this EventControl.
        :rtype: bool
        :required/optional: required
        """
        return self._default_needs_attention

    @default_needs_attention.setter
    def default_needs_attention(self, default_needs_attention):
        """
        Sets the default_needs_attention of this EventControl.
        This is the default value for needs attention. Its value can be overridden by oemNeedsAttention.

        :param default_needs_attention: The default_needs_attention of this EventControl.
        :type: bool
        """
        self._default_needs_attention = default_needs_attention

    @property
    def default_send_alert(self):
        """
        Gets the default_send_alert of this EventControl.
        This is the default value for sending an alert. Its value can be overridden by oemSendAlert.

        :return: The default_send_alert of this EventControl.
        :rtype: bool
        :required/optional: required
        """
        return self._default_send_alert

    @default_send_alert.setter
    def default_send_alert(self, default_send_alert):
        """
        Sets the default_send_alert of this EventControl.
        This is the default value for sending an alert. Its value can be overridden by oemSendAlert.

        :param default_send_alert: The default_send_alert of this EventControl.
        :type: bool
        """
        self._default_send_alert = default_send_alert

    @property
    def default_visibility(self):
        """
        Gets the default_visibility of this EventControl.
        This is the default value for visibility. Its value can be overridden by oemVisibility.

        :return: The default_visibility of this EventControl.
        :rtype: bool
        :required/optional: required
        """
        return self._default_visibility

    @default_visibility.setter
    def default_visibility(self, default_visibility):
        """
        Sets the default_visibility of this EventControl.
        This is the default value for visibility. Its value can be overridden by oemVisibility.

        :param default_visibility: The default_visibility of this EventControl.
        :type: bool
        """
        self._default_visibility = default_visibility

    @property
    def oem_needs_attention(self):
        """
        Gets the oem_needs_attention of this EventControl.
        If this value is equal to EVENT_CONTROL_ACCEPT_DEFAULT then the value of defaultNeedsAttention determines whether Needs Attention is set on the array. Otherwise, this field determines whether Needs Attention is set on the array.

        :return: The oem_needs_attention of this EventControl.
        :rtype: str
        :required/optional: required
        """
        return self._oem_needs_attention

    @oem_needs_attention.setter
    def oem_needs_attention(self, oem_needs_attention):
        """
        Sets the oem_needs_attention of this EventControl.
        If this value is equal to EVENT_CONTROL_ACCEPT_DEFAULT then the value of defaultNeedsAttention determines whether Needs Attention is set on the array. Otherwise, this field determines whether Needs Attention is set on the array.

        :param oem_needs_attention: The oem_needs_attention of this EventControl.
        :type: str
        """
        allowed_values = ["unknown", "acceptDefault", "overrideToTrue", "overrideToFalse", "__UNDEFINED"]
        if oem_needs_attention not in allowed_values:
            raise ValueError(
                "Invalid value for `oem_needs_attention`, must be one of {0}"
                .format(allowed_values)
            )
        self._oem_needs_attention = oem_needs_attention

    @property
    def oem_send_alert(self):
        """
        Gets the oem_send_alert of this EventControl.
        If this value is equal to EVENT_CONTROL_ACCEPT_DEFAULT then the value of defaultSendAlert determines whether an alert will be sent. Otherwise this field determines whether an alert will be sent.

        :return: The oem_send_alert of this EventControl.
        :rtype: str
        :required/optional: required
        """
        return self._oem_send_alert

    @oem_send_alert.setter
    def oem_send_alert(self, oem_send_alert):
        """
        Sets the oem_send_alert of this EventControl.
        If this value is equal to EVENT_CONTROL_ACCEPT_DEFAULT then the value of defaultSendAlert determines whether an alert will be sent. Otherwise this field determines whether an alert will be sent.

        :param oem_send_alert: The oem_send_alert of this EventControl.
        :type: str
        """
        allowed_values = ["unknown", "acceptDefault", "overrideToTrue", "overrideToFalse", "__UNDEFINED"]
        if oem_send_alert not in allowed_values:
            raise ValueError(
                "Invalid value for `oem_send_alert`, must be one of {0}"
                .format(allowed_values)
            )
        self._oem_send_alert = oem_send_alert

    @property
    def oem_visibility(self):
        """
        Gets the oem_visibility of this EventControl.
        If this value is equal to EVENT_CONTROL_ACCEPT_DEFAULT then the value of defaultVisibility determines whether the event will be displayed. Otherwise, this field determines whether the event will be displayed.

        :return: The oem_visibility of this EventControl.
        :rtype: str
        :required/optional: required
        """
        return self._oem_visibility

    @oem_visibility.setter
    def oem_visibility(self, oem_visibility):
        """
        Sets the oem_visibility of this EventControl.
        If this value is equal to EVENT_CONTROL_ACCEPT_DEFAULT then the value of defaultVisibility determines whether the event will be displayed. Otherwise, this field determines whether the event will be displayed.

        :param oem_visibility: The oem_visibility of this EventControl.
        :type: str
        """
        allowed_values = ["unknown", "acceptDefault", "overrideToTrue", "overrideToFalse", "__UNDEFINED"]
        if oem_visibility not in allowed_values:
            raise ValueError(
                "Invalid value for `oem_visibility`, must be one of {0}"
                .format(allowed_values)
            )
        self._oem_visibility = oem_visibility

    @property
    def collect_support_bundle(self):
        """
        Gets the collect_support_bundle of this EventControl.
        If this value is true, a support bundle will be collected.

        :return: The collect_support_bundle of this EventControl.
        :rtype: bool
        :required/optional: required
        """
        return self._collect_support_bundle

    @collect_support_bundle.setter
    def collect_support_bundle(self, collect_support_bundle):
        """
        Sets the collect_support_bundle of this EventControl.
        If this value is true, a support bundle will be collected.

        :param collect_support_bundle: The collect_support_bundle of this EventControl.
        :type: bool
        """
        self._collect_support_bundle = collect_support_bundle

    @property
    def priority_case_creation_trigger(self):
        """
        Gets the priority_case_creation_trigger of this EventControl.
        This flag indicates whether or not this MEL event should be marked as the reason a customer case was automatically created. It's possible that multiple MEL events could be present in the MEL log that would trigger case creation. But the first MEL event in the log that has this flag set will be tagged as the event that caused the case to be created.

        :return: The priority_case_creation_trigger of this EventControl.
        :rtype: bool
        :required/optional: required
        """
        return self._priority_case_creation_trigger

    @priority_case_creation_trigger.setter
    def priority_case_creation_trigger(self, priority_case_creation_trigger):
        """
        Sets the priority_case_creation_trigger of this EventControl.
        This flag indicates whether or not this MEL event should be marked as the reason a customer case was automatically created. It's possible that multiple MEL events could be present in the MEL log that would trigger case creation. But the first MEL event in the log that has this flag set will be tagged as the event that caused the case to be created.

        :param priority_case_creation_trigger: The priority_case_creation_trigger of this EventControl.
        :type: bool
        """
        self._priority_case_creation_trigger = priority_case_creation_trigger

    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

