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

"""
    apimaticcalculatorlatest

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


class MessageRequestFromSupplier(object):

    """Implementation of the 'MessageRequestFromSupplier' model.

    TODO: type model description here.

    Attributes:
        thread_id (int): ID of thread
        message (string): Message text

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "thread_id":'threadId',
        "message":'message'
    }

    def __init__(self,
                 thread_id=None,
                 message=None):
        """Constructor for the MessageRequestFromSupplier class"""

        # Initialize members of the class
        self.thread_id = thread_id
        self.message = message


    @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
        thread_id = dictionary.get('threadId')
        message = dictionary.get('message')

        # Return an object of this model
        return cls(thread_id,
                   message)


