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

"""
zypev1

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


class Device(object):

    """Implementation of the 'Device' model.

    TODO: type model description here.

    Attributes:
        id (string): ID of the device
        description (string): TODO: type description here.
        name (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "description": 'description',
        "name": 'name'
    }

    def __init__(self,
                 id=None,
                 description=None,
                 name=None):
        """Constructor for the Device class"""

        # Initialize members of the class
        self.id = id
        self.description = description
        self.name = name

    @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
        id = dictionary.get('_id')
        description = dictionary.get('description')
        name = dictionary.get('name')

        # Return an object of this model
        return cls(id,
                   description,
                   name)
