# -*- coding: utf-8 -*-

"""
    greenbyteapi

    This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""


class DataSignal(object):

    """Implementation of the 'DataSignal' model.

    A data signal.

    Attributes:
        data_signal_id (int): The unique id of a data signal.
        title (string): TODO: type description here.
        unit (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "data_signal_id":'dataSignalId',
        "title":'title',
        "unit":'unit'
    }

    def __init__(self,
                 data_signal_id=None,
                 title=None,
                 unit=None):
        """Constructor for the DataSignal class"""

        # Initialize members of the class
        self.data_signal_id = data_signal_id
        self.title = title
        self.unit = unit


    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object as
            obtained from the deserialization of the server's response. The keys
            MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        data_signal_id = dictionary.get('dataSignalId')
        title = dictionary.get('title')
        unit = dictionary.get('unit')

        # Return an object of this model
        return cls(data_signal_id,
                   title,
                   unit)


