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

"""
billbeeapi

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


class RechnungsdruckWebAppControllersApiOrderApiControllerTriggerEventContainer(object):

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

    TODO: type model description here.

    Attributes:
        name (string): Name of the event
        delay_in_minutes (int): The delay in minutes until the rule is
            executed

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name": 'Name',
        "delay_in_minutes": 'DelayInMinutes'
    }

    def __init__(self,
                 name=None,
                 delay_in_minutes=None):
        """Constructor for the RechnungsdruckWebAppControllersApiOrderApiControllerTriggerEventContainer class"""

        # Initialize members of the class
        self.name = name
        self.delay_in_minutes = delay_in_minutes

    @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
        name = dictionary.get('Name')
        delay_in_minutes = dictionary.get('DelayInMinutes')

        # Return an object of this model
        return cls(name,
                   delay_in_minutes)
