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

"""
    apimaticcalculatorlatest

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


class Text(object):

    """Implementation of the 'Text' model.

    TODO: type model description here.

    Attributes:
        language (string): Language 2 letter value  as ISO 639-1 code
            (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
        value (string): Text value. Send here only plain text. Do not use HTML
            or any other characters.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "language":'language',
        "value":'value'
    }

    def __init__(self,
                 language=None,
                 value=None):
        """Constructor for the Text class"""

        # Initialize members of the class
        self.language = language
        self.value = value


    @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
        language = dictionary.get('language')
        value = dictionary.get('value')

        # Return an object of this model
        return cls(language,
                   value)


