# coding: utf-8

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

from typing import List, Dict  # noqa: F401

from rbb_swagger_server.models.base_model_ import Model
from rbb_swagger_server import util


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

    Do not edit the class manually.
    """

    def __init__(self, name: str=None, msg_type: str=None, msg_type_hash: str=None, msg_definition: str=None, msg_count: int=None, avg_frequency: float=None):  # noqa: E501
        """Topic - a model defined in Swagger

        :param name: The name of this Topic.  # noqa: E501
        :type name: str
        :param msg_type: The msg_type of this Topic.  # noqa: E501
        :type msg_type: str
        :param msg_type_hash: The msg_type_hash of this Topic.  # noqa: E501
        :type msg_type_hash: str
        :param msg_definition: The msg_definition of this Topic.  # noqa: E501
        :type msg_definition: str
        :param msg_count: The msg_count of this Topic.  # noqa: E501
        :type msg_count: int
        :param avg_frequency: The avg_frequency of this Topic.  # noqa: E501
        :type avg_frequency: float
        """
        self.swagger_types = {
            'name': str,
            'msg_type': str,
            'msg_type_hash': str,
            'msg_definition': str,
            'msg_count': int,
            'avg_frequency': float
        }

        self.attribute_map = {
            'name': 'name',
            'msg_type': 'msg_type',
            'msg_type_hash': 'msg_type_hash',
            'msg_definition': 'msg_definition',
            'msg_count': 'msg_count',
            'avg_frequency': 'avg_frequency'
        }

        self._name = name
        self._msg_type = msg_type
        self._msg_type_hash = msg_type_hash
        self._msg_definition = msg_definition
        self._msg_count = msg_count
        self._avg_frequency = avg_frequency

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

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

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

        Name of the topic  # noqa: E501

        :return: The name of this Topic.
        :rtype: str
        """
        return self._name

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

        Name of the topic  # noqa: E501

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

        self._name = name

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

        Message type of the topic  # noqa: E501

        :return: The msg_type of this Topic.
        :rtype: str
        """
        return self._msg_type

    @msg_type.setter
    def msg_type(self, msg_type: str):
        """Sets the msg_type of this Topic.

        Message type of the topic  # noqa: E501

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

        self._msg_type = msg_type

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

        Hash identifier of the message type  # noqa: E501

        :return: The msg_type_hash of this Topic.
        :rtype: str
        """
        return self._msg_type_hash

    @msg_type_hash.setter
    def msg_type_hash(self, msg_type_hash: str):
        """Sets the msg_type_hash of this Topic.

        Hash identifier of the message type  # noqa: E501

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

        self._msg_type_hash = msg_type_hash

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

        Definition of custom messages.  # noqa: E501

        :return: The msg_definition of this Topic.
        :rtype: str
        """
        return self._msg_definition

    @msg_definition.setter
    def msg_definition(self, msg_definition: str):
        """Sets the msg_definition of this Topic.

        Definition of custom messages.  # noqa: E501

        :param msg_definition: The msg_definition of this Topic.
        :type msg_definition: str
        """

        self._msg_definition = msg_definition

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

        Number of messages in this topic.  # noqa: E501

        :return: The msg_count of this Topic.
        :rtype: int
        """
        return self._msg_count

    @msg_count.setter
    def msg_count(self, msg_count: int):
        """Sets the msg_count of this Topic.

        Number of messages in this topic.  # noqa: E501

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

        self._msg_count = msg_count

    @property
    def avg_frequency(self) -> float:
        """Gets the avg_frequency of this Topic.

        Average publishing frequency  # noqa: E501

        :return: The avg_frequency of this Topic.
        :rtype: float
        """
        return self._avg_frequency

    @avg_frequency.setter
    def avg_frequency(self, avg_frequency: float):
        """Sets the avg_frequency of this Topic.

        Average publishing frequency  # noqa: E501

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

        self._avg_frequency = avg_frequency
