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

"""
uexcorpapi

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from uexcorpapi.api_helper import APIHelper


class Data7(object):

    """Implementation of the 'Data7' model.

    Attributes:
        live (str): The model property of type str.
        ptu (str): The model property of type str.
        additional_properties (Dict[str, Any]): The additional properties for
            the model.

    """

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

    def __init__(self,
                 live=None,
                 ptu=None,
                 additional_properties=None):
        """Constructor for the Data7 class"""

        # Initialize members of the class
        self.live = live 
        self.ptu = ptu 

        # Add additional model properties to the instance
        if additional_properties is None:
            additional_properties = {}
        self.additional_properties = additional_properties

    @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 not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        live = dictionary.get("live") if dictionary.get("live") else None
        ptu = dictionary.get("ptu") if dictionary.get("ptu") else None
        additional_properties = APIHelper.get_additional_properties(
            dictionary={k: v for k, v in dictionary.items() if k not in cls._names.values()},
            unboxing_function=lambda value: value)
        # Return an object of this model
        return cls(live,
                   ptu,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'live={self.live!r}, '
                f'ptu={self.ptu!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'live={self.live!s}, '
                f'ptu={self.ptu!s}, '
                f'additional_properties={self.additional_properties!s})')
