"""
    FactSet Fundamentals API

    Gain access to current, comprehensive, and comparative information on securities in worldwide developed and emerging markets. Composed of annual and interim/quarterly data, detailed historical financial statement content, per share data, and calculated ratios, FactSet Fundamentals provides you with the information you need for a global investment perspective.   # noqa: E501

    The version of the OpenAPI document: 1.0.2
    Contact: <EMAIL>
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from fds.sdk.FactSetFundamentals.model_utils import (  # noqa: F401
    ApiTypeError,
    ModelComposed,
    ModelNormal,
    ModelSimple,
    cached_property,
    change_keys_js_to_python,
    convert_js_args_to_python_args,
    date,
    datetime,
    file_type,
    none_type,
    validate_get_composed_info,
    OpenApiModel
)
from fds.sdk.FactSetFundamentals.exceptions import ApiAttributeError



class Fundamental(ModelNormal):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Attributes:
      allowed_values (dict): The key is the tuple path to the attribute
          and the for var_name this is (var_name,). The value is a dict
          with a capitalized key describing the allowed value and an allowed
          value. These dicts store the allowed enum values.
      attribute_map (dict): The key is attribute name
          and the value is json key in definition.
      discriminator_value_class_map (dict): A dict to go from the discriminator
          variable value to the discriminator class name.
      validations (dict): The key is the tuple path to the attribute
          and the for var_name this is (var_name,). The value is a dict
          that stores validations for max_length, min_length, max_items,
          min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
          inclusive_minimum, and regex.
      additional_properties_type (tuple): A tuple of classes accepted
          as additional properties values.
    """

    allowed_values = {
        ('periodicity',): {
            'ANN': "ANN",
            'ANN_R': "ANN_R",
            'QTR': "QTR",
            'QTR_R': "QTR_R",
            'SEMI': "SEMI",
            'CAL': "CAL",
            'LTM': "LTM",
            'LTMSG': "LTMSG",
            'YTD': "YTD",
        },
    }

    validations = {
    }

    @cached_property
    def additional_properties_type():
        """
        This must be a method because a model may have properties that are
        of type self, this must run after the class is loaded
        """
        return (bool, date, datetime, dict, float, int, list, str, none_type,)  # noqa: E501

    _nullable = False

    @cached_property
    def openapi_types():
        """
        This must be a method because a model may have properties that are
        of type self, this must run after the class is loaded

        Returns
            openapi_types (dict): The key is attribute name
                and the value is attribute type.
        """
        return {
            'request_id': (str,),  # noqa: E501
            'fsym_id': (str,),  # noqa: E501
            'metric': (str,),  # noqa: E501
            'periodicity': (str,),  # noqa: E501
            'fiscal_period': (int,),  # noqa: E501
            'fiscal_year': (int,),  # noqa: E501
            'fiscal_period_length': (int,),  # noqa: E501
            'fiscal_end_date': (date,),  # noqa: E501
            'report_date': (date,),  # noqa: E501
            'eps_report_date': (date,),  # noqa: E501
            'update_type': (int,),  # noqa: E501
            'update_status': (str,),  # noqa: E501
            'currency': (str,),  # noqa: E501
            'value': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),  # noqa: E501
        }

    @cached_property
    def discriminator():
        return None


    attribute_map = {
        'request_id': 'requestId',  # noqa: E501
        'fsym_id': 'fsymId',  # noqa: E501
        'metric': 'metric',  # noqa: E501
        'periodicity': 'periodicity',  # noqa: E501
        'fiscal_period': 'fiscalPeriod',  # noqa: E501
        'fiscal_year': 'fiscalYear',  # noqa: E501
        'fiscal_period_length': 'fiscalPeriodLength',  # noqa: E501
        'fiscal_end_date': 'fiscalEndDate',  # noqa: E501
        'report_date': 'reportDate',  # noqa: E501
        'eps_report_date': 'epsReportDate',  # noqa: E501
        'update_type': 'updateType',  # noqa: E501
        'update_status': 'updateStatus',  # noqa: E501
        'currency': 'currency',  # noqa: E501
        'value': 'value',  # noqa: E501
    }

    read_only_vars = {
    }

    _composed_schemas = {}

    @classmethod
    @convert_js_args_to_python_args
    def _from_openapi_data(cls, *args, **kwargs):  # noqa: E501
        """Fundamental - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            request_id (str): Identifier that was used for the request.. [optional]  # noqa: E501
            fsym_id (str): FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency. For equities, all primary listings per region and currency are allocated a regional-level permanent identifier. The regional-level permanent identifier will be available once a SEDOL representing the region/currency has been allocated and the identifiers are on FactSet.. [optional]  # noqa: E501
            metric (str): The requested `metric` input, representing the Fundamental Data Item. For a definition of the item please use the /fundamentals/v#/metrics endpoint.. [optional]  # noqa: E501
            periodicity (str): Periodicity or frequency of the fiscal periods, where ANN = Annual Original, ANN_R = Annual Latest, QTR = Quarterly Original, QTR_R = Quarterly Latest, SEMI = Semi-Annual, LTM = Last Twelve Months, LTMSG = Last Twelve Months Global [OA17959](https://my.apps.factset.com/oa/pages/17959) and YTD = Year-to-date.. [optional]  # noqa: E501
            fiscal_period (int): Fiscal Period indicator. Returns an integer representing the fiscal period for the requested item and periodicity. QUARTERLY CODE: 1-Fist Quarter; 2-Second Quarter; 3-Third Quarter; 4-Fourth Quarter. SEMI-CODE: 1-First Semi-annual Period; 2-Second Semi-annual Period.. [optional]  # noqa: E501
            fiscal_year (int): Fiscal year of the reported period in YYYY format.. [optional]  # noqa: E501
            fiscal_period_length (int): Length of fiscal period in days.. [optional]  # noqa: E501
            fiscal_end_date (date): The normalized data the fiscal period ended.. [optional]  # noqa: E501
            report_date (date): The date the reported fiscal period actually ended.. [optional]  # noqa: E501
            eps_report_date (date): The date the EPS was reported for the requested periodicity. In YYYY-MM-DD format. Unavailable data returned as 0001-01-01.. [optional]  # noqa: E501
            update_type (int): The update type, where: 1 = Preliminary; 2 = FAST; 3 = Final. For more details, visit [Online Assistant Page #D13094](https://oa.apps.factset.com/pages/D13094).. [optional]  # noqa: E501
            update_status (str): Update Status Flag: P = Preliminary - The period is updated from a report that usually contains limited or only key information., F = Final - The period is updated from a report where detailed information are available in financial statements including the notes to the line items.. [optional]  # noqa: E501
            currency (str): Currency code for the data. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).. [optional]  # noqa: E501
            value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value of the data metric requested. Note that the type of value is 'object', and depending on the data metric requested, the value could be an object representation of a string or double. . [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        self = super(OpenApiModel, cls).__new__(cls)

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
        return self

    required_properties = set([
        '_data_store',
        '_check_type',
        '_spec_property_naming',
        '_path_to_item',
        '_configuration',
        '_visited_composed_classes',
    ])

    @convert_js_args_to_python_args
    def __init__(self, *args, **kwargs):  # noqa: E501
        """Fundamental - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            request_id (str): Identifier that was used for the request.. [optional]  # noqa: E501
            fsym_id (str): FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency. For equities, all primary listings per region and currency are allocated a regional-level permanent identifier. The regional-level permanent identifier will be available once a SEDOL representing the region/currency has been allocated and the identifiers are on FactSet.. [optional]  # noqa: E501
            metric (str): The requested `metric` input, representing the Fundamental Data Item. For a definition of the item please use the /fundamentals/v#/metrics endpoint.. [optional]  # noqa: E501
            periodicity (str): Periodicity or frequency of the fiscal periods, where ANN = Annual Original, ANN_R = Annual Latest, QTR = Quarterly Original, QTR_R = Quarterly Latest, SEMI = Semi-Annual, LTM = Last Twelve Months, LTMSG = Last Twelve Months Global [OA17959](https://my.apps.factset.com/oa/pages/17959) and YTD = Year-to-date.. [optional]  # noqa: E501
            fiscal_period (int): Fiscal Period indicator. Returns an integer representing the fiscal period for the requested item and periodicity. QUARTERLY CODE: 1-Fist Quarter; 2-Second Quarter; 3-Third Quarter; 4-Fourth Quarter. SEMI-CODE: 1-First Semi-annual Period; 2-Second Semi-annual Period.. [optional]  # noqa: E501
            fiscal_year (int): Fiscal year of the reported period in YYYY format.. [optional]  # noqa: E501
            fiscal_period_length (int): Length of fiscal period in days.. [optional]  # noqa: E501
            fiscal_end_date (date): The normalized data the fiscal period ended.. [optional]  # noqa: E501
            report_date (date): The date the reported fiscal period actually ended.. [optional]  # noqa: E501
            eps_report_date (date): The date the EPS was reported for the requested periodicity. In YYYY-MM-DD format. Unavailable data returned as 0001-01-01.. [optional]  # noqa: E501
            update_type (int): The update type, where: 1 = Preliminary; 2 = FAST; 3 = Final. For more details, visit [Online Assistant Page #D13094](https://oa.apps.factset.com/pages/D13094).. [optional]  # noqa: E501
            update_status (str): Update Status Flag: P = Preliminary - The period is updated from a report that usually contains limited or only key information., F = Final - The period is updated from a report where detailed information are available in financial statements including the notes to the line items.. [optional]  # noqa: E501
            currency (str): Currency code for the data. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).. [optional]  # noqa: E501
            value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value of the data metric requested. Note that the type of value is 'object', and depending on the data metric requested, the value could be an object representation of a string or double. . [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                                     f"class with read only attributes.")

"""
    FactSet Fundamentals API

    Gain access to current, comprehensive, and comparative information on securities in worldwide developed and emerging markets. Composed of annual and interim/quarterly data, detailed historical financial statement content, per share data, and calculated ratios, FactSet Fundamentals provides you with the information you need for a global investment perspective.   # noqa: E501

    The version of the OpenAPI document: 1.0.2
    Contact: <EMAIL>
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from fds.sdk.FactSetFundamentals.model_utils import (  # noqa: F401
    ApiTypeError,
    ModelComposed,
    ModelNormal,
    ModelSimple,
    cached_property,
    change_keys_js_to_python,
    convert_js_args_to_python_args,
    date,
    datetime,
    file_type,
    none_type,
    validate_get_composed_info,
    OpenApiModel
)
from fds.sdk.FactSetFundamentals.exceptions import ApiAttributeError



class Fundamental(ModelNormal):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Attributes:
      allowed_values (dict): The key is the tuple path to the attribute
          and the for var_name this is (var_name,). The value is a dict
          with a capitalized key describing the allowed value and an allowed
          value. These dicts store the allowed enum values.
      attribute_map (dict): The key is attribute name
          and the value is json key in definition.
      discriminator_value_class_map (dict): A dict to go from the discriminator
          variable value to the discriminator class name.
      validations (dict): The key is the tuple path to the attribute
          and the for var_name this is (var_name,). The value is a dict
          that stores validations for max_length, min_length, max_items,
          min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
          inclusive_minimum, and regex.
      additional_properties_type (tuple): A tuple of classes accepted
          as additional properties values.
    """

    allowed_values = {
        ('periodicity',): {
            'ANN': "ANN",
            'ANN_R': "ANN_R",
            'QTR': "QTR",
            'QTR_R': "QTR_R",
            'SEMI': "SEMI",
            'CAL': "CAL",
            'LTM': "LTM",
            'LTMSG': "LTMSG",
            'YTD': "YTD",
        },
    }

    validations = {
    }

    @cached_property
    def additional_properties_type():
        """
        This must be a method because a model may have properties that are
        of type self, this must run after the class is loaded
        """
        return (bool, date, datetime, dict, float, int, list, str, none_type,)  # noqa: E501

    _nullable = False

    @cached_property
    def openapi_types():
        """
        This must be a method because a model may have properties that are
        of type self, this must run after the class is loaded

        Returns
            openapi_types (dict): The key is attribute name
                and the value is attribute type.
        """
        return {
            'request_id': (str,),  # noqa: E501
            'fsym_id': (str,),  # noqa: E501
            'metric': (str,),  # noqa: E501
            'periodicity': (str,),  # noqa: E501
            'fiscal_period': (int,),  # noqa: E501
            'fiscal_year': (int,),  # noqa: E501
            'fiscal_period_length': (int,),  # noqa: E501
            'fiscal_end_date': (date,),  # noqa: E501
            'report_date': (date,),  # noqa: E501
            'eps_report_date': (date,),  # noqa: E501
            'update_type': (int,),  # noqa: E501
            'update_status': (str,),  # noqa: E501
            'currency': (str,),  # noqa: E501
            'value': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},),  # noqa: E501
        }

    @cached_property
    def discriminator():
        return None


    attribute_map = {
        'request_id': 'requestId',  # noqa: E501
        'fsym_id': 'fsymId',  # noqa: E501
        'metric': 'metric',  # noqa: E501
        'periodicity': 'periodicity',  # noqa: E501
        'fiscal_period': 'fiscalPeriod',  # noqa: E501
        'fiscal_year': 'fiscalYear',  # noqa: E501
        'fiscal_period_length': 'fiscalPeriodLength',  # noqa: E501
        'fiscal_end_date': 'fiscalEndDate',  # noqa: E501
        'report_date': 'reportDate',  # noqa: E501
        'eps_report_date': 'epsReportDate',  # noqa: E501
        'update_type': 'updateType',  # noqa: E501
        'update_status': 'updateStatus',  # noqa: E501
        'currency': 'currency',  # noqa: E501
        'value': 'value',  # noqa: E501
    }

    read_only_vars = {
    }

    _composed_schemas = {}

    @classmethod
    @convert_js_args_to_python_args
    def _from_openapi_data(cls, *args, **kwargs):  # noqa: E501
        """Fundamental - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            request_id (str): Identifier that was used for the request.. [optional]  # noqa: E501
            fsym_id (str): FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency. For equities, all primary listings per region and currency are allocated a regional-level permanent identifier. The regional-level permanent identifier will be available once a SEDOL representing the region/currency has been allocated and the identifiers are on FactSet.. [optional]  # noqa: E501
            metric (str): The requested `metric` input, representing the Fundamental Data Item. For a definition of the item please use the /fundamentals/v#/metrics endpoint.. [optional]  # noqa: E501
            periodicity (str): Periodicity or frequency of the fiscal periods, where ANN = Annual Original, ANN_R = Annual Latest, QTR = Quarterly Original, QTR_R = Quarterly Latest, SEMI = Semi-Annual, LTM = Last Twelve Months, LTMSG = Last Twelve Months Global [OA17959](https://my.apps.factset.com/oa/pages/17959) and YTD = Year-to-date.. [optional]  # noqa: E501
            fiscal_period (int): Fiscal Period indicator. Returns an integer representing the fiscal period for the requested item and periodicity. QUARTERLY CODE: 1-Fist Quarter; 2-Second Quarter; 3-Third Quarter; 4-Fourth Quarter. SEMI-CODE: 1-First Semi-annual Period; 2-Second Semi-annual Period.. [optional]  # noqa: E501
            fiscal_year (int): Fiscal year of the reported period in YYYY format.. [optional]  # noqa: E501
            fiscal_period_length (int): Length of fiscal period in days.. [optional]  # noqa: E501
            fiscal_end_date (date): The normalized data the fiscal period ended.. [optional]  # noqa: E501
            report_date (date): The date the reported fiscal period actually ended.. [optional]  # noqa: E501
            eps_report_date (date): The date the EPS was reported for the requested periodicity. In YYYY-MM-DD format. Unavailable data returned as 0001-01-01.. [optional]  # noqa: E501
            update_type (int): The update type, where: 1 = Preliminary; 2 = FAST; 3 = Final. For more details, visit [Online Assistant Page #D13094](https://oa.apps.factset.com/pages/D13094).. [optional]  # noqa: E501
            update_status (str): Update Status Flag: P = Preliminary - The period is updated from a report that usually contains limited or only key information., F = Final - The period is updated from a report where detailed information are available in financial statements including the notes to the line items.. [optional]  # noqa: E501
            currency (str): Currency code for the data. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).. [optional]  # noqa: E501
            value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value of the data metric requested. Note that the type of value is 'object', and depending on the data metric requested, the value could be an object representation of a string or double. . [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        self = super(OpenApiModel, cls).__new__(cls)

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
        return self

    required_properties = set([
        '_data_store',
        '_check_type',
        '_spec_property_naming',
        '_path_to_item',
        '_configuration',
        '_visited_composed_classes',
    ])

    @convert_js_args_to_python_args
    def __init__(self, *args, **kwargs):  # noqa: E501
        """Fundamental - a model defined in OpenAPI

        Keyword Args:
            _check_type (bool): if True, values for parameters in openapi_types
                                will be type checked and a TypeError will be
                                raised if the wrong type is input.
                                Defaults to True
            _path_to_item (tuple/list): This is a list of keys or values to
                                drill down to the model in received_data
                                when deserializing a response
            _spec_property_naming (bool): True if the variable names in the input data
                                are serialized names, as specified in the OpenAPI document.
                                False if the variable names in the input data
                                are pythonic names, e.g. snake case (default)
            _configuration (Configuration): the instance to use when
                                deserializing a file_type parameter.
                                If passed, type conversion is attempted
                                If omitted no type conversion is done.
            _visited_composed_classes (tuple): This stores a tuple of
                                classes that we have traveled through so that
                                if we see that class again we will not use its
                                discriminator again.
                                When traveling through a discriminator, the
                                composed schema that is
                                is traveled through is added to this set.
                                For example if Animal has a discriminator
                                petType and we pass in "Dog", and the class Dog
                                allOf includes Animal, we move through Animal
                                once using the discriminator, and pick Dog.
                                Then in Dog, we will make an instance of the
                                Animal class but this time we won't travel
                                through its discriminator because we passed in
                                _visited_composed_classes = (Animal,)
            request_id (str): Identifier that was used for the request.. [optional]  # noqa: E501
            fsym_id (str): FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency. For equities, all primary listings per region and currency are allocated a regional-level permanent identifier. The regional-level permanent identifier will be available once a SEDOL representing the region/currency has been allocated and the identifiers are on FactSet.. [optional]  # noqa: E501
            metric (str): The requested `metric` input, representing the Fundamental Data Item. For a definition of the item please use the /fundamentals/v#/metrics endpoint.. [optional]  # noqa: E501
            periodicity (str): Periodicity or frequency of the fiscal periods, where ANN = Annual Original, ANN_R = Annual Latest, QTR = Quarterly Original, QTR_R = Quarterly Latest, SEMI = Semi-Annual, LTM = Last Twelve Months, LTMSG = Last Twelve Months Global [OA17959](https://my.apps.factset.com/oa/pages/17959) and YTD = Year-to-date.. [optional]  # noqa: E501
            fiscal_period (int): Fiscal Period indicator. Returns an integer representing the fiscal period for the requested item and periodicity. QUARTERLY CODE: 1-Fist Quarter; 2-Second Quarter; 3-Third Quarter; 4-Fourth Quarter. SEMI-CODE: 1-First Semi-annual Period; 2-Second Semi-annual Period.. [optional]  # noqa: E501
            fiscal_year (int): Fiscal year of the reported period in YYYY format.. [optional]  # noqa: E501
            fiscal_period_length (int): Length of fiscal period in days.. [optional]  # noqa: E501
            fiscal_end_date (date): The normalized data the fiscal period ended.. [optional]  # noqa: E501
            report_date (date): The date the reported fiscal period actually ended.. [optional]  # noqa: E501
            eps_report_date (date): The date the EPS was reported for the requested periodicity. In YYYY-MM-DD format. Unavailable data returned as 0001-01-01.. [optional]  # noqa: E501
            update_type (int): The update type, where: 1 = Preliminary; 2 = FAST; 3 = Final. For more details, visit [Online Assistant Page #D13094](https://oa.apps.factset.com/pages/D13094).. [optional]  # noqa: E501
            update_status (str): Update Status Flag: P = Preliminary - The period is updated from a report that usually contains limited or only key information., F = Final - The period is updated from a report where detailed information are available in financial statements including the notes to the line items.. [optional]  # noqa: E501
            currency (str): Currency code for the data. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).. [optional]  # noqa: E501
            value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value of the data metric requested. Note that the type of value is 'object', and depending on the data metric requested, the value could be an object representation of a string or double. . [optional]  # noqa: E501
        """

        _check_type = kwargs.pop('_check_type', True)
        _spec_property_naming = kwargs.pop('_spec_property_naming', False)
        _path_to_item = kwargs.pop('_path_to_item', ())
        _configuration = kwargs.pop('_configuration', None)
        _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())

        if args:
            raise ApiTypeError(
                "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
                    args,
                    self.__class__.__name__,
                ),
                path_to_item=_path_to_item,
                valid_classes=(self.__class__,),
            )

        self._data_store = {}
        self._check_type = _check_type
        self._spec_property_naming = _spec_property_naming
        self._path_to_item = _path_to_item
        self._configuration = _configuration
        self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

        for var_name, var_value in kwargs.items():
            if var_name not in self.attribute_map and \
                        self._configuration is not None and \
                        self._configuration.discard_unknown_keys and \
                        self.additional_properties_type is None:
                # discard variable.
                continue
            setattr(self, var_name, var_value)
            if var_name in self.read_only_vars:
                raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
                                     f"class with read only attributes.")

FactSet Fundamentals API      Gain access to current, comprehensive, and comparative information on securities in worldwide developed and emerging markets. Composed of annual and interim/quarterly data, detailed historical financial statement content, per share data, and calculated ratios, FactSet Fundamentals provides you with the information you need for a global investment perspective.   # noqa: E501      The version of the OpenAPI document: 1.0.2     Contact: <EMAIL>     Generated by: https://openapi-generator.tech # noqa: F401 # noqa: F401 # noqa: F401 NOTE: This class is auto generated by OpenAPI Generator.     Ref: https://openapi-generator.tech      Do not edit the class manually.      Attributes:       allowed_values (dict): The key is the tuple path to the attribute           and the for var_name this is (var_name,). The value is a dict           with a capitalized key describing the allowed value and an allowed           value. These dicts store the allowed enum values.       attribute_map (dict): The key is attribute name           and the value is json key in definition.       discriminator_value_class_map (dict): A dict to go from the discriminator           variable value to the discriminator class name.       validations (dict): The key is the tuple path to the attribute           and the for var_name this is (var_name,). The value is a dict           that stores validations for max_length, min_length, max_items,           min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,           inclusive_minimum, and regex.       additional_properties_type (tuple): A tuple of classes accepted           as additional properties values. This must be a method because a model may have properties that are         of type self, this must run after the class is loaded # noqa: E501 This must be a method because a model may have properties that are         of type self, this must run after the class is loaded          Returns             openapi_types (dict): The key is attribute name                 and the value is attribute type. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 Fundamental - a model defined in OpenAPI          Keyword Args:             _check_type (bool): if True, values for parameters in openapi_types                                 will be type checked and a TypeError will be                                 raised if the wrong type is input.                                 Defaults to True             _path_to_item (tuple/list): This is a list of keys or values to                                 drill down to the model in received_data                                 when deserializing a response             _spec_property_naming (bool): True if the variable names in the input data                                 are serialized names, as specified in the OpenAPI document.                                 False if the variable names in the input data                                 are pythonic names, e.g. snake case (default)             _configuration (Configuration): the instance to use when                                 deserializing a file_type parameter.                                 If passed, type conversion is attempted                                 If omitted no type conversion is done.             _visited_composed_classes (tuple): This stores a tuple of                                 classes that we have traveled through so that                                 if we see that class again we will not use its                                 discriminator again.                                 When traveling through a discriminator, the                                 composed schema that is                                 is traveled through is added to this set.                                 For example if Animal has a discriminator                                 petType and we pass in "Dog", and the class Dog                                 allOf includes Animal, we move through Animal                                 once using the discriminator, and pick Dog.                                 Then in Dog, we will make an instance of the                                 Animal class but this time we won't travel                                 through its discriminator because we passed in                                 _visited_composed_classes = (Animal,)             request_id (str): Identifier that was used for the request.. [optional]  # noqa: E501             fsym_id (str): FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency. For equities, all primary listings per region and currency are allocated a regional-level permanent identifier. The regional-level permanent identifier will be available once a SEDOL representing the region/currency has been allocated and the identifiers are on FactSet.. [optional]  # noqa: E501             metric (str): The requested `metric` input, representing the Fundamental Data Item. For a definition of the item please use the /fundamentals/v#/metrics endpoint.. [optional]  # noqa: E501             periodicity (str): Periodicity or frequency of the fiscal periods, where ANN = Annual Original, ANN_R = Annual Latest, QTR = Quarterly Original, QTR_R = Quarterly Latest, SEMI = Semi-Annual, LTM = Last Twelve Months, LTMSG = Last Twelve Months Global [OA17959](https://my.apps.factset.com/oa/pages/17959) and YTD = Year-to-date.. [optional]  # noqa: E501             fiscal_period (int): Fiscal Period indicator. Returns an integer representing the fiscal period for the requested item and periodicity. QUARTERLY CODE: 1-Fist Quarter; 2-Second Quarter; 3-Third Quarter; 4-Fourth Quarter. SEMI-CODE: 1-First Semi-annual Period; 2-Second Semi-annual Period.. [optional]  # noqa: E501             fiscal_year (int): Fiscal year of the reported period in YYYY format.. [optional]  # noqa: E501             fiscal_period_length (int): Length of fiscal period in days.. [optional]  # noqa: E501             fiscal_end_date (date): The normalized data the fiscal period ended.. [optional]  # noqa: E501             report_date (date): The date the reported fiscal period actually ended.. [optional]  # noqa: E501             eps_report_date (date): The date the EPS was reported for the requested periodicity. In YYYY-MM-DD format. Unavailable data returned as 0001-01-01.. [optional]  # noqa: E501             update_type (int): The update type, where: 1 = Preliminary; 2 = FAST; 3 = Final. For more details, visit [Online Assistant Page #D13094](https://oa.apps.factset.com/pages/D13094).. [optional]  # noqa: E501             update_status (str): Update Status Flag: P = Preliminary - The period is updated from a report that usually contains limited or only key information., F = Final - The period is updated from a report where detailed information are available in financial statements including the notes to the line items.. [optional]  # noqa: E501             currency (str): Currency code for the data. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).. [optional]  # noqa: E501             value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value of the data metric requested. Note that the type of value is 'object', and depending on the data metric requested, the value could be an object representation of a string or double. . [optional]  # noqa: E501 # discard variable. # noqa: E501 Fundamental - a model defined in OpenAPI          Keyword Args:             _check_type (bool): if True, values for parameters in openapi_types                                 will be type checked and a TypeError will be                                 raised if the wrong type is input.                                 Defaults to True             _path_to_item (tuple/list): This is a list of keys or values to                                 drill down to the model in received_data                                 when deserializing a response             _spec_property_naming (bool): True if the variable names in the input data                                 are serialized names, as specified in the OpenAPI document.                                 False if the variable names in the input data                                 are pythonic names, e.g. snake case (default)             _configuration (Configuration): the instance to use when                                 deserializing a file_type parameter.                                 If passed, type conversion is attempted                                 If omitted no type conversion is done.             _visited_composed_classes (tuple): This stores a tuple of                                 classes that we have traveled through so that                                 if we see that class again we will not use its                                 discriminator again.                                 When traveling through a discriminator, the                                 composed schema that is                                 is traveled through is added to this set.                                 For example if Animal has a discriminator                                 petType and we pass in "Dog", and the class Dog                                 allOf includes Animal, we move through Animal                                 once using the discriminator, and pick Dog.                                 Then in Dog, we will make an instance of the                                 Animal class but this time we won't travel                                 through its discriminator because we passed in                                 _visited_composed_classes = (Animal,)             request_id (str): Identifier that was used for the request.. [optional]  # noqa: E501             fsym_id (str): FactSet Regional Security Identifier. Six alpha-numeric characters, excluding vowels, with an -R suffix (XXXXXX-R). Identifies the security's best regional security data series per currency. For equities, all primary listings per region and currency are allocated a regional-level permanent identifier. The regional-level permanent identifier will be available once a SEDOL representing the region/currency has been allocated and the identifiers are on FactSet.. [optional]  # noqa: E501             metric (str): The requested `metric` input, representing the Fundamental Data Item. For a definition of the item please use the /fundamentals/v#/metrics endpoint.. [optional]  # noqa: E501             periodicity (str): Periodicity or frequency of the fiscal periods, where ANN = Annual Original, ANN_R = Annual Latest, QTR = Quarterly Original, QTR_R = Quarterly Latest, SEMI = Semi-Annual, LTM = Last Twelve Months, LTMSG = Last Twelve Months Global [OA17959](https://my.apps.factset.com/oa/pages/17959) and YTD = Year-to-date.. [optional]  # noqa: E501             fiscal_period (int): Fiscal Period indicator. Returns an integer representing the fiscal period for the requested item and periodicity. QUARTERLY CODE: 1-Fist Quarter; 2-Second Quarter; 3-Third Quarter; 4-Fourth Quarter. SEMI-CODE: 1-First Semi-annual Period; 2-Second Semi-annual Period.. [optional]  # noqa: E501             fiscal_year (int): Fiscal year of the reported period in YYYY format.. [optional]  # noqa: E501             fiscal_period_length (int): Length of fiscal period in days.. [optional]  # noqa: E501             fiscal_end_date (date): The normalized data the fiscal period ended.. [optional]  # noqa: E501             report_date (date): The date the reported fiscal period actually ended.. [optional]  # noqa: E501             eps_report_date (date): The date the EPS was reported for the requested periodicity. In YYYY-MM-DD format. Unavailable data returned as 0001-01-01.. [optional]  # noqa: E501             update_type (int): The update type, where: 1 = Preliminary; 2 = FAST; 3 = Final. For more details, visit [Online Assistant Page #D13094](https://oa.apps.factset.com/pages/D13094).. [optional]  # noqa: E501             update_status (str): Update Status Flag: P = Preliminary - The period is updated from a report that usually contains limited or only key information., F = Final - The period is updated from a report where detailed information are available in financial statements including the notes to the line items.. [optional]  # noqa: E501             currency (str): Currency code for the data. For a list of currency ISO codes, visit [Online Assistant Page #1470](https://oa.apps.factset.com/pages/1470).. [optional]  # noqa: E501             value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value of the data metric requested. Note that the type of value is 'object', and depending on the data metric requested, the value could be an object representation of a string or double. . [optional]  # noqa: E501 # discard variable.