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

"""
billbeeapi

This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
from billbeeapi.models.billbee_interfaces_order_multi_language_string import BillbeeInterfacesOrderMultiLanguageString


class RechnungsdruckWebAppControllersApiOrderApiControllerSendMessageModel(object):

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

    TODO: type model description here.

    Attributes:
        send_mode (SendModeEnum): TODO: type description here.
        subject (list of BillbeeInterfacesOrderMultiLanguageString): TODO:
            type description here.
        body (list of BillbeeInterfacesOrderMultiLanguageString): TODO: type
            description here.
        alternative_mail (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "send_mode": 'SendMode',
        "subject": 'Subject',
        "body": 'Body',
        "alternative_mail": 'AlternativeMail'
    }

    def __init__(self,
                 send_mode=None,
                 subject=None,
                 body=None,
                 alternative_mail=None):
        """Constructor for the RechnungsdruckWebAppControllersApiOrderApiControllerSendMessageModel class"""

        # Initialize members of the class
        self.send_mode = send_mode
        self.subject = subject
        self.body = body
        self.alternative_mail = alternative_mail

    @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
        send_mode = dictionary.get('SendMode')
        subject = None
        if dictionary.get('Subject') is not None:
            subject = [BillbeeInterfacesOrderMultiLanguageString.from_dictionary(x) for x in dictionary.get('Subject')]
        body = None
        if dictionary.get('Body') is not None:
            body = [BillbeeInterfacesOrderMultiLanguageString.from_dictionary(x) for x in dictionary.get('Body')]
        alternative_mail = dictionary.get('AlternativeMail')

        # Return an object of this model
        return cls(send_mode,
                   subject,
                   body,
                   alternative_mail)
