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

"""
uexcorpapi

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


class Global(object):

    """Implementation of the 'Global' model.

    Attributes:
        evaluation_period_days (str): The model property of type str.
        game_version (str): The model property of type str.
        game_version_ptu (str): The model property of type str.
        is_accepting_ptu_reports (str): The model property of type str.
        is_accepting_reports (str): The model property of type str.
        is_datacenter_enabled (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 = {
        "evaluation_period_days": 'evaluation_period_days',
        "game_version": 'game_version',
        "game_version_ptu": 'game_version_ptu',
        "is_accepting_ptu_reports": 'is_accepting_ptu_reports',
        "is_accepting_reports": 'is_accepting_reports',
        "is_datacenter_enabled": 'is_datacenter_enabled'
    }

    def __init__(self,
                 evaluation_period_days=None,
                 game_version=None,
                 game_version_ptu=None,
                 is_accepting_ptu_reports=None,
                 is_accepting_reports=None,
                 is_datacenter_enabled=None,
                 additional_properties=None):
        """Constructor for the Global class"""

        # Initialize members of the class
        self.evaluation_period_days = evaluation_period_days 
        self.game_version = game_version 
        self.game_version_ptu = game_version_ptu 
        self.is_accepting_ptu_reports = is_accepting_ptu_reports 
        self.is_accepting_reports = is_accepting_reports 
        self.is_datacenter_enabled = is_datacenter_enabled 

        # 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
        evaluation_period_days = dictionary.get("evaluation_period_days") if dictionary.get("evaluation_period_days") else None
        game_version = dictionary.get("game_version") if dictionary.get("game_version") else None
        game_version_ptu = dictionary.get("game_version_ptu") if dictionary.get("game_version_ptu") else None
        is_accepting_ptu_reports = dictionary.get("is_accepting_ptu_reports") if dictionary.get("is_accepting_ptu_reports") else None
        is_accepting_reports = dictionary.get("is_accepting_reports") if dictionary.get("is_accepting_reports") else None
        is_datacenter_enabled = dictionary.get("is_datacenter_enabled") if dictionary.get("is_datacenter_enabled") 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(evaluation_period_days,
                   game_version,
                   game_version_ptu,
                   is_accepting_ptu_reports,
                   is_accepting_reports,
                   is_datacenter_enabled,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'evaluation_period_days={self.evaluation_period_days!r}, '
                f'game_version={self.game_version!r}, '
                f'game_version_ptu={self.game_version_ptu!r}, '
                f'is_accepting_ptu_reports={self.is_accepting_ptu_reports!r}, '
                f'is_accepting_reports={self.is_accepting_reports!r}, '
                f'is_datacenter_enabled={self.is_datacenter_enabled!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'evaluation_period_days={self.evaluation_period_days!s}, '
                f'game_version={self.game_version!s}, '
                f'game_version_ptu={self.game_version_ptu!s}, '
                f'is_accepting_ptu_reports={self.is_accepting_ptu_reports!s}, '
                f'is_accepting_reports={self.is_accepting_reports!s}, '
                f'is_datacenter_enabled={self.is_datacenter_enabled!s}, '
                f'additional_properties={self.additional_properties!s})')
