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

"""
    greenbyteapi

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


class DeviceModel(object):

    """Implementation of the 'DeviceModel' model.

    General device model information.

    Attributes:
        device_model_id (int): TODO: type description here.
        manufacturer (string): TODO: type description here.
        model (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "device_model_id":'deviceModelId',
        "manufacturer":'manufacturer',
        "model":'model'
    }

    def __init__(self,
                 device_model_id=None,
                 manufacturer=None,
                 model=None):
        """Constructor for the DeviceModel class"""

        # Initialize members of the class
        self.device_model_id = device_model_id
        self.manufacturer = manufacturer
        self.model = model


    @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_model_id = dictionary.get('deviceModelId')
        manufacturer = dictionary.get('manufacturer')
        model = dictionary.get('model')

        # Return an object of this model
        return cls(device_model_id,
                   manufacturer,
                   model)


