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

"""
zypev1

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from zypev1.models.consumer import Consumer


class ConsumerRequest(object):

    """Implementation of the 'ConsumerRequest' model.

    TODO: type model description here.

    Attributes:
        consumer (Consumer): TODO: type description here.

    """

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

    def __init__(self,
                 consumer=None):
        """Constructor for the ConsumerRequest class"""

        # Initialize members of the class
        self.consumer = consumer

    @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
        consumer = Consumer.from_dictionary(dictionary.get('consumer')) if dictionary.get('consumer') else None

        # Return an object of this model
        return cls(consumer)
