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

"""
    greenbyteapi

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


class DeviceType(object):

    """Implementation of the 'DeviceType' model.

    TODO: type model description here.

    Attributes:
        device_type_id (int): The id of a device type.
        title (string): The string representation of the device type.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "device_type_id":'deviceTypeId',
        "title":'title'
    }

    def __init__(self,
                 device_type_id=None,
                 title=None):
        """Constructor for the DeviceType class"""

        # Initialize members of the class
        self.device_type_id = device_type_id
        self.title = title


    @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
        device_type_id = dictionary.get('deviceTypeId')
        title = dictionary.get('title')

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


