# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from swagger_server.models.base_model_ import Model
from swagger_server import util


class MQTT(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, host: str=None, topic: str=None, qos: int=None, port: int=None, username: str=None, password: str=None, ca_cert_path: str=None, insecure: bool=None, detachable: bool=None, reuseable: bool=None):  # noqa: E501
        """MQTT - a model defined in Swagger

        :param host: The host of this MQTT.  # noqa: E501
        :type host: str
        :param topic: The topic of this MQTT.  # noqa: E501
        :type topic: str
        :param qos: The qos of this MQTT.  # noqa: E501
        :type qos: int
        :param port: The port of this MQTT.  # noqa: E501
        :type port: int
        :param username: The username of this MQTT.  # noqa: E501
        :type username: str
        :param password: The password of this MQTT.  # noqa: E501
        :type password: str
        :param ca_cert_path: The ca_cert_path of this MQTT.  # noqa: E501
        :type ca_cert_path: str
        :param insecure: The insecure of this MQTT.  # noqa: E501
        :type insecure: bool
        :param detachable: The detachable of this MQTT.  # noqa: E501
        :type detachable: bool
        :param reuseable: The reuseable of this MQTT.  # noqa: E501
        :type reuseable: bool
        """
        self.swagger_types = {
            'host': str,
            'topic': str,
            'qos': int,
            'port': int,
            'username': str,
            'password': str,
            'ca_cert_path': str,
            'insecure': bool,
            'detachable': bool,
            'reuseable': bool
        }

        self.attribute_map = {
            'host': 'host',
            'topic': 'topic',
            'qos': 'qos',
            'port': 'port',
            'username': 'username',
            'password': 'password',
            'ca_cert_path': 'ca_cert_path',
            'insecure': 'insecure',
            'detachable': 'detachable',
            'reuseable': 'reuseable'
        }

        self._host = host
        self._topic = topic
        self._qos = qos
        self._port = port
        self._username = username
        self._password = password
        self._ca_cert_path = ca_cert_path
        self._insecure = insecure
        self._detachable = detachable
        self._reuseable = reuseable

    @classmethod
    def from_dict(cls, dikt) -> 'MQTT':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The MQTT of this MQTT.  # noqa: E501
        :rtype: MQTT
        """
        return util.deserialize_model(dikt, cls)

    @property
    def host(self) -> str:
        """Gets the host of this MQTT.


        :return: The host of this MQTT.
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host: str):
        """Sets the host of this MQTT.


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

        self._host = host

    @property
    def topic(self) -> str:
        """Gets the topic of this MQTT.


        :return: The topic of this MQTT.
        :rtype: str
        """
        return self._topic

    @topic.setter
    def topic(self, topic: str):
        """Sets the topic of this MQTT.


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

        self._topic = topic

    @property
    def qos(self) -> int:
        """Gets the qos of this MQTT.


        :return: The qos of this MQTT.
        :rtype: int
        """
        return self._qos

    @qos.setter
    def qos(self, qos: int):
        """Sets the qos of this MQTT.


        :param qos: The qos of this MQTT.
        :type qos: int
        """
        if qos is not None and qos > 2:  # noqa: E501
            raise ValueError("Invalid value for `qos`, must be a value less than or equal to `2`")  # noqa: E501
        if qos is not None and qos < 0:  # noqa: E501
            raise ValueError("Invalid value for `qos`, must be a value greater than or equal to `0`")  # noqa: E501

        self._qos = qos

    @property
    def port(self) -> int:
        """Gets the port of this MQTT.


        :return: The port of this MQTT.
        :rtype: int
        """
        return self._port

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


        :param port: The port of this MQTT.
        :type port: int
        """
        if port is not None and port < 0:  # noqa: E501
            raise ValueError("Invalid value for `port`, must be a value greater than or equal to `0`")  # noqa: E501

        self._port = port

    @property
    def username(self) -> str:
        """Gets the username of this MQTT.


        :return: The username of this MQTT.
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username: str):
        """Sets the username of this MQTT.


        :param username: The username of this MQTT.
        :type username: str
        """

        self._username = username

    @property
    def password(self) -> str:
        """Gets the password of this MQTT.


        :return: The password of this MQTT.
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password: str):
        """Sets the password of this MQTT.


        :param password: The password of this MQTT.
        :type password: str
        """

        self._password = password

    @property
    def ca_cert_path(self) -> str:
        """Gets the ca_cert_path of this MQTT.


        :return: The ca_cert_path of this MQTT.
        :rtype: str
        """
        return self._ca_cert_path

    @ca_cert_path.setter
    def ca_cert_path(self, ca_cert_path: str):
        """Sets the ca_cert_path of this MQTT.


        :param ca_cert_path: The ca_cert_path of this MQTT.
        :type ca_cert_path: str
        """

        self._ca_cert_path = ca_cert_path

    @property
    def insecure(self) -> bool:
        """Gets the insecure of this MQTT.


        :return: The insecure of this MQTT.
        :rtype: bool
        """
        return self._insecure

    @insecure.setter
    def insecure(self, insecure: bool):
        """Sets the insecure of this MQTT.


        :param insecure: The insecure of this MQTT.
        :type insecure: bool
        """

        self._insecure = insecure

    @property
    def detachable(self) -> bool:
        """Gets the detachable of this MQTT.


        :return: The detachable of this MQTT.
        :rtype: bool
        """
        return self._detachable

    @detachable.setter
    def detachable(self, detachable: bool):
        """Sets the detachable of this MQTT.


        :param detachable: The detachable of this MQTT.
        :type detachable: bool
        """

        self._detachable = detachable

    @property
    def reuseable(self) -> bool:
        """Gets the reuseable of this MQTT.


        :return: The reuseable of this MQTT.
        :rtype: bool
        """
        return self._reuseable

    @reuseable.setter
    def reuseable(self, reuseable: bool):
        """Sets the reuseable of this MQTT.


        :param reuseable: The reuseable of this MQTT.
        :type reuseable: bool
        """

        self._reuseable = reuseable
