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

"""
billbeeapi

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


class RechnungsdruckWebAppControllersApiOrderApiControllerParseTextContainer(object):

    """Implementation of the 'Rechnungsdruck.WebApp.Controllers.Api.OrderApiController.ParseTextContainer' model.

    TODO: type model description here.

    Attributes:
        text_to_parse (string): The text to parse and replace the placeholders
            in.
        is_html (bool): If true, the string will be handled as html.
        language (string): The ISO 639-1 code of the target language. Using
            default if not set.
        trim (bool): If true, then the placeholder values are trimmed after
            usage.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "text_to_parse": 'TextToParse',
        "is_html": 'IsHtml',
        "language": 'Language',
        "trim": 'Trim'
    }

    def __init__(self,
                 text_to_parse=None,
                 is_html=None,
                 language=None,
                 trim=None):
        """Constructor for the RechnungsdruckWebAppControllersApiOrderApiControllerParseTextContainer class"""

        # Initialize members of the class
        self.text_to_parse = text_to_parse
        self.is_html = is_html
        self.language = language
        self.trim = trim

    @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
        text_to_parse = dictionary.get('TextToParse')
        is_html = dictionary.get('IsHtml')
        language = dictionary.get('Language')
        trim = dictionary.get('Trim')

        # Return an object of this model
        return cls(text_to_parse,
                   is_html,
                   language,
                   trim)
