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

"""
mdnotes

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


class Note(object):

    """Implementation of the 'Note' model.

    TODO: type model description here.

    Attributes:
        id (long|int): TODO: type description here.
        title (string): TODO: type description here.
        body (string): TODO: type description here.
        user_id (long|int): TODO: type description here.
        created_at (string): TODO: type description here.
        updated_at (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": 'id',
        "title": 'title',
        "body": 'body',
        "user_id": 'user_id',
        "created_at": 'created_at',
        "updated_at": 'updated_at'
    }

    def __init__(self,
                 id=None,
                 title=None,
                 body=None,
                 user_id=None,
                 created_at=None,
                 updated_at=None,
                 additional_properties={}):
        """Constructor for the Note class"""

        # Initialize members of the class
        self.id = id
        self.title = title
        self.body = body
        self.user_id = user_id
        self.created_at = created_at
        self.updated_at = updated_at

        # Add additional model properties to the instance
        self.additional_properties = additional_properties

    @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')
        title = dictionary.get('title')
        body = dictionary.get('body')
        user_id = dictionary.get('user_id')
        created_at = dictionary.get('created_at')
        updated_at = dictionary.get('updated_at')

        # Clean out expected properties from dictionary
        for key in cls._names.values():
            if key in dictionary:
                del dictionary[key]

        # Return an object of this model
        return cls(id,
                   title,
                   body,
                   user_id,
                   created_at,
                   updated_at,
                   dictionary)
