# coding: utf-8

"""
    UBIKA WAAP Gateway and Cloud API

    The UBIKA's WAAP management API provides a REST/JSON programming interface. It allows automation and scripting of WAAP administration tasks, such as management of reverse proxies and tunnels. The API documentation is shipped with the product itself. Once the product installed, you can access the documentation on the following URL https://ManagementWAAP:3001/api/v1/doc/  # noqa: E501

    The version of the OpenAPI document: 1.0.9
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ubika_waap_api_client.configuration import Configuration


class CreateAlertingDestinationsSyslogConfig(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'ip': 'str',
        'port': 'int',
        'protocol': 'str',
        'severity': 'int',
        'facility': 'int',
        'format': 'str'
    }

    attribute_map = {
        'ip': 'ip',
        'port': 'port',
        'protocol': 'protocol',
        'severity': 'severity',
        'facility': 'facility',
        'format': 'format'
    }

    def __init__(self, ip=None, port=None, protocol=None, severity=None, facility=None, format=None, local_vars_configuration=None):  # noqa: E501
        """CreateAlertingDestinationsSyslogConfig - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._ip = None
        self._port = None
        self._protocol = None
        self._severity = None
        self._facility = None
        self._format = None
        self.discriminator = None

        self.ip = ip
        self.port = port
        self.protocol = protocol
        self.severity = severity
        self.facility = facility
        self.format = format

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


        :return: The ip of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :rtype: str
        """
        return self._ip

    @ip.setter
    def ip(self, ip):
        """Sets the ip of this CreateAlertingDestinationsSyslogConfig.


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

        self._ip = ip

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


        :return: The port of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """Sets the port of this CreateAlertingDestinationsSyslogConfig.


        :param port: The port of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and port is None:  # noqa: E501
            raise ValueError("Invalid value for `port`, must not be `None`")  # noqa: E501

        self._port = port

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


        :return: The protocol of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :rtype: str
        """
        return self._protocol

    @protocol.setter
    def protocol(self, protocol):
        """Sets the protocol of this CreateAlertingDestinationsSyslogConfig.


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

        self._protocol = protocol

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


        :return: The severity of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :rtype: int
        """
        return self._severity

    @severity.setter
    def severity(self, severity):
        """Sets the severity of this CreateAlertingDestinationsSyslogConfig.


        :param severity: The severity of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and severity is None:  # noqa: E501
            raise ValueError("Invalid value for `severity`, must not be `None`")  # noqa: E501

        self._severity = severity

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


        :return: The facility of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :rtype: int
        """
        return self._facility

    @facility.setter
    def facility(self, facility):
        """Sets the facility of this CreateAlertingDestinationsSyslogConfig.


        :param facility: The facility of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and facility is None:  # noqa: E501
            raise ValueError("Invalid value for `facility`, must not be `None`")  # noqa: E501

        self._facility = facility

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


        :return: The format of this CreateAlertingDestinationsSyslogConfig.  # noqa: E501
        :rtype: str
        """
        return self._format

    @format.setter
    def format(self, format):
        """Sets the format of this CreateAlertingDestinationsSyslogConfig.


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

        self._format = format

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

        for attr, _ in six.iteritems(self.openapi_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 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, CreateAlertingDestinationsSyslogConfig):
            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, CreateAlertingDestinationsSyslogConfig):
            return True

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